24 particletrackfiletype, &
43 character(len=LENBUDTXT),
dimension(NBDITEMS) ::
budtxt
44 data budtxt/
' STORAGE',
' TERMINATION'/
57 integer(I4B),
pointer :: infmi => null()
58 integer(I4B),
pointer :: inmip => null()
59 integer(I4B),
pointer :: inmvt => null()
60 integer(I4B),
pointer :: inmst => null()
61 integer(I4B),
pointer :: inadv => null()
62 integer(I4B),
pointer :: indsp => null()
63 integer(I4B),
pointer :: inssm => null()
64 integer(I4B),
pointer :: inoc => null()
65 integer(I4B),
pointer :: nprp => null()
66 real(dp),
dimension(:),
pointer,
contiguous :: masssto => null()
67 real(dp),
dimension(:),
pointer,
contiguous :: massstoold => null()
68 real(dp),
dimension(:),
pointer,
contiguous :: ratesto => null()
69 real(dp),
dimension(:),
pointer,
contiguous :: masstrm => null()
70 real(dp),
dimension(:),
pointer,
contiguous :: ratetrm => null()
108 character(len=LENPACKAGETYPE),
dimension(PRT_NBASEPKG) ::
prt_basepkg
109 data prt_basepkg/
'DIS6 ',
'DISV6',
'DISU6',
'IC6 ',
'MST6 ', &
110 &
'ADV6 ',
'DSP6 ',
'SSM6 ',
'MIP6 ',
'CNC6 ', &
111 &
'OC6 ',
' ',
'FMI6 ',
' ',
'IST6 ', &
112 &
'LKT6 ',
'SFT6 ',
'MWT6 ',
'UZT6 ',
'MVT6 ', &
113 &
'API6 ',
' ',
' ',
' ',
' ', &
122 character(len=LENPACKAGETYPE),
dimension(PRT_NMULTIPKG) ::
prt_multipkg
132 subroutine prt_cr(filename, id, modelname)
143 character(len=*),
intent(in) :: filename
144 integer(I4B),
intent(in) :: id
145 character(len=*),
intent(in) :: modelname
149 character(len=LENMEMPATH) :: input_mempath
150 character(len=LINELENGTH) :: lst_fname
160 allocate (this%events)
161 allocate (this%tracks)
164 call this%allocate_scalars(modelname)
169 this%filename = filename
170 this%name = modelname
171 this%macronym =
'PRT'
178 call mem_set_value(this%iprpak,
'PRINT_INPUT', input_mempath, &
180 call mem_set_value(this%iprflow,
'PRINT_FLOWS', input_mempath, &
182 call mem_set_value(this%ipakcb,
'SAVE_FLOWS', input_mempath, &
186 call this%create_lstfile(lst_fname, filename, found%list, &
187 'PARTICLE TRACKING MODEL (PRT)')
190 if (found%save_flows)
then
195 call this%create_packages()
201 if (this%iout > 0)
then
202 call this%log_namfile_options(found)
219 class(
bndtype),
pointer :: packobj
222 call this%dis%dis_df()
223 call this%fmi%fmi_df(this%dis, 1)
225 call this%budget%budget_df(
niunit_prt,
'MASS',
'M')
228 do ip = 1, this%bndlist%Count()
230 call packobj%bnd_df(this%dis%nodes, this%dis)
231 packobj%TsManager%iout = this%iout
232 packobj%TasManager%iout = this%iout
236 call this%allocate_arrays()
253 integer(I4B) :: ip, nprp
254 class(
bndtype),
pointer :: packobj
255 class(*),
pointer :: p
258 call this%fmi%fmi_ar(this%ibound)
259 if (this%inmip > 0)
call this%mip%mip_ar()
262 call this%oc%oc_ar(this%dis,
dhnoflo)
263 call this%budget%set_ibudcsv(this%oc%ibudcsv)
266 call this%tracks%init_buffer(this%oc%scratch_buffer)
269 call this%tracks%select_events( &
270 this%oc%trackrelease, &
271 this%oc%trackfeatexit, &
272 this%oc%tracktimestep, &
273 this%oc%trackterminate, &
274 this%oc%trackweaksink, &
275 this%oc%trackusertime, &
276 this%oc%tracksubfexit, &
277 this%oc%trackdropped)
281 do ip = 1, this%bndlist%Count()
283 select type (packobj)
286 call packobj%prp_set_pointers(this%ibound, this%mip%izone)
287 call packobj%bnd_ar()
288 call packobj%bnd_ar()
289 if (packobj%itrkout > 0)
then
290 call this%tracks%init_file( &
294 if (packobj%itrkcsv > 0)
then
295 call this%tracks%init_file( &
301 call packobj%bnd_ar()
306 if (this%oc%itrkout > 0) &
307 call this%tracks%init_file(this%oc%itrkout)
308 if (this%oc%itrkcsv > 0) &
309 call this%tracks%init_file(this%oc%itrkcsv, csv=.true.)
312 select type (dis => this%dis)
314 call this%method_dis%init( &
316 events=this%events, &
317 izone=this%mip%izone, &
318 flowja=this%flowja, &
319 porosity=this%mip%porosity, &
320 retfactor=this%mip%retfactor, &
321 tracktimes=this%oc%tracktimes)
322 this%method => this%method_dis
324 call this%method_disv%init( &
326 events=this%events, &
327 izone=this%mip%izone, &
328 flowja=this%flowja, &
329 porosity=this%mip%porosity, &
330 retfactor=this%mip%retfactor, &
331 tracktimes=this%oc%tracktimes)
332 this%method => this%method_disv
340 if (this%oc%dump_event_trace) this%tracks%iout = 0
349 class(
bndtype),
pointer :: packobj
356 if (this%inoc > 0)
call this%oc%oc_rp()
357 do ip = 1, this%bndlist%Count()
359 call packobj%bnd_rp()
369 class(
bndtype),
pointer :: packobj
371 integer(I4B) :: ip, n, i
381 call this%tracks%discard_buffer()
384 do n = 1, this%dis%nodes
385 this%massstoold(n) = this%masssto(n)
389 call this%fmi%fmi_ad()
392 do ip = 1, this%bndlist%Count()
394 call packobj%bnd_ad()
396 call packobj%bnd_ck()
405 do i = 1, this%dis%nja
406 this%flowja(i) =
dzero
411 subroutine prt_cq(this, icnvg, isuppress_output)
418 integer(I4B),
intent(in) :: icnvg
419 integer(I4B),
intent(in) :: isuppress_output
423 class(
bndtype),
pointer :: packobj
437 do i = 1, this%dis%nja
438 this%flowja(i) = this%flowja(i) * tled
442 call this%prt_cq_budterms()
445 do ip = 1, this%bndlist%Count()
447 call packobj%bnd_cq(this%masssto, this%flowja)
465 class(
bndtype),
pointer :: packobj
468 integer(I4B) :: idiag
470 integer(I4B) :: istatus
472 real(DP) :: ratesto, ratetrm
473 character(len=:),
allocatable :: particle_id
482 do n = 1, this%dis%nodes
483 this%masssto(n) =
dzero
484 this%masstrm(n) =
dzero
485 this%ratesto(n) =
dzero
486 this%ratetrm(n) =
dzero
492 do ip = 1, this%bndlist%Count()
494 select type (packobj)
496 do np = 1, packobj%nparticles
497 call packobj%particles_staging%get(particle, this%id, iprp, np)
498 istatus = packobj%particles_staging%istatus(np)
499 particle_id = particle%get_id()
500 if (istatus ==
active)
then
503 this%masssto(n) = this%masssto(n) +
done
504 else if (istatus >
active)
then
505 if (this%trm_ids%get(particle_id) /= 0) cycle
508 this%masstrm(n) = this%masstrm(n) +
done
509 call this%trm_ids%add(particle_id, 1)
516 do n = 1, this%dis%nodes
517 ratesto = -(this%masssto(n) - this%massstoold(n)) * tled
518 ratetrm = -this%masstrm(n) * tled
519 this%ratesto(n) = ratesto
520 this%ratetrm(n) = ratetrm
521 idiag = this%dis%con%ia(n)
522 this%flowja(idiag) = this%flowja(idiag) + ratesto
525 call particle%destroy()
526 deallocate (particle)
536 subroutine prt_bd(this, icnvg, isuppress_output)
542 integer(I4B),
intent(in) :: icnvg
543 integer(I4B),
intent(in) :: isuppress_output
546 class(
bndtype),
pointer :: packobj
554 call this%budget%reset()
557 call this%budget%addentry(rin, rout,
delt,
budtxt(1), &
558 isuppress_output,
' PRT')
561 call this%budget%addentry(rin, rout,
delt,
budtxt(2), &
562 isuppress_output,
' PRT')
564 do ip = 1, this%bndlist%Count()
566 call packobj%bnd_bd(this%budget)
577 integer(I4B) :: idvsave
578 integer(I4B) :: idvprint
579 integer(I4B) :: icbcfl
580 integer(I4B) :: icbcun
581 integer(I4B) :: ibudfl
582 integer(I4B) :: ipflag
584 class(
bndtype),
pointer :: packobj
587 call this%tracks%flush_buffer()
590 do ip = 1, this%bndlist%Count()
592 select type (packobj)
594 call packobj%prp_commit()
603 if (this%oc%oc_save(
'CONCENTRATION')) idvsave = 1
604 if (this%oc%oc_print(
'CONCENTRATION')) idvprint = 1
605 if (this%oc%oc_save(
'BUDGET')) icbcfl = 1
606 if (this%oc%oc_print(
'BUDGET')) ibudfl = 1
607 icbcun = this%oc%oc_save_unit(
'BUDGET')
611 ibudfl = this%oc%set_print_flag(
'BUDGET', 1,
endofperiod)
612 idvprint = this%oc%set_print_flag(
'CONCENTRATION', 1,
endofperiod)
615 call this%prt_ot_flow(icbcfl, ibudfl, icbcun)
618 call this%prt_ot_dv(idvsave, idvprint, ipflag)
621 call this%prt_ot_bdsummary(ibudfl, ipflag)
625 if (ipflag == 1)
call tdis_ot(this%iout)
632 integer(I4B),
intent(in) :: icbcfl
633 integer(I4B),
intent(in) :: ibudfl
634 integer(I4B),
intent(in) :: icbcun
635 class(
bndtype),
pointer :: packobj
639 call this%prt_ot_saveflow(this%dis%nja, this%flowja, icbcfl, icbcun)
640 do ip = 1, this%bndlist%Count()
642 call packobj%bnd_ot_model_flows(icbcfl=icbcfl, ibudfl=0, icbcun=icbcun)
646 do ip = 1, this%bndlist%Count()
648 call packobj%bnd_ot_package_flows(icbcfl=icbcfl, ibudfl=0)
652 call this%prt_ot_printflow(ibudfl, this%flowja)
653 do ip = 1, this%bndlist%Count()
655 call packobj%bnd_ot_model_flows(icbcfl=icbcfl, ibudfl=ibudfl, icbcun=0)
659 do ip = 1, this%bndlist%Count()
661 call packobj%bnd_ot_package_flows(icbcfl=0, ibudfl=ibudfl)
669 integer(I4B),
intent(in) :: nja
670 real(DP),
dimension(nja),
intent(in) :: flowja
671 integer(I4B),
intent(in) :: icbcfl
672 integer(I4B),
intent(in) :: icbcun
674 integer(I4B) :: ibinun
676 real(DP),
dimension(0) :: auxrow
677 character(len=LENAUXNAME),
dimension(0) :: auxname
678 logical(LGP) :: header_written
679 integer(I4B) :: i, nn
681 integer(I4B) :: nsto, ntrm
682 logical(LGP),
allocatable :: msto_mask(:), mtrm_mask(:)
683 integer(I4B),
allocatable :: msto_nns(:), mtrm_nns(:)
684 real(DP),
allocatable :: msto_vals(:), mtrm_vals(:)
687 if (this%ipakcb < 0)
then
689 elseif (this%ipakcb == 0)
then
694 if (icbcfl == 0) ibinun = 0
697 if (ibinun == 0)
return
700 call this%dis%record_connection_array(flowja, ibinun, this%iout)
704 header_written = .false.
705 msto_mask = this%masssto >
dzero
706 msto_vals = pack(this%masssto, msto_mask)
707 msto_nns = [(i, i=1,
size(this%masssto))]
708 msto_nns = pack(msto_nns, msto_mask)
709 nsto =
size(msto_nns)
713 if (.not. header_written)
then
714 call this%dis%record_srcdst_list_header(
budtxt(1), &
719 naux, auxname, ibinun, &
721 header_written = .true.
723 call this%dis%record_mf6_list_entry(ibinun, nn, nn, m, &
729 header_written = .false.
730 mtrm_mask = this%masstrm >
dzero
731 mtrm_vals = pack(this%masstrm, mtrm_mask)
732 mtrm_nns = [(i, i=1,
size(this%masstrm))]
733 mtrm_nns = pack(mtrm_nns, mtrm_mask)
734 ntrm =
size(mtrm_nns)
738 if (.not. header_written)
then
739 call this%dis%record_srcdst_list_header(
budtxt(2), &
744 naux, auxname, ibinun, &
746 header_written = .true.
748 call this%dis%record_mf6_list_entry(ibinun, nn, nn, m, &
762 integer(I4B),
intent(in) :: ibudfl
763 real(DP),
intent(inout),
dimension(:) :: flowja
765 character(len=LENBIGLINE) :: line
766 character(len=30) :: tempstr
767 integer(I4B) :: n, ipos, m
770 character(len=*),
parameter :: fmtiprflow = &
771 "(/,4x,'CALCULATED INTERCELL FLOW &
772 &FOR PERIOD ', i0, ' STEP ', i0)"
775 if (ibudfl /= 0 .and. this%iprflow > 0)
then
776 write (this%iout, fmtiprflow)
kper,
kstp
777 do n = 1, this%dis%nodes
779 call this%dis%noder_to_string(n, tempstr)
780 line = trim(tempstr)//
':'
781 do ipos = this%dis%con%ia(n) + 1, this%dis%con%ia(n + 1) - 1
782 m = this%dis%con%ja(ipos)
783 call this%dis%noder_to_string(m, tempstr)
784 line = trim(line)//
' '//trim(tempstr)
786 write (tempstr,
'(1pg15.6)') qnm
787 line = trim(line)//
' '//trim(adjustl(tempstr))
789 write (this%iout,
'(a)') trim(line)
798 integer(I4B),
intent(in) :: idvsave
799 integer(I4B),
intent(in) :: idvprint
800 integer(I4B),
intent(inout) :: ipflag
802 class(
bndtype),
pointer :: packobj
806 do ip = 1, this%bndlist%Count()
808 call packobj%bnd_ot_dv(idvsave, idvprint)
812 call this%oc%oc_ot(ipflag)
821 integer(I4B),
intent(in) :: ibudfl
822 integer(I4B),
intent(inout) :: ipflag
824 class(
bndtype),
pointer :: packobj
828 do ip = 1, this%bndlist%Count()
830 call packobj%bnd_ot_bdsummary(
kstp,
kper, this%iout, ibudfl)
834 call this%budget%finalize_step(
delt)
835 if (ibudfl /= 0)
then
838 call this%budget%budget_ot(
kstp,
kper, this%iout)
842 call this%budget%writecsv(
totim)
855 class(
bndtype),
pointer :: packobj
862 call this%dis%dis_da()
863 call this%fmi%fmi_da()
864 call this%mip%mip_da()
865 call this%budget%budget_da()
867 deallocate (this%dis)
868 deallocate (this%fmi)
869 deallocate (this%mip)
870 deallocate (this%budget)
874 call this%method_dis%deallocate()
875 deallocate (this%method_dis)
876 call this%method_disv%deallocate()
877 deallocate (this%method_disv)
880 do ip = 1, this%bndlist%Count()
882 call packobj%bnd_da()
903 call this%tracks%destroy()
904 deallocate (this%events)
905 deallocate (this%tracks)
907 call this%ExplicitModelType%model_da()
914 character(len=*),
intent(in) :: modelname
917 call this%ExplicitModelType%allocate_scalars(modelname)
946 call this%ExplicitModelType%allocate_arrays()
950 'MASSSTO', this%memoryPath)
952 'MASSSTOOLD', this%memoryPath)
954 'RATESTO', this%memoryPath)
956 'MASSTRM', this%memoryPath)
958 'RATETRM', this%memoryPath)
959 do n = 1, this%dis%nodes
960 this%masssto(n) =
dzero
961 this%massstoold(n) =
dzero
962 this%ratesto(n) =
dzero
963 this%masstrm(n) =
dzero
964 this%ratetrm(n) =
dzero
976 character(len=*),
intent(in) :: filtyp
977 character(len=LINELENGTH) :: errmsg
978 integer(I4B),
intent(in) :: ipakid
979 integer(I4B),
intent(in) :: ipaknum
980 character(len=*),
intent(in) :: pakname
981 character(len=*),
intent(in) :: mempath
982 integer(I4B),
intent(in) :: inunit
983 integer(I4B),
intent(in) :: iout
985 class(
bndtype),
pointer :: packobj
986 class(
bndtype),
pointer :: packobj2
992 call prp_create(packobj, ipakid, ipaknum, inunit, iout, &
993 this%name, pakname, this%fmi, mempath)
995 call api_create(packobj, ipakid, ipaknum, inunit, iout, &
996 this%name, pakname, mempath)
998 write (errmsg, *)
'Invalid package type: ', filtyp
1005 do ip = 1, this%bndlist%Count()
1007 if (packobj2%packName == pakname)
then
1008 write (errmsg,
'(a,a)')
'Cannot create package. Package name '// &
1009 'already exists: ', trim(pakname)
1020 integer(I4B),
intent(in) :: indis
1022 character(len=LINELENGTH) :: errmsg
1025 if (indis == 0)
then
1026 write (errmsg,
'(1x,a)') &
1027 'Discretization (DIS6, DISV6, or DISU6) package not specified.'
1030 if (this%inmip == 0)
then
1031 write (errmsg,
'(1x,a)') &
1032 'Model input (MIP6) package not specified.'
1037 write (errmsg,
'(1x,a)')
'One or more required package(s) not specified.'
1051 integer(I4B),
intent(in) :: isuppress_output
1053 integer(I4B) :: np, ip
1054 class(
bndtype),
pointer :: packobj
1057 integer(I4B) :: iprp
1062 if (isuppress_output /= 0)
return
1067 call create_particle(particle)
1070 do ip = 1, this%bndlist%Count()
1072 select type (packobj)
1075 do np = 1, packobj%nparticles
1077 call packobj%particles_staging%get(particle, this%id, iprp, np)
1087 call packobj%particles_staging%put(particle, np)
1089 if (particle%istatus >
active) cycle
1090 particle%istatus =
active
1092 if (particle%trelease >=
totimc)
call this%method%release(particle)
1098 tmax = particle%tstop
1103 call this%method%apply(particle, tmax)
1112 if (particle%istatus <=
active .and. &
1114 call this%method%terminate(particle, status=
term_timeout)
1116 call packobj%particles_staging%put(particle, np)
1120 call particle%destroy()
1121 deallocate (particle)
1132 integer(I4B),
dimension(:),
allocatable,
intent(inout) :: bndpkgs
1134 pointer,
intent(inout) :: pkgtypes
1136 pointer,
intent(inout) :: pkgnames
1138 pointer,
intent(inout) :: mempaths
1139 integer(I4B),
dimension(:),
contiguous, &
1140 pointer,
intent(inout) :: inunits
1142 integer(I4B) :: ipakid, ipaknum
1143 character(len=LENFTYPE) :: pkgtype, bndptype
1144 character(len=LENPACKAGENAME) :: pkgname
1145 character(len=LENMEMPATH) :: mempath
1146 integer(I4B),
pointer :: inunit
1149 if (
allocated(bndpkgs))
then
1153 do n = 1,
size(bndpkgs)
1154 pkgtype = pkgtypes(bndpkgs(n))
1155 pkgname = pkgnames(bndpkgs(n))
1156 mempath = mempaths(bndpkgs(n))
1157 inunit => inunits(bndpkgs(n))
1159 if (bndptype /= pkgtype)
then
1164 call this%package_create(pkgtype, ipakid, ipaknum, pkgname, mempath, &
1167 ipaknum = ipaknum + 1
1171 deallocate (bndpkgs)
1193 pointer :: pkgtypes => null()
1195 pointer :: pkgnames => null()
1197 pointer :: mempaths => null()
1198 integer(I4B),
dimension(:),
contiguous, &
1199 pointer :: inunits => null()
1200 character(len=LENMEMPATH) :: model_mempath
1201 character(len=LENFTYPE) :: pkgtype
1202 character(len=LENPACKAGENAME) :: pkgname
1203 character(len=LENMEMPATH) :: mempath
1204 integer(I4B),
pointer :: inunit
1205 integer(I4B),
dimension(:),
allocatable :: bndpkgs
1207 integer(I4B) :: indis = 0
1208 character(len=LENMEMPATH) :: mempathmip =
''
1209 character(len=LENMEMPATH) :: mempathfmi =
''
1210 character(len=LENMEMPATH) :: mempathoc =
''
1216 call mem_setptr(pkgtypes,
'PKGTYPES', model_mempath)
1217 call mem_setptr(pkgnames,
'PKGNAMES', model_mempath)
1218 call mem_setptr(mempaths,
'MEMPATHS', model_mempath)
1219 call mem_setptr(inunits,
'INUNITS', model_mempath)
1223 do n = 1,
size(pkgtypes)
1224 pkgtype = pkgtypes(n)
1225 pkgname = pkgnames(n)
1226 mempath = mempaths(n)
1227 inunit => inunits(n)
1229 select case (pkgtype)
1232 call dis_cr(this%dis, this%name, mempath, indis, this%iout)
1235 call disv_cr(this%dis, this%name, mempath, indis, this%iout)
1238 call disu_cr(this%dis, this%name, mempath, indis, this%iout)
1241 mempathmip = mempath
1244 mempathfmi = mempath
1250 bndpkgs(
size(bndpkgs)) = n
1252 call pstop(1,
"Unrecognized package type: "//pkgtype)
1264 call mip_cr(this%mip, this%name, mempathmip, this%inmip, this%iout, this%dis)
1265 call fmi_cr(this%fmi, this%name, mempathfmi, this%infmi, this%iout)
1266 call oc_cr(this%oc, this%name, mempathoc, this%inoc, this%iout)
1269 call this%ftype_check(indis)
1272 call this%create_bndpkgs(bndpkgs, pkgtypes, pkgnames, mempaths, inunits)
1273 call this%create_exg_prp()
1281 class(
bndtype),
pointer :: packobj
1282 character(len=LENPACKAGENAME) :: exgprp_name
1284 exgprp_name =
'EXGPRP'
1291 namemodel=this%name, &
1292 pakname=exgprp_name, &
1303 write (this%iout,
'(1x,a)')
'NAMEFILE OPTIONS:'
1305 if (found%print_input)
then
1306 write (this%iout,
'(4x,a)')
'STRESS PACKAGE INPUT WILL BE PRINTED '// &
1307 'FOR ALL MODEL STRESS PACKAGES'
1310 if (found%print_flows)
then
1311 write (this%iout,
'(4x,a)')
'PACKAGE FLOWS WILL BE PRINTED '// &
1312 'FOR ALL MODEL PACKAGES'
1315 if (found%save_flows)
then
1316 write (this%iout,
'(4x,a)') &
1317 'FLOWS WILL BE SAVED TO BUDGET FILE SPECIFIED IN OUTPUT CONTROL'
1320 write (this%iout,
'(1x,a)')
'END NAMEFILE OPTIONS:'
Event handler interface. Handlers may signal to the dispatching caller whether they have handled the ...
This module contains the API package methods.
subroutine, public api_create(packobj, id, ibcnum, inunit, iout, namemodel, pakname, mempath)
@ brief Create a new package object
subroutine, public addbasemodeltolist(list, model)
This module contains the base boundary package.
subroutine, public addbndtolist(list, bnd)
Add boundary to package list.
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
subroutine, public rate_accumulator(flow, rin, rout)
@ brief Rate accumulator subroutine
This module contains simulation constants.
integer(i4b), parameter linelength
maximum length of a standard line
@ mnormal
normal output mode
integer(i4b), parameter lenpackagename
maximum length of the package name
integer(i4b), parameter lenpackagetype
maximum length of a package type (DIS6, SFR6, CSUB6, etc.)
integer(i4b), parameter lenbigline
maximum length of a big line
real(dp), parameter dhnoflo
real no flow constant
integer(i4b), parameter lenpakloc
maximum length of a package location
integer(i4b), parameter lenftype
maximum length of a package type (DIS, WEL, OC, etc.)
integer(i4b), parameter lenauxname
maximum length of a aux variable
real(dp), parameter dzero
real constant zero
integer(i4b), parameter lenbudtxt
maximum length of a budget component names
integer(i4b), parameter lenmempath
maximum length of the memory path
real(dp), parameter done
real constant 1
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.
subroutine pstop(status, message)
Stop the program, optionally specifying an error status code.
Models that solve themselves.
A chaining hash map for integers.
subroutine, public hash_table_cr(map)
Create a hash table.
subroutine, public hash_table_da(map)
Deallocate the hash table.
This module defines variable data types.
type(listtype), public basemodellist
character(len=lenmempath) function create_mem_path(component, subcomponent, context)
returns the path to the memory object
subroutine, public memorystore_remove(component, subcomponent, context)
subroutine, public create_method_dis(method)
Create a new structured grid (DIS) tracking method.
subroutine, public create_method_disv(method)
Create a new vertex grid (DISV) tracking method.
Particle tracking strategies.
@, public release
particle was released
@, public terminate
particle terminated
@ term_timeout
terminated at stop time or end of simulation
@ term_unreleased
terminated permanently unreleased
subroutine create_particle(particle)
Create a new particle.
Particle track output module.
logical(lgp) function, public add_particle_event(context, particle, event)
Add a particle event to be written to eligible files and printed to an output file unit if requested....
subroutine, public fmi_cr(fmiobj, name_model, input_mempath, inunit, iout)
Create a new PrtFmi object.
subroutine, public mip_cr(mip, name_model, input_mempath, inunit, iout, dis)
Create a model input object.
integer(i4b), parameter niunit_prt
subroutine prt_ot(this)
Print and/or save model output.
subroutine prt_rp(this)
Read and prepare (calls package read and prepare routines)
subroutine create_bndpkgs(this, bndpkgs, pkgtypes, pkgnames, mempaths, inunits)
Source package info and begin to process.
subroutine prt_ar(this)
Allocate and read.
subroutine ftype_check(this, indis)
Check to make sure required input files have been specified.
subroutine prt_ot_saveflow(this, nja, flowja, icbcfl, icbcun)
Save intercell flows.
subroutine prt_ad(this)
Time step advance (calls package advance subroutines)
subroutine prt_cq(this, icnvg, isuppress_output)
Calculate intercell flow (flowja)
subroutine package_create(this, filtyp, ipakid, ipaknum, pakname, mempath, inunit, iout)
Create boundary condition packages for this model.
subroutine prt_ot_flow(this, icbcfl, ibudfl, icbcun)
Save flows.
subroutine allocate_scalars(this, modelname)
Allocate memory for scalars.
subroutine prt_ot_bdsummary(this, ibudfl, ipflag)
Print budget summary.
character(len=lenpackagetype), dimension(prt_nmultipkg), public prt_multipkg
subroutine create_packages(this)
Source package info and begin to process.
character(len=lenpackagetype), dimension(prt_nbasepkg), public prt_basepkg
subroutine prt_solve(this, isuppress_output)
Solve the model.
integer(i4b), parameter, public prt_nmultipkg
PRT multi package array descriptors.
character(len=lenbudtxt), dimension(nbditems) budtxt
subroutine prt_da(this)
Deallocate.
subroutine, public prt_cr(filename, id, modelname)
Create a new particle tracking model object.
subroutine prt_ot_printflow(this, ibudfl, flowja)
Print intercell flows.
subroutine prt_bd(this, icnvg, isuppress_output)
Calculate flows and budget.
subroutine prt_df(this)
Define packages.
integer(i4b), parameter, public prt_nbasepkg
PRT base package array descriptors.
integer(i4b), parameter nbditems
subroutine allocate_arrays(this)
Allocate arrays.
subroutine log_namfile_options(this, found)
Write model namfile options to list file.
subroutine prt_cq_budterms(this)
Calculate particle mass budget terms.
subroutine prt_ot_dv(this, idvsave, idvprint, ipflag)
Print dependent variables.
subroutine create_exg_prp(this)
Create an exchange PRP package for particles entering this model from other model.
subroutine, public oc_cr(ocobj, name_model, input_mempath, inunit, iout)
@ brief Create an output control object
subroutine, public prp_create(packobj, id, ibcnum, inunit, iout, namemodel, pakname, fmi, input_mempath)
Create a new particle release point package.
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=linelength) idm_context
integer(i4b) isimcheck
simulation input check flag (1) to check input, (0) to ignore checks
subroutine csr_diagsum(ia, flowja)
logical(lgp), pointer, public endofperiod
flag indicating end of stress period
logical(lgp), pointer, public endofsimulation
flag indicating end of simulation
subroutine, public tdis_ot(iout)
Print simulation time.
real(dp), pointer, public totim
time relative to start of simulation
logical(lgp), pointer, public readnewdata
flag indicating time to read new data
real(dp), pointer, public totimc
simulation time at start of time step
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 version information.
subroutine write_listfile_header(iout, cmodel_type, write_sys_command, write_kind_info)
@ brief Write program header
Highest level model type. All models extend this parent type.
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 ...
Structured grid discretization.
Unstructured grid discretization.
Vertex grid discretization.
Base type for models that solve themselves.
A generic heterogeneous doubly-linked list.
Base type for particle tracking methods.
Dispatcher for particle events. Consumers subscribe handlers to the dispatcher. Events may be dispatc...
Particle tracked by the PRT model.
Particle track output manager. Handles printing as well as writing to files. One output unit can be c...
Particle tracking (PRT) model.
@ brief Output control for particle tracking models
Particle release point (PRP) package.