24 particletrackfiletype, &
44 character(len=LENBUDTXT),
dimension(NBDITEMS) ::
budtxt
45 data budtxt/
' STORAGE',
' TERMINATION'/
58 integer(I4B),
pointer :: infmi => null()
59 integer(I4B),
pointer :: inmip => null()
60 integer(I4B),
pointer :: inmvt => null()
61 integer(I4B),
pointer :: inmst => null()
62 integer(I4B),
pointer :: inadv => null()
63 integer(I4B),
pointer :: indsp => null()
64 integer(I4B),
pointer :: inssm => null()
65 integer(I4B),
pointer :: inoc => null()
66 integer(I4B),
pointer :: nprp => null()
67 real(dp),
dimension(:),
pointer,
contiguous :: masssto => null()
68 real(dp),
dimension(:),
pointer,
contiguous :: massstoold => null()
69 real(dp),
dimension(:),
pointer,
contiguous :: ratesto => null()
70 real(dp),
dimension(:),
pointer,
contiguous :: masstrm => null()
71 real(dp),
dimension(:),
pointer,
contiguous :: ratetrm => null()
109 character(len=LENPACKAGETYPE),
dimension(PRT_NBASEPKG) ::
prt_basepkg
110 data prt_basepkg/
'DIS6 ',
'DISV6',
'DISU6',
'IC6 ',
'MST6 ', &
111 &
'ADV6 ',
'DSP6 ',
'SSM6 ',
'MIP6 ',
'CNC6 ', &
112 &
'OC6 ',
' ',
'FMI6 ',
' ',
'IST6 ', &
113 &
'LKT6 ',
'SFT6 ',
'MWT6 ',
'UZT6 ',
'MVT6 ', &
114 &
' ',
' ',
' ',
' ',
' ', &
123 character(len=LENPACKAGETYPE),
dimension(PRT_NMULTIPKG) ::
prt_multipkg
133 subroutine prt_cr(filename, id, modelname)
144 character(len=*),
intent(in) :: filename
145 integer(I4B),
intent(in) :: id
146 character(len=*),
intent(in) :: modelname
150 character(len=LENMEMPATH) :: input_mempath
151 character(len=LINELENGTH) :: lst_fname
161 allocate (this%events)
162 allocate (this%tracks)
165 call this%allocate_scalars(modelname)
170 this%filename = filename
171 this%name = modelname
172 this%macronym =
'PRT'
179 call mem_set_value(this%iprpak,
'PRINT_INPUT', input_mempath, &
181 call mem_set_value(this%iprflow,
'PRINT_FLOWS', input_mempath, &
183 call mem_set_value(this%ipakcb,
'SAVE_FLOWS', input_mempath, &
187 call this%create_lstfile(lst_fname, filename, found%list, &
188 'PARTICLE TRACKING MODEL (PRT)')
191 if (found%save_flows)
then
196 call this%create_packages()
202 if (this%iout > 0)
then
203 call this%log_namfile_options(found)
220 class(
bndtype),
pointer :: packobj
223 call this%dis%dis_df()
224 call this%fmi%fmi_df(this%dis, 1)
226 call this%budget%budget_df(
niunit_prt,
'MASS',
'M')
229 do ip = 1, this%bndlist%Count()
231 call packobj%bnd_df(this%dis%nodes, this%dis)
232 packobj%TsManager%iout = this%iout
233 packobj%TasManager%iout = this%iout
237 call this%allocate_arrays()
255 integer(I4B) :: ip, nprp
256 class(
bndtype),
pointer :: packobj
257 class(*),
pointer :: p
260 call this%fmi%fmi_ar(this%ibound)
261 if (this%inmip > 0)
call this%mip%mip_ar()
264 call this%oc%oc_ar(this%dis,
dhnoflo)
265 call this%budget%set_ibudcsv(this%oc%ibudcsv)
268 call this%tracks%init_buffer(this%oc%scratch_buffer)
271 call this%tracks%select_events( &
272 this%oc%trackrelease, &
273 this%oc%trackfeatexit, &
274 this%oc%tracktimestep, &
275 this%oc%trackterminate, &
276 this%oc%trackweaksink, &
277 this%oc%trackusertime, &
278 this%oc%tracksubfexit, &
279 this%oc%trackdropped)
283 do ip = 1, this%bndlist%Count()
285 select type (packobj)
288 call packobj%prp_set_pointers(this%ibound, this%mip%izone)
289 call packobj%bnd_ar()
290 if (packobj%itrkout > 0)
then
291 call this%tracks%init_file( &
295 if (packobj%itrkcsv > 0)
then
296 call this%tracks%init_file( &
302 call packobj%bnd_ar()
307 if (this%oc%itrkout > 0) &
308 call this%tracks%init_file(this%oc%itrkout)
309 if (this%oc%itrkcsv > 0) &
310 call this%tracks%init_file(this%oc%itrkcsv, csv=.true.)
313 if (this%tracks%ntrackfiles == 0)
then
315 'No particle track output configured (TRACK or TRACKCSV FILEOUT &
316 &in OC or any PRP). Particle events will not be saved.'
321 select type (
dis => this%dis)
323 call this%method_dis%init( &
325 events=this%events, &
326 izone=this%mip%izone, &
327 flowja=this%flowja, &
328 porosity=this%mip%porosity, &
329 retfactor=this%mip%retfactor, &
330 tracktimes=this%oc%tracktimes)
331 this%method => this%method_dis
333 call this%method_disv%init( &
335 events=this%events, &
336 izone=this%mip%izone, &
337 flowja=this%flowja, &
338 porosity=this%mip%porosity, &
339 retfactor=this%mip%retfactor, &
340 tracktimes=this%oc%tracktimes)
341 this%method => this%method_disv
349 if (this%oc%dump_event_trace) this%tracks%iout = 0
358 class(
bndtype),
pointer :: packobj
365 if (this%inoc > 0)
call this%oc%oc_rp()
366 do ip = 1, this%bndlist%Count()
368 call packobj%bnd_rp()
378 class(
bndtype),
pointer :: packobj
380 integer(I4B) :: ip, n, i
390 call this%tracks%discard_buffer()
393 do n = 1, this%dis%nodes
394 this%massstoold(n) = this%masssto(n)
398 call this%fmi%fmi_ad()
401 do ip = 1, this%bndlist%Count()
403 call packobj%bnd_ad()
405 call packobj%bnd_ck()
414 do i = 1, this%dis%nja
415 this%flowja(i) = dzero
420 subroutine prt_cq(this, icnvg, isuppress_output)
427 integer(I4B),
intent(in) :: icnvg
428 integer(I4B),
intent(in) :: isuppress_output
432 class(
bndtype),
pointer :: packobj
446 do i = 1, this%dis%nja
447 this%flowja(i) = this%flowja(i) * tled
451 call this%prt_cq_budterms()
454 do ip = 1, this%bndlist%Count()
456 call packobj%bnd_cq(this%masssto, this%flowja)
474 class(
bndtype),
pointer :: packobj
477 integer(I4B) :: idiag
479 integer(I4B) :: istatus
481 real(DP) :: ratesto, ratetrm
482 character(len=:),
allocatable :: particle_id
491 do n = 1, this%dis%nodes
492 this%masssto(n) = dzero
493 this%masstrm(n) = dzero
494 this%ratesto(n) = dzero
495 this%ratetrm(n) = dzero
501 do ip = 1, this%bndlist%Count()
503 select type (packobj)
506 do np = 1, packobj%nparticles
507 call packobj%particles_staging%get(particle, this%id, iprp, np)
508 istatus = packobj%particles_staging%istatus(np)
509 particle_id = particle%get_id()
510 if (istatus ==
active)
then
513 this%masssto(n) = this%masssto(n) + done
514 else if (istatus >
active)
then
515 if (this%trm_ids%get(particle_id) /= 0) cycle
518 this%masstrm(n) = this%masstrm(n) + done
519 call this%trm_ids%add(particle_id, 1)
526 do n = 1, this%dis%nodes
527 ratesto = -(this%masssto(n) - this%massstoold(n)) * tled
528 ratetrm = -this%masstrm(n) * tled
529 this%ratesto(n) = ratesto
530 this%ratetrm(n) = ratetrm
531 idiag = this%dis%con%ia(n)
532 this%flowja(idiag) = this%flowja(idiag) + ratesto
535 call particle%destroy()
536 deallocate (particle)
546 subroutine prt_bd(this, icnvg, isuppress_output)
552 integer(I4B),
intent(in) :: icnvg
553 integer(I4B),
intent(in) :: isuppress_output
556 class(
bndtype),
pointer :: packobj
564 call this%budget%reset()
567 call this%budget%addentry(rin, rout,
delt,
budtxt(1), &
568 isuppress_output,
' PRT')
571 call this%budget%addentry(rin, rout,
delt,
budtxt(2), &
572 isuppress_output,
' PRT')
574 do ip = 1, this%bndlist%Count()
576 call packobj%bnd_bd(this%budget)
587 integer(I4B) :: idvsave
588 integer(I4B) :: idvprint
589 integer(I4B) :: icbcfl
590 integer(I4B) :: icbcun
591 integer(I4B) :: ibudfl
592 integer(I4B) :: ipflag
594 class(
bndtype),
pointer :: packobj
597 call this%tracks%flush_buffer()
600 do ip = 1, this%bndlist%Count()
602 select type (packobj)
604 call packobj%prp_commit()
613 if (this%oc%oc_save(
'CONCENTRATION')) idvsave = 1
614 if (this%oc%oc_print(
'CONCENTRATION')) idvprint = 1
615 if (this%oc%oc_save(
'BUDGET')) icbcfl = 1
616 if (this%oc%oc_print(
'BUDGET')) ibudfl = 1
617 icbcun = this%oc%oc_save_unit(
'BUDGET')
621 ibudfl = this%oc%set_print_flag(
'BUDGET', 1,
endofperiod)
622 idvprint = this%oc%set_print_flag(
'CONCENTRATION', 1,
endofperiod)
625 call this%prt_ot_flow(icbcfl, ibudfl, icbcun)
628 call this%prt_ot_dv(idvsave, idvprint, ipflag)
631 call this%prt_ot_bdsummary(ibudfl, ipflag)
635 if (ipflag == 1)
call tdis_ot(this%iout)
642 integer(I4B),
intent(in) :: icbcfl
643 integer(I4B),
intent(in) :: ibudfl
644 integer(I4B),
intent(in) :: icbcun
645 class(
bndtype),
pointer :: packobj
649 call this%prt_ot_saveflow(this%dis%nja, this%flowja, icbcfl, icbcun)
650 do ip = 1, this%bndlist%Count()
652 call packobj%bnd_ot_model_flows(icbcfl=icbcfl, ibudfl=0, icbcun=icbcun)
656 do ip = 1, this%bndlist%Count()
658 call packobj%bnd_ot_package_flows(icbcfl=icbcfl, ibudfl=0)
662 call this%prt_ot_printflow(ibudfl, this%flowja)
663 do ip = 1, this%bndlist%Count()
665 call packobj%bnd_ot_model_flows(icbcfl=icbcfl, ibudfl=ibudfl, icbcun=0)
669 do ip = 1, this%bndlist%Count()
671 call packobj%bnd_ot_package_flows(icbcfl=0, ibudfl=ibudfl)
679 integer(I4B),
intent(in) :: nja
680 real(DP),
dimension(nja),
intent(in) :: flowja
681 integer(I4B),
intent(in) :: icbcfl
682 integer(I4B),
intent(in) :: icbcun
684 integer(I4B) :: ibinun
686 real(DP),
dimension(0) :: auxrow
687 character(len=LENAUXNAME),
dimension(0) :: auxname
688 logical(LGP) :: header_written
689 integer(I4B) :: i, nn
691 integer(I4B) :: nsto, ntrm
692 logical(LGP),
allocatable :: msto_mask(:), mtrm_mask(:)
693 integer(I4B),
allocatable :: msto_nns(:), mtrm_nns(:)
694 real(DP),
allocatable :: msto_vals(:), mtrm_vals(:)
697 if (this%ipakcb < 0)
then
699 elseif (this%ipakcb == 0)
then
704 if (icbcfl == 0) ibinun = 0
707 if (ibinun == 0)
return
710 call this%dis%record_connection_array(flowja, ibinun, this%iout)
714 header_written = .false.
715 msto_mask = this%masssto > dzero
716 msto_vals = pack(this%masssto, msto_mask)
717 msto_nns = [(i, i=1,
size(this%masssto))]
718 msto_nns = pack(msto_nns, msto_mask)
719 nsto =
size(msto_nns)
723 if (.not. header_written)
then
724 call this%dis%record_srcdst_list_header(
budtxt(1), &
729 naux, auxname, ibinun, &
731 header_written = .true.
733 call this%dis%record_mf6_list_entry(ibinun, nn, nn, m, &
739 header_written = .false.
740 mtrm_mask = this%masstrm > dzero
741 mtrm_vals = pack(this%masstrm, mtrm_mask)
742 mtrm_nns = [(i, i=1,
size(this%masstrm))]
743 mtrm_nns = pack(mtrm_nns, mtrm_mask)
744 ntrm =
size(mtrm_nns)
748 if (.not. header_written)
then
749 call this%dis%record_srcdst_list_header(
budtxt(2), &
754 naux, auxname, ibinun, &
756 header_written = .true.
758 call this%dis%record_mf6_list_entry(ibinun, nn, nn, m, &
772 integer(I4B),
intent(in) :: ibudfl
773 real(DP),
intent(inout),
dimension(:) :: flowja
775 character(len=LENBIGLINE) :: line
776 character(len=30) :: tempstr
777 integer(I4B) :: n, ipos, m
780 character(len=*),
parameter :: fmtiprflow = &
781 "(/,4x,'CALCULATED INTERCELL FLOW &
782 &FOR PERIOD ', i0, ' STEP ', i0)"
785 if (ibudfl /= 0 .and. this%iprflow > 0)
then
786 write (this%iout, fmtiprflow)
kper,
kstp
787 do n = 1, this%dis%nodes
789 call this%dis%noder_to_string(n, tempstr)
790 line = trim(tempstr)//
':'
791 do ipos = this%dis%con%ia(n) + 1, this%dis%con%ia(n + 1) - 1
792 m = this%dis%con%ja(ipos)
793 call this%dis%noder_to_string(m, tempstr)
794 line = trim(line)//
' '//trim(tempstr)
796 write (tempstr,
'(1pg15.6)') qnm
797 line = trim(line)//
' '//trim(adjustl(tempstr))
799 write (this%iout,
'(a)') trim(line)
808 integer(I4B),
intent(in) :: idvsave
809 integer(I4B),
intent(in) :: idvprint
810 integer(I4B),
intent(inout) :: ipflag
812 class(
bndtype),
pointer :: packobj
816 do ip = 1, this%bndlist%Count()
818 call packobj%bnd_ot_dv(idvsave, idvprint)
822 call this%oc%oc_ot(ipflag)
831 integer(I4B),
intent(in) :: ibudfl
832 integer(I4B),
intent(inout) :: ipflag
834 class(
bndtype),
pointer :: packobj
838 do ip = 1, this%bndlist%Count()
840 call packobj%bnd_ot_bdsummary(
kstp,
kper, this%iout, ibudfl)
844 call this%budget%finalize_step(
delt)
845 if (ibudfl /= 0)
then
848 call this%budget%budget_ot(
kstp,
kper, this%iout)
852 call this%budget%writecsv(
totim)
865 class(
bndtype),
pointer :: packobj
872 call this%dis%dis_da()
873 call this%fmi%fmi_da()
874 call this%mip%mip_da()
875 call this%budget%budget_da()
877 deallocate (this%dis)
878 deallocate (this%fmi)
879 deallocate (this%mip)
880 deallocate (this%budget)
884 call this%method_dis%deallocate()
885 deallocate (this%method_dis)
886 call this%method_disv%deallocate()
887 deallocate (this%method_disv)
890 do ip = 1, this%bndlist%Count()
892 call packobj%bnd_da()
913 call this%tracks%destroy()
914 deallocate (this%events)
915 deallocate (this%tracks)
917 call this%ExplicitModelType%model_da()
924 character(len=*),
intent(in) :: modelname
927 call this%ExplicitModelType%allocate_scalars(modelname)
930 call mem_allocate(this%infmi,
'INFMI', this%memoryPath)
931 call mem_allocate(this%inmip,
'INMIP', this%memoryPath)
932 call mem_allocate(this%inmvt,
'INMVT', this%memoryPath)
933 call mem_allocate(this%inmst,
'INMST', this%memoryPath)
934 call mem_allocate(this%inadv,
'INADV', this%memoryPath)
935 call mem_allocate(this%indsp,
'INDSP', this%memoryPath)
936 call mem_allocate(this%inssm,
'INSSM', this%memoryPath)
937 call mem_allocate(this%inoc,
'INOC ', this%memoryPath)
956 call this%ExplicitModelType%allocate_arrays()
960 'MASSSTO', this%memoryPath)
962 'MASSSTOOLD', this%memoryPath)
964 'RATESTO', this%memoryPath)
966 'MASSTRM', this%memoryPath)
968 'RATETRM', this%memoryPath)
969 do n = 1, this%dis%nodes
970 this%masssto(n) = dzero
971 this%massstoold(n) = dzero
972 this%ratesto(n) = dzero
973 this%masstrm(n) = dzero
974 this%ratetrm(n) = dzero
985 character(len=*),
intent(in) :: filtyp
986 character(len=LINELENGTH) :: errmsg
987 integer(I4B),
intent(in) :: ipakid
988 integer(I4B),
intent(in) :: ipaknum
989 character(len=*),
intent(in) :: pakname
990 character(len=*),
intent(in) :: mempath
991 integer(I4B),
intent(in) :: inunit
992 integer(I4B),
intent(in) :: iout
994 class(
bndtype),
pointer :: packobj
995 class(
bndtype),
pointer :: packobj2
1001 call prp_create(packobj, ipakid, ipaknum, inunit, iout, &
1002 this%name, pakname, this%fmi, mempath)
1004 write (errmsg, *)
'Invalid package type: ', filtyp
1011 do ip = 1, this%bndlist%Count()
1013 if (packobj2%packName == pakname)
then
1014 write (errmsg,
'(a,a)')
'Cannot create package. Package name '// &
1015 'already exists: ', trim(pakname)
1026 integer(I4B),
intent(in) :: indis
1028 character(len=LINELENGTH) :: errmsg
1031 if (indis == 0)
then
1032 write (errmsg,
'(1x,a)') &
1033 'Discretization (DIS6, DISV6, or DISU6) package not specified.'
1036 if (this%inmip == 0)
then
1037 write (errmsg,
'(1x,a)') &
1038 'Model input (MIP6) package not specified.'
1043 write (errmsg,
'(1x,a)')
'One or more required package(s) not specified.'
1058 integer(I4B),
intent(in) :: isuppress_output
1060 integer(I4B) :: np, ip
1061 class(
bndtype),
pointer :: packobj
1064 integer(I4B) :: iprp
1069 if (isuppress_output /= 0)
return
1077 do ip = 1, this%bndlist%Count()
1079 select type (packobj)
1082 do np = 1, packobj%nparticles
1084 call packobj%particles_staging%get(particle, this%id, iprp, np)
1094 call packobj%particles_staging%put(particle, np)
1096 if (particle%istatus >
active) cycle
1097 if (particle%istatus == 0)
then
1098 particle%istatus =
active
1099 if (particle%trelease >=
totimc)
then
1100 if (particle%trelease > particle%tstop)
then
1103 write (
warnmsg,
'(a,g0,a,g0,a,g0,a)') &
1104 'Particle release point ', particle%irpt,
' has &
1105 &release time ', particle%trelease,
' after package &
1106 &stop time ', particle%tstop,
'; particle will not &
1113 call this%method%release(particle)
1117 if (particle%istatus <=
active)
then
1123 tmax = particle%tstop
1136 if (tmax < particle%ttrack) &
1137 call pstop(1,
'Programmer error: PRT tracking tmax &
1138 &precedes particle%ttrack.')
1140 call this%method%apply(particle, tmax)
1149 if (particle%istatus <=
active .and. &
1151 call this%method%terminate(particle, status=
term_timeout)
1154 call packobj%particles_staging%put(particle, np)
1158 call particle%destroy()
1159 deallocate (particle)
1170 integer(I4B),
dimension(:),
allocatable,
intent(inout) :: bndpkgs
1172 pointer,
intent(inout) :: pkgtypes
1174 pointer,
intent(inout) :: pkgnames
1176 pointer,
intent(inout) :: mempaths
1177 integer(I4B),
dimension(:),
contiguous, &
1178 pointer,
intent(inout) :: inunits
1180 integer(I4B) :: ipakid, ipaknum
1181 character(len=LENFTYPE) :: pkgtype, bndptype
1182 character(len=LENPACKAGENAME) :: pkgname
1183 character(len=LENMEMPATH) :: mempath
1184 integer(I4B),
pointer :: inunit
1187 if (
allocated(bndpkgs))
then
1191 do n = 1,
size(bndpkgs)
1192 pkgtype = pkgtypes(bndpkgs(n))
1193 pkgname = pkgnames(bndpkgs(n))
1194 mempath = mempaths(bndpkgs(n))
1195 inunit => inunits(bndpkgs(n))
1197 if (bndptype /= pkgtype)
then
1202 call this%package_create(pkgtype, ipakid, ipaknum, pkgname, mempath, &
1205 ipaknum = ipaknum + 1
1209 deallocate (bndpkgs)
1231 pointer :: pkgtypes => null()
1233 pointer :: pkgnames => null()
1235 pointer :: mempaths => null()
1236 integer(I4B),
dimension(:),
contiguous, &
1237 pointer :: inunits => null()
1238 character(len=LENMEMPATH) :: model_mempath
1239 character(len=LENFTYPE) :: pkgtype
1240 character(len=LENPACKAGENAME) :: pkgname
1241 character(len=LENMEMPATH) :: mempath
1242 integer(I4B),
pointer :: inunit
1243 integer(I4B),
dimension(:),
allocatable :: bndpkgs
1245 integer(I4B) :: indis = 0
1246 character(len=LENMEMPATH) :: mempathmip =
''
1247 character(len=LENMEMPATH) :: mempathfmi =
''
1248 character(len=LENMEMPATH) :: mempathoc =
''
1254 call mem_setptr(pkgtypes,
'PKGTYPES', model_mempath)
1255 call mem_setptr(pkgnames,
'PKGNAMES', model_mempath)
1256 call mem_setptr(mempaths,
'MEMPATHS', model_mempath)
1257 call mem_setptr(inunits,
'INUNITS', model_mempath)
1261 do n = 1,
size(pkgtypes)
1262 pkgtype = pkgtypes(n)
1263 pkgname = pkgnames(n)
1264 mempath = mempaths(n)
1265 inunit => inunits(n)
1267 select case (pkgtype)
1270 call dis_cr(this%dis, this%name, mempath, indis, this%iout)
1273 call disv_cr(this%dis, this%name, mempath, indis, this%iout)
1276 call disu_cr(this%dis, this%name, mempath, indis, this%iout)
1279 mempathmip = mempath
1282 mempathfmi = mempath
1288 bndpkgs(
size(bndpkgs)) = n
1290 call pstop(1,
"Unrecognized package type: "//pkgtype)
1302 call mip_cr(this%mip, this%name, mempathmip, this%inmip, this%iout, this%dis)
1303 call fmi_cr(this%fmi, this%name, mempathfmi, this%infmi, this%iout)
1304 call oc_cr(this%oc, this%name, mempathoc, this%inoc, this%iout)
1307 call this%ftype_check(indis)
1310 call this%create_bndpkgs(bndpkgs, pkgtypes, pkgnames, mempaths, inunits)
1311 call this%create_exg_prp()
1319 class(
bndtype),
pointer :: packobj
1320 character(len=LENPACKAGENAME) :: exgprp_name
1322 exgprp_name =
'EXGPRP'
1324 call prp_create(packobj, &
1329 namemodel=this%name, &
1330 pakname=exgprp_name, &
1341 write (this%iout,
'(1x,a)')
'NAMEFILE OPTIONS:'
1343 if (found%print_input)
then
1344 write (this%iout,
'(4x,a)')
'STRESS PACKAGE INPUT WILL BE PRINTED '// &
1345 'FOR ALL MODEL STRESS PACKAGES'
1348 if (found%print_flows)
then
1349 write (this%iout,
'(4x,a)')
'PACKAGE FLOWS WILL BE PRINTED '// &
1350 'FOR ALL MODEL PACKAGES'
1353 if (found%save_flows)
then
1354 write (this%iout,
'(4x,a)') &
1355 'FLOWS WILL BE SAVED TO BUDGET FILE SPECIFIED IN OUTPUT CONTROL'
1358 write (this%iout,
'(1x,a)')
'END NAMEFILE OPTIONS:'
Event handler interface. Handlers may signal to the dispatching caller whether they have handled the ...
subroutine, public addbasemodeltolist(list, model)
subroutine model_ar(this)
Allocate and read.
subroutine model_ot(this)
Output results.
subroutine allocate_scalars(this, modelname)
Allocate scalar variables.
subroutine model_rp(this)
Read and prepare.
subroutine model_df(this)
Define the model.
subroutine model_da(this)
Deallocate.
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)
Create a new budget object.
subroutine, public rate_accumulator(flow, rin, rout)
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
@ dis
DIS6 discretization.
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 allocate_scalars(this, name_model, input_mempath)
Allocate and initialize scalar variables.
subroutine, public dis_cr(dis, name_model, input_mempath, inunit, iout)
Create a new structured discretization object.
subroutine allocate_arrays(this)
Allocate and initialize arrays.
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.
subroutine model_bd(this, icnvg, isuppress_output)
Calculate model budget.
subroutine model_solve(this, isuppress_output)
Solve the model.
subroutine model_cq(this, icnvg, isuppress_output)
Calculate model flows.
subroutine model_ad(this)
Advance the model.
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.
subroutine terminate(this, particle, status)
A particle terminates.
@ release
particle was released
@ 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 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 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)
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_warning(msg, substring)
Store warning message.
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
character(len=maxcharlen) warnmsg
warning message string
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)
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.
Output control for particle tracking models.
Particle release point (PRP) package.