17 character(len=LENFTYPE) ::
ftype =
'SRC'
18 character(len=16) ::
text =
' SRC'
22 character(len=LENVARNAME) :: depvartype =
''
24 logical(LGP),
pointer :: highest_sat => null()
25 real(dp),
dimension(:),
pointer,
contiguous :: smassrate => null()
26 integer(I4B),
dimension(:),
pointer,
contiguous :: nodesontop => null()
53 subroutine src_create(packobj, id, ibcnum, inunit, iout, namemodel, &
54 depvartype, pakname, input_mempath, fmi)
58 class(
bndtype),
pointer :: packobj
59 integer(I4B),
intent(in) :: id
60 integer(I4B),
intent(in) :: ibcnum
61 integer(I4B),
intent(in) :: inunit
62 integer(I4B),
intent(in) :: iout
63 character(len=*),
intent(in) :: namemodel
64 character(len=*),
intent(in) :: pakname
65 character(len=LENVARNAME),
intent(in) :: depvartype
66 character(len=*),
intent(in) :: input_mempath
76 call packobj%set_names(ibcnum, namemodel, pakname,
ftype, input_mempath)
80 call srcobj%allocate_scalars()
83 call packobj%pack_initialize()
85 packobj%inunit = inunit
88 packobj%ibcnum = ibcnum
93 srcobj%depvartype = depvartype
112 call this%BndExtType%source_options()
115 call mem_set_value(this%highest_sat,
'HIGHEST_SAT', this%input_mempath, &
118 write (this%iout,
'(/1x,a)')
'PROCESSING SRC OPTIONS'
119 if (found%highest_sat)
then
120 write (this%iout,
'(4x,a)') &
121 'Mass source loading rate will be applied to the highest cell at or below &
122 &the specified cellid with a non-zero saturation.'
124 write (this%iout,
'(1x,a)')
'END OF SRC OPTIONS'
136 call this%BndExtType%bnd_da()
140 if (this%highest_sat)
then
141 call mem_deallocate(this%nodesontop,
"NODESONTOP", this%memoryPath)
158 call this%BndExtType%allocate_scalars()
161 call mem_allocate(this%highest_sat,
'HIGHEST_SAT', this%memoryPath)
164 this%highest_sat = .false.
176 integer(I4B),
dimension(:),
pointer,
contiguous,
optional :: nodelist
177 real(DP),
dimension(:, :),
pointer,
contiguous,
optional :: auxvar
182 call this%BndExtType%allocate_arrays(nodelist, auxvar)
185 if (this%highest_sat)
then
186 call mem_allocate(this%nodesontop, this%maxbound,
'NODESONTOP', &
191 call mem_setptr(this%smassrate,
'SMASSRATE', this%input_mempath)
194 call mem_checkin(this%smassrate,
'SMASSRATE', this%memoryPath, &
195 'SMASSRATE', this%input_mempath)
198 if (this%highest_sat)
then
199 do n = 1, this%maxbound
200 this%nodesontop(n) = 0
210 if (this%iper /=
kper)
return
211 call this%BndExtType%bnd_rp()
212 if (this%highest_sat)
call this%set_nodesontop()
230 do n = 1, this%nbound
231 this%nodesontop(n) = this%nodelist(n)
245 integer(I4B) :: i, node
249 if (this%nbound == 0)
return
252 do i = 1, this%nbound
255 if (this%highest_sat)
then
256 node = this%nodesontop(i)
258 node = this%nodelist(i)
262 if (this%highest_sat)
then
263 if (this%fmi%gwfsat(node) == 0) &
264 call this%dis%highest_saturated(node, this%fmi%gwfsat)
265 this%nodelist(i) = node
269 if (this%ibound(node) <= 0)
then
275 q = this%mass_mult(i)
285 subroutine src_fc(this, rhs, ia, idxglo, matrix_sln)
288 real(DP),
dimension(:),
intent(inout) :: rhs
289 integer(I4B),
dimension(:),
intent(in) :: ia
290 integer(I4B),
dimension(:),
intent(in) :: idxglo
293 integer(I4B) :: i, n, ipos
296 if (this%imover == 1)
then
297 call this%pakmvrobj%fc()
301 do i = 1, this%nbound
303 rhs(n) = rhs(n) + this%rhs(i)
305 call matrix_sln%add_value_pos(idxglo(ipos), this%hcof(i))
309 if (this%imover == 1 .and. this%rhs(i) >
dzero)
then
310 call this%pakmvrobj%accumulate_qformvr(i, this%rhs(i))
326 this%listlabel = trim(this%filtyp)//
' NO.'
327 if (this%dis%ndim == 3)
then
328 write (this%listlabel,
'(a, a7)') trim(this%listlabel),
'LAYER'
329 write (this%listlabel,
'(a, a7)') trim(this%listlabel),
'ROW'
330 write (this%listlabel,
'(a, a7)') trim(this%listlabel),
'COL'
331 elseif (this%dis%ndim == 2)
then
332 write (this%listlabel,
'(a, a7)') trim(this%listlabel),
'LAYER'
333 write (this%listlabel,
'(a, a7)') trim(this%listlabel),
'CELL2D'
335 write (this%listlabel,
'(a, a7)') trim(this%listlabel),
'NODE'
337 write (this%listlabel,
'(a, a16)') trim(this%listlabel),
'STRESS RATE'
338 if (this%inamedbound == 1)
then
339 write (this%listlabel,
'(a, a16)') trim(this%listlabel),
'BOUNDARY NAME'
371 call this%obs%StoreObsType(
'src', .true., indx)
376 call this%obs%StoreObsType(
'to-mvr', .true., indx)
390 integer(I4B),
intent(in) :: col
391 integer(I4B),
intent(in) :: row
397 bndval = this%smassrate(row)
412 integer(I4B),
intent(in) :: row
416 if (this%iauxmultcol > 0)
then
417 ener = this%smassrate(row) * this%auxvar(this%iauxmultcol, row)
419 ener = 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.
real(dp) function mass_mult(this, row)
Return a value that applies a multiplier.
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
This module contains simulation methods.
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
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 ...