@@ -36,23 +36,18 @@ module PrtPrpModule
3636
3737 ! > @brief Particle release point (PRP) package
3838 type, extends(BndExtType) :: PrtPrpType
39- type (PrtFmiType), pointer :: fmi = > null () ! < flow model interface
40- type (ParticleStoreType), pointer :: particles = > null () ! < particle store
41- type (ParticleReleaseScheduleType), pointer :: schedule ! < particle release schedule
42- integer (I4B), pointer :: nreleasepoints = > null () ! < number of release points
43- integer (I4B), pointer :: nreleasetimes = > null () ! < number of user-specified particle release times
44- integer (I4B), pointer :: nparticles = > null () ! < number of particles released
39+ ! options
40+ logical (LGP), pointer :: extend = > null () ! < extend tracking beyond simulation's end
41+ logical (LGP), pointer :: frctrn = > null () ! < force ternary solution for quad grids
42+ logical (LGP), pointer :: drape = > null () ! < whether to drape particle to topmost active cell
43+ logical (LGP), pointer :: localz = > null () ! < compute z coordinates local to the release cell
4544 integer (I4B), pointer :: istopweaksink = > null () ! < weak sink option: 0 = no stop, 1 = stop
4645 integer (I4B), pointer :: istopzone = > null () ! < optional stop zone number: 0 = no stop zone
47- integer (I4B), pointer :: idrape = > null () ! < drape option: 0 = do not drape, 1 = drape to topmost active cell
4846 integer (I4B), pointer :: idrymeth = > null () ! < dry tracking method: 0 = drop, 1 = stop, 2 = stay
4947 integer (I4B), pointer :: itrkout = > null () ! < binary track file
5048 integer (I4B), pointer :: itrkhdr = > null () ! < track header file
5149 integer (I4B), pointer :: itrkcsv = > null () ! < CSV track file
5250 integer (I4B), pointer :: irlstls = > null () ! < release time file
53- integer (I4B), pointer :: ilocalz = > null () ! < compute z coordinates local to the cell
54- integer (I4B), pointer :: iextend = > null () ! < extend tracking beyond simulation's end
55- integer (I4B), pointer :: ifrctrn = > null () ! < force ternary solution for quad grids
5651 integer (I4B), pointer :: iexmeth = > null () ! < method for iterative solution of particle exit location and time in generalized Pollock's method
5752 integer (I4B), pointer :: ichkmeth = > null () ! < method for checking particle release coordinates are in the specified cells, 0 = none, 1 = eager
5853 integer (I4B), pointer :: icycwin = > null () ! < cycle detection window size
@@ -62,6 +57,13 @@ module PrtPrpModule
6257 real (DP), pointer :: offset = > null () ! < release time offset
6358 real (DP), pointer :: stoptime = > null () ! < stop time for all release points
6459 real (DP), pointer :: stoptraveltime = > null () ! < stop travel time for all points
60+ !
61+ type (PrtFmiType), pointer :: fmi = > null () ! < flow model interface
62+ type (ParticleStoreType), pointer :: particles = > null () ! < particle store
63+ type (ParticleReleaseScheduleType), pointer :: schedule = > null () ! < particle release schedule
64+ integer (I4B), pointer :: nreleasepoints = > null () ! < number of release points
65+ integer (I4B), pointer :: nreleasetimes = > null () ! < number of user-specified particle release times
66+ integer (I4B), pointer :: nparticles = > null () ! < number of particles released
6567 integer (I4B), pointer , contiguous :: rptnode(:) = > null () ! < release point reduced nns
6668 integer (I4B), pointer , contiguous :: rptzone(:) = > null () ! < release point zone numbers
6769 real (DP), pointer , contiguous :: rptx(:) = > null () ! < release point x coordinates
@@ -151,14 +153,14 @@ subroutine prp_da(this)
151153 call this% BndExtType% bnd_da()
152154
153155 ! Deallocate scalars
154- call mem_deallocate(this% ilocalz )
155- call mem_deallocate(this% iextend )
156+ call mem_deallocate(this% localz )
157+ call mem_deallocate(this% extend )
156158 call mem_deallocate(this% offset)
157159 call mem_deallocate(this% stoptime)
158160 call mem_deallocate(this% stoptraveltime)
159161 call mem_deallocate(this% istopweaksink)
160162 call mem_deallocate(this% istopzone)
161- call mem_deallocate(this% idrape )
163+ call mem_deallocate(this% drape )
162164 call mem_deallocate(this% idrymeth)
163165 call mem_deallocate(this% nreleasepoints)
164166 call mem_deallocate(this% nreleasetimes)
@@ -167,7 +169,7 @@ subroutine prp_da(this)
167169 call mem_deallocate(this% itrkhdr)
168170 call mem_deallocate(this% itrkcsv)
169171 call mem_deallocate(this% irlstls)
170- call mem_deallocate(this% ifrctrn )
172+ call mem_deallocate(this% frctrn )
171173 call mem_deallocate(this% iexmeth)
172174 call mem_deallocate(this% ichkmeth)
173175 call mem_deallocate(this% icycwin)
@@ -243,14 +245,14 @@ subroutine prp_allocate_scalars(this)
243245 call this% BndExtType% allocate_scalars()
244246
245247 ! Allocate scalars for this type
246- call mem_allocate(this% ilocalz , ' ILOCALZ ' , this% memoryPath)
247- call mem_allocate(this% iextend , ' IEXTEND ' , this% memoryPath)
248+ call mem_allocate(this% localz , ' LOCALZ ' , this% memoryPath)
249+ call mem_allocate(this% extend , ' EXTEND ' , this% memoryPath)
248250 call mem_allocate(this% offset, ' OFFSET' , this% memoryPath)
249251 call mem_allocate(this% stoptime, ' STOPTIME' , this% memoryPath)
250252 call mem_allocate(this% stoptraveltime, ' STOPTRAVELTIME' , this% memoryPath)
251253 call mem_allocate(this% istopweaksink, ' ISTOPWEAKSINK' , this% memoryPath)
252254 call mem_allocate(this% istopzone, ' ISTOPZONE' , this% memoryPath)
253- call mem_allocate(this% idrape , ' IDRAPE ' , this% memoryPath)
255+ call mem_allocate(this% drape , ' DRAPE ' , this% memoryPath)
254256 call mem_allocate(this% idrymeth, ' IDRYMETH' , this% memoryPath)
255257 call mem_allocate(this% nreleasepoints, ' NRELEASEPOINTS' , this% memoryPath)
256258 call mem_allocate(this% nreleasetimes, ' NRELEASETIMES' , this% memoryPath)
@@ -259,7 +261,7 @@ subroutine prp_allocate_scalars(this)
259261 call mem_allocate(this% itrkhdr, ' ITRKHDR' , this% memoryPath)
260262 call mem_allocate(this% itrkcsv, ' ITRKCSV' , this% memoryPath)
261263 call mem_allocate(this% irlstls, ' IRLSTLS' , this% memoryPath)
262- call mem_allocate(this% ifrctrn , ' IFRCTRN ' , this% memoryPath)
264+ call mem_allocate(this% frctrn , ' FRCTRN ' , this% memoryPath)
263265 call mem_allocate(this% iexmeth, ' IEXMETH' , this% memoryPath)
264266 call mem_allocate(this% ichkmeth, ' ICHKMETH' , this% memoryPath)
265267 call mem_allocate(this% icycwin, ' ICYCWIN' , this% memoryPath)
@@ -268,14 +270,14 @@ subroutine prp_allocate_scalars(this)
268270 call mem_allocate(this% rtfreq, ' RTFREQ' , this% memoryPath)
269271
270272 ! Set values
271- this% ilocalz = 0
272- this% iextend = 0
273+ this% localz = .false.
274+ this% extend = .false.
273275 this% offset = DZERO
274276 this% stoptime = huge (1d0 )
275277 this% stoptraveltime = huge (1d0 )
276278 this% istopweaksink = 0
277279 this% istopzone = 0
278- this% idrape = 0
280+ this% drape = .false.
279281 this% idrymeth = 0
280282 this% nreleasepoints = 0
281283 this% nreleasetimes = 0
@@ -284,7 +286,7 @@ subroutine prp_allocate_scalars(this)
284286 this% itrkhdr = 0
285287 this% itrkcsv = 0
286288 this% irlstls = 0
287- this% ifrctrn = 0
289+ this% frctrn = .false.
288290 this% iexmeth = 0
289291 this% ichkmeth = 1
290292 this% icycwin = 0
@@ -361,7 +363,7 @@ subroutine prp_ad(this)
361363 ' Skipping negative release time (t=' , t, ' ).'
362364 call store_warning(warnmsg)
363365 cycle
364- else if (t > totalsimtime .and. this% iextend == 0 ) then
366+ else if (t > totalsimtime .and. .not. this% extend ) then
365367 write (warnmsg, ' (a,g0,a)' ) &
366368 ' Skipping release time falling after the end of the &
367369 &simulation (t=' , t, ' ). Enable EXTEND_TRACKING to &
@@ -494,7 +496,7 @@ subroutine initialize_particle(this, particle, ip, trelease)
494496 ! enabled, or else terminate permanently unreleased.
495497 if (this% ibound(ic) == 0 ) then
496498 ic_old = ic
497- if (this% idrape > 0 ) then
499+ if (this% drape ) then
498500 call this% dis% highest_active(ic, this% ibound)
499501 if (ic == ic_old .or. this% ibound(ic) == 0 ) then
500502 ! negative unreleased status signals to the
@@ -510,7 +512,7 @@ subroutine initialize_particle(this, particle, ip, trelease)
510512 ! Load coordinates and transform if needed
511513 x = this% rptx(ip)
512514 y = this% rpty(ip)
513- if (this% ilocalz > 0 ) then
515+ if (this% localz ) then
514516 top = this% fmi% dis% top(ic)
515517 bot = this% fmi% dis% bot(ic)
516518 hds = this% fmi% gwfhead(ic)
@@ -542,9 +544,9 @@ subroutine initialize_particle(this, particle, ip, trelease)
542544 particle% iboundary(LEVEL_FEATURE) = 0
543545 particle% itrdomain(LEVEL_SUBFEATURE) = 0
544546 particle% iboundary(LEVEL_SUBFEATURE) = 0
545- particle% ifrctrn = this% ifrctrn
547+ particle% frctrn = this% frctrn
546548 particle% iexmeth = this% iexmeth
547- particle% iextend = this% iext end
549+ particle% extend = this% ext end
548550 particle% icycwin = this% icycwin
549551 particle% extol = this% extol
550552 end subroutine initialize_particle
@@ -694,26 +696,26 @@ subroutine prp_options(this)
694696 found% istopweaksink)
695697 call mem_set_value(this% istopzone, ' ISTOPZONE' , this% input_mempath, &
696698 found% istopzone)
697- call mem_set_value(this% idrape , ' DRAPE' , this% input_mempath, &
699+ call mem_set_value(this% drape , ' DRAPE' , this% input_mempath, &
698700 found% drape)
699701 call mem_set_value(this% idrymeth, ' IDRYMETH' , this% input_mempath, &
700702 drytrack_method, found% idrymeth)
701703 call mem_set_value(trackfile, ' TRACKFILE' , this% input_mempath, &
702704 found% trackfile)
703705 call mem_set_value(trackcsvfile, ' TRACKCSVFILE' , this% input_mempath, &
704706 found% trackcsvfile)
705- call mem_set_value(this% ilocalz , ' LOCAL_Z ' , this% input_mempath, &
706- found% local_z )
707- call mem_set_value(this% iextend , ' EXTEND_TRACKING ' , this% input_mempath, &
708- found% extend_tracking )
707+ call mem_set_value(this% localz , ' LOCALZ ' , this% input_mempath, &
708+ found% localz )
709+ call mem_set_value(this% extend , ' EXTEND ' , this% input_mempath, &
710+ found% extend )
709711 call mem_set_value(this% extol, ' EXTOL' , this% input_mempath, &
710712 found% extol)
711713 call mem_set_value(this% rttol, ' RTTOL' , this% input_mempath, &
712714 found% rttol)
713715 call mem_set_value(this% rtfreq, ' RTFREQ' , this% input_mempath, &
714716 found% rtfreq)
715- call mem_set_value(this% ifrctrn , ' IFRCTRN ' , this% input_mempath, &
716- found% ifrctrn )
717+ call mem_set_value(this% frctrn , ' FRCTRN ' , this% input_mempath, &
718+ found% frctrn )
717719 call mem_set_value(this% iexmeth, ' IEXMETH' , this% input_mempath, &
718720 found% iexmeth)
719721 call mem_set_value(this% ichkmeth, ' ICHKMETH' , this% input_mempath, &
@@ -823,7 +825,7 @@ subroutine prp_log_options(this, found, trackfile, trackcsvfile)
823825
824826 write (this% iout, ' (1x,a)' ) ' PROCESSING PARTICLE INPUT DIMENSIONS'
825827
826- if (found% ifrctrn ) then
828+ if (found% frctrn ) then
827829 write (this% iout, ' (4x,a)' ) &
828830 ' IF DISV, TRACKING WILL USE THE TERNARY METHOD REGARDLESS OF CELL TYPE'
829831 end if
@@ -948,7 +950,7 @@ subroutine prp_packagedata(this)
948950 this% rptnode(rptno) = noder
949951 end if
950952
951- if (this% ilocalz > 0 .and. (zrpts(n) < 0 .or. zrpts(n) > 1 )) then
953+ if (this% localz .and. (zrpts(n) < 0 .or. zrpts(n) > 1 )) then
952954 call store_error(' Local z coordinate must fall in the interval [0, 1]' )
953955 cycle
954956 end if
0 commit comments