34 character(len=LENFTYPE) ::
ftype =
'PRP'
35 character(len=16) ::
text =
' PRP'
41 logical(LGP),
pointer :: extend => null()
42 logical(LGP),
pointer :: frctrn => null()
43 logical(LGP),
pointer :: drape => null()
44 logical(LGP),
pointer :: localz => null()
45 integer(I4B),
pointer :: istopweaksink => null()
46 integer(I4B),
pointer :: istopzone => null()
47 integer(I4B),
pointer :: idrymeth => null()
48 integer(I4B),
pointer :: itrkout => null()
49 integer(I4B),
pointer :: itrkhdr => null()
50 integer(I4B),
pointer :: itrkcsv => null()
51 integer(I4B),
pointer :: irlstls => null()
52 integer(I4B),
pointer :: iexmeth => null()
53 integer(I4B),
pointer :: ichkmeth => null()
54 integer(I4B),
pointer :: icycwin => null()
55 real(dp),
pointer :: extol => null()
56 real(dp),
pointer :: rttol => null()
57 real(dp),
pointer :: rtfreq => null()
58 real(dp),
pointer :: offset => null()
59 real(dp),
pointer :: stoptime => null()
60 real(dp),
pointer :: stoptraveltime => null()
65 integer(I4B),
pointer :: nreleasepoints => null()
66 integer(I4B),
pointer :: nreleasetimes => null()
67 integer(I4B),
pointer :: nparticles => null()
68 integer(I4B),
pointer,
contiguous :: rptnode(:) => null()
69 integer(I4B),
pointer,
contiguous :: rptzone(:) => null()
70 real(dp),
pointer,
contiguous :: rptx(:) => null()
71 real(dp),
pointer,
contiguous :: rpty(:) => null()
72 real(dp),
pointer,
contiguous :: rptz(:) => null()
73 real(dp),
pointer,
contiguous :: rptm(:) => null()
74 character(len=LENBOUNDNAME),
pointer,
contiguous :: rptname(:) => null()
75 character(len=LINELENGTH),
allocatable :: period_block_lines(:)
76 integer(I4B) :: applied_kper
104 subroutine prp_create(packobj, id, ibcnum, inunit, iout, namemodel, &
105 pakname, input_mempath, fmi)
107 class(
bndtype),
pointer :: packobj
108 integer(I4B),
intent(in) :: id
109 integer(I4B),
intent(in) :: ibcnum
110 integer(I4B),
intent(in) :: inunit
111 integer(I4B),
intent(in) :: iout
112 character(len=*),
intent(in) :: namemodel
113 character(len=*),
intent(in) :: pakname
114 character(len=*),
intent(in) :: input_mempath
119 character(len=*),
parameter :: fmtheader = &
120 "(1x, /1x, 'PRP PARTICLE RELEASE POINT PACKAGE', &
121 &' INPUT READ FROM MEMPATH: ', a, /)"
128 call packobj%set_names(ibcnum, namemodel, pakname,
ftype, input_mempath)
132 call prpobj%prp_allocate_scalars()
135 call packobj%pack_initialize()
137 packobj%inunit = inunit
140 packobj%ibcnum = ibcnum
148 if (inunit > 0)
write (iout, fmtheader) input_mempath
156 call this%BndExtType%bnd_da()
192 if (
allocated(this%period_block_lines))
deallocate (this%period_block_lines)
195 call this%particles%destroy(this%memoryPath)
196 call this%schedule%destroy()
197 deallocate (this%particles)
198 deallocate (this%schedule)
204 integer(I4B),
dimension(:),
pointer,
contiguous :: ibound
205 integer(I4B),
dimension(:),
pointer,
contiguous :: izone
207 this%ibound => ibound
208 this%rptzone => izone
215 integer(I4B),
dimension(:),
pointer,
contiguous,
optional :: nodelist
216 real(DP),
dimension(:, :),
pointer,
contiguous,
optional :: auxvar
220 call this%BndExtType%allocate_arrays()
226 this%nreleasepoints, &
230 call mem_allocate(this%rptx, this%nreleasepoints,
'RPTX', this%memoryPath)
231 call mem_allocate(this%rpty, this%nreleasepoints,
'RPTY', this%memoryPath)
232 call mem_allocate(this%rptz, this%nreleasepoints,
'RPTZ', this%memoryPath)
233 call mem_allocate(this%rptm, this%nreleasepoints,
'RPTMASS', &
235 call mem_allocate(this%rptnode, this%nreleasepoints,
'RPTNODER', &
238 'RPTNAME', this%memoryPath)
241 do nps = 1, this%nreleasepoints
242 this%rptm(nps) =
dzero
251 call this%BndExtType%allocate_scalars()
254 call mem_allocate(this%localz,
'LOCALZ', this%memoryPath)
255 call mem_allocate(this%extend,
'EXTEND', this%memoryPath)
256 call mem_allocate(this%offset,
'OFFSET', this%memoryPath)
257 call mem_allocate(this%stoptime,
'STOPTIME', this%memoryPath)
258 call mem_allocate(this%stoptraveltime,
'STOPTRAVELTIME', this%memoryPath)
259 call mem_allocate(this%istopweaksink,
'ISTOPWEAKSINK', this%memoryPath)
260 call mem_allocate(this%istopzone,
'ISTOPZONE', this%memoryPath)
262 call mem_allocate(this%idrymeth,
'IDRYMETH', this%memoryPath)
263 call mem_allocate(this%nreleasepoints,
'NRELEASEPOINTS', this%memoryPath)
264 call mem_allocate(this%nreleasetimes,
'NRELEASETIMES', this%memoryPath)
265 call mem_allocate(this%nparticles,
'NPARTICLES', this%memoryPath)
266 call mem_allocate(this%itrkout,
'ITRKOUT', this%memoryPath)
267 call mem_allocate(this%itrkhdr,
'ITRKHDR', this%memoryPath)
268 call mem_allocate(this%itrkcsv,
'ITRKCSV', this%memoryPath)
269 call mem_allocate(this%irlstls,
'IRLSTLS', this%memoryPath)
270 call mem_allocate(this%frctrn,
'FRCTRN', this%memoryPath)
271 call mem_allocate(this%iexmeth,
'IEXMETH', this%memoryPath)
272 call mem_allocate(this%ichkmeth,
'ICHKMETH', this%memoryPath)
273 call mem_allocate(this%icycwin,
'ICYCWIN', this%memoryPath)
276 call mem_allocate(this%rtfreq,
'RTFREQ', this%memoryPath)
279 this%localz = .false.
280 this%extend = .false.
282 this%stoptime = huge(1d0)
283 this%stoptraveltime = huge(1d0)
284 this%istopweaksink = 0
288 this%nreleasepoints = 0
289 this%nreleasetimes = 0
295 this%frctrn = .false.
302 this%applied_kper = 0
313 call this%obs%obs_ar()
315 if (this%inamedbound /= 0)
then
316 do n = 1, this%nreleasepoints
317 this%boundname(n) = this%rptname(n)
320 do n = 1, this%nreleasepoints
321 this%nodelist(n) = this%rptnode(n)
329 integer(I4B) :: ip, it
342 do ip = 1, this%nreleasepoints
343 this%rptm(ip) =
dzero
351 if (
kstp == 1 .and. &
352 kper /= this%applied_kper .and. &
353 allocated(this%period_block_lines))
then
354 call this%schedule%advance(lines=this%period_block_lines)
355 this%applied_kper =
kper
357 call this%schedule%advance()
361 if (.not. this%schedule%any())
return
364 call this%log_release()
368 call this%particles%resize( &
369 this%particles%num_stored() + &
370 (this%nreleasepoints * this%schedule%count()), &
375 do ip = 1, this%nreleasepoints
376 do it = 1, this%schedule%count()
377 t = this%schedule%times(it)
382 'Skipping negative release time (t=', t,
').'
387 'Skipping release time falling after the end of the &
388 &simulation (t=', t,
'). Enable EXTEND_TRACKING to &
389 &release particles after the simulation end time.'
393 call this%release(ip, t)
401 if (this%iprpak > 0)
then
402 write (this%iout,
"(1x,/1x,a,1x,i0)") &
403 'PARTICLE RELEASE FOR PRP', this%ibcnum
404 call this%schedule%log(this%iout)
416 integer(I4B),
intent(in) :: ic
417 real(DP),
intent(in) :: x, y, z
419 real(DP),
allocatable :: polyverts(:, :)
421 call this%fmi%dis%get_polyverts(ic, polyverts)
423 write (
errmsg,
'(a,g0,a,g0,a,i0)') &
424 'Error: release point (x=', x,
', y=', y,
') is not in cell ', &
425 this%dis%get_nodeuser(ic)
429 if (z > maxval(this%dis%top))
then
430 write (
errmsg,
'(a,g0,a,g0,a,i0)') &
431 'Error: release point (z=', z,
') is above grid top ', &
435 else if (z < minval(this%dis%bot))
then
436 write (
errmsg,
'(a,g0,a,g0,a,i0)') &
437 'Error: release point (z=', z,
') is below grid bottom ', &
442 deallocate (polyverts)
460 integer(I4B),
intent(in) :: ip
461 real(DP),
intent(in) :: trelease
466 call this%initialize_particle(particle, ip, trelease)
467 np = this%nparticles + 1
469 call this%particles%put(particle, np)
470 deallocate (particle)
471 this%rptm(ip) = this%rptm(ip) +
done
479 integer(I4B),
intent(in) :: ip
480 real(DP),
intent(in) :: trelease
482 integer(I4B) :: irow, icol, ilay, icpl
483 integer(I4B) :: ic, icu, ic_old
485 real(DP) :: top, bot, hds
487 character(len=*),
parameter :: fmticterr = &
488 "('Error in ',a,': Flow model interface does not contain ICELLTYPE. &
489 &ICELLTYPE is required for PRT to distinguish convertible cells &
490 &from confined cells if LOCAL_Z release coordinates are provided. &
491 &Make sure a GWFGRID entry is configured in the PRT FMI package.')"
493 ic = this%rptnode(ip)
494 icu = this%dis%get_nodeuser(ic)
496 call create_particle(particle)
498 if (
size(this%boundname) /= 0)
then
499 particle%name = this%boundname(ip)
505 particle%istopweaksink = this%istopweaksink
506 particle%istopzone = this%istopzone
507 particle%idrymeth = this%idrymeth
510 select type (dis => this%dis)
512 call get_ijk(icu, dis%nrow, dis%ncol, dis%nlay, irow, icol, ilay)
514 call get_jk(icu, dis%ncpl, dis%nlay, icpl, ilay)
517 particle%izone = this%rptzone(ic)
522 if (this%ibound(ic) == 0)
then
525 call this%dis%highest_active(ic, this%ibound)
526 if (ic == ic_old .or. this%ibound(ic) == 0)
then
540 if (this%localz)
then
544 if (this%fmi%igwfceltyp /= 1)
then
545 write (
errmsg, fmticterr) trim(this%text)
555 top = this%fmi%dis%top(ic)
556 bot = this%fmi%dis%bot(ic)
557 if (this%fmi%gwfceltyp(icu) /= 0)
then
558 hds = this%fmi%gwfhead(ic)
562 z = bot + this%rptz(ip) * (top - bot)
567 if (this%ichkmeth > 0) &
568 call this%validate_release_point(ic, x, y, z)
573 particle%trelease = trelease
576 if (this%stoptraveltime == huge(1d0))
then
577 particle%tstop = this%stoptime
579 particle%tstop = particle%trelease + this%stoptraveltime
580 if (this%stoptime < particle%tstop) particle%tstop = this%stoptime
583 particle%ttrack = particle%trelease
590 particle%frctrn = this%frctrn
591 particle%iexmeth = this%iexmeth
592 particle%extend = this%extend
593 particle%icycwin = this%icycwin
594 particle%extol = this%extol
608 integer(I4B),
pointer :: iper, ionper, nlist
612 call mem_setptr(iper,
'IPER', this%input_mempath)
613 call mem_setptr(ionper,
'IONPER', this%input_mempath)
615 if (
kper == 1 .and. &
617 (ionper >
nper) .and. &
618 size(this%schedule%time_select%times) == 0)
then
624 if (
allocated(this%period_block_lines))
deallocate (this%period_block_lines)
625 allocate (this%period_block_lines(1))
626 this%period_block_lines(1) =
"FIRST"
628 else if (iper /=
kper)
then
633 call mem_setptr(nlist,
'NBOUND', this%input_mempath)
634 call mem_setptr(settings,
'SETTING', this%input_mempath)
637 if (
allocated(this%period_block_lines))
deallocate (this%period_block_lines)
638 allocate (this%period_block_lines(nlist))
640 this%period_block_lines(n) = settings(n)
650 real(DP),
dimension(:),
intent(in) :: hnew
651 real(DP),
dimension(:),
intent(inout) :: flowja
652 integer(I4B),
intent(in) :: imover
656 integer(I4B) :: idiag
660 if (this%nbound <= 0)
return
663 do i = 1, this%nbound
664 node = this%nodelist(i)
669 idiag = this%dis%con%ia(node)
670 rrate = this%rptm(i) * (
done /
delt)
671 flowja(idiag) = flowja(idiag) + rrate
675 this%simvals(i) = rrate
696 call this%obs%StoreObsType(
'prp', .true., indx)
701 call this%obs%StoreObsType(
'to-mvr', .true., indx)
716 character(len=LENVARNAME),
dimension(3) :: drytrack_method = &
717 &[character(len=LENVARNAME) ::
'DROP',
'STOP',
'STAY']
718 character(len=
lenvarname),
dimension(2) :: coorcheck_method = &
719 &[
character(len=LENVARNAME) ::
'NONE',
'EAGER']
720 character(len=LINELENGTH) :: trackfile, trackcsvfile, fname
722 character(len=*),
parameter :: fmtextolwrn = &
723 "('WARNING: EXIT_SOLVE_TOLERANCE is set to ',g10.3,' &
724 &which is much greater than the default value of ',g10.3,'. &
725 &The tolerance that strikes the best balance between accuracy &
726 &and runtime is problem-dependent. Since the variable being &
727 &solved varies from 0 to 1, tolerance values much less than 1 &
728 &typically give the best results.')"
731 call this%BndExtType%source_options()
734 call mem_set_value(this%stoptime,
'STOPTIME', this%input_mempath, &
737 this%input_mempath, found%stoptraveltime)
738 call mem_set_value(this%istopweaksink,
'ISTOPWEAKSINK', this%input_mempath, &
740 call mem_set_value(this%istopzone,
'ISTOPZONE', this%input_mempath, &
742 call mem_set_value(this%drape,
'DRAPE', this%input_mempath, &
744 call mem_set_value(this%idrymeth,
'IDRYMETH', this%input_mempath, &
745 drytrack_method, found%idrymeth)
746 call mem_set_value(trackfile,
'TRACKFILE', this%input_mempath, &
748 call mem_set_value(trackcsvfile,
'TRACKCSVFILE', this%input_mempath, &
750 call mem_set_value(this%localz,
'LOCALZ', this%input_mempath, &
752 call mem_set_value(this%extend,
'EXTEND', this%input_mempath, &
754 call mem_set_value(this%extol,
'EXTOL', this%input_mempath, &
756 call mem_set_value(this%rttol,
'RTTOL', this%input_mempath, &
758 call mem_set_value(this%rtfreq,
'RTFREQ', this%input_mempath, &
760 call mem_set_value(this%frctrn,
'FRCTRN', this%input_mempath, &
762 call mem_set_value(this%iexmeth,
'IEXMETH', this%input_mempath, &
764 call mem_set_value(this%ichkmeth,
'ICHKMETH', this%input_mempath, &
765 coorcheck_method, found%ichkmeth)
766 call mem_set_value(this%icycwin,
'ICYCWIN', this%input_mempath, found%icycwin)
769 if (found%idrymeth)
then
770 if (this%idrymeth == 0)
then
771 write (
errmsg,
'(a)')
'Unsupported dry tracking method. &
772 &DRY_TRACKING_METHOD must be "DROP", "STOP", or "STAY"'
776 this%idrymeth = this%idrymeth - 1
780 if (found%extol)
then
781 if (this%extol <=
dzero) &
782 call store_error(
'EXIT_SOLVE_TOLERANCE MUST BE POSITIVE')
783 if (this%extol > dem2)
then
784 write (
warnmsg, fmt=fmtextolwrn) &
790 if (found%rttol)
then
791 if (this%rttol <=
dzero) &
792 call store_error(
'RELEASE_TIME_TOLERANCE MUST BE POSITIVE')
795 if (found%rtfreq)
then
796 if (this%rtfreq <=
dzero) &
797 call store_error(
'RELEASE_TIME_FREQUENCY MUST BE POSITIVE')
800 if (found%iexmeth)
then
801 if (.not. (this%iexmeth /= 1 .or. this%iexmeth /= 2)) &
803 &1 (BRENT) OR 2 (CHANDRUPATLA)')
806 if (found%ichkmeth)
then
807 if (this%ichkmeth == 0)
then
808 write (
errmsg,
'(a)')
'Unsupported coordinate check method. &
809 &COORDINATE_CHECK_METHOD must be "NONE" or "EAGER"'
813 this%ichkmeth = this%ichkmeth - 1
817 if (found%icycwin)
then
818 if (this%icycwin < 0) &
819 call store_error(
'CYCLE_DETECTION_WINDOW MUST BE NON-NEGATIVE')
823 if (found%trackfile)
then
825 call openfile(this%itrkout, this%iout, trackfile,
'DATA(BINARY)', &
830 fname = trim(trackfile)//
'.hdr'
831 call openfile(this%itrkhdr, this%iout, fname,
'CSV', &
832 filstat_opt=
'REPLACE', mode_opt=
mnormal)
836 if (found%trackcsvfile)
then
838 call openfile(this%itrkcsv, this%iout, trackcsvfile,
'CSV', &
839 filstat_opt=
'REPLACE')
849 call this%prp_log_options(found, trackfile, trackcsvfile)
863 character(len=*),
intent(in) :: trackfile
864 character(len=*),
intent(in) :: trackcsvfile
867 character(len=*),
parameter :: fmttrkbin = &
868 "(4x, 'PARTICLE TRACKS WILL BE SAVED TO BINARY FILE: ', a, /4x, &
869 &'OPENED ON UNIT: ', I0)"
870 character(len=*),
parameter :: fmttrkcsv = &
871 "(4x, 'PARTICLE TRACKS WILL BE SAVED TO CSV FILE: ', a, /4x, &
872 &'OPENED ON UNIT: ', I0)"
874 write (this%iout,
'(1x,a)')
'PROCESSING PARTICLE INPUT DIMENSIONS'
876 if (found%frctrn)
then
877 write (this%iout,
'(4x,a)') &
878 'IF DISV, TRACKING WILL USE THE TERNARY METHOD REGARDLESS OF CELL TYPE'
881 if (found%trackfile)
then
882 write (this%iout, fmttrkbin) trim(adjustl(trackfile)), this%itrkout
885 if (found%trackcsvfile)
then
886 write (this%iout, fmttrkcsv) trim(adjustl(trackcsvfile)), this%itrkcsv
889 write (this%iout,
'(1x,a)')
'END OF PARTICLE INPUT DIMENSIONS'
902 call mem_set_value(this%nreleasepoints,
'NRELEASEPTS', this%input_mempath, &
904 call mem_set_value(this%nreleasetimes,
'NRELEASETIMES', this%input_mempath, &
907 write (this%iout,
'(1x,a)')
'PROCESSING PARTICLE INPUT DIMENSIONS'
908 write (this%iout,
'(4x,a,i0)')
'NRELEASEPTS = ', this%nreleasepoints
909 write (this%iout,
'(4x,a,i0)')
'NRELEASETIMES = ', this%nreleasetimes
910 write (this%iout,
'(1x,a)')
'END OF PARTICLE INPUT DIMENSIONS'
913 this%maxbound = this%nreleasepoints
914 this%nbound = this%nreleasepoints
917 call this%prp_allocate_arrays()
920 call this%prp_packagedata()
921 call this%prp_releasetimes()
922 call this%prp_load_releasetimefrequency()
933 integer(I4B),
dimension(:),
pointer,
contiguous :: irptno
934 integer(I4B),
dimension(:, :),
pointer,
contiguous :: cellids
935 real(DP),
dimension(:),
pointer,
contiguous :: xrpts, yrpts, zrpts
937 contiguous :: boundnames
938 character(len=LENBOUNDNAME) :: bndName, bndNameTemp
939 character(len=9) :: cno
940 character(len=20) :: cellidstr
941 integer(I4B),
dimension(:),
allocatable :: nboundchk
942 integer(I4B),
dimension(:),
pointer :: cellid
943 integer(I4B) :: n, noder, nodeu, rptno
946 call mem_setptr(irptno,
'IRPTNO', this%input_mempath)
947 call mem_setptr(cellids,
'CELLID', this%input_mempath)
948 call mem_setptr(xrpts,
'XRPT', this%input_mempath)
949 call mem_setptr(yrpts,
'YRPT', this%input_mempath)
950 call mem_setptr(zrpts,
'ZRPT', this%input_mempath)
951 call mem_setptr(boundnames,
'BOUNDNAME', this%input_mempath)
954 allocate (nboundchk(this%nreleasepoints))
955 do n = 1, this%nreleasepoints
959 write (this%iout,
'(/1x,a)')
'PROCESSING '//trim(adjustl(this%packName)) &
962 do n = 1,
size(irptno)
966 if (rptno < 1 .or. rptno > this%nreleasepoints)
then
967 write (
errmsg,
'(a,i0,a,i0,a)') &
968 'Expected ', this%nreleasepoints,
' release points. &
969 &Points must be numbered from 1 to ', this%nreleasepoints,
'.'
975 nboundchk(rptno) = nboundchk(rptno) + 1
978 cellid => cellids(:, n)
981 if (this%dis%ndim == 1)
then
983 elseif (this%dis%ndim == 2)
then
984 nodeu =
get_node(cellid(1), 1, cellid(2), &
985 this%dis%mshape(1), 1, &
988 nodeu =
get_node(cellid(1), cellid(2), cellid(3), &
989 this%dis%mshape(1), &
990 this%dis%mshape(2), &
995 noder = this%dis%get_nodenumber(nodeu, 1)
997 call this%dis%nodeu_to_string(nodeu, cellidstr)
999 'Particle release point configured for nonexistent cell: '// &
1000 trim(adjustl(cellidstr))//
'. This cell has IDOMAIN <= 0 and '&
1001 &
'therefore does not exist in the model grid.'
1005 this%rptnode(rptno) = noder
1008 if (this%localz .and. (zrpts(n) < 0 .or. zrpts(n) > 1))
then
1009 call store_error(
'Local z coordinate must fall in the interval [0, 1]')
1014 this%rptx(rptno) = xrpts(n)
1015 this%rpty(rptno) = yrpts(n)
1016 this%rptz(rptno) = zrpts(n)
1019 write (cno,
'(i9.9)') rptno
1020 bndname =
'PRP'//cno
1023 if (this%inamedbound /= 0)
then
1024 bndnametemp = boundnames(n)
1025 if (bndnametemp /=
'') bndname = bndnametemp
1031 this%rptname(rptno) = bndname
1034 write (this%iout,
'(1x,a)') &
1035 'END OF '//trim(adjustl(this%packName))//
' PACKAGEDATA'
1038 do n = 1, this%nreleasepoints
1039 if (nboundchk(n) == 0)
then
1040 write (
errmsg,
'(a,a,1x,i0,a)')
'No data specified for particle ', &
1041 'release point', n,
'.'
1043 else if (nboundchk(n) > 1)
then
1044 write (
errmsg,
'(a,1x,i0,1x,a,1x,i0,1x,a)') &
1045 'Data for particle release point', n,
'specified', nboundchk(n), &
1057 deallocate (nboundchk)
1066 real(DP),
dimension(:),
pointer,
contiguous :: time
1067 integer(I4B) :: n, isize
1068 real(DP),
allocatable :: times(:)
1070 if (this%nreleasetimes <= 0)
return
1073 allocate (times(this%nreleasetimes))
1076 call get_isize(
'TIME', this%input_mempath, isize)
1078 if (isize <= 0)
then
1079 errmsg =
"RELEASTIMES block expected when &
1080 &NRELEASETIMES dimension is non-zero."
1086 call mem_setptr(time,
'TIME', this%input_mempath)
1089 do n = 1,
size(time)
1094 call this%schedule%time_select%extend(times)
1097 if (.not. this%schedule%time_select%increasing())
then
1098 errmsg =
"RELEASTIMES block entries must strictly increase."
1114 real(DP),
allocatable :: times(:)
1117 if (this%rtfreq <=
dzero)
return
1126 call this%schedule%time_select%extend(times)
1129 if (.not. this%schedule%time_select%increasing())
then
1130 errmsg =
"Release times must strictly increase"
This module contains the extended boundary package.
This module contains the base boundary package.
This module contains simulation constants.
real(dp), parameter dsame
real constant for values that are considered the same based on machine precision
integer(i4b), parameter linelength
maximum length of a standard line
@ tabcenter
centered table column
@ tableft
left justified table column
@ mnormal
normal output mode
real(dp), parameter dep3
real constant 1000
integer(i4b), parameter lenpakloc
maximum length of a package location
real(dp), parameter dem1
real constant 1e-1
real(dp), parameter dep9
real constant 1e9
integer(i4b), parameter lenvarname
maximum length of a variable name
integer(i4b), parameter lenftype
maximum length of a package type (DIS, WEL, OC, etc.)
integer(i4b), parameter lenboundname
maximum length of a bound name
real(dp), parameter dzero
real constant zero
real(dp), parameter dem5
real constant 1e-5
real(dp), parameter dem2
real constant 1e-2
real(dp), parameter done
real constant 1
subroutine pstop(status, message)
Stop the program, optionally specifying an error status code.
integer(i4b) function, public get_node(ilay, irow, icol, nlay, nrow, ncol)
Get node number, given layer, row, and column indices for a structured grid. If any argument is inval...
logical function, public point_in_polygon(x, y, poly)
Check if a point is within a polygon.
subroutine, public get_ijk(nodenumber, nrow, ncol, nlay, irow, icol, ilay)
Get row, column and layer indices from node number and grid dimensions. If nodenumber is invalid,...
subroutine, public get_jk(nodenumber, ncpl, nlay, icpl, ilay)
Get layer index and within-layer node index from node number and grid dimensions. If nodenumber is in...
This module defines variable data types.
pure real(dp) function, dimension(:), allocatable, public arange(start, stop, step)
Return reals separated by the given step over the given interval.
pure logical function, public is_close(a, b, rtol, atol, symmetric)
Check if a real value is approximately equal to another.
subroutine, public get_isize(name, mem_path, isize)
@ brief Get the number of elements for this variable
Particle tracking strategies.
@, public level_subfeature
This module contains the derived type ObsType.
subroutine, public defaultobsidprocessor(obsrv, dis, inunitobs, iout)
@ brief Process IDstring provided for each observation
subroutine create_particle_store(store, np, mempath)
Allocate particle store.
@ term_unreleased
terminated permanently unreleased
subroutine create_particle(particle)
Create a new particle.
Particle release scheduling.
type(particlereleasescheduletype) function, pointer, public create_release_schedule(tolerance)
Create a new release schedule.
Particle track output module.
character(len= *), parameter, public trackheader
character(len= *), parameter, public trackdtypes
subroutine, public prp_create(packobj, id, ibcnum, inunit, iout, namemodel, pakname, input_mempath, fmi)
Create a new particle release point package.
subroutine prp_allocate_arrays(this, nodelist, auxvar)
Allocate arrays.
subroutine prp_rp(this)
@ brief Read and prepare period data for particle input
subroutine prp_load_releasetimefrequency(this)
Load regularly spaced release times if configured.
subroutine prp_cq_simrate(this, hnew, flowja, imover)
@ brief Calculate flow between package and model.
character(len=lenftype) ftype
subroutine prp_df_obs(this)
Store supported observations.
real(dp), parameter default_exit_solve_tolerance
subroutine define_listlabel(this)
subroutine log_release(this)
Log the release scheduled for this time step.
subroutine prp_ad(this)
Advance a time step and release particles if scheduled.
subroutine prp_allocate_scalars(this)
Allocate scalars.
subroutine prp_dimensions(this)
@ brief Set dimensions specific to PrtPrpType
subroutine prp_set_pointers(this, ibound, izone)
@ brief Set pointers to model variables
subroutine initialize_particle(this, particle, ip, trelease)
subroutine prp_da(this)
Deallocate memory.
subroutine prp_releasetimes(this)
Load explicitly specified release times.
subroutine prp_options(this)
@ brief Set options specific to PrtPrpType
subroutine prp_log_options(this, found, trackfile, trackcsvfile)
@ brief Log options specific to PrtPrpType
logical function prp_obs_supported(this)
Indicates whether observations are supported.
subroutine prp_ar(this)
@ brief Allocate and read period data
subroutine release(this, ip, trelease)
Release a particle at the specified time.
subroutine validate_release_point(this, ic, x, y, z)
Verify that the release point is in the cell.
subroutine prp_packagedata(this)
Load package data (release points).
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=maxcharlen) errmsg
error message string
character(len=maxcharlen) warnmsg
warning message string
real(dp), pointer, public totalsimtime
time at end 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
integer(i4b), pointer, public nper
number of stress period
This class is used to store a single deferred-length character string. It was designed to work in an ...
Structured grid discretization.
Vertex grid discretization.
Structure of arrays to store particles.
Particle tracked by the PRT model.
Particle release scheduling utility.
Manages particle track output (logging/writing).
Particle release point (PRP) package.