MODFLOW 6  version 6.5.0.dev2
MODFLOW 6 Code Documentation
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, inmst)
 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, inmst)
 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 tranpsort model output routine. More...
 
subroutine tsp_ot_bdsummary (this, ibudfl, ipflag)
 Generalized tranpsort 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 tranpsort 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 548 of file tsp.f90.

549  ! -- modules
551  ! -- dummy
552  class(TransportModelType) :: this
553  character(len=*), intent(in) :: modelname
554  !
555  ! -- allocate members from (grand)parent class
556  call this%NumericalModelType%allocate_scalars(modelname)
557  !
558  ! -- allocate members that are part of model class
559  call mem_allocate(this%inic, 'INIC', this%memoryPath)
560  call mem_allocate(this%infmi, 'INFMI', this%memoryPath)
561  call mem_allocate(this%inmvt, 'INMVT', this%memoryPath)
562  call mem_allocate(this%inadv, 'INADV', this%memoryPath)
563  call mem_allocate(this%inssm, 'INSSM', this%memoryPath)
564  call mem_allocate(this%inoc, 'INOC ', this%memoryPath)
565  call mem_allocate(this%inobs, 'INOBS', this%memoryPath)
566  call mem_allocate(this%eqnsclfac, 'EQNSCLFAC', this%memoryPath)
567  !
568  this%inic = 0
569  this%infmi = 0
570  this%inmvt = 0
571  this%inadv = 0
572  this%inssm = 0
573  this%inoc = 0
574  this%inobs = 0
575  this%eqnsclfac = dzero
576  !
577  ! -- Return
578  return

◆ create_tsp_packages()

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

Definition at line 721 of file tsp.f90.

722  ! -- modules
728  use dismodule, only: dis_cr
729  use disvmodule, only: disv_cr
730  use disumodule, only: disu_cr
731  use tspicmodule, only: ic_cr
732  use tspfmimodule, only: fmi_cr
733  use tspadvmodule, only: adv_cr
734  use tspssmmodule, only: ssm_cr
735  use tspmvtmodule, only: mvt_cr
736  use tspocmodule, only: oc_cr
737  use tspobsmodule, only: tsp_obs_cr
738  ! -- dummy
739  class(TransportModelType) :: this
740  integer(I4B), intent(inout) :: indis ! DIS enabled flag
741  ! -- local
742  type(CharacterStringType), dimension(:), contiguous, &
743  pointer :: pkgtypes => null()
744  type(CharacterStringType), dimension(:), contiguous, &
745  pointer :: pkgnames => null()
746  type(CharacterStringType), dimension(:), contiguous, &
747  pointer :: mempaths => null()
748  integer(I4B), dimension(:), contiguous, &
749  pointer :: inunits => null()
750  character(len=LENMEMPATH) :: model_mempath
751  character(len=LENFTYPE) :: pkgtype
752  character(len=LENPACKAGENAME) :: pkgname
753  character(len=LENMEMPATH) :: mempath
754  integer(I4B), pointer :: inunit
755  integer(I4B) :: n
756  character(len=LENMEMPATH) :: mempathic = ''
757  !
758  ! -- Initialize
759  indis = 0
760  !
761  ! -- Set input memory paths, input/model and input/model/namfile
762  model_mempath = create_mem_path(component=this%name, context=idm_context)
763  !
764  ! -- Set pointers to model path package info
765  call mem_setptr(pkgtypes, 'PKGTYPES', model_mempath)
766  call mem_setptr(pkgnames, 'PKGNAMES', model_mempath)
767  call mem_setptr(mempaths, 'MEMPATHS', model_mempath)
768  call mem_setptr(inunits, 'INUNITS', model_mempath)
769  !
770  do n = 1, size(pkgtypes)
771  !
772  ! -- Attributes for this input package
773  pkgtype = pkgtypes(n)
774  pkgname = pkgnames(n)
775  mempath = mempaths(n)
776  inunit => inunits(n)
777  !
778  ! -- Create dis package as it is a prerequisite for other packages
779  select case (pkgtype)
780  case ('DIS6')
781  indis = 1
782  call dis_cr(this%dis, this%name, mempath, indis, this%iout)
783  case ('DISV6')
784  indis = 1
785  call disv_cr(this%dis, this%name, mempath, indis, this%iout)
786  case ('DISU6')
787  indis = 1
788  call disu_cr(this%dis, this%name, mempath, indis, this%iout)
789  case ('IC6')
790  this%inic = 1
791  mempathic = mempath
792  case ('FMI6')
793  this%infmi = inunit
794  case ('MVT6', 'MVE6')
795  this%inmvt = inunit
796  case ('ADV6')
797  this%inadv = inunit
798  case ('SSM6')
799  this%inssm = inunit
800  case ('OC6')
801  this%inoc = inunit
802  case ('OBS6')
803  this%inobs = inunit
804  !case default
805  ! TODO
806  end select
807  end do
808  !
809  ! -- Create packages that are tied directly to model
810  call ic_cr(this%ic, this%name, mempathic, this%inic, this%iout, this%dis, &
811  this%depvartype)
812  call fmi_cr(this%fmi, this%name, this%infmi, this%iout, this%eqnsclfac, &
813  this%depvartype)
814  call adv_cr(this%adv, this%name, this%inadv, this%iout, this%fmi, &
815  this%eqnsclfac)
816  call ssm_cr(this%ssm, this%name, this%inssm, this%iout, this%fmi, &
817  this%eqnsclfac, this%depvartype)
818  call mvt_cr(this%mvt, this%name, this%inmvt, this%iout, this%fmi, &
819  this%eqnsclfac, this%depvartype)
820  call oc_cr(this%oc, this%name, this%inoc, this%iout)
821  call tsp_obs_cr(this%obs, this%inobs)
822  !
823  ! -- Return
824  return
This module contains simulation constants.
Definition: Constants.f90:9
integer(i4b), parameter linelength
maximum length of a standard line
Definition: Constants.f90:44
integer(i4b), parameter lenpackagename
maximum length of the package name
Definition: Constants.f90:22
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:47
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)
Create a new TspObsType object.
Definition: tsp-obs.f90:42
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 639 of file tsp.f90.

640  ! -- modules
641  use constantsmodule, only: linelength
643  ! -- dummy
644  class(TransportModelType) :: this
645  integer(I4B), intent(in) :: indis
646  integer(I4B), intent(in) :: inmst !< representative of both inmst and inest depending on model type
647  ! -- local
648  character(len=LINELENGTH) :: errmsg
649  !
650  ! -- Check for IC6, DIS(u), and MST. Stop if not present.
651  if (this%inic == 0) then
652  write (errmsg, '(a)') &
653  'Initial conditions (IC6) package not specified.'
654  call store_error(errmsg)
655  end if
656  if (indis == 0) then
657  write (errmsg, '(a)') &
658  'Discretization (DIS6 or DISU6) package not specified.'
659  call store_error(errmsg)
660  end if
661  if (inmst == 0) then
662  write (errmsg, '(a)') 'Mass storage and transfer (MST6) &
663  &package not specified.'
664  call store_error(errmsg)
665  end if
666  !
667  if (count_errors() > 0) then
668  write (errmsg, '(a)') 'Required package(s) not specified.'
669  call store_error(errmsg)
670  call store_error_filename(this%filename)
671  end if
672  !
673  ! -- Return
674  return
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 679 of file tsp.f90.

680  ! -- modules
682  ! -- dummy
683  class(TransportModelType) :: this
684  type(GwfNamParamFoundType), intent(in) :: found
685  !
686  write (this%iout, '(1x,a)') 'NAMEFILE OPTIONS:'
687  !
688  if (found%newton) then
689  write (this%iout, '(4x,a)') &
690  'NEWTON-RAPHSON method enabled for the model.'
691  if (found%under_relaxation) then
692  write (this%iout, '(4x,a,a)') &
693  'NEWTON-RAPHSON UNDER-RELAXATION based on the bottom ', &
694  'elevation of the model will be applied to the model.'
695  end if
696  end if
697  !
698  if (found%print_input) then
699  write (this%iout, '(4x,a)') 'STRESS PACKAGE INPUT WILL BE PRINTED '// &
700  'FOR ALL MODEL STRESS PACKAGES'
701  end if
702  !
703  if (found%print_flows) then
704  write (this%iout, '(4x,a)') 'PACKAGE FLOWS WILL BE PRINTED '// &
705  'FOR ALL MODEL PACKAGES'
706  end if
707  !
708  if (found%save_flows) then
709  write (this%iout, '(4x,a)') &
710  'FLOWS WILL BE SAVED TO BUDGET FILE SPECIFIED IN OUTPUT CONTROL'
711  end if
712  !
713  write (this%iout, '(1x,a)') 'END NAMEFILE OPTIONS:'
714  !
715  ! -- Return
716  return

◆ 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 586 of file tsp.f90.

588  class(TransportModelType) :: this
589  character(len=*), intent(in), pointer :: tsptype !< type of model, default is GWT (alternative is GWE)
590  character(len=*), intent(in) :: depvartype !< dependent variable type, default is "CONCENTRATION"
591  character(len=*), intent(in) :: depvarunit !< units of dependent variable for writing to list file
592  character(len=*), intent(in) :: depvarunitabbrev !< abbreviation of associated units
593  !
594  ! -- Set the model type
595  this%tsptype = tsptype
596  !
597  ! -- Set the type of dependent variable being solved for
598  this%depvartype = depvartype
599  !
600  ! -- Set the units associated with the dependent variable
601  this%depvarunit = depvarunit
602  !
603  ! -- Set the units abbreviation
604  this%depvarunitabbrev = depvarunitabbrev
605  !
606  ! -- Return
607  return

◆ 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 171 of file tsp.f90.

172  ! -- modules
173  use sparsemodule, only: sparsematrix
174  ! -- dummy
175  class(TransportModelType) :: this
176  type(sparsematrix), intent(inout) :: sparse
177  !
178  ! -- Return
179  return

◆ 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 229 of file tsp.f90.

230  ! -- dummy
231  class(TransportModelType) :: this
232  !
233  ! -- Return
234  return

◆ 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 203 of file tsp.f90.

204  ! -- dummy
205  class(TransportModelType) :: this
206  !
207  ! -- Return
208  return

◆ 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 293 of file tsp.f90.

294  ! -- dummy
295  class(TransportModelType) :: this
296  integer(I4B), intent(in) :: icnvg
297  integer(I4B), intent(in) :: isuppress_output
298  !
299  ! -- Return
300  return

◆ 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 258 of file tsp.f90.

259  ! -- dummy
260  class(TransportModelType) :: this
261  integer(I4B), intent(in) :: innertot
262  integer(I4B), intent(in) :: kiter
263  integer(I4B), intent(in) :: iend
264  integer(I4B), intent(in) :: icnvgmod
265  character(len=LENPAKLOC), intent(inout) :: cpak
266  integer(I4B), intent(inout) :: ipak
267  real(DP), intent(inout) :: dpak
268  !
269  ! -- Return
270  return

◆ 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 278 of file tsp.f90.

279  ! -- dummy
280  class(TransportModelType) :: this
281  integer(I4B), intent(in) :: icnvg
282  integer(I4B), intent(in) :: isuppress_output
283  !
284  ! -- Return
285  return

◆ 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)
147  !
148  ! -- Return
149  return
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 614 of file tsp.f90.

615  ! -- modules
617  ! -- dummy
618  class(TransportModelType) :: this
619  ! -- local
620  !
621  ! -- Scalars
622  call mem_deallocate(this%inic)
623  call mem_deallocate(this%infmi)
624  call mem_deallocate(this%inadv)
625  call mem_deallocate(this%inssm)
626  call mem_deallocate(this%inmvt)
627  call mem_deallocate(this%inoc)
628  call mem_deallocate(this%inobs)
629  call mem_deallocate(this%eqnsclfac)
630  !
631  ! -- Return
632  return

◆ 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 158 of file tsp.f90.

159  ! -- dummy
160  class(TransportModelType) :: this
161  !
162  ! -- Return
163  return

◆ 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 242 of file tsp.f90.

243  ! -- dummy
244  class(TransportModelType) :: this
245  integer(I4B), intent(in) :: kiter
246  class(MatrixBaseType), pointer :: matrix_sln
247  integer(I4B), intent(in) :: inwtflag
248  !
249  ! -- Return
250  return

◆ 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 188 of file tsp.f90.

189  ! -- dummy
190  class(TransportModelType) :: this
191  class(MatrixBaseType), pointer :: matrix_sln !< global system matrix
192  !
193  ! -- Return
194  return

◆ tsp_ot()

subroutine transportmodelmodule::tsp_ot ( class(transportmodeltype this,
integer(i4b), intent(in)  inmst 
)
private

Generalized transport model output

Definition at line 307 of file tsp.f90.

308  ! -- modules
309  use tdismodule, only: kstp, kper, tdis_ot, endofperiod
310  ! -- dummy
311  class(TransportModelType) :: this
312  integer(I4B), intent(in) :: inmst
313  ! -- local
314  integer(I4B) :: idvsave
315  integer(I4B) :: idvprint
316  integer(I4B) :: icbcfl
317  integer(I4B) :: icbcun
318  integer(I4B) :: ibudfl
319  integer(I4B) :: ipflag
320  ! -- formats
321  character(len=*), parameter :: fmtnocnvg = &
322  "(1X,/9X,'****FAILED TO MEET SOLVER CONVERGENCE CRITERIA IN TIME STEP ', &
323  &I0,' OF STRESS PERIOD ',I0,'****')"
324  !
325  ! -- Set write and print flags
326  idvsave = 0
327  idvprint = 0
328  icbcfl = 0
329  ibudfl = 0
330  if (this%oc%oc_save(trim(this%depvartype))) idvsave = 1
331  if (this%oc%oc_print(trim(this%depvartype))) idvprint = 1
332  if (this%oc%oc_save('BUDGET')) icbcfl = 1
333  if (this%oc%oc_print('BUDGET')) ibudfl = 1
334  icbcun = this%oc%oc_save_unit('BUDGET')
335  !
336  ! -- Override ibudfl and idvprint flags for nonconvergence
337  ! and end of period
338  ibudfl = this%oc%set_print_flag('BUDGET', this%icnvg, endofperiod)
339  idvprint = this%oc%set_print_flag(trim(this%depvartype), &
340  this%icnvg, endofperiod)
341  !
342  ! -- Calculate and save observations
343  call this%tsp_ot_obs()
344  !
345  ! -- Save and print flows
346  call this%tsp_ot_flow(icbcfl, ibudfl, icbcun, inmst)
347  !
348  ! -- Save and print dependent variables
349  call this%tsp_ot_dv(idvsave, idvprint, ipflag)
350  !
351  ! -- Print budget summaries
352  call this%tsp_ot_bdsummary(ibudfl, ipflag)
353  !
354  ! -- Timing Output; if any dependent variables or budgets
355  ! are printed, then ipflag is set to 1.
356  if (ipflag == 1) call tdis_ot(this%iout)
357  !
358  ! -- Write non-convergence message
359  if (this%icnvg == 0) then
360  write (this%iout, fmtnocnvg) kstp, kper
361  end if
362  !
363  ! -- Return
364  return
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:349
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 511 of file tsp.f90.

512  use tdismodule, only: kstp, kper, totim, delt
513  class(TransportModelType) :: this
514  integer(I4B), intent(in) :: ibudfl
515  integer(I4B), intent(inout) :: ipflag
516  class(BndType), pointer :: packobj
517  integer(I4B) :: ip
518  !
519  ! -- Package budget summary
520  do ip = 1, this%bndlist%Count()
521  packobj => getbndfromlist(this%bndlist, ip)
522  call packobj%bnd_ot_bdsummary(kstp, kper, this%iout, ibudfl)
523  end do
524  !
525  ! -- Mover budget summary
526  if (this%inmvt > 0) then
527  call this%mvt%mvt_ot_bdsummary(ibudfl)
528  end if
529  !
530  ! -- Model budget summary
531  call this%budget%finalize_step(delt)
532  if (ibudfl /= 0) then
533  ipflag = 1
534  call this%budget%budget_ot(kstp, kper, this%iout)
535  end if
536  !
537  ! -- Write to budget csv
538  call this%budget%writecsv(totim)
539  !
540  ! -- Return
541  return
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 486 of file tsp.f90.

487  class(TransportModelType) :: this
488  integer(I4B), intent(in) :: idvsave
489  integer(I4B), intent(in) :: idvprint
490  integer(I4B), intent(inout) :: ipflag
491  class(BndType), pointer :: packobj
492  integer(I4B) :: ip
493  !
494  ! -- Print advanced package dependent variables
495  do ip = 1, this%bndlist%Count()
496  packobj => getbndfromlist(this%bndlist, ip)
497  call packobj%bnd_ot_dv(idvsave, idvprint)
498  end do
499  !
500  ! -- Save head and print head
501  call this%oc%oc_ot(ipflag)
502  !
503  ! -- Return
504  return
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,
integer(i4b), intent(in)  inmst 
)
private

Save and print flows

Definition at line 392 of file tsp.f90.

393  ! -- dummy
394  class(TransportModelType) :: this
395  integer(I4B), intent(in) :: icbcfl
396  integer(I4B), intent(in) :: ibudfl
397  integer(I4B), intent(in) :: icbcun
398  integer(I4B), intent(in) :: inmst
399  ! -- local
400  class(BndType), pointer :: packobj
401  integer(I4B) :: ip
402  !
403  ! -- Save TSP flows
404  call this%tsp_ot_flowja(this%nja, this%flowja, icbcfl, icbcun)
405  if (this%infmi > 0) call this%fmi%fmi_ot_flow(icbcfl, icbcun)
406  if (this%inssm > 0) then
407  call this%ssm%ssm_ot_flow(icbcfl=icbcfl, ibudfl=0, icbcun=icbcun)
408  end if
409  !
410  do ip = 1, this%bndlist%Count()
411  packobj => getbndfromlist(this%bndlist, ip)
412  call packobj%bnd_ot_model_flows(icbcfl=icbcfl, ibudfl=0, icbcun=icbcun)
413  end do
414  !
415  ! -- Save advanced package flows
416  do ip = 1, this%bndlist%Count()
417  packobj => getbndfromlist(this%bndlist, ip)
418  call packobj%bnd_ot_package_flows(icbcfl=icbcfl, ibudfl=0)
419  end do
420  if (this%inmvt > 0) then
421  call this%mvt%mvt_ot_saveflow(icbcfl, ibudfl)
422  end if
423  !
424  ! -- Print Model (GWT or GWE) flows
425  ! no need to print flowja
426  ! no need to print mst
427  ! no need to print fmi
428  if (this%inssm > 0) then
429  call this%ssm%ssm_ot_flow(icbcfl=icbcfl, ibudfl=ibudfl, icbcun=0)
430  end if
431  do ip = 1, this%bndlist%Count()
432  packobj => getbndfromlist(this%bndlist, ip)
433  call packobj%bnd_ot_model_flows(icbcfl=icbcfl, ibudfl=ibudfl, icbcun=0)
434  end do
435  !
436  ! -- Print advanced package flows
437  do ip = 1, this%bndlist%Count()
438  packobj => getbndfromlist(this%bndlist, ip)
439  call packobj%bnd_ot_package_flows(icbcfl=0, ibudfl=ibudfl)
440  end do
441  !
442  if (this%inmvt > 0) then
443  call this%mvt%mvt_ot_printflow(icbcfl, ibudfl)
444  end if
445  !
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 452 of file tsp.f90.

453  ! -- dummy
454  class(TransportModelType) :: this
455  integer(I4B), intent(in) :: nja
456  real(DP), dimension(nja), intent(in) :: flowja
457  integer(I4B), intent(in) :: icbcfl
458  integer(I4B), intent(in) :: icbcun
459  ! -- local
460  integer(I4B) :: ibinun
461  ! -- formats
462  !
463  ! -- Set unit number for binary output
464  if (this%ipakcb < 0) then
465  ibinun = icbcun
466  elseif (this%ipakcb == 0) then
467  ibinun = 0
468  else
469  ibinun = this%ipakcb
470  end if
471  if (icbcfl == 0) ibinun = 0
472  !
473  ! -- Write the face flows if requested
474  if (ibinun /= 0) then
475  call this%dis%record_connection_array(flowja, ibinun, this%iout)
476  end if
477  !
478  ! -- Return
479  return

◆ tsp_ot_obs()

subroutine transportmodelmodule::tsp_ot_obs ( class(transportmodeltype this)

Calculate and save observations

Definition at line 371 of file tsp.f90.

372  class(TransportModelType) :: this
373  class(BndType), pointer :: packobj
374  integer(I4B) :: ip
375  ! -- Calculate and save observations
376  call this%obs%obs_bd()
377  call this%obs%obs_ot()
378  !
379  ! -- Calculate and save package obserations
380  do ip = 1, this%bndlist%Count()
381  packobj => getbndfromlist(this%bndlist, ip)
382  call packobj%bnd_bd_obs()
383  call packobj%bnd_ot_obs()
384  end do
385  !
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 216 of file tsp.f90.

217  ! -- dummy
218  class(TransportModelType) :: this
219  !
220  ! -- Return
221  return