MODFLOW 6  version 6.9.0.dev0
USGS Modular Hydrologic Model
tspaptmodule Module Reference

Data Types

type  tspapttype
 

Functions/Subroutines

subroutine apt_ac (this, moffset, sparse)
 Add package connection to matrix. More...
 
subroutine apt_mc (this, moffset, matrix_sln)
 Advanced package transport map package connections to matrix. More...
 
subroutine apt_ar (this)
 Advanced package transport allocate and read (ar) routine. More...
 
subroutine apt_rp (this)
 Advanced package transport read and prepare (rp) routine. More...
 
subroutine apt_ad_chk (this)
 
integer(i4b) function apt_check_valid (this, itemno)
 Advanced package transport routine. More...
 
real(dp) function, dimension(:), pointer, contiguous get_mvr_depvar (this)
 Advanced package transport utility function. More...
 
subroutine apt_ad (this)
 Advanced package transport routine. More...
 
subroutine apt_ad_resync (this)
 Per-timestep TS re-sync and state update. More...
 
subroutine apt_ad_ts (this)
 Virtual hook: called every timestep, after the time series manager advances, before apt_ad_chk. No-op extension point for packages to override. More...
 
real(dp) function apt_setting_value (this, itemno, key)
 Virtual hook: value for a package-specific PERIOD setting. Override in individual packages to supply the already-resolved value for a PERIOD field beyond STATUS, CONCENTRATION/TEMPERATURE, and AUXILIARY, so the shared apt_rp table echo can print it. More...
 
subroutine apt_reset (this)
 Override bnd reset for custom mover logic. More...
 
subroutine apt_fc (this, rhs, ia, idxglo, matrix_sln)
 
subroutine apt_fc_nonexpanded (this, rhs, ia, idxglo, matrix_sln)
 Advanced package transport fill coefficient (fc) method. More...
 
subroutine apt_fc_expanded (this, rhs, ia, idxglo, matrix_sln)
 Advanced package transport fill coefficient (fc) method. More...
 
subroutine pak_fc_expanded (this, rhs, ia, idxglo, matrix_sln)
 Advanced package transport fill coefficient (fc) method. More...
 
subroutine apt_cfupdate (this)
 Advanced package transport routine. More...
 
subroutine apt_cq (this, x, flowja, iadv)
 Advanced package transport calculate flows (cq) routine. More...
 
subroutine apt_ot_package_flows (this, icbcfl, ibudfl)
 Save advanced package flows routine. More...
 
subroutine apt_ot_dv (this, idvsave, idvprint)
 
subroutine apt_ot_bdsummary (this, kstp, kper, iout, ibudfl)
 Print advanced package transport dependent variables. More...
 
subroutine allocate_scalars (this)
 @ brief Allocate scalars More...
 
subroutine apt_allocate_index_arrays (this)
 @ brief Allocate index arrays More...
 
subroutine apt_allocate_arrays (this)
 @ brief Allocate arrays More...
 
subroutine apt_da (this)
 @ brief Deallocate memory More...
 
subroutine find_apt_package (this)
 Find corresponding advanced package transport package. More...
 
subroutine apt_source_options (this)
 Source OPTIONS block from the input context. More...
 
subroutine apt_source_dimensions (this)
 Source DIMENSIONS from the flow package; allocate package arrays. More...
 
subroutine apt_source_cvs (this)
 Source PACKAGEDATA feature information from the input context. More...
 
subroutine apt_read_initial_attr (this)
 Read the initial parameters for an advanced package. More...
 
subroutine apt_solve (this)
 Add terms specific to advanced package transport to the explicit solve. More...
 
subroutine pak_solve (this)
 Add terms specific to advanced package transport features to the explicit solve routine. More...
 
subroutine apt_accumulate_ccterm (this, ilak, rrate, ccratin, ccratout)
 Accumulate constant concentration (or temperature) terms for budget. More...
 
subroutine define_listlabel (this)
 Define the list heading that is written to iout when PRINT_INPUT option is used. More...
 
subroutine apt_set_pointers (this, neq, ibound, xnew, xold, flowja)
 Set pointers to model arrays and variables so that a package has access to these items. More...
 
subroutine apt_get_volumes (this, icv, vnew, vold, delt)
 Return the feature new volume and old volume. More...
 
integer(i4b) function pak_get_nbudterms (this)
 Function to return the number of budget terms just for this package. More...
 
subroutine apt_setup_budobj (this)
 Set up the budget object that stores advanced package flow terms. More...
 
subroutine pak_setup_budobj (this, idx)
 Set up a budget object that stores an advanced package flows. More...
 
subroutine apt_fill_budobj (this, x, flowja)
 Copy flow terms into thisbudobj. More...
 
subroutine pak_fill_budobj (this, idx, x, flowja, ccratin, ccratout)
 Copy flow terms into thisbudobj, must be overridden. More...
 
subroutine apt_stor_term (this, ientry, n1, n2, rrate, rhsval, hcofval)
 Account for mass or energy storage in advanced package features. More...
 
subroutine apt_tmvr_term (this, ientry, n1, n2, rrate, rhsval, hcofval)
 Account for mass or energy transferred to the MVR package. More...
 
subroutine apt_fmvr_term (this, ientry, n1, n2, rrate, rhsval, hcofval)
 Account for mass or energy transferred to this package from the MVR package. More...
 
subroutine apt_fjf_term (this, ientry, n1, n2, rrate, rhsval, hcofval)
 Go through each "within apt-apt" connection (e.g., lkt-lkt, or sft-sft) and accumulate total mass (or energy) in dbuff mass. More...
 
subroutine apt_copy2flowp (this)
 Copy concentrations (or temperatures) into flow package aux variable. More...
 
logical function apt_obs_supported (this)
 Determine whether an obs type is supported. More...
 
subroutine apt_df_obs (this)
 Define observation type. More...
 
subroutine pak_df_obs (this)
 Define apt observation type. More...
 
subroutine pak_rp_obs (this, obsrv, found)
 Process package specific obs. More...
 
subroutine rp_obs_byfeature (this, obsrv)
 Prepare observation. More...
 
subroutine rp_obs_budterm (this, obsrv, budterm)
 Prepare observation. More...
 
subroutine rp_obs_flowjaface (this, obsrv, budterm)
 Prepare observation. More...
 
subroutine apt_rp_obs (this)
 Read and prepare apt-related observations. More...
 
subroutine apt_bd_obs (this)
 Calculate observation values. More...
 
subroutine pak_bd_obs (this, obstypeid, jj, v, found)
 Check if observation exists in an advanced package. More...
 
subroutine, public apt_process_obsid (obsrv, dis, inunitobs, iout)
 Process observation IDs for an advanced package. More...
 
subroutine, public apt_process_obsid12 (obsrv, dis, inunitobs, iout)
 Process observation IDs for a package. More...
 
subroutine apt_setup_tableobj (this)
 Setup a table object an advanced package. More...
 

Variables

character(len=lenftype) ftype = 'APT'
 
character(len=lenvarname) text = ' APT'
 

Function/Subroutine Documentation

◆ allocate_scalars()

subroutine tspaptmodule::allocate_scalars ( class(tspapttype)  this)

Allocate scalar variables for an advanced package

Definition at line 1012 of file tsp-apt.f90.

1013  ! -- modules
1015  ! -- dummy
1016  class(TspAptType) :: this
1017  ! -- local
1018  !
1019  ! -- allocate scalars in BndExtType
1020  call this%BndExtType%allocate_scalars()
1021  !
1022  ! -- Allocate
1023  call mem_allocate(this%iauxfpconc, 'IAUXFPCONC', this%memoryPath)
1024  call mem_allocate(this%imatrows, 'IMATROWS', this%memoryPath)
1025  call mem_allocate(this%iprconc, 'IPRCONC', this%memoryPath)
1026  call mem_allocate(this%iconcout, 'ICONCOUT', this%memoryPath)
1027  call mem_allocate(this%ibudgetout, 'IBUDGETOUT', this%memoryPath)
1028  call mem_allocate(this%ibudcsv, 'IBUDCSV', this%memoryPath)
1029  call mem_allocate(this%igwfaptpak, 'IGWFAPTPAK', this%memoryPath)
1030  call mem_allocate(this%ncv, 'NCV', this%memoryPath)
1031  call mem_allocate(this%idxbudfjf, 'IDXBUDFJF', this%memoryPath)
1032  call mem_allocate(this%idxbudgwf, 'IDXBUDGWF', this%memoryPath)
1033  call mem_allocate(this%idxbudsto, 'IDXBUDSTO', this%memoryPath)
1034  call mem_allocate(this%idxbudtmvr, 'IDXBUDTMVR', this%memoryPath)
1035  call mem_allocate(this%idxbudfmvr, 'IDXBUDFMVR', this%memoryPath)
1036  call mem_allocate(this%idxbudaux, 'IDXBUDAUX', this%memoryPath)
1037  call mem_allocate(this%nconcbudssm, 'NCONCBUDSSM', this%memoryPath)
1038  call mem_allocate(this%idxprepak, 'IDXPREPAK', this%memoryPath)
1039  call mem_allocate(this%idxlastpak, 'IDXLASTPAK', this%memoryPath)
1040  !
1041  ! -- Initialize
1042  this%iauxfpconc = 0
1043  this%imatrows = 1
1044  this%iprconc = 0
1045  this%iconcout = 0
1046  this%ibudgetout = 0
1047  this%ibudcsv = 0
1048  this%igwfaptpak = 0
1049  this%ncv = 0
1050  this%idxbudfjf = 0
1051  this%idxbudgwf = 0
1052  this%idxbudsto = 0
1053  this%idxbudtmvr = 0
1054  this%idxbudfmvr = 0
1055  this%idxbudaux = 0
1056  this%nconcbudssm = 0
1057  this%idxprepak = 0
1058  this%idxlastpak = 0
1059  !
1060  ! -- set this package as causing asymmetric matrix terms
1061  this%iasym = 1

◆ apt_ac()

subroutine tspaptmodule::apt_ac ( class(tspapttype), intent(inout)  this,
integer(i4b), intent(in)  moffset,
type(sparsematrix), intent(inout)  sparse 
)

Definition at line 200 of file tsp-apt.f90.

202  use sparsemodule, only: sparsematrix
203  ! -- dummy
204  class(TspAptType), intent(inout) :: this
205  integer(I4B), intent(in) :: moffset
206  type(sparsematrix), intent(inout) :: sparse
207  ! -- local
208  integer(I4B) :: i, n
209  integer(I4B) :: jj, jglo
210  integer(I4B) :: nglo
211  ! -- format
212  !
213  ! -- Add package rows to sparse
214  if (this%imatrows /= 0) then
215  !
216  ! -- diagonal
217  do n = 1, this%ncv
218  nglo = moffset + this%dis%nodes + this%ioffset + n
219  call sparse%addconnection(nglo, nglo, 1)
220  end do
221  !
222  ! -- apt-gwf connections
223  do i = 1, this%flowbudptr%budterm(this%idxbudgwf)%nlist
224  n = this%flowbudptr%budterm(this%idxbudgwf)%id1(i)
225  jj = this%flowbudptr%budterm(this%idxbudgwf)%id2(i)
226  nglo = moffset + this%dis%nodes + this%ioffset + n
227  jglo = jj + moffset
228  call sparse%addconnection(nglo, jglo, 1)
229  call sparse%addconnection(jglo, nglo, 1)
230  end do
231  !
232  ! -- apt-apt connections
233  if (this%idxbudfjf /= 0) then
234  do i = 1, this%flowbudptr%budterm(this%idxbudfjf)%maxlist
235  n = this%flowbudptr%budterm(this%idxbudfjf)%id1(i)
236  jj = this%flowbudptr%budterm(this%idxbudfjf)%id2(i)
237  nglo = moffset + this%dis%nodes + this%ioffset + n
238  jglo = moffset + this%dis%nodes + this%ioffset + jj
239  call sparse%addconnection(nglo, jglo, 1)
240  end do
241  end if
242  end if

◆ apt_accumulate_ccterm()

subroutine tspaptmodule::apt_accumulate_ccterm ( class(tspapttype)  this,
integer(i4b), intent(in)  ilak,
real(dp), intent(in)  rrate,
real(dp), intent(inout)  ccratin,
real(dp), intent(inout)  ccratout 
)

Definition at line 1637 of file tsp-apt.f90.

1638  ! -- dummy
1639  class(TspAptType) :: this
1640  integer(I4B), intent(in) :: ilak
1641  real(DP), intent(in) :: rrate
1642  real(DP), intent(inout) :: ccratin
1643  real(DP), intent(inout) :: ccratout
1644  ! -- locals
1645  real(DP) :: q
1646  ! format
1647  ! code
1648  !
1649  if (this%iboundpak(ilak) < 0) then
1650  q = -rrate
1651  this%ccterm(ilak) = this%ccterm(ilak) + q
1652  !
1653  ! -- See if flow is into lake or out of lake.
1654  if (q < dzero) then
1655  !
1656  ! -- Flow is out of lake subtract rate from ratout.
1657  ccratout = ccratout - q
1658  else
1659  !
1660  ! -- Flow is into lake; add rate to ratin.
1661  ccratin = ccratin + q
1662  end if
1663  end if

◆ apt_ad()

subroutine tspaptmodule::apt_ad ( class(tspapttype)  this)

Add package connections to matrix

Definition at line 565 of file tsp-apt.f90.

566  ! -- dummy
567  class(TspAptType) :: this
568  !
569  ! -- sync PACKAGEDATA AUX TS and advance observations
570  call this%BndExtType%bnd_ad()
571  !
572  call this%apt_ad_resync()

◆ apt_ad_chk()

subroutine tspaptmodule::apt_ad_chk ( class(tspapttype), intent(inout)  this)

Definition at line 522 of file tsp-apt.f90.

523  ! -- dummy
524  class(TspAptType), intent(inout) :: this
525  ! function available for override by packages

◆ apt_ad_resync()

subroutine tspaptmodule::apt_ad_resync ( class(tspapttype)  this)

Called directly by packages that override bnd_ad (e.g. SFT/SFE) so apt_ad_ts/apt_ad_chk still dispatch to their own overrides.

Definition at line 580 of file tsp-apt.f90.

581  ! -- modules
583  use tdismodule, only: kstp
584  ! -- dummy
585  class(TspAptType) :: this
586  ! -- local
587  integer(I4B) :: n
588  integer(I4B) :: j, iaux
589  !
590  ! -- re-sync period TS; package-specific fields via apt_ad_ts
591  if (this%ts_active) then
592  call this%apt_ad_ts()
593  end if
594  !
595  ! -- update auxiliary variables by copying from featureauxvar into
596  ! bndpackage auxvar for GWF budget file output; featureauxvar can
597  ! only have changed at period start (kstp==1) or, when TS-active,
598  ! this timestep's apt_ad_ts() call above
599  if (this%naux > 0 .and. (kstp == 1 .or. this%ts_active)) then
600  do j = 1, this%flowbudptr%budterm(this%idxbudgwf)%nlist
601  n = this%flowbudptr%budterm(this%idxbudgwf)%id1(j)
602  do iaux = 1, this%naux
603  this%auxvar(iaux, j) = this%featureauxvar(iaux, n)
604  end do
605  end do
606  end if
607  !
608  ! -- copy xnew into xold and set xnewpak to specified concentration (or
609  ! temperature) for constant concentration/temperature features
610  if (ifailedstepretry == 0) then
611  do n = 1, this%ncv
612  this%xoldpak(n) = this%xnewpak(n)
613  if (this%iboundpak(n) < 0) then
614  this%xnewpak(n) = this%concfeat(n)
615  end if
616  end do
617  else
618  do n = 1, this%ncv
619  this%xnewpak(n) = this%xoldpak(n)
620  if (this%iboundpak(n) < 0) then
621  this%xnewpak(n) = this%concfeat(n)
622  end if
623  end do
624  end if
625  !
626  ! -- run package-specific checks
627  call this%apt_ad_chk()
This module contains simulation variables.
Definition: SimVariables.f90:9
integer(i4b) ifailedstepretry
current retry for this time step
integer(i4b), pointer, public kstp
current time step number
Definition: tdis.f90:27

◆ apt_ad_ts()

subroutine tspaptmodule::apt_ad_ts ( class(tspapttype), intent(inout)  this)

Definition at line 634 of file tsp-apt.f90.

635  ! -- dummy
636  class(TspAptType), intent(inout) :: this

◆ apt_allocate_arrays()

subroutine tspaptmodule::apt_allocate_arrays ( class(tspapttype), intent(inout)  this)

Allocate advanced package transport arrays

Definition at line 1125 of file tsp-apt.f90.

1126  ! -- modules
1128  ! -- dummy
1129  class(TspAptType), intent(inout) :: this
1130  ! -- local
1131  integer(I4B) :: n
1132  !
1133  ! -- call standard BndExtType allocate arrays
1134  call this%BndExtType%allocate_arrays()
1135  !
1136  ! -- Allocate
1137  !
1138  ! -- allocate and initialize dbuff
1139  if (this%iconcout > 0) then
1140  call mem_allocate(this%dbuff, this%ncv, 'DBUFF', this%memoryPath)
1141  do n = 1, this%ncv
1142  this%dbuff(n) = dzero
1143  end do
1144  else
1145  call mem_allocate(this%dbuff, 0, 'DBUFF', this%memoryPath)
1146  end if
1147  !
1148  ! -- allocate character array for status
1149  allocate (this%status(this%ncv))
1150  !
1151  ! -- alias into the input context's permanent, feature-indexed
1152  ! CONCENTRATION/TEMPERATURE array (allocated and DZERO-initialized by
1153  ! the input context)
1154  call mem_setptr(this%concfeat, trim(this%depvartype), this%input_mempath)
1155  !
1156  ! -- budget terms
1157  call mem_allocate(this%qsto, this%ncv, 'QSTO', this%memoryPath)
1158  call mem_allocate(this%ccterm, this%ncv, 'CCTERM', this%memoryPath)
1159  !
1160  ! -- concentration for budget terms
1161  call mem_allocate(this%concbudssm, this%nconcbudssm, this%ncv, &
1162  'CONCBUDSSM', this%memoryPath)
1163  !
1164  ! -- mass (or energy) added from the mover transport package
1165  call mem_allocate(this%qmfrommvr, this%ncv, 'QMFROMMVR', this%memoryPath)
1166  !
1167  ! -- initialize arrays
1168  do n = 1, this%ncv
1169  this%status(n) = 'ACTIVE'
1170  this%qsto(n) = dzero
1171  this%ccterm(n) = dzero
1172  this%qmfrommvr(n) = dzero
1173  this%concbudssm(:, n) = dzero
1174  end do

◆ apt_allocate_index_arrays()

subroutine tspaptmodule::apt_allocate_index_arrays ( class(tspapttype), intent(inout)  this)

Allocate arrays that map to locations in the numerical solution

Definition at line 1068 of file tsp-apt.f90.

1069  ! -- modules
1071  ! -- dummy
1072  class(TspAptType), intent(inout) :: this
1073  ! -- local
1074  integer(I4B) :: n
1075  !
1076  if (this%imatrows /= 0) then
1077  !
1078  ! -- count number of flow-ja-face connections
1079  n = 0
1080  if (this%idxbudfjf /= 0) then
1081  n = this%flowbudptr%budterm(this%idxbudfjf)%maxlist
1082  end if
1083  !
1084  ! -- allocate pointers to global matrix
1085  call mem_allocate(this%idxlocnode, this%ncv, 'IDXLOCNODE', &
1086  this%memoryPath)
1087  call mem_allocate(this%idxpakdiag, this%ncv, 'IDXPAKDIAG', &
1088  this%memoryPath)
1089  call mem_allocate(this%idxdglo, this%maxbound, 'IDXGLO', &
1090  this%memoryPath)
1091  call mem_allocate(this%idxoffdglo, this%maxbound, 'IDXOFFDGLO', &
1092  this%memoryPath)
1093  call mem_allocate(this%idxsymdglo, this%maxbound, 'IDXSYMDGLO', &
1094  this%memoryPath)
1095  call mem_allocate(this%idxsymoffdglo, this%maxbound, 'IDXSYMOFFDGLO', &
1096  this%memoryPath)
1097  call mem_allocate(this%idxfjfdglo, n, 'IDXFJFDGLO', &
1098  this%memoryPath)
1099  call mem_allocate(this%idxfjfoffdglo, n, 'IDXFJFOFFDGLO', &
1100  this%memoryPath)
1101  else
1102  call mem_allocate(this%idxlocnode, 0, 'IDXLOCNODE', &
1103  this%memoryPath)
1104  call mem_allocate(this%idxpakdiag, 0, 'IDXPAKDIAG', &
1105  this%memoryPath)
1106  call mem_allocate(this%idxdglo, 0, 'IDXGLO', &
1107  this%memoryPath)
1108  call mem_allocate(this%idxoffdglo, 0, 'IDXOFFDGLO', &
1109  this%memoryPath)
1110  call mem_allocate(this%idxsymdglo, 0, 'IDXSYMDGLO', &
1111  this%memoryPath)
1112  call mem_allocate(this%idxsymoffdglo, 0, 'IDXSYMOFFDGLO', &
1113  this%memoryPath)
1114  call mem_allocate(this%idxfjfdglo, 0, 'IDXFJFDGLO', &
1115  this%memoryPath)
1116  call mem_allocate(this%idxfjfoffdglo, 0, 'IDXFJFOFFDGLO', &
1117  this%memoryPath)
1118  end if

◆ apt_ar()

subroutine tspaptmodule::apt_ar ( class(tspapttype), intent(inout)  this)

Definition at line 308 of file tsp-apt.f90.

309  ! -- modules
310  ! -- dummy
311  class(TspAptType), intent(inout) :: this
312  ! -- local
313  integer(I4B) :: j
314  logical :: found
315  ! -- formats
316  character(len=*), parameter :: fmtapt = &
317  "(1x,/1x,'APT -- ADVANCED PACKAGE TRANSPORT, VERSION 1, 3/5/2020', &
318  &' INPUT READ FROM UNIT ', i0, //)"
319  !
320  ! -- Get obs setup
321  call this%obs%obs_ar()
322  !
323  ! --print a message identifying the apt package.
324  write (this%iout, fmtapt) this%inunit
325  !
326  ! -- Allocate arrays
327  call this%apt_allocate_arrays()
328  !
329  ! -- read optional initial package parameters
330  call this%read_initial_attr()
331  !
332  ! -- Find the package index in the GWF model or GWF budget file
333  ! for the corresponding apt flow package
334  call this%fmi%get_package_index(this%flowpackagename, this%igwfaptpak)
335  !
336  ! -- Tell fmi that this package is being handled by APT, otherwise
337  ! SSM would handle the flows into GWT from this pack. Then point the
338  ! fmi data for an advanced package to xnewpak and qmfrommvr
339  this%fmi%iatp(this%igwfaptpak) = 1
340  this%fmi%datp(this%igwfaptpak)%concpack => this%get_mvr_depvar()
341  this%fmi%datp(this%igwfaptpak)%qmfrommvr => this%qmfrommvr
342  !
343  ! -- If there is an associated flow package and the user wishes to put
344  ! simulated concentrations (or temperatures) into a aux variable
345  ! column, then find the column number.
346  if (associated(this%flowpackagebnd)) then
347  if (this%cauxfpconc /= '') then
348  found = .false.
349  do j = 1, this%flowpackagebnd%naux
350  if (this%flowpackagebnd%auxname(j) == this%cauxfpconc) then
351  this%iauxfpconc = j
352  found = .true.
353  exit
354  end if
355  end do
356  if (this%iauxfpconc == 0) then
357  errmsg = 'Could not find auxiliary variable '// &
358  trim(adjustl(this%cauxfpconc))//' in flow package '// &
359  trim(adjustl(this%flowpackagename))
360  call store_error(errmsg)
361  call store_error_filename(this%input_fname)
362  else
363  ! -- tell package not to update this auxiliary variable
364  this%flowpackagebnd%noupdateauxvar(this%iauxfpconc) = 1
365  call this%apt_copy2flowp()
366  end if
367  end if
368  end if
Here is the call graph for this function:

◆ apt_bd_obs()

subroutine tspaptmodule::apt_bd_obs ( class(tspapttype)  this)

Routine calculates observations common to SFT/LKT/MWT/UZT (or SFE/LKE/MWE/UZE) for as many TspAptType observations that are common among the advanced transport packages

Definition at line 2582 of file tsp-apt.f90.

2583  ! -- modules
2584  ! -- dummy
2585  class(TspAptType) :: this
2586  ! -- local
2587  integer(I4B) :: i
2588  integer(I4B) :: igwfnode
2589  integer(I4B) :: j
2590  integer(I4B) :: jj
2591  integer(I4B) :: n
2592  integer(I4B) :: n1
2593  integer(I4B) :: n2
2594  real(DP) :: v
2595  type(ObserveType), pointer :: obsrv => null()
2596  logical :: found
2597  !
2598  ! -- Write simulated values for all Advanced Package observations
2599  if (this%obs%npakobs > 0) then
2600  call this%obs%obs_bd_clear()
2601  do i = 1, this%obs%npakobs
2602  obsrv => this%obs%pakobs(i)%obsrv
2603  do j = 1, obsrv%indxbnds_count
2604  v = dnodata
2605  jj = obsrv%indxbnds(j)
2606  select case (obsrv%ObsTypeId)
2607  case ('CONCENTRATION', 'TEMPERATURE')
2608  if (this%iboundpak(jj) /= 0) then
2609  v = this%xnewpak(jj)
2610  end if
2611  case ('LKT', 'SFT', 'MWT', 'UZT', 'LKE', 'SFE', 'MWE', 'UZE')
2612  n = this%flowbudptr%budterm(this%idxbudgwf)%id1(jj)
2613  if (this%iboundpak(n) /= 0) then
2614  igwfnode = this%flowbudptr%budterm(this%idxbudgwf)%id2(jj)
2615  v = this%hcof(jj) * this%xnew(igwfnode) - this%rhs(jj)
2616  v = -v
2617  end if
2618  case ('FLOW-JA-FACE')
2619  n = this%flowbudptr%budterm(this%idxbudfjf)%id1(jj)
2620  if (this%iboundpak(n) /= 0) then
2621  call this%apt_fjf_term(jj, n1, n2, v)
2622  end if
2623  case ('STORAGE')
2624  if (this%iboundpak(jj) /= 0) then
2625  v = this%qsto(jj)
2626  end if
2627  case ('CONSTANT')
2628  if (this%iboundpak(jj) /= 0) then
2629  v = this%ccterm(jj)
2630  end if
2631  case ('FROM-MVR')
2632  if (this%iboundpak(jj) /= 0 .and. this%idxbudfmvr > 0) then
2633  call this%apt_fmvr_term(jj, n1, n2, v)
2634  end if
2635  case ('TO-MVR')
2636  if (this%idxbudtmvr > 0) then
2637  n = this%flowbudptr%budterm(this%idxbudtmvr)%id1(jj)
2638  if (this%iboundpak(n) /= 0) then
2639  call this%apt_tmvr_term(jj, n1, n2, v)
2640  end if
2641  end if
2642  case default
2643  found = .false.
2644  !
2645  ! -- check the child package for any specific obs
2646  call this%pak_bd_obs(obsrv%ObsTypeId, jj, v, found)
2647  !
2648  ! -- if none found then terminate with an error
2649  if (.not. found) then
2650  errmsg = 'Unrecognized observation type "'// &
2651  trim(obsrv%ObsTypeId)//'" for '// &
2652  trim(adjustl(this%text))//' package '// &
2653  trim(this%packName)
2654  call store_error(errmsg, terminate=.true.)
2655  end if
2656  end select
2657  call this%obs%SaveOneSimval(obsrv, v)
2658  end do
2659  end do
2660  !
2661  ! -- write summary of error messages
2662  if (count_errors() > 0) then
2663  call store_error_unit(this%obs%inunitobs)
2664  end if
2665  end if
Here is the call graph for this function:

◆ apt_cfupdate()

subroutine tspaptmodule::apt_cfupdate ( class(tspapttype)  this)

Calculate advanced package transport hcof and rhs so transport budget is calculated.

Definition at line 845 of file tsp-apt.f90.

846  ! -- modules
847  ! -- dummy
848  class(TspAptType) :: this
849  ! -- local
850  integer(I4B) :: j, n
851  real(DP) :: qbnd
852  real(DP) :: omega
853  !
854  ! -- Calculate hcof and rhs terms so GWF exchanges are calculated correctly
855  ! -- go through each apt-gwf connection and calculate
856  ! rhs and hcof terms for gwt/gwe matrix rows
857  do j = 1, this%flowbudptr%budterm(this%idxbudgwf)%nlist
858  n = this%flowbudptr%budterm(this%idxbudgwf)%id1(j)
859  this%hcof(j) = dzero
860  this%rhs(j) = dzero
861  if (this%iboundpak(n) /= 0) then
862  qbnd = this%flowbudptr%budterm(this%idxbudgwf)%flow(j)
863  omega = dzero
864  if (qbnd < dzero) omega = done
865  this%hcof(j) = -(done - omega) * qbnd * this%eqnsclfac
866  this%rhs(j) = omega * qbnd * this%xnewpak(n) * this%eqnsclfac
867  end if
868  end do

◆ apt_check_valid()

integer(i4b) function tspaptmodule::apt_check_valid ( class(tspapttype), intent(inout)  this,
integer(i4b), intent(in)  itemno 
)

Determine if a valid feature number has been specified.

Definition at line 532 of file tsp-apt.f90.

533  ! -- return
534  integer(I4B) :: ierr
535  ! -- dummy
536  class(TspAptType), intent(inout) :: this
537  integer(I4B), intent(in) :: itemno
538  ! -- formats
539  ierr = 0
540  if (itemno < 1 .or. itemno > this%ncv) then
541  write (errmsg, '(a,1x,i6,1x,a,1x,i6)') &
542  'Featureno ', itemno, 'must be > 0 and <= ', this%ncv
543  call store_error(errmsg)
544  ierr = 1
545  end if
Here is the call graph for this function:

◆ apt_copy2flowp()

subroutine tspaptmodule::apt_copy2flowp ( class(tspapttype)  this)

Definition at line 2228 of file tsp-apt.f90.

2229  ! -- modules
2230  ! -- dummy
2231  class(TspAptType) :: this
2232  ! -- local
2233  integer(I4B) :: n, j
2234  !
2235  ! -- copy
2236  if (this%iauxfpconc /= 0) then
2237  !
2238  ! -- go through each apt-gwf connection
2239  do j = 1, this%flowbudptr%budterm(this%idxbudgwf)%nlist
2240  !
2241  ! -- set n to feature number and process if active feature
2242  n = this%flowbudptr%budterm(this%idxbudgwf)%id1(j)
2243  this%flowpackagebnd%auxvar(this%iauxfpconc, j) = this%xnewpak(n)
2244  end do
2245  end if

◆ apt_cq()

subroutine tspaptmodule::apt_cq ( class(tspapttype), intent(inout)  this,
real(dp), dimension(:), intent(in)  x,
real(dp), dimension(:), intent(inout), contiguous  flowja,
integer(i4b), intent(in), optional  iadv 
)

Calculate flows for the advanced package transport feature

Definition at line 875 of file tsp-apt.f90.

876  ! -- modules
877  ! -- dummy
878  class(TspAptType), intent(inout) :: this
879  real(DP), dimension(:), intent(in) :: x
880  real(DP), dimension(:), contiguous, intent(inout) :: flowja
881  integer(I4B), optional, intent(in) :: iadv
882  ! -- local
883  integer(I4B) :: n, n1, n2
884  real(DP) :: rrate
885  !
886  ! -- Solve the feature concentrations (or temperatures) again or update
887  ! the feature hcof and rhs terms
888  if (this%imatrows == 0) then
889  call this%apt_solve()
890  else
891  call this%apt_cfupdate()
892  end if
893  !
894  ! -- call base functionality in bnd_cq
895  call this%BndType%bnd_cq(x, flowja)
896  !
897  ! -- calculate storage term
898  do n = 1, this%ncv
899  rrate = dzero
900  if (this%iboundpak(n) > 0) then
901  call this%apt_stor_term(n, n1, n2, rrate)
902  end if
903  this%qsto(n) = rrate
904  end do
905  !
906  ! -- Copy concentrations (or temperatures) into the flow package auxiliary variable
907  call this%apt_copy2flowp()
908  !
909  ! -- fill the budget object
910  call this%apt_fill_budobj(x, flowja)

◆ apt_da()

subroutine tspaptmodule::apt_da ( class(tspapttype)  this)

Deallocate memory associated with this package

Definition at line 1181 of file tsp-apt.f90.

1182  ! -- modules
1184  ! -- dummy
1185  class(TspAptType) :: this
1186  ! -- local
1187  !
1188  ! -- deallocate arrays
1189  call mem_deallocate(this%dbuff)
1190  call mem_deallocate(this%qsto)
1191  call mem_deallocate(this%ccterm)
1192  call mem_deallocate(this%strt)
1193  call mem_deallocate(this%xoldpak)
1194  if (this%imatrows == 0) then
1195  call mem_deallocate(this%iboundpak)
1196  call mem_deallocate(this%xnewpak)
1197  end if
1198  call mem_deallocate(this%concbudssm)
1199  nullify (this%concfeat) ! input-context-owned alias, not package-allocated
1200  call mem_deallocate(this%qmfrommvr)
1201  deallocate (this%status)
1202  deallocate (this%featname)
1203  !
1204  ! -- budobj
1205  call this%budobj%budgetobject_da()
1206  deallocate (this%budobj)
1207  nullify (this%budobj)
1208  !
1209  ! -- conc table
1210  if (this%iprconc > 0) then
1211  call this%dvtab%table_da()
1212  deallocate (this%dvtab)
1213  nullify (this%dvtab)
1214  end if
1215  !
1216  ! -- index pointers
1217  call mem_deallocate(this%idxlocnode)
1218  call mem_deallocate(this%idxpakdiag)
1219  call mem_deallocate(this%idxdglo)
1220  call mem_deallocate(this%idxoffdglo)
1221  call mem_deallocate(this%idxsymdglo)
1222  call mem_deallocate(this%idxsymoffdglo)
1223  call mem_deallocate(this%idxfjfdglo)
1224  call mem_deallocate(this%idxfjfoffdglo)
1225  !
1226  ! -- deallocate scalars
1227  call mem_deallocate(this%iauxfpconc)
1228  call mem_deallocate(this%imatrows)
1229  call mem_deallocate(this%iprconc)
1230  call mem_deallocate(this%iconcout)
1231  call mem_deallocate(this%ibudgetout)
1232  call mem_deallocate(this%ibudcsv)
1233  call mem_deallocate(this%igwfaptpak)
1234  call mem_deallocate(this%ncv)
1235  call mem_deallocate(this%idxbudfjf)
1236  call mem_deallocate(this%idxbudgwf)
1237  call mem_deallocate(this%idxbudsto)
1238  call mem_deallocate(this%idxbudtmvr)
1239  call mem_deallocate(this%idxbudfmvr)
1240  call mem_deallocate(this%idxbudaux)
1241  call mem_deallocate(this%idxbudssm)
1242  call mem_deallocate(this%nconcbudssm)
1243  call mem_deallocate(this%idxprepak)
1244  call mem_deallocate(this%idxlastpak)
1245  !
1246  ! -- deallocate scalars in BndExtType
1247  call this%BndExtType%bnd_da()

◆ apt_df_obs()

subroutine tspaptmodule::apt_df_obs ( class(tspapttype)  this)

This routine:

  • stores observation types supported by APT package.
  • overrides BndTypebnd_df_obs

Definition at line 2269 of file tsp-apt.f90.

2270  ! -- modules
2271  ! -- dummy
2272  class(TspAptType) :: this
2273  ! -- local
2274  !
2275  ! -- call additional specific observations for lkt, sft, mwt, and uzt
2276  call this%pak_df_obs()

◆ apt_fc()

subroutine tspaptmodule::apt_fc ( class(tspapttype)  this,
real(dp), dimension(:), intent(inout)  rhs,
integer(i4b), dimension(:), intent(in)  ia,
integer(i4b), dimension(:), intent(in)  idxglo,
class(matrixbasetype), pointer  matrix_sln 
)

Definition at line 664 of file tsp-apt.f90.

665  ! -- modules
666  ! -- dummy
667  class(TspAptType) :: this
668  real(DP), dimension(:), intent(inout) :: rhs
669  integer(I4B), dimension(:), intent(in) :: ia
670  integer(I4B), dimension(:), intent(in) :: idxglo
671  class(MatrixBaseType), pointer :: matrix_sln
672  ! -- local
673  !
674  ! -- Call fc depending on whether or not a matrix is expanded or not
675  if (this%imatrows == 0) then
676  call this%apt_fc_nonexpanded(rhs, ia, idxglo, matrix_sln)
677  else
678  call this%apt_fc_expanded(rhs, ia, idxglo, matrix_sln)
679  end if

◆ apt_fc_expanded()

subroutine tspaptmodule::apt_fc_expanded ( class(tspapttype)  this,
real(dp), dimension(:), intent(inout)  rhs,
integer(i4b), dimension(:), intent(in)  ia,
integer(i4b), dimension(:), intent(in)  idxglo,
class(matrixbasetype), pointer  matrix_sln 
)

Routine to formulate the expanded matrix case in which new rows are added to the system of equations for each advanced package transport feature

Definition at line 716 of file tsp-apt.f90.

717  ! -- modules
718  ! -- dummy
719  class(TspAptType) :: this
720  real(DP), dimension(:), intent(inout) :: rhs
721  integer(I4B), dimension(:), intent(in) :: ia
722  integer(I4B), dimension(:), intent(in) :: idxglo
723  class(MatrixBaseType), pointer :: matrix_sln
724  ! -- local
725  integer(I4B) :: j, n, n1, n2
726  integer(I4B) :: iloc
727  integer(I4B) :: iposd, iposoffd
728  integer(I4B) :: ipossymd, ipossymoffd
729  real(DP) :: cold
730  real(DP) :: qbnd, qbnd_scaled
731  real(DP) :: omega
732  real(DP) :: rrate
733  real(DP) :: rhsval
734  real(DP) :: hcofval
735  !
736  ! -- call the specific method for the advanced transport package, such as
737  ! what would be overridden by
738  ! GwtLktType, GwtSftType, GwtMwtType, GwtUztType
739  ! This routine will add terms for rainfall, runoff, or other terms
740  ! specific to the package
741  call this%pak_fc_expanded(rhs, ia, idxglo, matrix_sln)
742  !
743  ! -- mass (or energy) storage in features
744  do n = 1, this%ncv
745  cold = this%xoldpak(n)
746  iloc = this%idxlocnode(n)
747  iposd = this%idxpakdiag(n)
748  call this%apt_stor_term(n, n1, n2, rrate, rhsval, hcofval)
749  call matrix_sln%add_value_pos(iposd, hcofval)
750  rhs(iloc) = rhs(iloc) + rhsval
751  end do
752  !
753  ! -- add to mover contribution
754  if (this%idxbudtmvr /= 0) then
755  do j = 1, this%flowbudptr%budterm(this%idxbudtmvr)%nlist
756  call this%apt_tmvr_term(j, n1, n2, rrate, rhsval, hcofval)
757  iloc = this%idxlocnode(n1)
758  iposd = this%idxpakdiag(n1)
759  call matrix_sln%add_value_pos(iposd, hcofval)
760  rhs(iloc) = rhs(iloc) + rhsval
761  end do
762  end if
763  !
764  ! -- add from mover contribution
765  if (this%idxbudfmvr /= 0) then
766  do n = 1, this%ncv
767  rhsval = this%qmfrommvr(n) ! this will already be in terms of energy for heat transport
768  iloc = this%idxlocnode(n)
769  rhs(iloc) = rhs(iloc) - rhsval
770  end do
771  end if
772  !
773  ! -- go through each apt-gwf connection
774  do j = 1, this%flowbudptr%budterm(this%idxbudgwf)%nlist
775  !
776  ! -- set n to feature number and process if active feature
777  n = this%flowbudptr%budterm(this%idxbudgwf)%id1(j)
778  if (this%iboundpak(n) /= 0) then
779  !
780  ! -- set acoef and rhs to negative so they are relative to apt and not gwt
781  qbnd = this%flowbudptr%budterm(this%idxbudgwf)%flow(j)
782  omega = dzero
783  if (qbnd < dzero) omega = done
784  qbnd_scaled = qbnd * this%eqnsclfac
785  !
786  ! -- add to apt row
787  iposd = this%idxdglo(j)
788  iposoffd = this%idxoffdglo(j)
789  call matrix_sln%add_value_pos(iposd, omega * qbnd_scaled)
790  call matrix_sln%add_value_pos(iposoffd, (done - omega) * qbnd_scaled)
791  !
792  ! -- add to gwf row for apt connection
793  ipossymd = this%idxsymdglo(j)
794  ipossymoffd = this%idxsymoffdglo(j)
795  call matrix_sln%add_value_pos(ipossymd, -(done - omega) * qbnd_scaled)
796  call matrix_sln%add_value_pos(ipossymoffd, -omega * qbnd_scaled)
797  end if
798  end do
799  !
800  ! -- go through each apt-apt connection
801  if (this%idxbudfjf /= 0) then
802  do j = 1, this%flowbudptr%budterm(this%idxbudfjf)%nlist
803  n1 = this%flowbudptr%budterm(this%idxbudfjf)%id1(j)
804  n2 = this%flowbudptr%budterm(this%idxbudfjf)%id2(j)
805  qbnd = this%flowbudptr%budterm(this%idxbudfjf)%flow(j)
806  if (qbnd <= dzero) then
807  omega = done
808  else
809  omega = dzero
810  end if
811  qbnd_scaled = qbnd * this%eqnsclfac
812  iposd = this%idxfjfdglo(j)
813  iposoffd = this%idxfjfoffdglo(j)
814  call matrix_sln%add_value_pos(iposd, omega * qbnd_scaled)
815  call matrix_sln%add_value_pos(iposoffd, (done - omega) * qbnd_scaled)
816  end do
817  end if

◆ apt_fc_nonexpanded()

subroutine tspaptmodule::apt_fc_nonexpanded ( class(tspapttype)  this,
real(dp), dimension(:), intent(inout)  rhs,
integer(i4b), dimension(:), intent(in)  ia,
integer(i4b), dimension(:), intent(in)  idxglo,
class(matrixbasetype), pointer  matrix_sln 
)

Routine to formulate the nonexpanded matrix case in which feature concentrations (or temperatures) are solved explicitly

Definition at line 687 of file tsp-apt.f90.

688  ! -- modules
689  ! -- dummy
690  class(TspAptType) :: this
691  real(DP), dimension(:), intent(inout) :: rhs
692  integer(I4B), dimension(:), intent(in) :: ia
693  integer(I4B), dimension(:), intent(in) :: idxglo
694  class(MatrixBaseType), pointer :: matrix_sln
695  ! -- local
696  integer(I4B) :: j, igwfnode, idiag
697  !
698  ! -- solve for concentration (or temperatures) in the features
699  call this%apt_solve()
700  !
701  ! -- add hcof and rhs terms (from apt_solve) to the gwf matrix
702  do j = 1, this%flowbudptr%budterm(this%idxbudgwf)%nlist
703  igwfnode = this%flowbudptr%budterm(this%idxbudgwf)%id2(j)
704  if (this%ibound(igwfnode) < 1) cycle
705  idiag = idxglo(ia(igwfnode))
706  call matrix_sln%add_value_pos(idiag, this%hcof(j))
707  rhs(igwfnode) = rhs(igwfnode) + this%rhs(j)
708  end do

◆ apt_fill_budobj()

subroutine tspaptmodule::apt_fill_budobj ( class(tspapttype)  this,
real(dp), dimension(:), intent(in)  x,
real(dp), dimension(:), intent(inout), contiguous  flowja 
)

Definition at line 1961 of file tsp-apt.f90.

1962  ! -- modules
1963  use tdismodule, only: delt
1964  ! -- dummy
1965  class(TspAptType) :: this
1966  real(DP), dimension(:), intent(in) :: x
1967  real(DP), dimension(:), contiguous, intent(inout) :: flowja
1968  ! -- local
1969  integer(I4B) :: naux
1970  real(DP), dimension(:), allocatable :: auxvartmp
1971  integer(I4B) :: i, j, n1, n2
1972  integer(I4B) :: idx
1973  integer(I4B) :: nlen
1974  integer(I4B) :: nlist
1975  integer(I4B) :: igwfnode
1976  real(DP) :: q
1977  real(DP) :: v0, v1
1978  real(DP) :: ccratin, ccratout
1979  ! -- formats
1980  !
1981  ! -- initialize counter
1982  idx = 0
1983  !
1984  ! -- initialize ccterm, which is used to sum up all mass (or energy) flows
1985  ! into a constant concentration (or temperature) cell
1986  ccratin = dzero
1987  ccratout = dzero
1988  do n1 = 1, this%ncv
1989  this%ccterm(n1) = dzero
1990  end do
1991  !
1992  ! -- FLOW JA FACE
1993  nlen = 0
1994  if (this%idxbudfjf /= 0) then
1995  nlen = this%flowbudptr%budterm(this%idxbudfjf)%maxlist
1996  end if
1997  if (nlen > 0) then
1998  idx = idx + 1
1999  nlist = this%flowbudptr%budterm(this%idxbudfjf)%maxlist
2000  call this%budobj%budterm(idx)%reset(nlist)
2001  q = dzero
2002  do j = 1, nlist
2003  call this%apt_fjf_term(j, n1, n2, q)
2004  call this%budobj%budterm(idx)%update_term(n1, n2, q)
2005  call this%apt_accumulate_ccterm(n1, q, ccratin, ccratout)
2006  end do
2007  end if
2008  !
2009  ! -- GWF (LEAKAGE)
2010  idx = idx + 1
2011  call this%budobj%budterm(idx)%reset(this%maxbound)
2012  do j = 1, this%flowbudptr%budterm(this%idxbudgwf)%nlist
2013  q = dzero
2014  n1 = this%flowbudptr%budterm(this%idxbudgwf)%id1(j)
2015  igwfnode = this%flowbudptr%budterm(this%idxbudgwf)%id2(j)
2016  if (this%iboundpak(n1) /= 0) then
2017  q = this%hcof(j) * x(igwfnode) - this%rhs(j)
2018  q = -q ! flip sign so relative to advanced package feature
2019  end if
2020  call this%budobj%budterm(idx)%update_term(n1, igwfnode, q)
2021  call this%apt_accumulate_ccterm(n1, q, ccratin, ccratout)
2022  end do
2023  !
2024  ! -- skip individual package terms for now and process them last
2025  ! -- in case they depend on the other terms (as for uze)
2026  idx = this%idxlastpak
2027  !
2028  ! -- STORAGE
2029  idx = idx + 1
2030  call this%budobj%budterm(idx)%reset(this%ncv)
2031  allocate (auxvartmp(1))
2032  do n1 = 1, this%ncv
2033  call this%apt_get_volumes(n1, v1, v0, delt)
2034  auxvartmp(1) = v1 * this%xnewpak(n1) ! Note: When GWE is added, check if this needs a factor of eqnsclfac
2035  q = this%qsto(n1)
2036  call this%budobj%budterm(idx)%update_term(n1, n1, q, auxvartmp)
2037  call this%apt_accumulate_ccterm(n1, q, ccratin, ccratout)
2038  end do
2039  deallocate (auxvartmp)
2040  !
2041  ! -- TO MOVER
2042  if (this%idxbudtmvr /= 0) then
2043  idx = idx + 1
2044  nlist = this%flowbudptr%budterm(this%idxbudtmvr)%nlist
2045  call this%budobj%budterm(idx)%reset(nlist)
2046  do j = 1, nlist
2047  call this%apt_tmvr_term(j, n1, n2, q)
2048  call this%budobj%budterm(idx)%update_term(n1, n2, q)
2049  call this%apt_accumulate_ccterm(n1, q, ccratin, ccratout)
2050  end do
2051  end if
2052  !
2053  ! -- FROM MOVER
2054  if (this%idxbudfmvr /= 0) then
2055  idx = idx + 1
2056  nlist = this%ncv
2057  call this%budobj%budterm(idx)%reset(nlist)
2058  do j = 1, nlist
2059  call this%apt_fmvr_term(j, n1, n2, q)
2060  call this%budobj%budterm(idx)%update_term(n1, n1, q)
2061  call this%apt_accumulate_ccterm(n1, q, ccratin, ccratout)
2062  end do
2063  end if
2064  !
2065  ! -- CONSTANT FLOW
2066  idx = idx + 1
2067  call this%budobj%budterm(idx)%reset(this%ncv)
2068  do n1 = 1, this%ncv
2069  q = this%ccterm(n1)
2070  call this%budobj%budterm(idx)%update_term(n1, n1, q)
2071  end do
2072  !
2073  ! -- AUXILIARY VARIABLES
2074  naux = this%naux
2075  if (naux > 0) then
2076  idx = idx + 1
2077  allocate (auxvartmp(naux))
2078  call this%budobj%budterm(idx)%reset(this%ncv)
2079  do n1 = 1, this%ncv
2080  q = dzero
2081  do i = 1, naux
2082  auxvartmp(i) = this%featureauxvar(i, n1)
2083  end do
2084  call this%budobj%budterm(idx)%update_term(n1, n1, q, auxvartmp)
2085  end do
2086  deallocate (auxvartmp)
2087  end if
2088  !
2089  ! -- individual package terms processed last
2090  idx = this%idxprepak
2091  call this%pak_fill_budobj(idx, x, flowja, ccratin, ccratout)
2092  !
2093  ! --Terms are filled, now accumulate them for this time step
2094  call this%budobj%accumulate_terms()
real(dp), pointer, public delt
length of the current time step
Definition: tdis.f90:32

◆ apt_fjf_term()

subroutine tspaptmodule::apt_fjf_term ( class(tspapttype)  this,
integer(i4b), intent(in)  ientry,
integer(i4b), intent(inout)  n1,
integer(i4b), intent(inout)  n2,
real(dp), intent(inout), optional  rrate,
real(dp), intent(inout), optional  rhsval,
real(dp), intent(inout), optional  hcofval 
)

Definition at line 2197 of file tsp-apt.f90.

2199  ! -- modules
2200  ! -- dummy
2201  class(TspAptType) :: this
2202  integer(I4B), intent(in) :: ientry
2203  integer(I4B), intent(inout) :: n1
2204  integer(I4B), intent(inout) :: n2
2205  real(DP), intent(inout), optional :: rrate
2206  real(DP), intent(inout), optional :: rhsval
2207  real(DP), intent(inout), optional :: hcofval
2208  ! -- local
2209  real(DP) :: qbnd
2210  real(DP) :: ctmp
2211  !
2212  n1 = this%flowbudptr%budterm(this%idxbudfjf)%id1(ientry)
2213  n2 = this%flowbudptr%budterm(this%idxbudfjf)%id2(ientry)
2214  qbnd = this%flowbudptr%budterm(this%idxbudfjf)%flow(ientry)
2215  if (qbnd <= 0) then
2216  ctmp = this%xnewpak(n1)
2217  else
2218  ctmp = this%xnewpak(n2)
2219  end if
2220  if (present(rrate)) rrate = ctmp * qbnd * this%eqnsclfac
2221  if (present(rhsval)) rhsval = -rrate * this%eqnsclfac
2222  if (present(hcofval)) hcofval = dzero

◆ apt_fmvr_term()

subroutine tspaptmodule::apt_fmvr_term ( class(tspapttype)  this,
integer(i4b), intent(in)  ientry,
integer(i4b), intent(inout)  n1,
integer(i4b), intent(inout)  n2,
real(dp), intent(inout), optional  rrate,
real(dp), intent(inout), optional  rhsval,
real(dp), intent(inout), optional  hcofval 
)

Definition at line 2174 of file tsp-apt.f90.

2176  ! -- modules
2177  ! -- dummy
2178  class(TspAptType) :: this
2179  integer(I4B), intent(in) :: ientry
2180  integer(I4B), intent(inout) :: n1
2181  integer(I4B), intent(inout) :: n2
2182  real(DP), intent(inout), optional :: rrate
2183  real(DP), intent(inout), optional :: rhsval
2184  real(DP), intent(inout), optional :: hcofval
2185  !
2186  ! -- Calculate MVR-related terms
2187  n1 = ientry
2188  n2 = n1
2189  if (present(rrate)) rrate = this%qmfrommvr(n1) ! NOTE: When bringing in GWE, ensure this is in terms of energy. Might need to apply eqnsclfac here.
2190  if (present(rhsval)) rhsval = this%qmfrommvr(n1)
2191  if (present(hcofval)) hcofval = dzero

◆ apt_get_volumes()

subroutine tspaptmodule::apt_get_volumes ( class(tspapttype)  this,
integer(i4b), intent(in)  icv,
real(dp), intent(inout)  vnew,
real(dp), intent(inout)  vold,
real(dp), intent(in)  delt 
)

Definition at line 1719 of file tsp-apt.f90.

1720  ! -- modules
1721  ! -- dummy
1722  class(TspAptType) :: this
1723  integer(I4B), intent(in) :: icv
1724  real(DP), intent(inout) :: vnew, vold
1725  real(DP), intent(in) :: delt
1726  ! -- local
1727  real(DP) :: qss
1728  !
1729  ! -- get volumes
1730  vold = dzero
1731  vnew = vold
1732  if (this%idxbudsto /= 0) then
1733  qss = this%flowbudptr%budterm(this%idxbudsto)%flow(icv)
1734  vnew = this%flowbudptr%budterm(this%idxbudsto)%auxvar(1, icv)
1735  vold = vnew + qss * delt
1736  end if

◆ apt_mc()

subroutine tspaptmodule::apt_mc ( class(tspapttype), intent(inout)  this,
integer(i4b), intent(in)  moffset,
class(matrixbasetype), pointer  matrix_sln 
)

Definition at line 247 of file tsp-apt.f90.

248  use sparsemodule, only: sparsematrix
249  ! -- dummy
250  class(TspAptType), intent(inout) :: this
251  integer(I4B), intent(in) :: moffset
252  class(MatrixBaseType), pointer :: matrix_sln
253  ! -- local
254  integer(I4B) :: n, j, iglo, jglo
255  integer(I4B) :: ipos
256  ! -- format
257  !
258  ! -- allocate memory for index arrays
259  call this%apt_allocate_index_arrays()
260  !
261  ! -- store index positions
262  if (this%imatrows /= 0) then
263  !
264  ! -- Find the position of each connection in the global ia, ja structure
265  ! and store them in idxglo. idxglo allows this model to insert or
266  ! retrieve values into or from the global A matrix
267  ! -- apt rows
268  do n = 1, this%ncv
269  this%idxlocnode(n) = this%dis%nodes + this%ioffset + n
270  iglo = moffset + this%dis%nodes + this%ioffset + n
271  this%idxpakdiag(n) = matrix_sln%get_position_diag(iglo)
272  end do
273  do ipos = 1, this%flowbudptr%budterm(this%idxbudgwf)%nlist
274  n = this%flowbudptr%budterm(this%idxbudgwf)%id1(ipos)
275  j = this%flowbudptr%budterm(this%idxbudgwf)%id2(ipos)
276  iglo = moffset + this%dis%nodes + this%ioffset + n
277  jglo = j + moffset
278  this%idxdglo(ipos) = matrix_sln%get_position_diag(iglo)
279  this%idxoffdglo(ipos) = matrix_sln%get_position(iglo, jglo)
280  end do
281  !
282  ! -- apt contributions to gwf portion of global matrix
283  do ipos = 1, this%flowbudptr%budterm(this%idxbudgwf)%nlist
284  n = this%flowbudptr%budterm(this%idxbudgwf)%id1(ipos)
285  j = this%flowbudptr%budterm(this%idxbudgwf)%id2(ipos)
286  iglo = j + moffset
287  jglo = moffset + this%dis%nodes + this%ioffset + n
288  this%idxsymdglo(ipos) = matrix_sln%get_position_diag(iglo)
289  this%idxsymoffdglo(ipos) = matrix_sln%get_position(iglo, jglo)
290  end do
291  !
292  ! -- apt-apt contributions to gwf portion of global matrix
293  if (this%idxbudfjf /= 0) then
294  do ipos = 1, this%flowbudptr%budterm(this%idxbudfjf)%nlist
295  n = this%flowbudptr%budterm(this%idxbudfjf)%id1(ipos)
296  j = this%flowbudptr%budterm(this%idxbudfjf)%id2(ipos)
297  iglo = moffset + this%dis%nodes + this%ioffset + n
298  jglo = moffset + this%dis%nodes + this%ioffset + j
299  this%idxfjfdglo(ipos) = matrix_sln%get_position_diag(iglo)
300  this%idxfjfoffdglo(ipos) = matrix_sln%get_position(iglo, jglo)
301  end do
302  end if
303  end if

◆ apt_obs_supported()

logical function tspaptmodule::apt_obs_supported ( class(tspapttype)  this)

This function:

  • returns true if APT package supports named observation.
  • overrides BndTypebnd_obs_supported()

Definition at line 2254 of file tsp-apt.f90.

2255  ! -- modules
2256  ! -- dummy
2257  class(TspAptType) :: this
2258  !
2259  ! -- Set to true
2260  apt_obs_supported = .true.

◆ apt_ot_bdsummary()

subroutine tspaptmodule::apt_ot_bdsummary ( class(tspapttype)  this,
integer(i4b), intent(in)  kstp,
integer(i4b), intent(in)  kper,
integer(i4b), intent(in)  iout,
integer(i4b), intent(in)  ibudfl 
)
Parameters
thisTspAptType object
[in]kstptime step number
[in]kperperiod number
[in]ioutflag and unit number for the model listing file
[in]ibudflflag indicating budget should be written

Definition at line 995 of file tsp-apt.f90.

996  ! -- module
997  use tdismodule, only: totim, delt
998  ! -- dummy
999  class(TspAptType) :: this !< TspAptType object
1000  integer(I4B), intent(in) :: kstp !< time step number
1001  integer(I4B), intent(in) :: kper !< period number
1002  integer(I4B), intent(in) :: iout !< flag and unit number for the model listing file
1003  integer(I4B), intent(in) :: ibudfl !< flag indicating budget should be written
1004  !
1005  call this%budobj%write_budtable(kstp, kper, iout, ibudfl, totim, delt)
real(dp), pointer, public totim
time relative to start of simulation
Definition: tdis.f90:35

◆ apt_ot_dv()

subroutine tspaptmodule::apt_ot_dv ( class(tspapttype)  this,
integer(i4b), intent(in)  idvsave,
integer(i4b), intent(in)  idvprint 
)

Definition at line 939 of file tsp-apt.f90.

940  ! -- modules
941  use constantsmodule, only: lenbudtxt
942  use tdismodule, only: kstp, kper, pertim, totim
944  use inputoutputmodule, only: ulasav
945  ! -- dummy
946  class(TspAptType) :: this
947  integer(I4B), intent(in) :: idvsave
948  integer(I4B), intent(in) :: idvprint
949  ! -- local
950  integer(I4B) :: ibinun
951  integer(I4B) :: n
952  real(DP) :: c
953  character(len=LENBUDTXT) :: text
954  !
955  ! -- set unit number for binary dependent variable output
956  ibinun = 0
957  if (this%iconcout /= 0) then
958  ibinun = this%iconcout
959  end if
960  if (idvsave == 0) ibinun = 0
961  !
962  ! -- write binary output
963  if (ibinun > 0) then
964  do n = 1, this%ncv
965  c = this%xnewpak(n)
966  if (this%iboundpak(n) == 0) then
967  c = dhnoflo
968  end if
969  this%dbuff(n) = c
970  end do
971  write (text, '(a)') str_pad_left(this%depvartype, lenvarname)
972  call ulasav(this%dbuff, text, kstp, kper, pertim, totim, &
973  this%ncv, 1, 1, ibinun)
974  end if
975  !
976  ! -- write apt conc table
977  if (idvprint /= 0 .and. this%iprconc /= 0) then
978  !
979  ! -- set table kstp and kper
980  call this%dvtab%set_kstpkper(kstp, kper)
981  !
982  ! -- fill concentration data
983  do n = 1, this%ncv
984  if (this%inamedbound == 1) then
985  call this%dvtab%add_term(this%featname(n))
986  end if
987  call this%dvtab%add_term(n)
988  call this%dvtab%add_term(this%xnewpak(n))
989  end do
990  end if
This module contains simulation constants.
Definition: Constants.f90:9
real(dp), parameter dhdry
real dry cell constant
Definition: Constants.f90:94
real(dp), parameter dhnoflo
real no flow constant
Definition: Constants.f90:93
integer(i4b), parameter lenbudtxt
maximum length of a budget component names
Definition: Constants.f90:37
subroutine, public ulasav(buf, text, kstp, kper, pertim, totim, ncol, nrow, ilay, ichn)
Save 1 layer array on disk.
real(dp), pointer, public pertim
time relative to start of stress period
Definition: tdis.f90:33
integer(i4b), pointer, public kper
current stress period number
Definition: tdis.f90:26
Here is the call graph for this function:

◆ apt_ot_package_flows()

subroutine tspaptmodule::apt_ot_package_flows ( class(tspapttype)  this,
integer(i4b), intent(in)  icbcfl,
integer(i4b), intent(in)  ibudfl 
)

Definition at line 915 of file tsp-apt.f90.

916  use tdismodule, only: kstp, kper, delt, pertim, totim
917  class(TspAptType) :: this
918  integer(I4B), intent(in) :: icbcfl
919  integer(I4B), intent(in) :: ibudfl
920  integer(I4B) :: ibinun
921  !
922  ! -- write the flows from the budobj
923  ibinun = 0
924  if (this%ibudgetout /= 0) then
925  ibinun = this%ibudgetout
926  end if
927  if (icbcfl == 0) ibinun = 0
928  if (ibinun > 0) then
929  call this%budobj%save_flows(this%dis, ibinun, kstp, kper, delt, &
930  pertim, totim, this%iout)
931  end if
932  !
933  ! -- Print lake flows table
934  if (ibudfl /= 0 .and. this%iprflow /= 0) then
935  call this%budobj%write_flowtable(this%dis, kstp, kper)
936  end if

◆ apt_process_obsid()

subroutine, public tspaptmodule::apt_process_obsid ( type(observetype), intent(inout)  obsrv,
class(disbasetype), intent(in)  dis,
integer(i4b), intent(in)  inunitobs,
integer(i4b), intent(in)  iout 
)

Method to process observation ID strings for an APT package. This processor is only for observation types that support ID1 and not ID2.

Parameters
[in,out]obsrvObservation object
[in]disDiscretization object
[in]inunitobsfile unit number for the package observation file
[in]ioutmodel listing file unit number

Definition at line 2689 of file tsp-apt.f90.

2690  ! -- dummy variables
2691  type(ObserveType), intent(inout) :: obsrv !< Observation object
2692  class(DisBaseType), intent(in) :: dis !< Discretization object
2693  integer(I4B), intent(in) :: inunitobs !< file unit number for the package observation file
2694  integer(I4B), intent(in) :: iout !< model listing file unit number
2695  ! -- local variables
2696  integer(I4B) :: nn1
2697  integer(I4B) :: icol
2698  integer(I4B) :: istart
2699  integer(I4B) :: istop
2700  character(len=LINELENGTH) :: string
2701  character(len=LENBOUNDNAME) :: bndname
2702  !
2703  ! -- initialize local variables
2704  string = obsrv%IDstring
2705  !
2706  ! -- Extract reach number from string and store it.
2707  ! If 1st item is not an integer(I4B), it should be a
2708  ! boundary name--deal with it.
2709  icol = 1
2710  !
2711  ! -- get reach number or boundary name
2712  call extract_idnum_or_bndname(string, icol, istart, istop, nn1, bndname)
2713  if (nn1 == namedboundflag) then
2714  obsrv%FeatureName = bndname
2715  end if
2716  !
2717  ! -- store reach number (NodeNumber)
2718  obsrv%NodeNumber = nn1
2719  !
2720  ! -- store NodeNumber2 as 1 so that this can be used
2721  ! as the iconn value for SFT. This works for SFT
2722  ! because there is only one reach per GWT connection.
2723  obsrv%NodeNumber2 = 1
Here is the call graph for this function:
Here is the caller graph for this function:

◆ apt_process_obsid12()

subroutine, public tspaptmodule::apt_process_obsid12 ( type(observetype), intent(inout)  obsrv,
class(disbasetype), intent(in)  dis,
integer(i4b), intent(in)  inunitobs,
integer(i4b), intent(in)  iout 
)

Method to process observation ID strings for an APT package. This processor is for the case where if ID1 is an integer then ID2 must be provided.

Parameters
[in,out]obsrvObservation object
[in]disDiscretization object
[in]inunitobsfile unit number for the package observation file
[in]ioutmodel listing file unit number

Definition at line 2732 of file tsp-apt.f90.

2733  ! -- dummy variables
2734  type(ObserveType), intent(inout) :: obsrv !< Observation object
2735  class(DisBaseType), intent(in) :: dis !< Discretization object
2736  integer(I4B), intent(in) :: inunitobs !< file unit number for the package observation file
2737  integer(I4B), intent(in) :: iout !< model listing file unit number
2738  ! -- local variables
2739  integer(I4B) :: nn1
2740  integer(I4B) :: iconn
2741  integer(I4B) :: icol
2742  integer(I4B) :: istart
2743  integer(I4B) :: istop
2744  character(len=LINELENGTH) :: string
2745  character(len=LENBOUNDNAME) :: bndname
2746  !
2747  ! -- initialize local variables
2748  string = obsrv%IDstring
2749  !
2750  ! -- Extract reach number from string and store it.
2751  ! If 1st item is not an integer(I4B), it should be a
2752  ! boundary name--deal with it.
2753  icol = 1
2754  !
2755  ! -- get reach number or boundary name
2756  call extract_idnum_or_bndname(string, icol, istart, istop, nn1, bndname)
2757  if (nn1 == namedboundflag) then
2758  obsrv%FeatureName = bndname
2759  else
2760  call extract_idnum_or_bndname(string, icol, istart, istop, iconn, bndname)
2761  if (len_trim(bndname) < 1 .and. iconn < 0) then
2762  write (errmsg, '(a,1x,a,a,1x,a,1x,a)') &
2763  'For observation type', trim(adjustl(obsrv%ObsTypeId)), &
2764  ', ID given as an integer and not as boundname,', &
2765  'but ID2 is missing. Either change ID to valid', &
2766  'boundname or supply valid entry for ID2.'
2767  call store_error(errmsg)
2768  end if
2769  obsrv%NodeNumber2 = iconn
2770  end if
2771  !
2772  ! -- store reach number (NodeNumber)
2773  obsrv%NodeNumber = nn1
Here is the call graph for this function:
Here is the caller graph for this function:

◆ apt_read_initial_attr()

subroutine tspaptmodule::apt_read_initial_attr ( class(tspapttype), intent(inout)  this)

Definition at line 1489 of file tsp-apt.f90.

1490  use constantsmodule, only: linelength
1491  use budgetmodule, only: budget_cr
1492  ! -- dummy
1493  class(TspAptType), intent(inout) :: this
1494  ! -- local
1495  !character(len=LINELENGTH) :: text
1496  integer(I4B) :: j, n
1497 
1498  !
1499  ! -- initialize xnewpak and set feature concentration (or temperature)
1500  ! -- todo: this should be a time series?
1501  do n = 1, this%ncv
1502  this%xnewpak(n) = this%strt(n)
1503  !
1504  ! -- todo: read aux
1505  !
1506  ! -- todo: read boundname
1507  end do
1508  !
1509  ! -- initialize status (iboundpak) of lakes to active
1510  do n = 1, this%ncv
1511  if (this%status(n) == 'CONSTANT') then
1512  this%iboundpak(n) = -1
1513  else if (this%status(n) == 'INACTIVE') then
1514  this%iboundpak(n) = 0
1515  else if (this%status(n) == 'ACTIVE ') then
1516  this%iboundpak(n) = 1
1517  end if
1518  end do
1519  !
1520  ! -- set boundname for each connection
1521  if (this%inamedbound /= 0) then
1522  do j = 1, this%flowbudptr%budterm(this%idxbudgwf)%nlist
1523  n = this%flowbudptr%budterm(this%idxbudgwf)%id1(j)
1524  this%boundname(j) = this%featname(n)
1525  end do
1526  end if
1527  !
1528  ! -- copy boundname into boundname_cst
1529  call this%copy_boundname()
This module contains the BudgetModule.
Definition: Budget.f90:20
subroutine, public budget_cr(this, name_model)
@ brief Create a new budget object
Definition: Budget.f90:85
integer(i4b), parameter linelength
maximum length of a standard line
Definition: Constants.f90:45
Here is the call graph for this function:

◆ apt_reset()

subroutine tspaptmodule::apt_reset ( class(tspapttype)  this)
Parameters
thisGwtAptType object

Definition at line 654 of file tsp-apt.f90.

655  class(TspAptType) :: this !< GwtAptType object
656  ! local
657  integer(I4B) :: i
658  !
659  do i = 1, size(this%qmfrommvr)
660  this%qmfrommvr(i) = dzero
661  end do

◆ apt_rp()

subroutine tspaptmodule::apt_rp ( class(tspapttype), intent(inout)  this)

This subroutine calls the attached packages' read and prepare routines.

Definition at line 375 of file tsp-apt.f90.

376  use tdismodule, only: kper
377  use constantsmodule, only: lenvarname
378  ! -- dummy
379  class(TspAptType), intent(inout) :: this
380  ! -- local
381  integer(I4B) :: n, itemno, igwfnode, isize
382  integer(I4B), pointer :: nbound => null()
383  integer(I4B), dimension(:), pointer, contiguous :: ifno => null()
384  type(CharacterStringType), dimension(:), pointer, contiguous :: &
385  setting => null()
386  type(CharacterStringType), dimension(:), pointer, contiguous :: &
387  status => null()
388  type(CharacterStringType), dimension(:), pointer, contiguous :: &
389  auxname => null()
390  real(DP), dimension(:), pointer, contiguous :: auxval => null()
391  character(len=LINELENGTH) :: str
392  character(len=LENVARNAME) :: key
393  character(len=LINELENGTH) :: title
394  character(len=LINELENGTH) :: text
395  character(len=LENVARNAME) :: auxnamestr
396  character(len=*), parameter :: fmtlsp = &
397  "(1X,/1X,'REUSING ',A,'S FROM LAST &
398  &STRESS PERIOD')"
399  !
400  ! -- set nbound to maxbound
401  this%nbound = this%maxbound
402  !
403  ! -- check if the input context has data for this stress period
404  if (this%iper == kper) then
405  !
406  ! -- get period data arrays
407  call mem_setptr(nbound, 'NBOUND', this%input_mempath)
408  !
409  ! -- setup table to echo period data
410  if (this%iprpak /= 0) then
411  title = trim(adjustl(this%text))//' PACKAGE ('// &
412  trim(adjustl(this%packName))//') DATA FOR PERIOD'
413  write (title, '(a,1x,i6)') trim(adjustl(title)), kper
414  call table_cr(this%inputtab, this%packName, title)
415  call this%inputtab%table_df(1, 4, this%iout, finalize=.false.)
416  text = 'NUMBER'
417  call this%inputtab%initialize_column(text, 10, alignment=tabcenter)
418  text = 'KEYWORD'
419  call this%inputtab%initialize_column(text, 20, alignment=tableft)
420  do n = 1, 2
421  write (text, '(a,1x,i6)') 'VALUE', n
422  call this%inputtab%initialize_column(text, 15, alignment=tabcenter)
423  end do
424  end if
425  !
426  if (nbound > 0) then
427  call mem_setptr(ifno, 'IFNO', this%input_mempath)
428  call mem_setptr(setting, 'SETTING', this%input_mempath)
429  call mem_setptr(status, 'STATUS', this%input_mempath)
430  if (this%naux > 0) then
431  call get_isize('AUXVAL', this%input_mempath, isize)
432  if (isize > 0) then
433  call mem_setptr(auxname, 'AUXNAME', this%input_mempath)
434  call mem_setptr(auxval, 'AUXVAL', this%input_mempath)
435  end if
436  end if
437  !
438  do n = 1, nbound
439  itemno = ifno(n)
440  if (this%apt_check_valid(itemno) /= 0) cycle
441  key = setting(n)
442  !
443  ! -- STATUS (string; not TS-capable)
444  if (trim(key) == 'STATUS') then
445  str = status(n)
446  select case (trim(str))
447  case ('CONSTANT')
448  this%iboundpak(itemno) = -1
449  case ('INACTIVE')
450  this%iboundpak(itemno) = 0
451  case ('ACTIVE')
452  this%iboundpak(itemno) = 1
453  case default
454  write (errmsg, '(a,a)') &
455  'Unknown '//trim(this%text)//' status keyword: ', &
456  trim(str)//'.'
457  call store_error(errmsg)
458  end select
459  this%status(itemno) = trim(str)
460  if (this%iprpak /= 0) then
461  call this%inputtab%add_term(itemno)
462  call this%inputtab%add_term(trim(key))
463  call this%inputtab%add_term(trim(str))
464  call this%inputtab%add_term(' ')
465  end if
466  !
467  ! -- CONCENTRATION/TEMPERATURE: value already resolved by the
468  ! input context; echo it directly
469  else if (trim(key) == trim(this%depvartype)) then
470  if (this%iprpak /= 0) then
471  call this%inputtab%add_term(itemno)
472  call this%inputtab%add_term(trim(key))
473  call this%inputtab%add_term(this%concfeat(itemno))
474  call this%inputtab%add_term(' ')
475  end if
476  !
477  ! -- AUXILIARY: value already resolved by the input context;
478  ! echo the raw auxname and resolved auxval for this row
479  else if (trim(key) == 'PERIOD_AUXILIARY') then
480  if (this%iprpak /= 0) then
481  auxnamestr = auxname(n)
482  call this%inputtab%add_term(itemno)
483  call this%inputtab%add_term('AUXILIARY')
484  call this%inputtab%add_term(trim(auxnamestr))
485  call this%inputtab%add_term(auxval(n))
486  end if
487  !
488  ! -- package-specific setting; value already resolved by the
489  ! input context, package supplies it for the table
490  else
491  if (this%iprpak /= 0) then
492  call this%inputtab%add_term(itemno)
493  call this%inputtab%add_term(trim(key))
494  call this%inputtab%add_term(this%apt_setting_value(itemno, key))
495  call this%inputtab%add_term(' ')
496  end if
497  end if
498  end do
499  end if
500  !
501  if (this%iprpak /= 0) then
502  call this%inputtab%finalize_table()
503  end if
504  !
505  else
506  write (this%iout, fmtlsp) trim(this%filtyp)
507  end if
508  !
509  ! -- write summary of stress period error messages
510  if (count_errors() > 0) then
511  call store_error_filename(this%input_fname)
512  end if
513  !
514  ! -- fill nodelist every period; non-vertical connections are not updated
515  ! by cf so must be set here
516  do n = 1, this%flowbudptr%budterm(this%idxbudgwf)%nlist
517  igwfnode = this%flowbudptr%budterm(this%idxbudgwf)%id2(n)
518  this%nodelist(n) = igwfnode
519  end do
integer(i4b), parameter lenvarname
maximum length of a variable name
Definition: Constants.f90:17
Here is the call graph for this function:

◆ apt_rp_obs()

subroutine tspaptmodule::apt_rp_obs ( class(tspapttype), intent(inout)  this)

Method to process specific observations for an apt package

Definition at line 2504 of file tsp-apt.f90.

2505  ! -- modules
2506  use tdismodule, only: kper
2507  ! -- dummy
2508  class(TspAptType), intent(inout) :: this
2509  ! -- local
2510  integer(I4B) :: i
2511  logical :: found
2512  class(ObserveType), pointer :: obsrv => null()
2513  !
2514  if (kper == 1) then
2515  do i = 1, this%obs%npakobs
2516  obsrv => this%obs%pakobs(i)%obsrv
2517  select case (obsrv%ObsTypeId)
2518  case ('CONCENTRATION', 'TEMPERATURE')
2519  call this%rp_obs_byfeature(obsrv)
2520  !
2521  ! -- catch non-cumulative observation assigned to observation defined
2522  ! by a boundname that is assigned to more than one element
2523  if (obsrv%indxbnds_count > 1) then
2524  write (errmsg, '(a, a, a, a)') &
2525  trim(adjustl(this%depvartype))// &
2526  ' for observation', trim(adjustl(obsrv%Name)), &
2527  ' must be assigned to a feature with a unique boundname.'
2528  call store_error(errmsg)
2529  end if
2530  case ('LKT', 'SFT', 'MWT', 'UZT', 'LKE', 'SFE', 'MWE', 'UZE')
2531  call this%rp_obs_budterm(obsrv, &
2532  this%flowbudptr%budterm(this%idxbudgwf))
2533  case ('FLOW-JA-FACE')
2534  if (this%idxbudfjf > 0) then
2535  call this%rp_obs_flowjaface(obsrv, &
2536  this%flowbudptr%budterm(this%idxbudfjf))
2537  else
2538  write (errmsg, '(7a)') &
2539  'Observation ', trim(obsrv%Name), ' of type ', &
2540  trim(adjustl(obsrv%ObsTypeId)), ' in package ', &
2541  trim(this%packName), &
2542  ' cannot be processed because there are no flow connections.'
2543  call store_error(errmsg)
2544  end if
2545  case ('STORAGE')
2546  call this%rp_obs_byfeature(obsrv)
2547  case ('CONSTANT')
2548  call this%rp_obs_byfeature(obsrv)
2549  case ('FROM-MVR')
2550  call this%rp_obs_byfeature(obsrv)
2551  case default
2552  !
2553  ! -- check the child package for any specific obs
2554  found = .false.
2555  call this%pak_rp_obs(obsrv, found)
2556  !
2557  ! -- if none found then terminate with an error
2558  if (.not. found) then
2559  errmsg = 'Unrecognized observation type "'// &
2560  trim(obsrv%ObsTypeId)//'" for '// &
2561  trim(adjustl(this%text))//' package '// &
2562  trim(this%packName)
2563  call store_error(errmsg, terminate=.true.)
2564  end if
2565  end select
2566 
2567  end do
2568  !
2569  ! -- check for errors
2570  if (count_errors() > 0) then
2571  call store_error_unit(this%obs%inunitobs)
2572  end if
2573  end if
Here is the call graph for this function:

◆ apt_set_pointers()

subroutine tspaptmodule::apt_set_pointers ( class(tspapttype)  this,
integer(i4b), pointer  neq,
integer(i4b), dimension(:), pointer, contiguous  ibound,
real(dp), dimension(:), pointer, contiguous  xnew,
real(dp), dimension(:), pointer, contiguous  xold,
real(dp), dimension(:), pointer, contiguous  flowja 
)

Definition at line 1693 of file tsp-apt.f90.

1694  class(TspAptType) :: this
1695  integer(I4B), pointer :: neq
1696  integer(I4B), dimension(:), pointer, contiguous :: ibound
1697  real(DP), dimension(:), pointer, contiguous :: xnew
1698  real(DP), dimension(:), pointer, contiguous :: xold
1699  real(DP), dimension(:), pointer, contiguous :: flowja
1700  ! -- local
1701  integer(I4B) :: istart, iend
1702  !
1703  ! -- call base BndType set_pointers
1704  call this%BndType%set_pointers(neq, ibound, xnew, xold, flowja)
1705  !
1706  ! -- Set the pointers
1707  !
1708  ! -- set package pointers
1709  if (this%imatrows /= 0) then
1710  istart = this%dis%nodes + this%ioffset + 1
1711  iend = istart + this%ncv - 1
1712  this%iboundpak => this%ibound(istart:iend)
1713  this%xnewpak => this%xnew(istart:iend)
1714  end if

◆ apt_setting_value()

real(dp) function tspaptmodule::apt_setting_value ( class(tspapttype), intent(inout)  this,
integer(i4b), intent(in)  itemno,
character(len=*), intent(in)  key 
)
Parameters
[in]itemnofeature number
[in]keySETTING dispatch key

Definition at line 644 of file tsp-apt.f90.

645  ! -- dummy
646  class(TspAptType), intent(inout) :: this
647  integer(I4B), intent(in) :: itemno !< feature number
648  character(len=*), intent(in) :: key !< SETTING dispatch key
649  real(DP) :: val
650  val = dzero

◆ apt_setup_budobj()

subroutine tspaptmodule::apt_setup_budobj ( class(tspapttype)  this)

Definition at line 1759 of file tsp-apt.f90.

1760  ! -- modules
1761  use constantsmodule, only: lenbudtxt
1762  ! -- dummy
1763  class(TspAptType) :: this
1764  ! -- local
1765  integer(I4B) :: nbudterm
1766  integer(I4B) :: nlen
1767  integer(I4B) :: n, n1, n2
1768  integer(I4B) :: maxlist, naux
1769  integer(I4B) :: idx
1770  logical :: ordered_id1
1771  real(DP) :: q
1772  character(len=LENBUDTXT) :: bddim_opt
1773  character(len=LENBUDTXT) :: text, textt
1774  character(len=LENBUDTXT), dimension(1) :: auxtxt
1775  !
1776  ! -- initialize nbudterm
1777  nbudterm = 0
1778  !
1779  ! -- Determine if there are flow-ja-face terms
1780  nlen = 0
1781  if (this%idxbudfjf /= 0) then
1782  nlen = this%flowbudptr%budterm(this%idxbudfjf)%maxlist
1783  end if
1784  !
1785  ! -- Determine the number of budget terms associated with apt.
1786  ! These are fixed for the simulation and cannot change
1787  !
1788  ! -- add one if flow-ja-face present
1789  if (this%idxbudfjf /= 0) nbudterm = nbudterm + 1
1790  !
1791  ! -- All the APT packages have GWF, STORAGE, and CONSTANT
1792  nbudterm = nbudterm + 3
1793  !
1794  ! -- add terms for the specific package
1795  nbudterm = nbudterm + this%pak_get_nbudterms()
1796  !
1797  ! -- add for mover terms and auxiliary
1798  if (this%idxbudtmvr /= 0) nbudterm = nbudterm + 1
1799  if (this%idxbudfmvr /= 0) nbudterm = nbudterm + 1
1800  if (this%naux > 0) nbudterm = nbudterm + 1
1801  !
1802  ! -- set up budobj
1803  call budgetobject_cr(this%budobj, this%packName)
1804  !
1805  bddim_opt = this%depvarunitabbrev
1806  call this%budobj%budgetobject_df(this%ncv, nbudterm, 0, 0, &
1807  bddim_opt=bddim_opt, ibudcsv=this%ibudcsv)
1808  idx = 0
1809  !
1810  ! -- Go through and set up each budget term
1811  if (nlen > 0) then
1812  text = ' FLOW-JA-FACE'
1813  idx = idx + 1
1814  maxlist = this%flowbudptr%budterm(this%idxbudfjf)%maxlist
1815  naux = 0
1816  ordered_id1 = this%flowbudptr%budterm(this%idxbudfjf)%ordered_id1
1817  call this%budobj%budterm(idx)%initialize(text, &
1818  this%name_model, &
1819  this%packName, &
1820  this%name_model, &
1821  this%packName, &
1822  maxlist, .false., .false., &
1823  naux, ordered_id1=ordered_id1)
1824  !
1825  ! -- store outlet connectivity
1826  call this%budobj%budterm(idx)%reset(maxlist)
1827  q = dzero
1828  do n = 1, maxlist
1829  n1 = this%flowbudptr%budterm(this%idxbudfjf)%id1(n)
1830  n2 = this%flowbudptr%budterm(this%idxbudfjf)%id2(n)
1831  call this%budobj%budterm(idx)%update_term(n1, n2, q)
1832  end do
1833  end if
1834  !
1835  ! --
1836  text = ' GWF'
1837  idx = idx + 1
1838  maxlist = this%flowbudptr%budterm(this%idxbudgwf)%maxlist
1839  naux = 0
1840  call this%budobj%budterm(idx)%initialize(text, &
1841  this%name_model, &
1842  this%packName, &
1843  this%name_model, &
1844  this%name_model, &
1845  maxlist, .false., .true., &
1846  naux)
1847  call this%budobj%budterm(idx)%reset(maxlist)
1848  q = dzero
1849  do n = 1, maxlist
1850  n1 = this%flowbudptr%budterm(this%idxbudgwf)%id1(n)
1851  n2 = this%flowbudptr%budterm(this%idxbudgwf)%id2(n)
1852  call this%budobj%budterm(idx)%update_term(n1, n2, q)
1853  end do
1854  !
1855  ! -- Reserve space for the package specific terms
1856  this%idxprepak = idx
1857  call this%pak_setup_budobj(idx)
1858  this%idxlastpak = idx
1859  !
1860  ! --
1861  text = ' STORAGE'
1862  idx = idx + 1
1863  maxlist = this%flowbudptr%budterm(this%idxbudsto)%maxlist
1864  naux = 1
1865  write (textt, '(a)') str_pad_left(this%depvarunit, 16)
1866  auxtxt(1) = textt ! ' MASS' or ' ENERGY'
1867  call this%budobj%budterm(idx)%initialize(text, &
1868  this%name_model, &
1869  this%packName, &
1870  this%name_model, &
1871  this%packName, &
1872  maxlist, .false., .false., &
1873  naux, auxtxt)
1874  if (this%idxbudtmvr /= 0) then
1875  !
1876  ! --
1877  text = ' TO-MVR'
1878  idx = idx + 1
1879  maxlist = this%flowbudptr%budterm(this%idxbudtmvr)%maxlist
1880  naux = 0
1881  ordered_id1 = this%flowbudptr%budterm(this%idxbudtmvr)%ordered_id1
1882  call this%budobj%budterm(idx)%initialize(text, &
1883  this%name_model, &
1884  this%packName, &
1885  this%name_model, &
1886  this%packName, &
1887  maxlist, .false., .false., &
1888  naux, ordered_id1=ordered_id1)
1889  end if
1890  if (this%idxbudfmvr /= 0) then
1891  !
1892  ! --
1893  text = ' FROM-MVR'
1894  idx = idx + 1
1895  maxlist = this%ncv
1896  naux = 0
1897  call this%budobj%budterm(idx)%initialize(text, &
1898  this%name_model, &
1899  this%packName, &
1900  this%name_model, &
1901  this%packName, &
1902  maxlist, .false., .false., &
1903  naux)
1904  end if
1905  !
1906  ! --
1907  text = ' CONSTANT'
1908  idx = idx + 1
1909  maxlist = this%ncv
1910  naux = 0
1911  call this%budobj%budterm(idx)%initialize(text, &
1912  this%name_model, &
1913  this%packName, &
1914  this%name_model, &
1915  this%packName, &
1916  maxlist, .false., .false., &
1917  naux)
1918 
1919  !
1920  ! --
1921  naux = this%naux
1922  if (naux > 0) then
1923  !
1924  ! --
1925  text = ' AUXILIARY'
1926  idx = idx + 1
1927  maxlist = this%ncv
1928  call this%budobj%budterm(idx)%initialize(text, &
1929  this%name_model, &
1930  this%packName, &
1931  this%name_model, &
1932  this%packName, &
1933  maxlist, .false., .false., &
1934  naux, this%auxname)
1935  end if
1936  !
1937  ! -- if flow for each control volume are written to the listing file
1938  if (this%iprflow /= 0) then
1939  call this%budobj%flowtable_df(this%iout)
1940  end if
Here is the call graph for this function:

◆ apt_setup_tableobj()

subroutine tspaptmodule::apt_setup_tableobj ( class(tspapttype)  this)

Set up the table object that is used to write the apt concentration (or temperature) data. The terms listed here must correspond in the apt_ot method.

Definition at line 2782 of file tsp-apt.f90.

2783  ! -- modules
2785  ! -- dummy
2786  class(TspAptType) :: this
2787  ! -- local
2788  integer(I4B) :: nterms
2789  character(len=LINELENGTH) :: title
2790  character(len=LINELENGTH) :: text_temp
2791  !
2792  ! -- setup well head table
2793  if (this%iprconc > 0) then
2794  !
2795  ! -- Determine the number of head table columns
2796  nterms = 2
2797  if (this%inamedbound == 1) nterms = nterms + 1
2798  !
2799  ! -- set up table title
2800  title = trim(adjustl(this%text))//' PACKAGE ('// &
2801  trim(adjustl(this%packName))// &
2802  ') '//trim(adjustl(this%depvartype))// &
2803  &' FOR EACH CONTROL VOLUME'
2804  !
2805  ! -- set up dv tableobj
2806  call table_cr(this%dvtab, this%packName, title)
2807  call this%dvtab%table_df(this%ncv, nterms, this%iout, &
2808  transient=.true.)
2809  !
2810  ! -- Go through and set up table budget term
2811  if (this%inamedbound == 1) then
2812  text_temp = 'NAME'
2813  call this%dvtab%initialize_column(text_temp, 20, alignment=tableft)
2814  end if
2815  !
2816  ! -- feature number
2817  text_temp = 'NUMBER'
2818  call this%dvtab%initialize_column(text_temp, 10, alignment=tabcenter)
2819  !
2820  ! -- feature conc
2821  text_temp = this%depvartype(1:4)
2822  call this%dvtab%initialize_column(text_temp, 12, alignment=tabcenter)
2823  end if
Here is the call graph for this function:

◆ apt_solve()

subroutine tspaptmodule::apt_solve ( class(tspapttype)  this)

Explicit solve for concentration (or temperature) in advaced package features, which is an alternative to the iterative implicit solve.

Definition at line 1538 of file tsp-apt.f90.

1539  use constantsmodule, only: linelength
1540  ! -- dummy
1541  class(TspAptType) :: this
1542  ! -- local
1543  integer(I4B) :: n, j, igwfnode
1544  integer(I4B) :: n1, n2
1545  real(DP) :: rrate
1546  real(DP) :: ctmp
1547  real(DP) :: c1, qbnd
1548  real(DP) :: hcofval, rhsval
1549  !
1550  ! -- initialize dbuff
1551  do n = 1, this%ncv
1552  this%dbuff(n) = dzero
1553  end do
1554  !
1555  ! -- call the individual package routines to add terms specific to the
1556  ! advanced transport package
1557  call this%pak_solve()
1558  !
1559  ! -- add to mover contribution
1560  if (this%idxbudtmvr /= 0) then
1561  do j = 1, this%flowbudptr%budterm(this%idxbudtmvr)%nlist
1562  call this%apt_tmvr_term(j, n1, n2, rrate)
1563  this%dbuff(n1) = this%dbuff(n1) + rrate
1564  end do
1565  end if
1566  !
1567  ! -- add from mover contribution
1568  if (this%idxbudfmvr /= 0) then
1569  do n1 = 1, size(this%qmfrommvr)
1570  rrate = this%qmfrommvr(n1) ! Will be in terms of energy for heat transport
1571  this%dbuff(n1) = this%dbuff(n1) + rrate
1572  end do
1573  end if
1574  !
1575  ! -- go through each gwf connection and accumulate
1576  ! total mass (or energy) in dbuff mass
1577  do j = 1, this%flowbudptr%budterm(this%idxbudgwf)%nlist
1578  n = this%flowbudptr%budterm(this%idxbudgwf)%id1(j)
1579  this%hcof(j) = dzero
1580  this%rhs(j) = dzero
1581  igwfnode = this%flowbudptr%budterm(this%idxbudgwf)%id2(j)
1582  qbnd = this%flowbudptr%budterm(this%idxbudgwf)%flow(j)
1583  if (qbnd <= dzero) then
1584  ctmp = this%xnewpak(n)
1585  this%rhs(j) = qbnd * ctmp * this%eqnsclfac
1586  else
1587  ctmp = this%xnew(igwfnode)
1588  this%hcof(j) = -qbnd * this%eqnsclfac
1589  end if
1590  c1 = qbnd * ctmp * this%eqnsclfac
1591  this%dbuff(n) = this%dbuff(n) + c1
1592  end do
1593  !
1594  ! -- go through each "within apt-apt" connection (e.g., lak-lak) and
1595  ! accumulate total mass (or energy) in dbuff mass
1596  if (this%idxbudfjf /= 0) then
1597  do j = 1, this%flowbudptr%budterm(this%idxbudfjf)%nlist
1598  call this%apt_fjf_term(j, n1, n2, rrate)
1599  c1 = rrate
1600  this%dbuff(n1) = this%dbuff(n1) + c1
1601  end do
1602  end if
1603  !
1604  ! -- calculate the feature concentration/temperature
1605  do n = 1, this%ncv
1606  call this%apt_stor_term(n, n1, n2, rrate, rhsval, hcofval)
1607  !
1608  ! -- at this point, dbuff has q * c for all sources, so now
1609  ! add Vold / dt * Cold
1610  this%dbuff(n) = this%dbuff(n) - rhsval
1611  !
1612  ! -- Now to calculate c, need to divide dbuff by hcofval
1613  c1 = -this%dbuff(n) / hcofval
1614  if (this%iboundpak(n) > 0) then
1615  this%xnewpak(n) = c1
1616  end if
1617  end do

◆ apt_source_cvs()

subroutine tspaptmodule::apt_source_cvs ( class(tspapttype), intent(inout)  this)

Definition at line 1406 of file tsp-apt.f90.

1407  ! -- dummy
1408  class(TspAptType), intent(inout) :: this
1409  ! -- local
1410  character(len=LENBOUNDNAME) :: bndName
1411  character(len=9) :: cno
1412  integer(I4B) :: n, itemno, isize, nfeat
1413  integer(I4B), allocatable, dimension(:) :: nboundchk
1414  real(DP), dimension(:), pointer, contiguous :: strt_ptr => null()
1415  type(CharacterStringType), dimension(:), pointer, contiguous :: &
1416  boundname_ptr => null()
1417  !
1418  ! -- allocate package simulation arrays
1419  call mem_allocate(this%strt, this%ncv, 'STRT', this%memoryPath)
1420  if (this%imatrows == 0) then
1421  call mem_allocate(this%iboundpak, this%ncv, 'IBOUND', this%memoryPath)
1422  call mem_allocate(this%xnewpak, this%ncv, 'XNEWPAK', this%memoryPath)
1423  end if
1424  call mem_allocate(this%xoldpak, this%ncv, 'XOLDPAK', this%memoryPath)
1425  allocate (this%featname(this%ncv))
1426  !
1427  ! -- initialize arrays
1428  do n = 1, this%ncv
1429  this%strt(n) = dep20
1430  this%xoldpak(n) = dep20
1431  if (this%imatrows == 0) then
1432  this%iboundpak(n) = 1
1433  this%xnewpak(n) = dep20
1434  end if
1435  end do
1436  !
1437  ! -- set up featureauxvar; allocate_featureauxvar also sets pkg_ifno
1438  ! from PACKAGEDATA_IFNO
1439  call this%allocate_featureauxvar()
1440  !
1441  ! -- validate PACKAGEDATA specifies IFNO exactly once for every feature
1442  nfeat = size(this%pkg_ifno)
1443  allocate (nboundchk(this%ncv))
1444  nboundchk = 0
1445  do n = 1, nfeat
1446  itemno = this%validate_ifno(this%pkg_ifno(n), this%ncv, nboundchk, 'IFNO', &
1447  trim(adjustl(this%text))//' PACKAGEDATA')
1448  end do
1449  call this%report_ifno_coverage(nboundchk, this%ncv, 'feature', &
1450  trim(adjustl(this%text))//' PACKAGEDATA')
1451  deallocate (nboundchk)
1452  if (count_errors() > 0) then
1453  call store_error_filename(this%input_fname)
1454  end if
1455  !
1456  ! -- source STRT from the input context
1457  call mem_setptr(strt_ptr, 'STRT', this%input_mempath)
1458  do n = 1, nfeat
1459  itemno = this%pkg_ifno(n)
1460  this%strt(itemno) = strt_ptr(n)
1461  end do
1462  call memorystore_release('STRT', this%input_mempath)
1463  !
1464  ! -- set default feature names then override with BOUNDNAME if present
1465  do n = 1, this%ncv
1466  write (cno, '(i9.9)') n
1467  this%featname(n) = 'Feature'//cno
1468  end do
1469  if (this%inamedbound /= 0) then
1470  call get_isize('BOUNDNAME', this%input_mempath, isize)
1471  if (isize > 0) then
1472  call mem_setptr(boundname_ptr, 'BOUNDNAME', this%input_mempath)
1473  do n = 1, nfeat
1474  itemno = this%pkg_ifno(n)
1475  if (itemno < 1 .or. itemno > this%ncv) cycle
1476  bndname = boundname_ptr(n)
1477  if (trim(bndname) /= '') this%featname(itemno) = trim(bndname)
1478  end do
1479  end if
1480  end if
1481  call memorystore_release('BOUNDNAME', this%input_mempath)
1482  !
1483  write (this%iout, '(/1x,a)') 'END OF '//trim(adjustl(this%text))// &
1484  ' PACKAGEDATA'
Here is the call graph for this function:

◆ apt_source_dimensions()

subroutine tspaptmodule::apt_source_dimensions ( class(tspapttype), intent(inout)  this)

Definition at line 1353 of file tsp-apt.f90.

1354  ! -- dummy
1355  class(TspAptType), intent(inout) :: this
1356  ! -- local
1357  integer(I4B) :: ierr
1358  !
1359  ! -- default flow package name to package name if not specified in OPTIONS
1360  if (this%flowpackagename == '') then
1361  this%flowpackagename = this%packName
1362  write (this%iout, '(4x,a)') &
1363  'THE FLOW PACKAGE NAME FOR '//trim(adjustl(this%text))//' WAS NOT &
1364  &SPECIFIED. SETTING FLOW PACKAGE NAME TO '// &
1365  trim(adjustl(this%flowpackagename))
1366  end if
1367  call this%find_apt_package()
1368  !
1369  ! -- derive dimensions from the corresponding GWF advanced package
1370  this%ncv = this%flowbudptr%ncv
1371  this%maxbound = this%flowbudptr%budterm(this%idxbudgwf)%maxlist
1372  this%nbound = this%maxbound
1373  write (this%iout, '(a, a)') 'SETTING DIMENSIONS FOR PACKAGE ', this%packName
1374  write (this%iout, '(2x,a,i0)') 'NUMBER OF CONTROL VOLUMES = ', this%ncv
1375  write (this%iout, '(2x,a,i0)') 'MAXBOUND = ', this%maxbound
1376  write (this%iout, '(2x,a,i0)') 'NBOUND = ', this%nbound
1377  if (this%imatrows /= 0) then
1378  this%npakeq = this%ncv
1379  write (this%iout, '(2x,a)') trim(adjustl(this%text))// &
1380  ' SOLVED AS PART OF GWT MATRIX EQUATIONS'
1381  else
1382  write (this%iout, '(2x,a)') trim(adjustl(this%text))// &
1383  ' SOLVED SEPARATELY FROM GWT MATRIX EQUATIONS '
1384  end if
1385  write (this%iout, '(a, //)') 'DONE SETTING DIMENSIONS FOR '// &
1386  trim(adjustl(this%text))
1387  !
1388  if (this%ncv < 0) then
1389  write (errmsg, '(a)') &
1390  'Number of control volumes could not be determined correctly.'
1391  call store_error(errmsg)
1392  end if
1393  ierr = count_errors()
1394  if (ierr > 0) call store_error_filename(this%input_fname)
1395  !
1396  ! -- source packagedata from the input context
1397  call this%apt_source_cvs()
1398  !
1399  call this%define_listlabel()
1400  call this%apt_setup_budobj()
1401  call this%apt_setup_tableobj()
Here is the call graph for this function:

◆ apt_source_options()

subroutine tspaptmodule::apt_source_options ( class(tspapttype), intent(inout)  this)

Definition at line 1266 of file tsp-apt.f90.

1267  ! -- dummy
1268  class(TspAptType), intent(inout) :: this
1269  ! -- local
1270  character(len=LINELENGTH) :: fname
1271  logical :: found
1272  ! -- formats
1273  character(len=*), parameter :: fmtaptbin = &
1274  "(4x, a, 1x, a, 1x, ' WILL BE SAVED TO FILE: ', a, &
1275  &/4x, 'OPENED ON UNIT: ', I0)"
1276  !
1277  ! -- call base class for AUXILIARY/BOUNDNAMES/PRINT_INPUT/PRINT_FLOWS/
1278  ! SAVE_FLOWS/OBS6/TS6 options
1279  call this%BndExtType%source_options()
1280  !
1281  write (this%iout, '(1x,a)') &
1282  'PROCESSING '//trim(adjustl(this%text))//' OPTIONS'
1283  !
1284  ! -- FLOW_PKG_NAME (DFN: flow_package_name)
1285  call mem_set_value(this%flowpackagename, 'FLOW_PKG_NAME', &
1286  this%input_mempath, found)
1287  if (found) then
1288  write (this%iout, '(4x,a)') &
1289  'THIS '//trim(adjustl(this%text))//' PACKAGE CORRESPONDS TO A GWF &
1290  &PACKAGE WITH THE NAME '//trim(adjustl(this%flowpackagename))
1291  end if
1292  !
1293  ! -- FP_AUX_NAME (DFN: flow_package_auxiliary_name)
1294  call mem_set_value(this%cauxfpconc, 'FP_AUX_NAME', &
1295  this%input_mempath, found)
1296  if (found) then
1297  write (this%iout, '(4x,a)') &
1298  'SIMULATED CONCENTRATIONS WILL BE COPIED INTO THE FLOW PACKAGE &
1299  &AUXILIARY VARIABLE WITH THE NAME '//trim(adjustl(this%cauxfpconc))
1300  end if
1301  !
1302  ! -- DEV_NONEXPANDING_MATRIX is intentionally not sourced: this
1303  ! package's imatrows=0 solve path divides by a per-feature
1304  ! storage term that is zero without a stage-volume table.
1305  !
1306  ! -- IPRCONC (DFN: print_concentration or print_temperature)
1307  call mem_set_value(this%iprconc, 'IPRCONC', this%input_mempath, found)
1308  if (found) then
1309  write (this%iout, '(4x,a)') trim(adjustl(this%text))// &
1310  ' '//trim(adjustl(this%depvartype))//'S WILL BE PRINTED TO LISTING FILE.'
1311  end if
1312  !
1313  ! -- concentration/temperature output file: 'CONCFILE' (GWT) or 'TEMPFILE' (GWE)
1314  if (this%depvartype == 'CONCENTRATION') then
1315  call mem_set_value(fname, 'CONCFILE', this%input_mempath, found)
1316  else
1317  call mem_set_value(fname, 'TEMPFILE', this%input_mempath, found)
1318  end if
1319  if (found) then
1320  call assign_iounit(this%iconcout, this%inunit, &
1321  trim(this%depvartype)//" fileout")
1322  call openfile(this%iconcout, this%iout, fname, 'DATA(BINARY)', &
1323  form, access, 'REPLACE', mode_opt=mnormal)
1324  write (this%iout, fmtaptbin) trim(adjustl(this%text)), &
1325  trim(adjustl(this%depvartype)), trim(fname), this%iconcout
1326  end if
1327  !
1328  ! -- BUDGET FILEOUT
1329  call mem_set_value(fname, 'BUDGETFILE', this%input_mempath, found)
1330  if (found) then
1331  call assign_iounit(this%ibudgetout, this%inunit, "BUDGET fileout")
1332  call openfile(this%ibudgetout, this%iout, fname, 'DATA(BINARY)', &
1333  form, access, 'REPLACE', mode_opt=mnormal)
1334  write (this%iout, fmtaptbin) trim(adjustl(this%text)), 'BUDGET', &
1335  trim(fname), this%ibudgetout
1336  end if
1337  !
1338  ! -- BUDGETCSV FILEOUT
1339  call mem_set_value(fname, 'BUDGETCSVFILE', this%input_mempath, found)
1340  if (found) then
1341  call assign_iounit(this%ibudcsv, this%inunit, "BUDGETCSV fileout")
1342  call openfile(this%ibudcsv, this%iout, fname, 'CSV', filstat_opt='REPLACE')
1343  write (this%iout, fmtaptbin) trim(adjustl(this%text)), 'BUDGET CSV', &
1344  trim(fname), this%ibudcsv
1345  end if
1346  !
1347  write (this%iout, '(1x,a)') &
1348  'END OF '//trim(adjustl(this%text))//' OPTIONS'
Here is the call graph for this function:

◆ apt_stor_term()

subroutine tspaptmodule::apt_stor_term ( class(tspapttype)  this,
integer(i4b), intent(in)  ientry,
integer(i4b), intent(inout)  n1,
integer(i4b), intent(inout)  n2,
real(dp), intent(inout), optional  rrate,
real(dp), intent(inout), optional  rhsval,
real(dp), intent(inout), optional  hcofval 
)

Definition at line 2118 of file tsp-apt.f90.

2120  use tdismodule, only: delt
2121  class(TspAptType) :: this
2122  integer(I4B), intent(in) :: ientry
2123  integer(I4B), intent(inout) :: n1
2124  integer(I4B), intent(inout) :: n2
2125  real(DP), intent(inout), optional :: rrate
2126  real(DP), intent(inout), optional :: rhsval
2127  real(DP), intent(inout), optional :: hcofval
2128  real(DP) :: v0, v1
2129  real(DP) :: c0, c1
2130  !
2131  n1 = ientry
2132  n2 = ientry
2133  call this%apt_get_volumes(n1, v1, v0, delt)
2134  c0 = this%xoldpak(n1)
2135  c1 = this%xnewpak(n1)
2136  if (present(rrate)) then
2137  rrate = (-c1 * v1 / delt + c0 * v0 / delt) * this%eqnsclfac
2138  end if
2139  !
2140  if (present(rhsval)) rhsval = -c0 * v0 * this%eqnsclfac / delt
2141  if (present(hcofval)) hcofval = -v1 * this%eqnsclfac / delt

◆ apt_tmvr_term()

subroutine tspaptmodule::apt_tmvr_term ( class(tspapttype)  this,
integer(i4b), intent(in)  ientry,
integer(i4b), intent(inout)  n1,
integer(i4b), intent(inout)  n2,
real(dp), intent(inout), optional  rrate,
real(dp), intent(inout), optional  rhsval,
real(dp), intent(inout), optional  hcofval 
)

Definition at line 2146 of file tsp-apt.f90.

2148  ! -- modules
2149  ! -- dummy
2150  class(TspAptType) :: this
2151  integer(I4B), intent(in) :: ientry
2152  integer(I4B), intent(inout) :: n1
2153  integer(I4B), intent(inout) :: n2
2154  real(DP), intent(inout), optional :: rrate
2155  real(DP), intent(inout), optional :: rhsval
2156  real(DP), intent(inout), optional :: hcofval
2157  ! -- local
2158  real(DP) :: qbnd
2159  real(DP) :: ctmp
2160  !
2161  ! -- Calculate MVR-related terms
2162  n1 = this%flowbudptr%budterm(this%idxbudtmvr)%id1(ientry)
2163  n2 = this%flowbudptr%budterm(this%idxbudtmvr)%id2(ientry)
2164  qbnd = this%flowbudptr%budterm(this%idxbudtmvr)%flow(ientry)
2165  ctmp = this%xnewpak(n1)
2166  if (present(rrate)) rrate = ctmp * qbnd * this%eqnsclfac
2167  if (present(rhsval)) rhsval = dzero
2168  if (present(hcofval)) hcofval = qbnd * this%eqnsclfac

◆ define_listlabel()

subroutine tspaptmodule::define_listlabel ( class(tspapttype), intent(inout)  this)

Definition at line 1669 of file tsp-apt.f90.

1670  class(TspAptType), intent(inout) :: this
1671  !
1672  ! -- create the header list label
1673  this%listlabel = trim(this%filtyp)//' NO.'
1674  if (this%dis%ndim == 3) then
1675  write (this%listlabel, '(a, a7)') trim(this%listlabel), 'LAYER'
1676  write (this%listlabel, '(a, a7)') trim(this%listlabel), 'ROW'
1677  write (this%listlabel, '(a, a7)') trim(this%listlabel), 'COL'
1678  elseif (this%dis%ndim == 2) then
1679  write (this%listlabel, '(a, a7)') trim(this%listlabel), 'LAYER'
1680  write (this%listlabel, '(a, a7)') trim(this%listlabel), 'CELL2D'
1681  else
1682  write (this%listlabel, '(a, a7)') trim(this%listlabel), 'NODE'
1683  end if
1684  write (this%listlabel, '(a, a16)') trim(this%listlabel), 'STRESS RATE'
1685  if (this%inamedbound == 1) then
1686  write (this%listlabel, '(a, a16)') trim(this%listlabel), 'BOUNDARY NAME'
1687  end if

◆ find_apt_package()

subroutine tspaptmodule::find_apt_package ( class(tspapttype)  this)

Definition at line 1252 of file tsp-apt.f90.

1253  ! -- modules
1255  ! -- dummy
1256  class(TspAptType) :: this
1257  ! -- local
1258  !
1259  ! -- this routine should never be called
1260  call store_error('Program error: pak_solve not implemented.', &
1261  terminate=.true.)
Here is the call graph for this function:

◆ get_mvr_depvar()

real(dp) function, dimension(:), pointer, contiguous tspaptmodule::get_mvr_depvar ( class(tspapttype)  this)

Set the concentration (or temperature) to be used by either MVT or MVE

Definition at line 552 of file tsp-apt.f90.

553  ! -- dummy
554  class(TspAptType) :: this
555  ! -- return
556  real(dp), dimension(:), contiguous, pointer :: get_mvr_depvar
557  !
558  get_mvr_depvar => this%xnewpak

◆ pak_bd_obs()

subroutine tspaptmodule::pak_bd_obs ( class(tspapttype), intent(inout)  this,
character(len=*), intent(in)  obstypeid,
integer(i4b), intent(in)  jj,
real(dp), intent(inout)  v,
logical, intent(inout)  found 
)

Definition at line 2670 of file tsp-apt.f90.

2671  ! -- dummy
2672  class(TspAptType), intent(inout) :: this
2673  character(len=*), intent(in) :: obstypeid
2674  integer(I4B), intent(in) :: jj
2675  real(DP), intent(inout) :: v
2676  logical, intent(inout) :: found
2677  ! -- local
2678  !
2679  ! -- set found = .false. because obstypeid is not known
2680  found = .false.

◆ pak_df_obs()

subroutine tspaptmodule::pak_df_obs ( class(tspapttype)  this)

This routine:

  • stores observations supported by the APT package
  • must be overridden by child class

Definition at line 2284 of file tsp-apt.f90.

2285  ! -- modules
2286  ! -- dummy
2287  class(TspAptType) :: this
2288  ! -- local
2289  !
2290  ! -- this routine should never be called
2291  call store_error('Program error: pak_df_obs not implemented.', &
2292  terminate=.true.)
Here is the call graph for this function:

◆ pak_fc_expanded()

subroutine tspaptmodule::pak_fc_expanded ( class(tspapttype)  this,
real(dp), dimension(:), intent(inout)  rhs,
integer(i4b), dimension(:), intent(in)  ia,
integer(i4b), dimension(:), intent(in)  idxglo,
class(matrixbasetype), pointer  matrix_sln 
)

Routine to allow a subclass advanced transport package to inject terms into the matrix assembly. This method must be overridden.

Definition at line 825 of file tsp-apt.f90.

826  ! -- modules
827  ! -- dummy
828  class(TspAptType) :: this
829  real(DP), dimension(:), intent(inout) :: rhs
830  integer(I4B), dimension(:), intent(in) :: ia
831  integer(I4B), dimension(:), intent(in) :: idxglo
832  class(MatrixBaseType), pointer :: matrix_sln
833  ! -- local
834  !
835  ! -- this routine should never be called
836  call store_error('Program error: pak_fc_expanded not implemented.', &
837  terminate=.true.)
Here is the call graph for this function:

◆ pak_fill_budobj()

subroutine tspaptmodule::pak_fill_budobj ( class(tspapttype)  this,
integer(i4b), intent(inout)  idx,
real(dp), dimension(:), intent(in)  x,
real(dp), dimension(:), intent(inout), contiguous  flowja,
real(dp), intent(inout)  ccratin,
real(dp), intent(inout)  ccratout 
)

Definition at line 2099 of file tsp-apt.f90.

2100  ! -- modules
2101  ! -- dummy
2102  class(TspAptType) :: this
2103  integer(I4B), intent(inout) :: idx
2104  real(DP), dimension(:), intent(in) :: x
2105  real(DP), dimension(:), contiguous, intent(inout) :: flowja
2106  real(DP), intent(inout) :: ccratin
2107  real(DP), intent(inout) :: ccratout
2108  ! -- local
2109  ! -- formats
2110  !
2111  ! -- this routine should never be called
2112  call store_error('Program error: pak_fill_budobj not implemented.', &
2113  terminate=.true.)
Here is the call graph for this function:

◆ pak_get_nbudterms()

integer(i4b) function tspaptmodule::pak_get_nbudterms ( class(tspapttype)  this)

This function must be overridden.

Definition at line 1743 of file tsp-apt.f90.

1744  ! -- modules
1745  ! -- dummy
1746  class(TspAptType) :: this
1747  ! -- return
1748  integer(I4B) :: nbudterms
1749  ! -- local
1750  !
1751  ! -- this routine should never be called
1752  call store_error('Program error: pak_get_nbudterms not implemented.', &
1753  terminate=.true.)
1754  nbudterms = 0
Here is the call graph for this function:

◆ pak_rp_obs()

subroutine tspaptmodule::pak_rp_obs ( class(tspapttype), intent(inout)  this,
type(observetype), intent(inout)  obsrv,
logical, intent(inout)  found 
)

Method to process specific observations for this package.

Parameters
[in,out]thispackage class
[in,out]obsrvobservation object
[in,out]foundindicate whether observation was found

Definition at line 2299 of file tsp-apt.f90.

2300  ! -- dummy
2301  class(TspAptType), intent(inout) :: this !< package class
2302  type(ObserveType), intent(inout) :: obsrv !< observation object
2303  logical, intent(inout) :: found !< indicate whether observation was found
2304  ! -- local
2305  !
2306  ! -- this routine should never be called
2307  call store_error('Program error: pak_rp_obs not implemented.', &
2308  terminate=.true.)
Here is the call graph for this function:

◆ pak_setup_budobj()

subroutine tspaptmodule::pak_setup_budobj ( class(tspapttype)  this,
integer(i4b), intent(inout)  idx 
)

Individual packages set up their budget terms. Must be overridden.

Definition at line 1947 of file tsp-apt.f90.

1948  ! -- modules
1949  ! -- dummy
1950  class(TspAptType) :: this
1951  integer(I4B), intent(inout) :: idx
1952  ! -- local
1953  !
1954  ! -- this routine should never be called
1955  call store_error('Program error: pak_setup_budobj not implemented.', &
1956  terminate=.true.)
Here is the call graph for this function:

◆ pak_solve()

subroutine tspaptmodule::pak_solve ( class(tspapttype)  this)

This routine must be overridden by the specific apt package

Definition at line 1625 of file tsp-apt.f90.

1626  ! -- dummy
1627  class(TspAptType) :: this
1628  ! -- local
1629  !
1630  ! -- this routine should never be called
1631  call store_error('Program error: pak_solve not implemented.', &
1632  terminate=.true.)
Here is the call graph for this function:

◆ rp_obs_budterm()

subroutine tspaptmodule::rp_obs_budterm ( class(tspapttype), intent(inout)  this,
type(observetype), intent(inout)  obsrv,
type(budgettermtype), intent(in)  budterm 
)

Find the indices for this observation assuming they are first indexed by feature number and secondly by a connection number

Parameters
[in,out]thisobject
[in,out]obsrvobservation
[in]budtermbudget term

Definition at line 2359 of file tsp-apt.f90.

2360  class(TspAptType), intent(inout) :: this !< object
2361  type(ObserveType), intent(inout) :: obsrv !< observation
2362  type(BudgetTermType), intent(in) :: budterm !< budget term
2363  integer(I4B) :: nn1
2364  integer(I4B) :: iconn
2365  integer(I4B) :: icv
2366  integer(I4B) :: idx
2367  integer(I4B) :: j
2368  logical :: jfound
2369  character(len=*), parameter :: fmterr = &
2370  "('Boundary ', a, ' for observation ', a, &
2371  &' is invalid in package ', a)"
2372  nn1 = obsrv%NodeNumber
2373  if (nn1 == namedboundflag) then
2374  jfound = .false.
2375  do j = 1, budterm%nlist
2376  icv = budterm%id1(j)
2377  if (this%featname(icv) == obsrv%FeatureName) then
2378  jfound = .true.
2379  call obsrv%AddObsIndex(j)
2380  end if
2381  end do
2382  if (.not. jfound) then
2383  write (errmsg, fmterr) trim(obsrv%FeatureName), trim(obsrv%Name), &
2384  trim(this%packName)
2385  call store_error(errmsg)
2386  end if
2387  else
2388  !
2389  ! -- ensure nn1 is > 0 and < ncv
2390  if (nn1 < 0 .or. nn1 > this%ncv) then
2391  write (errmsg, '(7a, i0, a, i0, a)') &
2392  'Observation ', trim(obsrv%Name), ' of type ', &
2393  trim(adjustl(obsrv%ObsTypeId)), ' in package ', &
2394  trim(this%packName), ' was assigned ID = ', nn1, &
2395  '. ID must be >= 1 and <= ', this%ncv, '.'
2396  call store_error(errmsg)
2397  end if
2398  iconn = obsrv%NodeNumber2
2399  do j = 1, budterm%nlist
2400  if (budterm%id1(j) == nn1) then
2401  ! -- Look for the first occurrence of nn1, then set indxbnds
2402  ! to the iconn record after that
2403  idx = j + iconn - 1
2404  call obsrv%AddObsIndex(idx)
2405  exit
2406  end if
2407  end do
2408  if (idx < 1 .or. idx > budterm%nlist) then
2409  write (errmsg, '(7a, i0, a, i0, a)') &
2410  'Observation ', trim(obsrv%Name), ' of type ', &
2411  trim(adjustl(obsrv%ObsTypeId)), ' in package ', &
2412  trim(this%packName), ' specifies iconn = ', iconn, &
2413  ', but this is not a valid connection for ID ', nn1, '.'
2414  call store_error(errmsg)
2415  else if (budterm%id1(idx) /= nn1) then
2416  write (errmsg, '(7a, i0, a, i0, a)') &
2417  'Observation ', trim(obsrv%Name), ' of type ', &
2418  trim(adjustl(obsrv%ObsTypeId)), ' in package ', &
2419  trim(this%packName), ' specifies iconn = ', iconn, &
2420  ', but this is not a valid connection for ID ', nn1, '.'
2421  call store_error(errmsg)
2422  end if
2423  end if
Here is the call graph for this function:

◆ rp_obs_byfeature()

subroutine tspaptmodule::rp_obs_byfeature ( class(tspapttype), intent(inout)  this,
type(observetype), intent(inout)  obsrv 
)

Find the indices for this observation assuming they are indexed by feature number

Parameters
[in,out]thisobject
[in,out]obsrvobservation

Definition at line 2316 of file tsp-apt.f90.

2317  class(TspAptType), intent(inout) :: this !< object
2318  type(ObserveType), intent(inout) :: obsrv !< observation
2319  integer(I4B) :: nn1
2320  integer(I4B) :: j
2321  logical :: jfound
2322  character(len=*), parameter :: fmterr = &
2323  "('Boundary ', a, ' for observation ', a, &
2324  &' is invalid in package ', a)"
2325  nn1 = obsrv%NodeNumber
2326  if (nn1 == namedboundflag) then
2327  jfound = .false.
2328  do j = 1, this%ncv
2329  if (this%featname(j) == obsrv%FeatureName) then
2330  jfound = .true.
2331  call obsrv%AddObsIndex(j)
2332  end if
2333  end do
2334  if (.not. jfound) then
2335  write (errmsg, fmterr) trim(obsrv%FeatureName), trim(obsrv%Name), &
2336  trim(this%packName)
2337  call store_error(errmsg)
2338  end if
2339  else
2340  !
2341  ! -- ensure nn1 is > 0 and < ncv
2342  if (nn1 < 0 .or. nn1 > this%ncv) then
2343  write (errmsg, '(7a, i0, a, i0, a)') &
2344  'Observation ', trim(obsrv%Name), ' of type ', &
2345  trim(adjustl(obsrv%ObsTypeId)), ' in package ', &
2346  trim(this%packName), ' was assigned ID = ', nn1, &
2347  '. ID must be >= 1 and <= ', this%ncv, '.'
2348  call store_error(errmsg)
2349  end if
2350  call obsrv%AddObsIndex(nn1)
2351  end if
Here is the call graph for this function:

◆ rp_obs_flowjaface()

subroutine tspaptmodule::rp_obs_flowjaface ( class(tspapttype), intent(inout)  this,
type(observetype), intent(inout)  obsrv,
type(budgettermtype), intent(in)  budterm 
)

Find the indices for this observation assuming they are first indexed by a feature number and secondly by a second feature number

Parameters
[in,out]thisobject
[in,out]obsrvobservation
[in]budtermbudget term

Definition at line 2431 of file tsp-apt.f90.

2432  class(TspAptType), intent(inout) :: this !< object
2433  type(ObserveType), intent(inout) :: obsrv !< observation
2434  type(BudgetTermType), intent(in) :: budterm !< budget term
2435  integer(I4B) :: nn1
2436  integer(I4B) :: nn2
2437  integer(I4B) :: icv
2438  integer(I4B) :: j
2439  logical :: jfound
2440  character(len=*), parameter :: fmterr = &
2441  "('Boundary ', a, ' for observation ', a, &
2442  &' is invalid in package ', a)"
2443  nn1 = obsrv%NodeNumber
2444  if (nn1 == namedboundflag) then
2445  jfound = .false.
2446  do j = 1, budterm%nlist
2447  icv = budterm%id1(j)
2448  if (this%featname(icv) == obsrv%FeatureName) then
2449  jfound = .true.
2450  call obsrv%AddObsIndex(j)
2451  end if
2452  end do
2453  if (.not. jfound) then
2454  write (errmsg, fmterr) trim(obsrv%FeatureName), trim(obsrv%Name), &
2455  trim(this%packName)
2456  call store_error(errmsg)
2457  end if
2458  else
2459  !
2460  ! -- ensure nn1 is > 0 and < ncv
2461  if (nn1 < 0 .or. nn1 > this%ncv) then
2462  write (errmsg, '(7a, i0, a, i0, a)') &
2463  'Observation ', trim(obsrv%Name), ' of type ', &
2464  trim(adjustl(obsrv%ObsTypeId)), ' in package ', &
2465  trim(this%packName), ' was assigned ID = ', nn1, &
2466  '. ID must be >= 1 and <= ', this%ncv, '.'
2467  call store_error(errmsg)
2468  end if
2469  nn2 = obsrv%NodeNumber2
2470  !
2471  ! -- ensure nn2 is > 0 and < ncv
2472  if (nn2 < 0 .or. nn2 > this%ncv) then
2473  write (errmsg, '(7a, i0, a, i0, a)') &
2474  'Observation ', trim(obsrv%Name), ' of type ', &
2475  trim(adjustl(obsrv%ObsTypeId)), ' in package ', &
2476  trim(this%packName), ' was assigned ID2 = ', nn2, &
2477  '. ID must be >= 1 and <= ', this%ncv, '.'
2478  call store_error(errmsg)
2479  end if
2480  ! -- Look for nn1 and nn2 in id1 and id2
2481  jfound = .false.
2482  do j = 1, budterm%nlist
2483  if (budterm%id1(j) == nn1 .and. budterm%id2(j) == nn2) then
2484  call obsrv%AddObsIndex(j)
2485  jfound = .true.
2486  end if
2487  end do
2488  if (.not. jfound) then
2489  write (errmsg, '(7a, i0, a, i0, a)') &
2490  'Observation ', trim(obsrv%Name), ' of type ', &
2491  trim(adjustl(obsrv%ObsTypeId)), ' in package ', &
2492  trim(this%packName), &
2493  ' specifies a connection between feature ', nn1, &
2494  ' feature ', nn2, ', but these features are not connected.'
2495  call store_error(errmsg)
2496  end if
2497  end if
Here is the call graph for this function:

Variable Documentation

◆ ftype

character(len=lenftype) tspaptmodule::ftype = 'APT'

Definition at line 70 of file tsp-apt.f90.

70  character(len=LENFTYPE) :: ftype = 'APT'

◆ text

character(len=lenvarname) tspaptmodule::text = ' APT'

Definition at line 71 of file tsp-apt.f90.

71  character(len=LENVARNAME) :: text = ' APT'