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 &
'API6 ',
' ',
' ',
' ',
' ', &
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()
254 integer(I4B) :: ip, nprp
255 class(
bndtype),
pointer :: packobj
256 class(*),
pointer :: p
259 call this%fmi%fmi_ar(this%ibound)
260 if (this%inmip > 0)
call this%mip%mip_ar()
263 call this%oc%oc_ar(this%dis,
dhnoflo)
264 call this%budget%set_ibudcsv(this%oc%ibudcsv)
267 call this%tracks%init_buffer(this%oc%scratch_buffer)
270 call this%tracks%select_events( &
271 this%oc%trackrelease, &
272 this%oc%trackfeatexit, &
273 this%oc%tracktimestep, &
274 this%oc%trackterminate, &
275 this%oc%trackweaksink, &
276 this%oc%trackusertime, &
277 this%oc%tracksubfexit, &
278 this%oc%trackdropped)
282 do ip = 1, this%bndlist%Count()
284 select type (packobj)
287 call packobj%prp_set_pointers(this%ibound, this%mip%izone)
288 call packobj%bnd_ar()
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 select type (dis => this%dis)
315 call this%method_dis%init( &
317 events=this%events, &
318 izone=this%mip%izone, &
319 flowja=this%flowja, &
320 porosity=this%mip%porosity, &
321 retfactor=this%mip%retfactor, &
322 tracktimes=this%oc%tracktimes)
323 this%method => this%method_dis
325 call this%method_disv%init( &
327 events=this%events, &
328 izone=this%mip%izone, &
329 flowja=this%flowja, &
330 porosity=this%mip%porosity, &
331 retfactor=this%mip%retfactor, &
332 tracktimes=this%oc%tracktimes)
333 this%method => this%method_disv
341 if (this%oc%dump_event_trace) this%tracks%iout = 0
350 class(
bndtype),
pointer :: packobj
357 if (this%inoc > 0)
call this%oc%oc_rp()
358 do ip = 1, this%bndlist%Count()
360 call packobj%bnd_rp()
370 class(
bndtype),
pointer :: packobj
372 integer(I4B) :: ip, n, i
382 call this%tracks%discard_buffer()
385 do n = 1, this%dis%nodes
386 this%massstoold(n) = this%masssto(n)
390 call this%fmi%fmi_ad()
393 do ip = 1, this%bndlist%Count()
395 call packobj%bnd_ad()
397 call packobj%bnd_ck()
406 do i = 1, this%dis%nja
407 this%flowja(i) =
dzero
412 subroutine prt_cq(this, icnvg, isuppress_output)
419 integer(I4B),
intent(in) :: icnvg
420 integer(I4B),
intent(in) :: isuppress_output
424 class(
bndtype),
pointer :: packobj
438 do i = 1, this%dis%nja
439 this%flowja(i) = this%flowja(i) * tled
443 call this%prt_cq_budterms()
446 do ip = 1, this%bndlist%Count()
448 call packobj%bnd_cq(this%masssto, this%flowja)
466 class(
bndtype),
pointer :: packobj
469 integer(I4B) :: idiag
471 integer(I4B) :: istatus
473 real(DP) :: ratesto, ratetrm
474 character(len=:),
allocatable :: particle_id
483 do n = 1, this%dis%nodes
484 this%masssto(n) =
dzero
485 this%masstrm(n) =
dzero
486 this%ratesto(n) =
dzero
487 this%ratetrm(n) =
dzero
493 do ip = 1, this%bndlist%Count()
495 select type (packobj)
498 do np = 1, packobj%nparticles
499 call packobj%particles_staging%get(particle, this%id, iprp, np)
500 istatus = packobj%particles_staging%istatus(np)
501 particle_id = particle%get_id()
502 if (istatus ==
active)
then
505 this%masssto(n) = this%masssto(n) +
done
506 else if (istatus >
active)
then
507 if (this%trm_ids%get(particle_id) /= 0) cycle
510 this%masstrm(n) = this%masstrm(n) +
done
511 call this%trm_ids%add(particle_id, 1)
518 do n = 1, this%dis%nodes
519 ratesto = -(this%masssto(n) - this%massstoold(n)) * tled
520 ratetrm = -this%masstrm(n) * tled
521 this%ratesto(n) = ratesto
522 this%ratetrm(n) = ratetrm
523 idiag = this%dis%con%ia(n)
524 this%flowja(idiag) = this%flowja(idiag) + ratesto
527 call particle%destroy()
528 deallocate (particle)
538 subroutine prt_bd(this, icnvg, isuppress_output)
544 integer(I4B),
intent(in) :: icnvg
545 integer(I4B),
intent(in) :: isuppress_output
548 class(
bndtype),
pointer :: packobj
556 call this%budget%reset()
559 call this%budget%addentry(rin, rout,
delt,
budtxt(1), &
560 isuppress_output,
' PRT')
563 call this%budget%addentry(rin, rout,
delt,
budtxt(2), &
564 isuppress_output,
' PRT')
566 do ip = 1, this%bndlist%Count()
568 call packobj%bnd_bd(this%budget)
579 integer(I4B) :: idvsave
580 integer(I4B) :: idvprint
581 integer(I4B) :: icbcfl
582 integer(I4B) :: icbcun
583 integer(I4B) :: ibudfl
584 integer(I4B) :: ipflag
586 class(
bndtype),
pointer :: packobj
589 call this%tracks%flush_buffer()
592 do ip = 1, this%bndlist%Count()
594 select type (packobj)
596 call packobj%prp_commit()
605 if (this%oc%oc_save(
'CONCENTRATION')) idvsave = 1
606 if (this%oc%oc_print(
'CONCENTRATION')) idvprint = 1
607 if (this%oc%oc_save(
'BUDGET')) icbcfl = 1
608 if (this%oc%oc_print(
'BUDGET')) ibudfl = 1
609 icbcun = this%oc%oc_save_unit(
'BUDGET')
613 ibudfl = this%oc%set_print_flag(
'BUDGET', 1,
endofperiod)
614 idvprint = this%oc%set_print_flag(
'CONCENTRATION', 1,
endofperiod)
617 call this%prt_ot_flow(icbcfl, ibudfl, icbcun)
620 call this%prt_ot_dv(idvsave, idvprint, ipflag)
623 call this%prt_ot_bdsummary(ibudfl, ipflag)
627 if (ipflag == 1)
call tdis_ot(this%iout)
634 integer(I4B),
intent(in) :: icbcfl
635 integer(I4B),
intent(in) :: ibudfl
636 integer(I4B),
intent(in) :: icbcun
637 class(
bndtype),
pointer :: packobj
641 call this%prt_ot_saveflow(this%dis%nja, this%flowja, icbcfl, icbcun)
642 do ip = 1, this%bndlist%Count()
644 call packobj%bnd_ot_model_flows(icbcfl=icbcfl, ibudfl=0, icbcun=icbcun)
648 do ip = 1, this%bndlist%Count()
650 call packobj%bnd_ot_package_flows(icbcfl=icbcfl, ibudfl=0)
654 call this%prt_ot_printflow(ibudfl, this%flowja)
655 do ip = 1, this%bndlist%Count()
657 call packobj%bnd_ot_model_flows(icbcfl=icbcfl, ibudfl=ibudfl, icbcun=0)
661 do ip = 1, this%bndlist%Count()
663 call packobj%bnd_ot_package_flows(icbcfl=0, ibudfl=ibudfl)
671 integer(I4B),
intent(in) :: nja
672 real(DP),
dimension(nja),
intent(in) :: flowja
673 integer(I4B),
intent(in) :: icbcfl
674 integer(I4B),
intent(in) :: icbcun
676 integer(I4B) :: ibinun
678 real(DP),
dimension(0) :: auxrow
679 character(len=LENAUXNAME),
dimension(0) :: auxname
680 logical(LGP) :: header_written
681 integer(I4B) :: i, nn
683 integer(I4B) :: nsto, ntrm
684 logical(LGP),
allocatable :: msto_mask(:), mtrm_mask(:)
685 integer(I4B),
allocatable :: msto_nns(:), mtrm_nns(:)
686 real(DP),
allocatable :: msto_vals(:), mtrm_vals(:)
689 if (this%ipakcb < 0)
then
691 elseif (this%ipakcb == 0)
then
696 if (icbcfl == 0) ibinun = 0
699 if (ibinun == 0)
return
702 call this%dis%record_connection_array(flowja, ibinun, this%iout)
706 header_written = .false.
707 msto_mask = this%masssto >
dzero
708 msto_vals = pack(this%masssto, msto_mask)
709 msto_nns = [(i, i=1,
size(this%masssto))]
710 msto_nns = pack(msto_nns, msto_mask)
711 nsto =
size(msto_nns)
715 if (.not. header_written)
then
716 call this%dis%record_srcdst_list_header(
budtxt(1), &
721 naux, auxname, ibinun, &
723 header_written = .true.
725 call this%dis%record_mf6_list_entry(ibinun, nn, nn, m, &
731 header_written = .false.
732 mtrm_mask = this%masstrm >
dzero
733 mtrm_vals = pack(this%masstrm, mtrm_mask)
734 mtrm_nns = [(i, i=1,
size(this%masstrm))]
735 mtrm_nns = pack(mtrm_nns, mtrm_mask)
736 ntrm =
size(mtrm_nns)
740 if (.not. header_written)
then
741 call this%dis%record_srcdst_list_header(
budtxt(2), &
746 naux, auxname, ibinun, &
748 header_written = .true.
750 call this%dis%record_mf6_list_entry(ibinun, nn, nn, m, &
764 integer(I4B),
intent(in) :: ibudfl
765 real(DP),
intent(inout),
dimension(:) :: flowja
767 character(len=LENBIGLINE) :: line
768 character(len=30) :: tempstr
769 integer(I4B) :: n, ipos, m
772 character(len=*),
parameter :: fmtiprflow = &
773 "(/,4x,'CALCULATED INTERCELL FLOW &
774 &FOR PERIOD ', i0, ' STEP ', i0)"
777 if (ibudfl /= 0 .and. this%iprflow > 0)
then
778 write (this%iout, fmtiprflow)
kper,
kstp
779 do n = 1, this%dis%nodes
781 call this%dis%noder_to_string(n, tempstr)
782 line = trim(tempstr)//
':'
783 do ipos = this%dis%con%ia(n) + 1, this%dis%con%ia(n + 1) - 1
784 m = this%dis%con%ja(ipos)
785 call this%dis%noder_to_string(m, tempstr)
786 line = trim(line)//
' '//trim(tempstr)
788 write (tempstr,
'(1pg15.6)') qnm
789 line = trim(line)//
' '//trim(adjustl(tempstr))
791 write (this%iout,
'(a)') trim(line)
800 integer(I4B),
intent(in) :: idvsave
801 integer(I4B),
intent(in) :: idvprint
802 integer(I4B),
intent(inout) :: ipflag
804 class(
bndtype),
pointer :: packobj
808 do ip = 1, this%bndlist%Count()
810 call packobj%bnd_ot_dv(idvsave, idvprint)
814 call this%oc%oc_ot(ipflag)
823 integer(I4B),
intent(in) :: ibudfl
824 integer(I4B),
intent(inout) :: ipflag
826 class(
bndtype),
pointer :: packobj
830 do ip = 1, this%bndlist%Count()
832 call packobj%bnd_ot_bdsummary(
kstp,
kper, this%iout, ibudfl)
836 call this%budget%finalize_step(
delt)
837 if (ibudfl /= 0)
then
840 call this%budget%budget_ot(
kstp,
kper, this%iout)
844 call this%budget%writecsv(
totim)
857 class(
bndtype),
pointer :: packobj
864 call this%dis%dis_da()
865 call this%fmi%fmi_da()
866 call this%mip%mip_da()
867 call this%budget%budget_da()
869 deallocate (this%dis)
870 deallocate (this%fmi)
871 deallocate (this%mip)
872 deallocate (this%budget)
876 call this%method_dis%deallocate()
877 deallocate (this%method_dis)
878 call this%method_disv%deallocate()
879 deallocate (this%method_disv)
882 do ip = 1, this%bndlist%Count()
884 call packobj%bnd_da()
905 call this%tracks%destroy()
906 deallocate (this%events)
907 deallocate (this%tracks)
909 call this%ExplicitModelType%model_da()
916 character(len=*),
intent(in) :: modelname
919 call this%ExplicitModelType%allocate_scalars(modelname)
948 call this%ExplicitModelType%allocate_arrays()
952 'MASSSTO', this%memoryPath)
954 'MASSSTOOLD', this%memoryPath)
956 'RATESTO', this%memoryPath)
958 'MASSTRM', this%memoryPath)
960 'RATETRM', this%memoryPath)
961 do n = 1, this%dis%nodes
962 this%masssto(n) =
dzero
963 this%massstoold(n) =
dzero
964 this%ratesto(n) =
dzero
965 this%masstrm(n) =
dzero
966 this%ratetrm(n) =
dzero
978 character(len=*),
intent(in) :: filtyp
979 character(len=LINELENGTH) :: errmsg
980 integer(I4B),
intent(in) :: ipakid
981 integer(I4B),
intent(in) :: ipaknum
982 character(len=*),
intent(in) :: pakname
983 character(len=*),
intent(in) :: mempath
984 integer(I4B),
intent(in) :: inunit
985 integer(I4B),
intent(in) :: iout
987 class(
bndtype),
pointer :: packobj
988 class(
bndtype),
pointer :: packobj2
994 call prp_create(packobj, ipakid, ipaknum, inunit, iout, &
995 this%name, pakname, this%fmi, mempath)
997 call api_create(packobj, ipakid, ipaknum, inunit, iout, &
998 this%name, pakname, mempath)
1000 write (errmsg, *)
'Invalid package type: ', filtyp
1007 do ip = 1, this%bndlist%Count()
1009 if (packobj2%packName == pakname)
then
1010 write (errmsg,
'(a,a)')
'Cannot create package. Package name '// &
1011 'already exists: ', trim(pakname)
1022 integer(I4B),
intent(in) :: indis
1024 character(len=LINELENGTH) :: errmsg
1027 if (indis == 0)
then
1028 write (errmsg,
'(1x,a)') &
1029 'Discretization (DIS6, DISV6, or DISU6) package not specified.'
1032 if (this%inmip == 0)
then
1033 write (errmsg,
'(1x,a)') &
1034 'Model input (MIP6) package not specified.'
1039 write (errmsg,
'(1x,a)')
'One or more required package(s) not specified.'
1054 integer(I4B),
intent(in) :: isuppress_output
1056 integer(I4B) :: np, ip
1057 class(
bndtype),
pointer :: packobj
1060 integer(I4B) :: iprp
1065 if (isuppress_output /= 0)
return
1070 call create_particle(particle)
1073 do ip = 1, this%bndlist%Count()
1075 select type (packobj)
1078 do np = 1, packobj%nparticles
1080 call packobj%particles_staging%get(particle, this%id, iprp, np)
1090 call packobj%particles_staging%put(particle, np)
1092 if (particle%istatus >
active) cycle
1093 particle%istatus =
active
1094 if (particle%trelease >=
totimc)
then
1095 if (particle%trelease > particle%tstop)
then
1098 write (
warnmsg,
'(a,g0,a,g0,a,g0,a)') &
1099 'Particle release point ', particle%irpt,
' has &
1100 &release time ', particle%trelease,
' after package &
1101 &stop time ', particle%tstop,
'; particle will not &
1108 call this%method%release(particle)
1111 if (particle%istatus <=
active)
then
1117 tmax = particle%tstop
1130 if (tmax < particle%ttrack) &
1131 call pstop(1,
'Programmer error: PRT tracking tmax &
1132 &precedes particle%ttrack.')
1134 call this%method%apply(particle, tmax)
1143 if (particle%istatus <=
active .and. &
1145 call this%method%terminate(particle, status=
term_timeout)
1148 call packobj%particles_staging%put(particle, np)
1152 call particle%destroy()
1153 deallocate (particle)
1164 integer(I4B),
dimension(:),
allocatable,
intent(inout) :: bndpkgs
1166 pointer,
intent(inout) :: pkgtypes
1168 pointer,
intent(inout) :: pkgnames
1170 pointer,
intent(inout) :: mempaths
1171 integer(I4B),
dimension(:),
contiguous, &
1172 pointer,
intent(inout) :: inunits
1174 integer(I4B) :: ipakid, ipaknum
1175 character(len=LENFTYPE) :: pkgtype, bndptype
1176 character(len=LENPACKAGENAME) :: pkgname
1177 character(len=LENMEMPATH) :: mempath
1178 integer(I4B),
pointer :: inunit
1181 if (
allocated(bndpkgs))
then
1185 do n = 1,
size(bndpkgs)
1186 pkgtype = pkgtypes(bndpkgs(n))
1187 pkgname = pkgnames(bndpkgs(n))
1188 mempath = mempaths(bndpkgs(n))
1189 inunit => inunits(bndpkgs(n))
1191 if (bndptype /= pkgtype)
then
1196 call this%package_create(pkgtype, ipakid, ipaknum, pkgname, mempath, &
1199 ipaknum = ipaknum + 1
1203 deallocate (bndpkgs)
1225 pointer :: pkgtypes => null()
1227 pointer :: pkgnames => null()
1229 pointer :: mempaths => null()
1230 integer(I4B),
dimension(:),
contiguous, &
1231 pointer :: inunits => null()
1232 character(len=LENMEMPATH) :: model_mempath
1233 character(len=LENFTYPE) :: pkgtype
1234 character(len=LENPACKAGENAME) :: pkgname
1235 character(len=LENMEMPATH) :: mempath
1236 integer(I4B),
pointer :: inunit
1237 integer(I4B),
dimension(:),
allocatable :: bndpkgs
1239 integer(I4B) :: indis = 0
1240 character(len=LENMEMPATH) :: mempathmip =
''
1241 character(len=LENMEMPATH) :: mempathfmi =
''
1242 character(len=LENMEMPATH) :: mempathoc =
''
1248 call mem_setptr(pkgtypes,
'PKGTYPES', model_mempath)
1249 call mem_setptr(pkgnames,
'PKGNAMES', model_mempath)
1250 call mem_setptr(mempaths,
'MEMPATHS', model_mempath)
1251 call mem_setptr(inunits,
'INUNITS', model_mempath)
1255 do n = 1,
size(pkgtypes)
1256 pkgtype = pkgtypes(n)
1257 pkgname = pkgnames(n)
1258 mempath = mempaths(n)
1259 inunit => inunits(n)
1261 select case (pkgtype)
1264 call dis_cr(this%dis, this%name, mempath, indis, this%iout)
1267 call disv_cr(this%dis, this%name, mempath, indis, this%iout)
1270 call disu_cr(this%dis, this%name, mempath, indis, this%iout)
1273 mempathmip = mempath
1276 mempathfmi = mempath
1282 bndpkgs(
size(bndpkgs)) = n
1284 call pstop(1,
"Unrecognized package type: "//pkgtype)
1296 call mip_cr(this%mip, this%name, mempathmip, this%inmip, this%iout, this%dis)
1297 call fmi_cr(this%fmi, this%name, mempathfmi, this%infmi, this%iout)
1298 call oc_cr(this%oc, this%name, mempathoc, this%inoc, this%iout)
1301 call this%ftype_check(indis)
1304 call this%create_bndpkgs(bndpkgs, pkgtypes, pkgnames, mempaths, inunits)
1305 call this%create_exg_prp()
1313 class(
bndtype),
pointer :: packobj
1314 character(len=LENPACKAGENAME) :: exgprp_name
1316 exgprp_name =
'EXGPRP'
1323 namemodel=this%name, &
1324 pakname=exgprp_name, &
1335 write (this%iout,
'(1x,a)')
'NAMEFILE OPTIONS:'
1337 if (found%print_input)
then
1338 write (this%iout,
'(4x,a)')
'STRESS PACKAGE INPUT WILL BE PRINTED '// &
1339 'FOR ALL MODEL STRESS PACKAGES'
1342 if (found%print_flows)
then
1343 write (this%iout,
'(4x,a)')
'PACKAGE FLOWS WILL BE PRINTED '// &
1344 'FOR ALL MODEL PACKAGES'
1347 if (found%save_flows)
then
1348 write (this%iout,
'(4x,a)') &
1349 'FLOWS WILL BE SAVED TO BUDGET FILE SPECIFIED IN OUTPUT CONTROL'
1352 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_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)
@ 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.