26 character(len=LENFTYPE) ::
ftype =
'FLW'
27 character(len=16) ::
text =
' FLW'
30 real(dp),
dimension(:),
pointer,
contiguous :: q => null()
58 subroutine flw_create(packobj, id, ibcnum, inunit, iout, namemodel, pakname, &
61 class(
bndtype),
pointer :: packobj
62 integer(I4B),
intent(in) :: id
63 integer(I4B),
intent(in) :: ibcnum
64 integer(I4B),
intent(in) :: inunit
65 integer(I4B),
intent(in) :: iout
66 character(len=*),
intent(in) :: namemodel
67 character(len=*),
intent(in) :: pakname
68 character(len=*),
intent(in) :: mempath
77 call packobj%set_names(ibcnum, namemodel, pakname,
ftype, mempath)
81 call flwobj%allocate_scalars()
84 call packobj%pack_initialize()
86 packobj%inunit = inunit
89 packobj%ibcnum = ibcnum
92 packobj%ictMemPath =
''
108 call this%BndExtType%allocate_scalars()
127 integer(I4B),
dimension(:),
pointer,
contiguous,
optional :: nodelist
128 real(DP),
dimension(:, :),
pointer,
contiguous,
optional :: auxvar
132 call this%BndExtType%allocate_arrays(nodelist, auxvar)
135 call mem_setptr(this%q,
'Q', this%input_mempath)
139 'Q', this%input_mempath)
154 call this%BndExtType%bnd_da()
177 call this%BndExtType%source_options()
183 call this%log_flw_options(found)
198 write (this%iout,
'(/1x,a)')
'PROCESSING '//trim(adjustl(this%text)) &
206 write (this%iout,
'(1x,a)') &
207 'END OF '//trim(adjustl(this%text))//
' OPTIONS'
219 if (this%iper /=
kper)
return
222 call this%BndExtType%bnd_rp()
225 if (this%iprpak /= 0)
then
226 call this%write_list()
240 integer(I4B) :: i, node
244 if (this%nbound == 0)
return
247 do i = 1, this%nbound
248 node = this%nodelist(i)
250 if (this%ibound(node) <= 0)
then
265 subroutine flw_fc(this, rhs, ia, idxglo, matrix_sln)
268 real(DP),
dimension(:),
intent(inout) :: rhs
269 integer(I4B),
dimension(:),
intent(in) :: ia
270 integer(I4B),
dimension(:),
intent(in) :: idxglo
278 if (this%imover == 1)
then
279 call this%pakmvrobj%fc()
283 do i = 1, this%nbound
285 rhs(n) = rhs(n) + this%rhs(i)
287 call matrix_sln%add_value_pos(idxglo(ipos), this%hcof(i))
291 if (this%imover == 1 .and. this%rhs(i) >
dzero)
then
292 call this%pakmvrobj%accumulate_qformvr(i, this%rhs(i))
308 this%listlabel = trim(this%filtyp)//
' NO.'
309 if (this%dis%ndim == 3)
then
310 write (this%listlabel,
'(a, a7)') trim(this%listlabel),
'LAYER'
311 write (this%listlabel,
'(a, a7)') trim(this%listlabel),
'ROW'
312 write (this%listlabel,
'(a, a7)') trim(this%listlabel),
'COL'
313 elseif (this%dis%ndim == 2)
then
314 write (this%listlabel,
'(a, a7)') trim(this%listlabel),
'LAYER'
315 write (this%listlabel,
'(a, a7)') trim(this%listlabel),
'CELL2D'
317 write (this%listlabel,
'(a, a7)') trim(this%listlabel),
'NODE'
319 write (this%listlabel,
'(a, a16)') trim(this%listlabel),
'FLOW RATE'
320 if (this%inamedbound == 1)
then
321 write (this%listlabel,
'(a, a16)') trim(this%listlabel),
'BOUNDARY NAME'
355 call this%obs%StoreObsType(
'flw', .true., indx)
360 call this%obs%StoreObsType(
'to-mvr', .true., indx)
380 call this%obs%obs_bd_clear()
383 do i = 1, this%obs%npakobs
384 obsrv => this%obs%pakobs(i)%obsrv
385 if (obsrv%BndFound)
then
386 do n = 1, obsrv%indxbnds_count
388 jj = obsrv%indxbnds(n)
389 select case (obsrv%ObsTypeId)
391 if (this%imover == 1)
then
392 v = this%pakmvrobj%get_qtomvr(jj)
400 errmsg =
'Unrecognized observation type: '//trim(obsrv%ObsTypeId)
403 call this%obs%SaveOneSimval(obsrv, v)
406 call this%obs%SaveOneSimval(obsrv,
dnodata)
423 integer(I4B) :: i, nlinks
427 nlinks = this%TsManager%boundtslinks%Count()
430 if (
associated(tslink))
then
431 if (tslink%JCol == 1)
then
443 integer(I4B),
intent(in) :: row
447 if (this%iauxmultcol > 0)
then
448 q = this%q(row) * this%auxvar(this%iauxmultcol, row)
465 integer(I4B),
intent(in) :: col
466 integer(I4B),
intent(in) :: row
472 bndval = this%q_mult(row)
474 errmsg =
'Programming error. FLW bound value requested column '&
475 &
'outside range of ncolbnd (1).'
This module contains the extended boundary package.
This module contains the base boundary package.
This module contains simulation constants.
real(dp), parameter dnodata
real no data constant
integer(i4b), parameter lenftype
maximum length of a package type (DIS, WEL, OC, etc.)
real(dp), parameter dzero
real constant zero
This module defines variable data types.
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
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.