41 integer(I4B),
pointer :: infmi => null()
42 integer(I4B),
pointer :: inadv => null()
43 integer(I4B),
pointer :: inic => null()
44 integer(I4B),
pointer :: inmvt => null()
45 integer(I4B),
pointer :: inoc => null()
46 integer(I4B),
pointer :: inobs => null()
48 integer(I4B),
pointer :: inssm => null()
49 real(dp),
pointer :: eqnsclfac => null()
51 character(len=LENVARNAME) :: tsptype =
''
52 character(len=LENVARNAME) :: depvartype =
''
53 character(len=LENVARNAME) :: depvarunit =
''
54 character(len=LENVARNAME) :: depvarunitabbrev =
''
71 procedure,
public :: model_ot =>
tsp_ot
92 subroutine tsp_cr(this, filename, id, modelname, macronym, indis)
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
107 character(len=LENMEMPATH) :: input_mempath
108 character(len=LINELENGTH) :: lst_fname
112 this%filename = filename
113 this%name = modelname
115 this%macronym = macronym
121 call mem_set_value(lst_fname,
'LIST', input_mempath, found%list)
122 call mem_set_value(this%iprpak,
'PRINT_INPUT', input_mempath, &
124 call mem_set_value(this%iprflow,
'PRINT_FLOWS', input_mempath, &
126 call mem_set_value(this%ipakcb,
'SAVE_FLOWS', input_mempath, found%save_flows)
129 call this%create_lstfile(lst_fname, filename, found%list, &
130 'TRANSPORT MODEL ('//trim(macronym)//
')')
133 if (found%save_flows)
then
138 if (this%iout > 0)
then
139 call this%log_namfile_options(found)
146 call this%create_tsp_packages(indis)
221 subroutine tsp_fc(this, kiter, matrix_sln, inwtflag)
224 integer(I4B),
intent(in) :: kiter
226 integer(I4B),
intent(in) :: inwtflag
234 subroutine tsp_cc(this, innertot, kiter, iend, icnvgmod, cpak, ipak, dpak)
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
251 subroutine tsp_cq(this, icnvg, isuppress_output)
254 integer(I4B),
intent(in) :: icnvg
255 integer(I4B),
intent(in) :: isuppress_output
263 subroutine tsp_bd(this, icnvg, isuppress_output)
266 integer(I4B),
intent(in) :: icnvg
267 integer(I4B),
intent(in) :: isuppress_output
280 integer(I4B) :: idvsave
281 integer(I4B) :: idvprint
282 integer(I4B) :: icbcfl
283 integer(I4B) :: icbcun
284 integer(I4B) :: ibudfl
285 integer(I4B) :: ipflag
287 character(len=*),
parameter :: fmtnocnvg = &
288 "(1X,/9X,'****FAILED TO MEET SOLVER CONVERGENCE CRITERIA IN TIME STEP ', &
289 &I0,' OF STRESS PERIOD ',I0,'****')"
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')
304 ibudfl = this%oc%set_print_flag(
'BUDGET', this%icnvg,
endofperiod)
305 idvprint = this%oc%set_print_flag(trim(this%depvartype), &
309 call this%tsp_ot_obs()
312 call this%tsp_ot_flow(icbcfl, ibudfl, icbcun)
315 call this%tsp_ot_dv(idvsave, idvprint, ipflag)
318 call this%tsp_ot_bdsummary(ibudfl, ipflag)
322 if (ipflag == 1)
call tdis_ot(this%iout)
325 if (this%icnvg == 0)
then
326 write (this%iout, fmtnocnvg)
kstp,
kper
336 class(
bndtype),
pointer :: packobj
339 call this%obs%obs_bd()
340 call this%obs%obs_ot()
343 do ip = 1, this%bndlist%Count()
345 call packobj%bnd_bd_obs()
346 call packobj%bnd_ot_obs()
358 integer(I4B),
intent(in) :: icbcfl
359 integer(I4B),
intent(in) :: ibudfl
360 integer(I4B),
intent(in) :: icbcun
362 class(
bndtype),
pointer :: packobj
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)
372 do ip = 1, this%bndlist%Count()
374 call packobj%bnd_ot_model_flows(icbcfl=icbcfl, ibudfl=0, icbcun=icbcun)
378 do ip = 1, this%bndlist%Count()
380 call packobj%bnd_ot_package_flows(icbcfl=icbcfl, ibudfl=0)
382 if (this%inmvt > 0)
then
383 call this%mvt%mvt_ot_saveflow(icbcfl, ibudfl)
390 if (this%inssm > 0)
then
391 call this%ssm%ssm_ot_flow(icbcfl=icbcfl, ibudfl=ibudfl, icbcun=0)
393 do ip = 1, this%bndlist%Count()
395 call packobj%bnd_ot_model_flows(icbcfl=icbcfl, ibudfl=ibudfl, icbcun=0)
399 do ip = 1, this%bndlist%Count()
401 call packobj%bnd_ot_package_flows(icbcfl=0, ibudfl=ibudfl)
404 if (this%inmvt > 0)
then
405 call this%mvt%mvt_ot_printflow(icbcfl, ibudfl)
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
422 integer(I4B) :: ibinun
426 if (this%ipakcb < 0)
then
428 elseif (this%ipakcb == 0)
then
433 if (icbcfl == 0) ibinun = 0
436 if (ibinun /= 0)
then
437 call this%dis%record_connection_array(flowja, ibinun, this%iout)
447 integer(I4B),
intent(in) :: idvsave
448 integer(I4B),
intent(in) :: idvprint
449 integer(I4B),
intent(inout) :: ipflag
450 class(
bndtype),
pointer :: packobj
454 do ip = 1, this%bndlist%Count()
456 call packobj%bnd_ot_dv(idvsave, idvprint)
460 call this%oc%oc_ot(ipflag)
470 integer(I4B),
intent(in) :: ibudfl
471 integer(I4B),
intent(inout) :: ipflag
472 class(
bndtype),
pointer :: packobj
476 do ip = 1, this%bndlist%Count()
478 call packobj%bnd_ot_bdsummary(
kstp,
kper, this%iout, ibudfl)
482 if (this%inmvt > 0)
then
483 call this%mvt%mvt_ot_bdsummary(ibudfl)
487 call this%budget%finalize_step(
delt)
488 if (ibudfl /= 0)
then
490 call this%budget%budget_ot(
kstp,
kper, this%iout)
494 call this%budget%writecsv(
totim)
506 character(len=*),
intent(in) :: modelname
509 call this%NumericalModelType%allocate_scalars(modelname)
519 call mem_allocate(this%eqnsclfac,
'EQNSCLFAC', this%memoryPath)
528 this%eqnsclfac =
dzero
539 character(len=*),
intent(in),
pointer :: tsptype
540 character(len=*),
intent(in) :: depvartype
541 character(len=*),
intent(in) :: depvarunit
542 character(len=*),
intent(in) :: depvarunitabbrev
545 this%tsptype = tsptype
548 this%depvartype = depvartype
551 this%depvarunit = depvarunit
554 this%depvarunitabbrev = depvarunitabbrev
589 integer(I4B),
intent(in) :: indis
590 integer(I4B),
intent(in) :: inmst
592 character(len=LINELENGTH) :: errmsg
595 if (this%inic == 0)
then
596 write (errmsg,
'(a)') &
597 'Initial conditions (IC6) package not specified.'
601 write (errmsg,
'(a)') &
602 'Discretization (DIS6 or DISU6) package not specified.'
606 write (errmsg,
'(a)')
'Mass storage and transfer (MST6) &
607 &package not specified.'
612 write (errmsg,
'(a)')
'Required package(s) not specified.'
627 write (this%iout,
'(1x,a)')
'NAMEFILE OPTIONS:'
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.'
639 if (found%print_input)
then
640 write (this%iout,
'(4x,a)')
'STRESS PACKAGE INPUT WILL BE PRINTED '// &
641 'FOR ALL MODEL STRESS PACKAGES'
644 if (found%print_flows)
then
645 write (this%iout,
'(4x,a)')
'PACKAGE FLOWS WILL BE PRINTED '// &
646 'FOR ALL MODEL PACKAGES'
649 if (found%save_flows)
then
650 write (this%iout,
'(4x,a)') &
651 'FLOWS WILL BE SAVED TO BUDGET FILE SPECIFIED IN OUTPUT CONTROL'
654 write (this%iout,
'(1x,a)')
'END NAMEFILE OPTIONS:'
678 integer(I4B),
intent(inout) :: indis
681 pointer :: pkgtypes => null()
683 pointer :: pkgnames => null()
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
694 character(len=LENMEMPATH) :: mempathic =
''
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)
708 do n = 1,
size(pkgtypes)
711 pkgtype = pkgtypes(n)
712 pkgname = pkgnames(n)
713 mempath = mempaths(n)
717 select case (pkgtype)
720 call dis_cr(this%dis, this%name, mempath, indis, this%iout)
723 call disv_cr(this%dis, this%name, mempath, indis, this%iout)
726 call disu_cr(this%dis, this%name, mempath, indis, this%iout)
732 case (
'MVT6',
'MVE6')
748 call ic_cr(this%ic, this%name, mempathic, this%inic, this%iout, this%dis, &
750 call fmi_cr(this%fmi, this%name, this%infmi, this%iout, this%eqnsclfac, &
752 call adv_cr(this%adv, this%name, this%inadv, this%iout, this%fmi, &
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 the base boundary package.
class(bndtype) function, pointer, public getbndfromlist(list, idx)
Get boundary from package list.
This module contains the BudgetModule.
subroutine, public budget_cr(this, name_model)
@ brief Create a new budget object
This module contains simulation constants.
integer(i4b), parameter linelength
maximum length of a standard line
integer(i4b), parameter lenpackagename
maximum length of the package name
integer(i4b), parameter lenpakloc
maximum length of a package location
integer(i4b), parameter lenvarname
maximum length of a variable name
integer(i4b), parameter lenftype
maximum length of a package type (DIS, WEL, OC, etc.)
real(dp), parameter dzero
real constant zero
integer(i4b), parameter lenmempath
maximum length of the memory path
subroutine, public dis_cr(dis, name_model, input_mempath, inunit, iout)
Create a new structured discretization object.
subroutine, public disu_cr(dis, name_model, input_mempath, inunit, iout)
Create a new unstructured discretization object.
subroutine, public disv_cr(dis, name_model, input_mempath, inunit, iout)
Create a new discretization by vertices object.
This module defines variable data types.
character(len=lenmempath) function create_mem_path(component, subcomponent, context)
returns the path to the memory object
This module contains simulation methods.
subroutine, public store_error(msg, terminate)
Store an error message.
integer(i4b) function, public count_errors()
Return number of errors.
subroutine, public store_error_filename(filename, terminate)
Store the erroring file name.
This module contains simulation variables.
character(len=maxcharlen) errmsg
error message string
character(len=linelength) idm_context
logical(lgp), pointer, public endofperiod
flag indicating end of stress period
subroutine, public tdis_ot(iout)
Print simulation time.
real(dp), pointer, public totim
time relative to start of simulation
integer(i4b), pointer, public kstp
current time step number
integer(i4b), pointer, public kper
current stress period number
real(dp), pointer, public delt
length of the current time step
This module contains the base transport model type.
subroutine tsp_ot_flowja(this, nja, flowja, icbcfl, icbcun)
Generalized transport model output routine.
subroutine tsp_bd(this, icnvg, isuppress_output)
Generalized transport model budget.
subroutine tsp_cr(this, filename, id, modelname, macronym, indis)
Create a new generalized transport model object.
subroutine tsp_da(this)
Deallocate memory.
subroutine tsp_ac(this, sparse)
Generalized transport model add connections.
subroutine tsp_cc(this, innertot, kiter, iend, icnvgmod, cpak, ipak, dpak)
Generalized transport model final convergence check.
subroutine tsp_ot(this)
Generalized transport model output routine.
subroutine tsp_rp(this)
Generalized transport model read and prepare.
subroutine tsp_ot_dv(this, idvsave, idvprint, ipflag)
Generalized transport model output routine.
subroutine tsp_ad(this)
Generalized transport model time step advance.
subroutine allocate_tsp_scalars(this, modelname)
Allocate scalar variables for transport model.
subroutine tsp_mc(this, matrix_sln)
Generalized transport model map coefficients.
subroutine tsp_ot_bdsummary(this, ibudfl, ipflag)
Generalized tranpsort model output budget summary.
subroutine tsp_ot_obs(this)
Generalized transport model output routine.
subroutine tsp_ot_flow(this, icbcfl, ibudfl, icbcun)
Generalized transport model output routine.
subroutine tsp_ar(this)
Generalized transport model allocate and read.
subroutine log_namfile_options(this, found)
Write model name file options to list file.
subroutine create_tsp_packages(this, indis)
Source package info and begin to process.
subroutine tsp_cq(this, icnvg, isuppress_output)
Generalized transport model calculate flows.
subroutine tsp_df(this)
Generalized transport model define model.
subroutine tsp_fc(this, kiter, matrix_sln, inwtflag)
Generalized transport model fill coefficients.
subroutine set_tsp_labels(this, tsptype, depvartype, depvarunit, depvarunitabbrev)
Define the labels corresponding to the flavor of transport model.
subroutine ftype_check(this, indis, inmst)
Generalized tranpsort model routine.
subroutine, public adv_cr(advobj, name_model, inunit, iout, fmi, eqnsclfac)
@ brief Create a new ADV object
subroutine, public fmi_cr(fmiobj, name_model, inunit, iout, eqnsclfac, depvartype)
Create a new FMI object.
subroutine, public ic_cr(ic, name_model, input_mempath, inunit, iout, dis, depvartype)
Create a new initial conditions object.
subroutine, public mvt_cr(mvt, name_model, inunit, iout, fmi1, eqnsclfac, depvartype, gwfmodelname1, gwfmodelname2, fmi2)
Create a new mover transport object.
subroutine, public tsp_obs_cr(obs, inobs, dvt)
Create a new TspObsType object.
subroutine, public oc_cr(ocobj, name_model, inunit, iout)
@ brief Create TspOcType
This module contains the TspSsm Module.
subroutine, public ssm_cr(ssmobj, name_model, inunit, iout, fmi, eqnsclfac, depvartype)
@ brief Create a new SSM package
Derived type for the Budget object.
This class is used to store a single deferred-length character string. It was designed to work in an ...
Derived type for the SSM Package.