MODFLOW 6  version 6.6.0.dev0
USGS Modular Hydrologic Model
transportmodelmodule Module Reference

This module contains the base transport model type. More...

Data Types

type  transportmodeltype
 

Functions/Subroutines

subroutine tsp_cr (this, filename, id, modelname, macronym, indis)
 Create a new generalized transport model object. More...
 
subroutine tsp_df (this)
 Generalized transport model define model. More...
 
subroutine tsp_ac (this, sparse)
 Generalized transport model add connections. More...
 
subroutine tsp_mc (this, matrix_sln)
 Generalized transport model map coefficients. More...
 
subroutine tsp_ar (this)
 Generalized transport model allocate and read. More...
 
subroutine tsp_rp (this)
 Generalized transport model read and prepare. More...
 
subroutine tsp_ad (this)
 Generalized transport model time step advance. More...
 
subroutine tsp_fc (this, kiter, matrix_sln, inwtflag)
 Generalized transport model fill coefficients. More...
 
subroutine tsp_cc (this, innertot, kiter, iend, icnvgmod, cpak, ipak, dpak)
 Generalized transport model final convergence check. More...
 
subroutine tsp_cq (this, icnvg, isuppress_output)
 Generalized transport model calculate flows. More...
 
subroutine tsp_bd (this, icnvg, isuppress_output)
 Generalized transport model budget. More...
 
subroutine tsp_ot (this)
 Generalized transport model output routine. More...
 
subroutine tsp_ot_obs (this)
 Generalized transport model output routine. More...
 
subroutine tsp_ot_flow (this, icbcfl, ibudfl, icbcun)
 Generalized transport model output routine. More...
 
subroutine tsp_ot_flowja (this, nja, flowja, icbcfl, icbcun)
 Generalized transport model output routine. More...
 
subroutine tsp_ot_dv (this, idvsave, idvprint, ipflag)
 Generalized transport model output routine. More...
 
subroutine tsp_ot_bdsummary (this, ibudfl, ipflag)
 Generalized transport model output budget summary. More...
 
subroutine allocate_tsp_scalars (this, modelname)
 Allocate scalar variables for transport model. More...
 
subroutine set_tsp_labels (this, tsptype, depvartype, depvarunit, depvarunitabbrev)
 Define the labels corresponding to the flavor of transport model. More...
 
subroutine tsp_da (this)
 Deallocate memory. More...
 
subroutine ftype_check (this, indis, inmst)
 Generalized transport model routine. More...
 
subroutine log_namfile_options (this, found)
 Write model name file options to list file. More...
 
subroutine create_tsp_packages (this, indis)
 Source package info and begin to process. More...
 

Detailed Description

This module contains the base class for transport models.

Function/Subroutine Documentation

◆ allocate_tsp_scalars()

subroutine transportmodelmodule::allocate_tsp_scalars ( class(transportmodeltype this,
character(len=*), intent(in)  modelname 
)

Method to allocate memory for non-allocatable members.

Definition at line 501 of file tsp.f90.

502  ! -- modules
504  ! -- dummy
505  class(TransportModelType) :: this
506  character(len=*), intent(in) :: modelname
507  !
508  ! -- allocate members from (grand)parent class
509  call this%NumericalModelType%allocate_scalars(modelname)
510  !
511  ! -- allocate members that are part of model class
512  call mem_allocate(this%inic, 'INIC', this%memoryPath)
513  call mem_allocate(this%infmi, 'INFMI', this%memoryPath)
514  call mem_allocate(this%inmvt, 'INMVT', this%memoryPath)
515  call mem_allocate(this%inadv, 'INADV', this%memoryPath)
516  call mem_allocate(this%inssm, 'INSSM', this%memoryPath)
517  call mem_allocate(this%inoc, 'INOC ', this%memoryPath)
518  call mem_allocate(this%inobs, 'INOBS', this%memoryPath)
519  call mem_allocate(this%eqnsclfac, 'EQNSCLFAC', this%memoryPath)
520  !
521  this%inic = 0
522  this%infmi = 0
523  this%inmvt = 0
524  this%inadv = 0
525  this%inssm = 0
526  this%inoc = 0
527  this%inobs = 0
528  this%eqnsclfac = dzero

◆ create_tsp_packages()

subroutine transportmodelmodule::create_tsp_packages ( class(transportmodeltype this,
integer(i4b), intent(inout)  indis 
)

Definition at line 659 of file tsp.f90.

660  ! -- modules
666  use dismodule, only: dis_cr
667  use disvmodule, only: disv_cr
668  use disumodule, only: disu_cr
669  use tspicmodule, only: ic_cr
670  use tspfmimodule, only: fmi_cr
671  use tspadvmodule, only: adv_cr
672  use tspssmmodule, only: ssm_cr
673  use tspmvtmodule, only: mvt_cr
674  use tspocmodule, only: oc_cr
675  use tspobsmodule, only: tsp_obs_cr
676  ! -- dummy
677  class(TransportModelType) :: this
678  integer(I4B), intent(inout) :: indis ! DIS enabled flag
679  ! -- local
680  type(CharacterStringType), dimension(:), contiguous, &
681  pointer :: pkgtypes => null()
682  type(CharacterStringType), dimension(:), contiguous, &
683  pointer :: pkgnames => null()
684  type(CharacterStringType), dimension(:), contiguous, &
685  pointer :: mempaths => null()
686  integer(I4B), dimension(:), contiguous, &
687  pointer :: inunits => null()
688  character(len=LENMEMPATH) :: model_mempath
689  character(len=LENFTYPE) :: pkgtype
690  character(len=LENPACKAGENAME) :: pkgname
691  character(len=LENMEMPATH) :: mempath
692  integer(I4B), pointer :: inunit
693  integer(I4B) :: n
694  character(len=LENMEMPATH) :: mempathic = ''
695  !
696  ! -- Initialize
697  indis = 0
698  !
699  ! -- Set input memory paths, input/model and input/model/namfile
700  model_mempath = create_mem_path(component=this%name, context=idm_context)
701  !
702  ! -- Set pointers to model path package info
703  call mem_setptr(pkgtypes, 'PKGTYPES', model_mempath)
704  call mem_setptr(pkgnames, 'PKGNAMES', model_mempath)
705  call mem_setptr(mempaths, 'MEMPATHS', model_mempath)
706  call mem_setptr(inunits, 'INUNITS', model_mempath)
707  !
708  do n = 1, size(pkgtypes)
709  !
710  ! -- Attributes for this input package
711  pkgtype = pkgtypes(n)
712  pkgname = pkgnames(n)
713  mempath = mempaths(n)
714  inunit => inunits(n)
715  !
716  ! -- Create dis package as it is a prerequisite for other packages
717  select case (pkgtype)
718  case ('DIS6')
719  indis = 1
720  call dis_cr(this%dis, this%name, mempath, indis, this%iout)
721  case ('DISV6')
722  indis = 1
723  call disv_cr(this%dis, this%name, mempath, indis, this%iout)
724  case ('DISU6')
725  indis = 1
726  call disu_cr(this%dis, this%name, mempath, indis, this%iout)
727  case ('IC6')
728  this%inic = 1
729  mempathic = mempath
730  case ('FMI6')
731  this%infmi = inunit
732  case ('MVT6', 'MVE6')
733  this%inmvt = inunit
734  case ('ADV6')
735  this%inadv = inunit
736  case ('SSM6')
737  this%inssm = inunit
738  case ('OC6')
739  this%inoc = inunit
740  case ('OBS6')
741  this%inobs = inunit
742  !case default
743  ! TODO
744  end select
745  end do
746  !
747  ! -- Create packages that are tied directly to model
748  call ic_cr(this%ic, this%name, mempathic, this%inic, this%iout, this%dis, &
749  this%depvartype)
750  call fmi_cr(this%fmi, this%name, this%infmi, this%iout, this%eqnsclfac, &
751  this%depvartype)
752  call adv_cr(this%adv, this%name, this%inadv, this%iout, this%fmi, &
753  this%eqnsclfac)
754  call ssm_cr(this%ssm, this%name, this%inssm, this%iout, this%fmi, &
755  this%eqnsclfac, this%depvartype)
756  call mvt_cr(this%mvt, this%name, this%inmvt, this%iout, this%fmi, &
757  this%eqnsclfac, this%depvartype)
758  call oc_cr(this%oc, this%name, this%inoc, this%iout)
759  call tsp_obs_cr(this%obs, this%inobs, this%depvartype)
This module contains simulation constants.
Definition: Constants.f90:9
integer(i4b), parameter linelength
maximum length of a standard line
Definition: Constants.f90:45
integer(i4b), parameter lenpackagename
maximum length of the package name
Definition: Constants.f90:23
Definition: Dis.f90:1
subroutine, public dis_cr(dis, name_model, input_mempath, inunit, iout)
Create a new structured discretization object.
Definition: Dis.f90:97
subroutine, public disu_cr(dis, name_model, input_mempath, inunit, iout)
Create a new unstructured discretization object.
Definition: Disu.f90:127
subroutine, public disv_cr(dis, name_model, input_mempath, inunit, iout)
Create a new discretization by vertices object.
Definition: Disv.f90:109
character(len=lenmempath) function create_mem_path(component, subcomponent, context)
returns the path to the memory object
This module contains simulation variables.
Definition: SimVariables.f90:9
character(len=linelength) idm_context
subroutine, public adv_cr(advobj, name_model, inunit, iout, fmi, eqnsclfac)
@ brief Create a new ADV object
Definition: tsp-adv.f90:50
subroutine, public fmi_cr(fmiobj, name_model, inunit, iout, eqnsclfac, depvartype)
Create a new FMI object.
Definition: tsp-fmi.f90:75
subroutine, public ic_cr(ic, name_model, input_mempath, inunit, iout, dis, depvartype)
Create a new initial conditions object.
Definition: tsp-ic.f90:25
subroutine, public mvt_cr(mvt, name_model, inunit, iout, fmi1, eqnsclfac, depvartype, gwfmodelname1, gwfmodelname2, fmi2)
Create a new mover transport object.
Definition: tsp-mvt.f90:75
subroutine, public tsp_obs_cr(obs, inobs, dvt)
Create a new TspObsType object.
Definition: tsp-obs.f90:44
subroutine, public oc_cr(ocobj, name_model, inunit, iout)
@ brief Create TspOcType
Definition: tsp-oc.f90:31
This module contains the TspSsm Module.
Definition: tsp-ssm.f90:8
subroutine, public ssm_cr(ssmobj, name_model, inunit, iout, fmi, eqnsclfac, depvartype)
@ brief Create a new SSM package
Definition: tsp-ssm.f90:84
This class is used to store a single deferred-length character string. It was designed to work in an ...
Definition: CharString.f90:23
Here is the call graph for this function:

◆ ftype_check()

subroutine transportmodelmodule::ftype_check ( class(transportmodeltype this,
integer(i4b), intent(in)  indis,
integer(i4b), intent(in)  inmst 
)

Check to make sure required input files have been specified

Parameters
[in]inmstrepresentative of both inmst and inest depending on model type

Definition at line 583 of file tsp.f90.

584  ! -- modules
585  use constantsmodule, only: linelength
587  ! -- dummy
588  class(TransportModelType) :: this
589  integer(I4B), intent(in) :: indis
590  integer(I4B), intent(in) :: inmst !< representative of both inmst and inest depending on model type
591  ! -- local
592  character(len=LINELENGTH) :: errmsg
593  !
594  ! -- Check for IC6, DIS(u), and MST. Stop if not present.
595  if (this%inic == 0) then
596  write (errmsg, '(a)') &
597  'Initial conditions (IC6) package not specified.'
598  call store_error(errmsg)
599  end if
600  if (indis == 0) then
601  write (errmsg, '(a)') &
602  'Discretization (DIS6 or DISU6) package not specified.'
603  call store_error(errmsg)
604  end if
605  if (inmst == 0) then
606  write (errmsg, '(a)') 'Mass storage and transfer (MST6) &
607  &package not specified.'
608  call store_error(errmsg)
609  end if
610  !
611  if (count_errors() > 0) then
612  write (errmsg, '(a)') 'Required package(s) not specified.'
613  call store_error(errmsg)
614  call store_error_filename(this%filename)
615  end if
This module contains simulation methods.
Definition: Sim.f90:10
subroutine, public store_error(msg, terminate)
Store an error message.
Definition: Sim.f90:92
integer(i4b) function, public count_errors()
Return number of errors.
Definition: Sim.f90:59
subroutine, public store_error_filename(filename, terminate)
Store the erroring file name.
Definition: Sim.f90:203
Here is the call graph for this function:

◆ log_namfile_options()

subroutine transportmodelmodule::log_namfile_options ( class(transportmodeltype this,
type(gwfnamparamfoundtype), intent(in)  found 
)

Definition at line 620 of file tsp.f90.

621  ! -- modules
623  ! -- dummy
624  class(TransportModelType) :: this
625  type(GwfNamParamFoundType), intent(in) :: found
626  !
627  write (this%iout, '(1x,a)') 'NAMEFILE OPTIONS:'
628  !
629  if (found%newton) then
630  write (this%iout, '(4x,a)') &
631  'NEWTON-RAPHSON method enabled for the model.'
632  if (found%under_relaxation) then
633  write (this%iout, '(4x,a,a)') &
634  'NEWTON-RAPHSON UNDER-RELAXATION based on the bottom ', &
635  'elevation of the model will be applied to the model.'
636  end if
637  end if
638  !
639  if (found%print_input) then
640  write (this%iout, '(4x,a)') 'STRESS PACKAGE INPUT WILL BE PRINTED '// &
641  'FOR ALL MODEL STRESS PACKAGES'
642  end if
643  !
644  if (found%print_flows) then
645  write (this%iout, '(4x,a)') 'PACKAGE FLOWS WILL BE PRINTED '// &
646  'FOR ALL MODEL PACKAGES'
647  end if
648  !
649  if (found%save_flows) then
650  write (this%iout, '(4x,a)') &
651  'FLOWS WILL BE SAVED TO BUDGET FILE SPECIFIED IN OUTPUT CONTROL'
652  end if
653  !
654  write (this%iout, '(1x,a)') 'END NAMEFILE OPTIONS:'

◆ set_tsp_labels()

subroutine transportmodelmodule::set_tsp_labels ( class(transportmodeltype this,
character(len=*), intent(in), pointer  tsptype,
character(len=*), intent(in)  depvartype,
character(len=*), intent(in)  depvarunit,
character(len=*), intent(in)  depvarunitabbrev 
)

Set variable names according to type of transport model

Parameters
[in]tsptypetype of model, default is GWT (alternative is GWE)
[in]depvartypedependent variable type, default is "CONCENTRATION"
[in]depvarunitunits of dependent variable for writing to list file
[in]depvarunitabbrevabbreviation of associated units

Definition at line 536 of file tsp.f90.

538  class(TransportModelType) :: this
539  character(len=*), intent(in), pointer :: tsptype !< type of model, default is GWT (alternative is GWE)
540  character(len=*), intent(in) :: depvartype !< dependent variable type, default is "CONCENTRATION"
541  character(len=*), intent(in) :: depvarunit !< units of dependent variable for writing to list file
542  character(len=*), intent(in) :: depvarunitabbrev !< abbreviation of associated units
543  !
544  ! -- Set the model type
545  this%tsptype = tsptype
546  !
547  ! -- Set the type of dependent variable being solved for
548  this%depvartype = depvartype
549  !
550  ! -- Set the units associated with the dependent variable
551  this%depvarunit = depvarunit
552  !
553  ! -- Set the units abbreviation
554  this%depvarunitabbrev = depvarunitabbrev

◆ tsp_ac()

subroutine transportmodelmodule::tsp_ac ( class(transportmodeltype this,
type(sparsematrix), intent(inout)  sparse 
)
private

This subroutine extended by either GWT or GWE. This routine adds the internal connections of this model to the sparse matrix

Definition at line 165 of file tsp.f90.

166  ! -- modules
167  use sparsemodule, only: sparsematrix
168  ! -- dummy
169  class(TransportModelType) :: this
170  type(sparsematrix), intent(inout) :: sparse

◆ tsp_ad()

subroutine transportmodelmodule::tsp_ad ( class(transportmodeltype this)
private

This subroutine extended by either GWT or GWE. This routine calls the advance time step (ad) routines of attached packages.

Definition at line 211 of file tsp.f90.

212  ! -- dummy
213  class(TransportModelType) :: this

◆ tsp_ar()

subroutine transportmodelmodule::tsp_ar ( class(transportmodeltype this)
private

This subroutine extended by either GWT or GWE. This routine calls the allocate and reads (ar) routines of attached packages and allocates memory for arrays required by the model object.

Definition at line 191 of file tsp.f90.

192  ! -- dummy
193  class(TransportModelType) :: this

◆ tsp_bd()

subroutine transportmodelmodule::tsp_bd ( class(transportmodeltype this,
integer(i4b), intent(in)  icnvg,
integer(i4b), intent(in)  isuppress_output 
)
private

This subroutine extended by either GWT or GWE. This routine calculates package contributions to model budget

Definition at line 263 of file tsp.f90.

264  ! -- dummy
265  class(TransportModelType) :: this
266  integer(I4B), intent(in) :: icnvg
267  integer(I4B), intent(in) :: isuppress_output

◆ tsp_cc()

subroutine transportmodelmodule::tsp_cc ( class(transportmodeltype this,
integer(i4b), intent(in)  innertot,
integer(i4b), intent(in)  kiter,
integer(i4b), intent(in)  iend,
integer(i4b), intent(in)  icnvgmod,
character(len=lenpakloc), intent(inout)  cpak,
integer(i4b), intent(inout)  ipak,
real(dp), intent(inout)  dpak 
)
private

This subroutine extended by either GWT or GWE. This routine calls the convergence check (cc) routines of attached packages.

Definition at line 234 of file tsp.f90.

235  ! -- dummy
236  class(TransportModelType) :: this
237  integer(I4B), intent(in) :: innertot
238  integer(I4B), intent(in) :: kiter
239  integer(I4B), intent(in) :: iend
240  integer(I4B), intent(in) :: icnvgmod
241  character(len=LENPAKLOC), intent(inout) :: cpak
242  integer(I4B), intent(inout) :: ipak
243  real(DP), intent(inout) :: dpak

◆ tsp_cq()

subroutine transportmodelmodule::tsp_cq ( class(transportmodeltype this,
integer(i4b), intent(in)  icnvg,
integer(i4b), intent(in)  isuppress_output 
)
private

This subroutine extended by either GWT or GWE. This routine calculates intercell flows (flowja)

Definition at line 251 of file tsp.f90.

252  ! -- dummy
253  class(TransportModelType) :: this
254  integer(I4B), intent(in) :: icnvg
255  integer(I4B), intent(in) :: isuppress_output

◆ tsp_cr()

subroutine transportmodelmodule::tsp_cr ( class(transportmodeltype this,
character(len=*), intent(in)  filename,
integer(i4b), intent(in)  id,
character(len=*), intent(in)  modelname,
character(len=*), intent(in)  macronym,
integer(i4b), intent(inout)  indis 
)
private

Create a new transport model that will be further refined into GWT or GWE

Definition at line 92 of file tsp.f90.

93  ! -- modules
98  use budgetmodule, only: budget_cr
99  ! -- dummy
100  class(TransportModelType) :: this
101  character(len=*), intent(in) :: filename
102  integer(I4B), intent(in) :: id
103  integer(I4B), intent(inout) :: indis
104  character(len=*), intent(in) :: modelname
105  character(len=*), intent(in) :: macronym
106  ! -- local
107  character(len=LENMEMPATH) :: input_mempath
108  character(len=LINELENGTH) :: lst_fname
109  type(GwfNamParamFoundType) :: found
110  !
111  ! -- Assign values
112  this%filename = filename
113  this%name = modelname
114  this%id = id
115  this%macronym = macronym
116  !
117  ! -- set input model namfile memory path
118  input_mempath = create_mem_path(modelname, 'NAM', idm_context)
119  !
120  ! -- copy option params from input context
121  call mem_set_value(lst_fname, 'LIST', input_mempath, found%list)
122  call mem_set_value(this%iprpak, 'PRINT_INPUT', input_mempath, &
123  found%print_input)
124  call mem_set_value(this%iprflow, 'PRINT_FLOWS', input_mempath, &
125  found%print_flows)
126  call mem_set_value(this%ipakcb, 'SAVE_FLOWS', input_mempath, found%save_flows)
127  !
128  ! -- create the list file
129  call this%create_lstfile(lst_fname, filename, found%list, &
130  'TRANSPORT MODEL ('//trim(macronym)//')')
131  !
132  ! -- activate save_flows if found
133  if (found%save_flows) then
134  this%ipakcb = -1
135  end if
136  !
137  ! -- log set options
138  if (this%iout > 0) then
139  call this%log_namfile_options(found)
140  end if
141  !
142  ! -- Create utility objects
143  call budget_cr(this%budget, this%name)
144  !
145  ! -- create model packages
146  call this%create_tsp_packages(indis)
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:84
Here is the call graph for this function:

◆ tsp_da()

subroutine transportmodelmodule::tsp_da ( class(transportmodeltype this)
private

Deallocate memory at conclusion of model run

Definition at line 561 of file tsp.f90.

562  ! -- modules
564  ! -- dummy
565  class(TransportModelType) :: this
566  ! -- local
567  !
568  ! -- Scalars
569  call mem_deallocate(this%inic)
570  call mem_deallocate(this%infmi)
571  call mem_deallocate(this%inadv)
572  call mem_deallocate(this%inssm)
573  call mem_deallocate(this%inmvt)
574  call mem_deallocate(this%inoc)
575  call mem_deallocate(this%inobs)
576  call mem_deallocate(this%eqnsclfac)

◆ tsp_df()

subroutine transportmodelmodule::tsp_df ( class(transportmodeltype this)

This subroutine extended by either GWT or GWE. This routine calls the define (df) routines for each attached package and sets variables and pointers.

Definition at line 155 of file tsp.f90.

156  ! -- dummy
157  class(TransportModelType) :: this

◆ tsp_fc()

subroutine transportmodelmodule::tsp_fc ( class(transportmodeltype this,
integer(i4b), intent(in)  kiter,
class(matrixbasetype), pointer  matrix_sln,
integer(i4b), intent(in)  inwtflag 
)
private

This subroutine extended by either GWT or GWE. This routine calls the fill coefficients (fc) routines of attached packages.

Definition at line 221 of file tsp.f90.

222  ! -- dummy
223  class(TransportModelType) :: this
224  integer(I4B), intent(in) :: kiter
225  class(MatrixBaseType), pointer :: matrix_sln
226  integer(I4B), intent(in) :: inwtflag

◆ tsp_mc()

subroutine transportmodelmodule::tsp_mc ( class(transportmodeltype this,
class(matrixbasetype), pointer  matrix_sln 
)

This subroutine extended by either GWT or GWE. This routine maps the positions of this models connections in the numerical solution coefficient matrix.

Parameters
matrix_slnglobal system matrix

Definition at line 179 of file tsp.f90.

180  ! -- dummy
181  class(TransportModelType) :: this
182  class(MatrixBaseType), pointer :: matrix_sln !< global system matrix

◆ tsp_ot()

subroutine transportmodelmodule::tsp_ot ( class(transportmodeltype this)
private

Generalized transport model output

Definition at line 274 of file tsp.f90.

275  ! -- modules
276  use tdismodule, only: kstp, kper, tdis_ot, endofperiod
277  ! -- dummy
278  class(TransportModelType) :: this
279  ! -- local
280  integer(I4B) :: idvsave
281  integer(I4B) :: idvprint
282  integer(I4B) :: icbcfl
283  integer(I4B) :: icbcun
284  integer(I4B) :: ibudfl
285  integer(I4B) :: ipflag
286  ! -- formats
287  character(len=*), parameter :: fmtnocnvg = &
288  "(1X,/9X,'****FAILED TO MEET SOLVER CONVERGENCE CRITERIA IN TIME STEP ', &
289  &I0,' OF STRESS PERIOD ',I0,'****')"
290  !
291  ! -- Set write and print flags
292  idvsave = 0
293  idvprint = 0
294  icbcfl = 0
295  ibudfl = 0
296  if (this%oc%oc_save(trim(this%depvartype))) idvsave = 1
297  if (this%oc%oc_print(trim(this%depvartype))) idvprint = 1
298  if (this%oc%oc_save('BUDGET')) icbcfl = 1
299  if (this%oc%oc_print('BUDGET')) ibudfl = 1
300  icbcun = this%oc%oc_save_unit('BUDGET')
301  !
302  ! -- Override ibudfl and idvprint flags for nonconvergence
303  ! and end of period
304  ibudfl = this%oc%set_print_flag('BUDGET', this%icnvg, endofperiod)
305  idvprint = this%oc%set_print_flag(trim(this%depvartype), &
306  this%icnvg, endofperiod)
307  !
308  ! -- Calculate and save observations
309  call this%tsp_ot_obs()
310  !
311  ! -- Save and print flows
312  call this%tsp_ot_flow(icbcfl, ibudfl, icbcun)
313  !
314  ! -- Save and print dependent variables
315  call this%tsp_ot_dv(idvsave, idvprint, ipflag)
316  !
317  ! -- Print budget summaries
318  call this%tsp_ot_bdsummary(ibudfl, ipflag)
319  !
320  ! -- Timing Output; if any dependent variables or budgets
321  ! are printed, then ipflag is set to 1.
322  if (ipflag == 1) call tdis_ot(this%iout)
323  !
324  ! -- Write non-convergence message
325  if (this%icnvg == 0) then
326  write (this%iout, fmtnocnvg) kstp, kper
327  end if
logical(lgp), pointer, public endofperiod
flag indicating end of stress period
Definition: tdis.f90:27
subroutine, public tdis_ot(iout)
Print simulation time.
Definition: tdis.f90:274
integer(i4b), pointer, public kstp
current time step number
Definition: tdis.f90:24
integer(i4b), pointer, public kper
current stress period number
Definition: tdis.f90:23
Here is the call graph for this function:

◆ tsp_ot_bdsummary()

subroutine transportmodelmodule::tsp_ot_bdsummary ( class(transportmodeltype this,
integer(i4b), intent(in)  ibudfl,
integer(i4b), intent(inout)  ipflag 
)
private

Loop through attached packages and write budget summaries

Definition at line 467 of file tsp.f90.

468  use tdismodule, only: kstp, kper, totim, delt
469  class(TransportModelType) :: this
470  integer(I4B), intent(in) :: ibudfl
471  integer(I4B), intent(inout) :: ipflag
472  class(BndType), pointer :: packobj
473  integer(I4B) :: ip
474  !
475  ! -- Package budget summary
476  do ip = 1, this%bndlist%Count()
477  packobj => getbndfromlist(this%bndlist, ip)
478  call packobj%bnd_ot_bdsummary(kstp, kper, this%iout, ibudfl)
479  end do
480  !
481  ! -- Mover budget summary
482  if (this%inmvt > 0) then
483  call this%mvt%mvt_ot_bdsummary(ibudfl)
484  end if
485  !
486  ! -- Model budget summary
487  call this%budget%finalize_step(delt)
488  if (ibudfl /= 0) then
489  ipflag = 1
490  call this%budget%budget_ot(kstp, kper, this%iout)
491  end if
492  !
493  ! -- Write to budget csv
494  call this%budget%writecsv(totim)
real(dp), pointer, public totim
time relative to start of simulation
Definition: tdis.f90:32
real(dp), pointer, public delt
length of the current time step
Definition: tdis.f90:29
Here is the call graph for this function:

◆ tsp_ot_dv()

subroutine transportmodelmodule::tsp_ot_dv ( class(transportmodeltype this,
integer(i4b), intent(in)  idvsave,
integer(i4b), intent(in)  idvprint,
integer(i4b), intent(inout)  ipflag 
)
private

Loop through attached packages saving and printing dependent variables

Definition at line 445 of file tsp.f90.

446  class(TransportModelType) :: this
447  integer(I4B), intent(in) :: idvsave
448  integer(I4B), intent(in) :: idvprint
449  integer(I4B), intent(inout) :: ipflag
450  class(BndType), pointer :: packobj
451  integer(I4B) :: ip
452  !
453  ! -- Print advanced package dependent variables
454  do ip = 1, this%bndlist%Count()
455  packobj => getbndfromlist(this%bndlist, ip)
456  call packobj%bnd_ot_dv(idvsave, idvprint)
457  end do
458  !
459  ! -- Save head and print head
460  call this%oc%oc_ot(ipflag)
Here is the call graph for this function:

◆ tsp_ot_flow()

subroutine transportmodelmodule::tsp_ot_flow ( class(transportmodeltype this,
integer(i4b), intent(in)  icbcfl,
integer(i4b), intent(in)  ibudfl,
integer(i4b), intent(in)  icbcun 
)
private

Save and print flows

Definition at line 355 of file tsp.f90.

356  ! -- dummy
357  class(TransportModelType) :: this
358  integer(I4B), intent(in) :: icbcfl
359  integer(I4B), intent(in) :: ibudfl
360  integer(I4B), intent(in) :: icbcun
361  ! -- local
362  class(BndType), pointer :: packobj
363  integer(I4B) :: ip
364  !
365  ! -- Save TSP flows
366  call this%tsp_ot_flowja(this%nja, this%flowja, icbcfl, icbcun)
367  if (this%infmi > 0) call this%fmi%fmi_ot_flow(icbcfl, icbcun)
368  if (this%inssm > 0) then
369  call this%ssm%ssm_ot_flow(icbcfl=icbcfl, ibudfl=0, icbcun=icbcun)
370  end if
371  !
372  do ip = 1, this%bndlist%Count()
373  packobj => getbndfromlist(this%bndlist, ip)
374  call packobj%bnd_ot_model_flows(icbcfl=icbcfl, ibudfl=0, icbcun=icbcun)
375  end do
376  !
377  ! -- Save advanced package flows
378  do ip = 1, this%bndlist%Count()
379  packobj => getbndfromlist(this%bndlist, ip)
380  call packobj%bnd_ot_package_flows(icbcfl=icbcfl, ibudfl=0)
381  end do
382  if (this%inmvt > 0) then
383  call this%mvt%mvt_ot_saveflow(icbcfl, ibudfl)
384  end if
385  !
386  ! -- Print Model (GWT or GWE) flows
387  ! no need to print flowja
388  ! no need to print mst
389  ! no need to print fmi
390  if (this%inssm > 0) then
391  call this%ssm%ssm_ot_flow(icbcfl=icbcfl, ibudfl=ibudfl, icbcun=0)
392  end if
393  do ip = 1, this%bndlist%Count()
394  packobj => getbndfromlist(this%bndlist, ip)
395  call packobj%bnd_ot_model_flows(icbcfl=icbcfl, ibudfl=ibudfl, icbcun=0)
396  end do
397  !
398  ! -- Print advanced package flows
399  do ip = 1, this%bndlist%Count()
400  packobj => getbndfromlist(this%bndlist, ip)
401  call packobj%bnd_ot_package_flows(icbcfl=0, ibudfl=ibudfl)
402  end do
403  !
404  if (this%inmvt > 0) then
405  call this%mvt%mvt_ot_printflow(icbcfl, ibudfl)
406  end if
407  !
Here is the call graph for this function:

◆ tsp_ot_flowja()

subroutine transportmodelmodule::tsp_ot_flowja ( class(transportmodeltype this,
integer(i4b), intent(in)  nja,
real(dp), dimension(nja), intent(in)  flowja,
integer(i4b), intent(in)  icbcfl,
integer(i4b), intent(in)  icbcun 
)
private

Write intercell flows for the transport model

Definition at line 414 of file tsp.f90.

415  ! -- dummy
416  class(TransportModelType) :: this
417  integer(I4B), intent(in) :: nja
418  real(DP), dimension(nja), intent(in) :: flowja
419  integer(I4B), intent(in) :: icbcfl
420  integer(I4B), intent(in) :: icbcun
421  ! -- local
422  integer(I4B) :: ibinun
423  ! -- formats
424  !
425  ! -- Set unit number for binary output
426  if (this%ipakcb < 0) then
427  ibinun = icbcun
428  elseif (this%ipakcb == 0) then
429  ibinun = 0
430  else
431  ibinun = this%ipakcb
432  end if
433  if (icbcfl == 0) ibinun = 0
434  !
435  ! -- Write the face flows if requested
436  if (ibinun /= 0) then
437  call this%dis%record_connection_array(flowja, ibinun, this%iout)
438  end if

◆ tsp_ot_obs()

subroutine transportmodelmodule::tsp_ot_obs ( class(transportmodeltype this)

Calculate and save observations

Definition at line 334 of file tsp.f90.

335  class(TransportModelType) :: this
336  class(BndType), pointer :: packobj
337  integer(I4B) :: ip
338  ! -- Calculate and save observations
339  call this%obs%obs_bd()
340  call this%obs%obs_ot()
341  !
342  ! -- Calculate and save package obserations
343  do ip = 1, this%bndlist%Count()
344  packobj => getbndfromlist(this%bndlist, ip)
345  call packobj%bnd_bd_obs()
346  call packobj%bnd_ot_obs()
347  end do
348  !
Here is the call graph for this function:

◆ tsp_rp()

subroutine transportmodelmodule::tsp_rp ( class(transportmodeltype this)
private

This subroutine extended by either GWT or GWE. This routine calls the read and prepare (rp) routines of attached packages.

Definition at line 201 of file tsp.f90.

202  ! -- dummy
203  class(TransportModelType) :: this