15 character(len=LENFTYPE) ::
ftype =
'SRC'
16 character(len=16) ::
text =
' SRC'
20 character(len=LENVARNAME) :: depvartype =
''
22 logical(LGP),
pointer :: highest_sat => null()
23 real(dp),
dimension(:),
pointer,
contiguous :: smassrate => null()
24 integer(I4B),
dimension(:),
pointer,
contiguous :: nodesontop => null()
50 subroutine src_create(packobj, id, ibcnum, inunit, iout, namemodel, &
51 depvartype, pakname, input_mempath, fmi)
55 class(
bndtype),
pointer :: packobj
56 integer(I4B),
intent(in) :: id
57 integer(I4B),
intent(in) :: ibcnum
58 integer(I4B),
intent(in) :: inunit
59 integer(I4B),
intent(in) :: iout
60 character(len=*),
intent(in) :: namemodel
61 character(len=*),
intent(in) :: pakname
62 character(len=LENVARNAME),
intent(in) :: depvartype
63 character(len=*),
intent(in) :: input_mempath
73 call packobj%set_names(ibcnum, namemodel, pakname,
ftype, input_mempath)
77 call srcobj%allocate_scalars()
80 call packobj%pack_initialize()
82 packobj%inunit = inunit
85 packobj%ibcnum = ibcnum
90 srcobj%depvartype = depvartype
109 call this%BndExtType%source_options()
112 call mem_set_value(this%highest_sat,
'HIGHEST_SAT', this%input_mempath, &
115 write (this%iout,
'(/1x,a)')
'PROCESSING SRC OPTIONS'
116 if (found%highest_sat)
then
117 write (this%iout,
'(4x,a)') &
118 'Mass source loading rate will be applied to the highest cell at or below &
119 &the specified cellid with a non-zero saturation.'
121 write (this%iout,
'(1x,a)')
'END OF SRC OPTIONS'
133 call this%BndExtType%bnd_da()
137 if (this%highest_sat)
then
138 call mem_deallocate(this%nodesontop,
"NODESONTOP", this%memoryPath)
155 call this%BndExtType%allocate_scalars()
158 call mem_allocate(this%highest_sat,
'HIGHEST_SAT', this%memoryPath)
161 this%highest_sat = .false.
173 integer(I4B),
dimension(:),
pointer,
contiguous,
optional :: nodelist
174 real(DP),
dimension(:, :),
pointer,
contiguous,
optional :: auxvar
179 call this%BndExtType%allocate_arrays(nodelist, auxvar)
182 if (this%highest_sat)
then
183 call mem_allocate(this%nodesontop, this%maxbound,
'NODESONTOP', &
188 call mem_setptr(this%smassrate,
'SMASSRATE', this%input_mempath)
191 call mem_checkin(this%smassrate,
'SMASSRATE', this%memoryPath, &
192 'SMASSRATE', this%input_mempath)
195 if (this%highest_sat)
then
196 do n = 1, this%maxbound
197 this%nodesontop(n) = 0
208 if (this%iper /=
kper)
return
209 call this%BndExtType%bnd_rp()
210 if (this%highest_sat)
call this%set_nodesontop()
228 do n = 1, this%nbound
229 this%nodesontop(n) = this%nodelist(n)
243 integer(I4B) :: i, node
247 if (this%nbound == 0)
return
250 do i = 1, this%nbound
253 if (this%highest_sat)
then
254 node = this%nodesontop(i)
256 node = this%nodelist(i)
260 if (this%highest_sat)
then
261 if (this%fmi%gwfsat(node) == 0) &
262 call this%dis%highest_saturated(node, this%fmi%gwfsat)
263 this%nodelist(i) = node
267 if (this%ibound(node) <= 0)
then
271 q = this%bound_value(1, i)
280 subroutine src_fc(this, rhs, ia, idxglo, matrix_sln)
283 real(DP),
dimension(:),
intent(inout) :: rhs
284 integer(I4B),
dimension(:),
intent(in) :: ia
285 integer(I4B),
dimension(:),
intent(in) :: idxglo
288 integer(I4B) :: i, n, ipos
291 if (this%imover == 1)
then
292 call this%pakmvrobj%fc()
296 do i = 1, this%nbound
298 rhs(n) = rhs(n) + this%rhs(i)
300 call matrix_sln%add_value_pos(idxglo(ipos), this%hcof(i))
304 if (this%imover == 1 .and. this%rhs(i) >
dzero)
then
305 call this%pakmvrobj%accumulate_qformvr(i, this%rhs(i))
321 this%listlabel = trim(this%filtyp)//
' NO.'
322 if (this%dis%ndim == 3)
then
323 write (this%listlabel,
'(a, a7)') trim(this%listlabel),
'LAYER'
324 write (this%listlabel,
'(a, a7)') trim(this%listlabel),
'ROW'
325 write (this%listlabel,
'(a, a7)') trim(this%listlabel),
'COL'
326 elseif (this%dis%ndim == 2)
then
327 write (this%listlabel,
'(a, a7)') trim(this%listlabel),
'LAYER'
328 write (this%listlabel,
'(a, a7)') trim(this%listlabel),
'CELL2D'
330 write (this%listlabel,
'(a, a7)') trim(this%listlabel),
'NODE'
332 write (this%listlabel,
'(a, a16)') trim(this%listlabel),
'STRESS RATE'
333 if (this%inamedbound == 1)
then
334 write (this%listlabel,
'(a, a16)') trim(this%listlabel),
'BOUNDARY NAME'
366 call this%obs%StoreObsType(
'src', .true., indx)
371 call this%obs%StoreObsType(
'to-mvr', .true., indx)
385 integer(I4B),
intent(in) :: col
386 integer(I4B),
intent(in) :: row
392 bndval = this%smassrate(row)
This module contains the extended boundary package.
This module contains the base boundary package.
This module contains simulation constants.
real(dp), parameter dem1
real constant 1e-1
integer(i4b), parameter lenvarname
maximum length of a variable name
integer(i4b), parameter lenftype
maximum length of a package type (DIS, WEL, OC, etc.)
real(dp), parameter dzero
real constant zero
real(dp), parameter done
real constant 1
subroutine, public src_create(packobj, id, ibcnum, inunit, iout, namemodel, depvartype, pakname, input_mempath, fmi)
Create a source loading package.
character(len=lenftype) ftype
subroutine src_fc(this, rhs, ia, idxglo, matrix_sln)
Add matrix terms related to specified mass source loading.
subroutine src_cf(this)
Formulate the HCOF and RHS terms.
subroutine src_allocate_arrays(this, nodelist, auxvar)
Allocate arrays.
subroutine src_options(this)
Set additional options specific to the GwtSrcType.
subroutine set_nodesontop(this)
Store nodelist in nodesontop.
subroutine src_allocate_scalars(this)
Allocate scalars.
subroutine src_da(this)
Deallocate memory.
subroutine define_listlabel(this)
Define list labels.
subroutine src_df_obs(this)
Define observations.
real(dp) function src_bound_value(this, col, row)
@ brief Return a bound value
logical function src_obs_supported(this)
Support function for specified mass source loading observations.
This module defines variable data types.
This module contains the derived type ObsType.
subroutine, public defaultobsidprocessor(obsrv, dis, inunitobs, iout)
@ brief Process IDstring provided for each observation
integer(i4b), pointer, public kper
current stress period number
This class is used to store a single deferred-length character string. It was designed to work in an ...