31 character(len=LENFTYPE) ::
ftype =
'FLW'
32 character(len=16) ::
text =
' FLW'
35 real(dp),
dimension(:),
pointer,
contiguous :: q => null()
63 subroutine flw_create(packobj, id, ibcnum, inunit, iout, namemodel, pakname, &
66 class(
bndtype),
pointer :: packobj
67 integer(I4B),
intent(in) :: id
68 integer(I4B),
intent(in) :: ibcnum
69 integer(I4B),
intent(in) :: inunit
70 integer(I4B),
intent(in) :: iout
71 character(len=*),
intent(in) :: namemodel
72 character(len=*),
intent(in) :: pakname
73 character(len=*),
intent(in) :: mempath
82 call packobj%set_names(ibcnum, namemodel, pakname,
ftype, mempath)
86 call flwobj%allocate_scalars()
89 call packobj%pack_initialize()
91 packobj%inunit = inunit
94 packobj%ibcnum = ibcnum
97 packobj%ictMemPath =
''
113 call this%BndExtType%allocate_scalars()
132 integer(I4B),
dimension(:),
pointer,
contiguous,
optional :: nodelist
133 real(DP),
dimension(:, :),
pointer,
contiguous,
optional :: auxvar
137 call this%BndExtType%allocate_arrays(nodelist, auxvar)
140 call mem_setptr(this%q,
'Q', this%input_mempath)
144 'Q', this%input_mempath)
159 call this%BndExtType%bnd_da()
182 call this%BndExtType%source_options()
188 call this%log_flw_options(found)
203 write (this%iout,
'(/1x,a)')
'PROCESSING '//trim(adjustl(this%text)) &
211 write (this%iout,
'(1x,a)') &
212 'END OF '//trim(adjustl(this%text))//
' OPTIONS'
224 if (this%iper /=
kper)
return
227 call this%BndExtType%bnd_rp()
230 if (this%iprpak /= 0)
then
231 call this%write_list()
245 integer(I4B) :: i, node
249 if (this%nbound == 0)
return
252 do i = 1, this%nbound
253 node = this%nodelist(i)
255 if (this%ibound(node) <= 0)
then
270 subroutine flw_fc(this, rhs, ia, idxglo, matrix_sln)
273 real(DP),
dimension(:),
intent(inout) :: rhs
274 integer(I4B),
dimension(:),
intent(in) :: ia
275 integer(I4B),
dimension(:),
intent(in) :: idxglo
283 if (this%imover == 1)
then
284 call this%pakmvrobj%fc()
288 do i = 1, this%nbound
290 rhs(n) = rhs(n) + this%rhs(i)
292 call matrix_sln%add_value_pos(idxglo(ipos), this%hcof(i))
296 if (this%imover == 1 .and. this%rhs(i) >
dzero)
then
297 call this%pakmvrobj%accumulate_qformvr(i, this%rhs(i))
313 this%listlabel = trim(this%filtyp)//
' NO.'
314 if (this%dis%ndim == 3)
then
315 write (this%listlabel,
'(a, a7)') trim(this%listlabel),
'LAYER'
316 write (this%listlabel,
'(a, a7)') trim(this%listlabel),
'ROW'
317 write (this%listlabel,
'(a, a7)') trim(this%listlabel),
'COL'
318 elseif (this%dis%ndim == 2)
then
319 write (this%listlabel,
'(a, a7)') trim(this%listlabel),
'LAYER'
320 write (this%listlabel,
'(a, a7)') trim(this%listlabel),
'CELL2D'
322 write (this%listlabel,
'(a, a7)') trim(this%listlabel),
'NODE'
324 write (this%listlabel,
'(a, a16)') trim(this%listlabel),
'FLOW RATE'
325 if (this%inamedbound == 1)
then
326 write (this%listlabel,
'(a, a16)') trim(this%listlabel),
'BOUNDARY NAME'
360 call this%obs%StoreObsType(
'flw', .true., indx)
365 call this%obs%StoreObsType(
'to-mvr', .true., indx)
385 call this%obs%obs_bd_clear()
388 do i = 1, this%obs%npakobs
389 obsrv => this%obs%pakobs(i)%obsrv
390 if (obsrv%BndFound)
then
391 do n = 1, obsrv%indxbnds_count
393 jj = obsrv%indxbnds(n)
394 select case (obsrv%ObsTypeId)
396 if (this%imover == 1)
then
397 v = this%pakmvrobj%get_qtomvr(jj)
405 errmsg =
'Unrecognized observation type: '//trim(obsrv%ObsTypeId)
408 call this%obs%SaveOneSimval(obsrv, v)
411 call this%obs%SaveOneSimval(obsrv,
dnodata)
428 integer(I4B) :: i, nlinks
432 nlinks = this%TsManager%boundtslinks%Count()
435 if (
associated(tslink))
then
436 if (tslink%JCol == 1)
then
448 integer(I4B),
intent(in) :: row
452 if (this%iauxmultcol > 0)
then
453 q = this%q(row) * this%auxvar(this%iauxmultcol, row)
470 integer(I4B),
intent(in) :: col
471 integer(I4B),
intent(in) :: row
477 bndval = this%q_mult(row)
479 errmsg =
'Programming error. FLW bound value requested column '&
480 &
'outside range of ncolbnd (1).'
This module contains block parser methods.
This module contains the extended boundary package.
This module contains the base boundary package.
This module contains simulation constants.
integer(i4b), parameter linelength
maximum length of a standard line
real(dp), parameter dnodata
real no data constant
real(dp), parameter dem1
real constant 1e-1
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
This module defines variable data types.
character(len=lenmempath) function create_mem_path(component, subcomponent, context)
returns the path to the memory object
This module contains the derived types ObserveType and ObsDataType.
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.
subroutine, public store_error_filename(filename, terminate)
Store the erroring file name.
This module contains simulation variables.
character(len=maxcharlen) errmsg
error message string
real(dp) function sqsaturationderivative(top, bot, x, c1, c2)
@ brief sQSaturationDerivative
real(dp) function sqsaturation(top, bot, x, c1, c2)
@ brief sQSaturation
This module contains the FLW package methods.
subroutine flw_df_obs(this)
Define the observation types available in the package.
character(len=lenftype) ftype
package ftype
subroutine flw_cf(this)
@ brief Formulate the package hcof and rhs terms.
subroutine, public flw_create(packobj, id, ibcnum, inunit, iout, namemodel, pakname, mempath)
@ brief Create a new package object
subroutine flw_da(this)
@ brief Deallocate package memory
real(dp) function flw_bound_value(this, col, row)
@ brief Return a bound value
logical function flw_obs_supported(this)
Determine if observations are supported.
subroutine flw_allocate_scalars(this)
@ brief Allocate scalars
character(len=16) text
package flow text string
subroutine flw_rp(this)
@ brief SWF read and prepare
subroutine flw_bd_obs(this)
Save observations for the package.
subroutine define_listlabel(this)
@ brief Define the list label for the package
subroutine log_flw_options(this, found)
@ brief Log SWF specific package options
subroutine flw_options(this)
@ brief Source additional options for package
real(dp) function q_mult(this, row)
subroutine flw_allocate_arrays(this, nodelist, auxvar)
@ brief Allocate arrays
subroutine flw_fc(this, rhs, ia, idxglo, matrix_sln)
@ brief Copy hcof and rhs terms into solution.
subroutine flw_rp_ts(this)
Assign time series links for the package.
integer(i4b), pointer, public kper
current stress period number
type(timeserieslinktype) function, pointer, public gettimeserieslinkfromlist(list, indx)
Get time series link from a list.