26 character(len=LENFTYPE) ::
ftype =
'FLW'
27 character(len=16) ::
text =
' FLW'
30 real(dp),
dimension(:),
pointer,
contiguous :: q => null()
57 subroutine flw_create(packobj, id, ibcnum, inunit, iout, namemodel, pakname, &
60 class(
bndtype),
pointer :: packobj
61 integer(I4B),
intent(in) :: id
62 integer(I4B),
intent(in) :: ibcnum
63 integer(I4B),
intent(in) :: inunit
64 integer(I4B),
intent(in) :: iout
65 character(len=*),
intent(in) :: namemodel
66 character(len=*),
intent(in) :: pakname
67 character(len=*),
intent(in) :: mempath
76 call packobj%set_names(ibcnum, namemodel, pakname,
ftype, mempath)
80 call flwobj%allocate_scalars()
83 call packobj%pack_initialize()
85 packobj%inunit = inunit
88 packobj%ibcnum = ibcnum
91 packobj%ictMemPath =
''
107 call this%BndExtType%allocate_scalars()
126 integer(I4B),
dimension(:),
pointer,
contiguous,
optional :: nodelist
127 real(DP),
dimension(:, :),
pointer,
contiguous,
optional :: auxvar
131 call this%BndExtType%allocate_arrays(nodelist, auxvar)
134 call mem_setptr(this%q,
'Q', this%input_mempath)
138 'Q', this%input_mempath)
153 call this%BndExtType%bnd_da()
176 call this%BndExtType%source_options()
182 call this%log_flw_options(found)
197 write (this%iout,
'(/1x,a)')
'PROCESSING '//trim(adjustl(this%text)) &
205 write (this%iout,
'(1x,a)') &
206 'END OF '//trim(adjustl(this%text))//
' OPTIONS'
219 integer(I4B) :: i, node
223 if (this%nbound == 0)
return
226 do i = 1, this%nbound
227 node = this%nodelist(i)
229 if (this%ibound(node) <= 0)
then
244 subroutine flw_fc(this, rhs, ia, idxglo, matrix_sln)
247 real(DP),
dimension(:),
intent(inout) :: rhs
248 integer(I4B),
dimension(:),
intent(in) :: ia
249 integer(I4B),
dimension(:),
intent(in) :: idxglo
257 if (this%imover == 1)
then
258 call this%pakmvrobj%fc()
262 do i = 1, this%nbound
264 rhs(n) = rhs(n) + this%rhs(i)
266 call matrix_sln%add_value_pos(idxglo(ipos), this%hcof(i))
270 if (this%imover == 1 .and. this%rhs(i) >
dzero)
then
271 call this%pakmvrobj%accumulate_qformvr(i, this%rhs(i))
287 this%listlabel = trim(this%filtyp)//
' NO.'
288 if (this%dis%ndim == 3)
then
289 write (this%listlabel,
'(a, a7)') trim(this%listlabel),
'LAYER'
290 write (this%listlabel,
'(a, a7)') trim(this%listlabel),
'ROW'
291 write (this%listlabel,
'(a, a7)') trim(this%listlabel),
'COL'
292 elseif (this%dis%ndim == 2)
then
293 write (this%listlabel,
'(a, a7)') trim(this%listlabel),
'LAYER'
294 write (this%listlabel,
'(a, a7)') trim(this%listlabel),
'CELL2D'
296 write (this%listlabel,
'(a, a7)') trim(this%listlabel),
'NODE'
298 write (this%listlabel,
'(a, a16)') trim(this%listlabel),
'FLOW RATE'
299 if (this%inamedbound == 1)
then
300 write (this%listlabel,
'(a, a16)') trim(this%listlabel),
'BOUNDARY NAME'
334 call this%obs%StoreObsType(
'flw', .true., indx)
339 call this%obs%StoreObsType(
'to-mvr', .true., indx)
359 call this%obs%obs_bd_clear()
362 do i = 1, this%obs%npakobs
363 obsrv => this%obs%pakobs(i)%obsrv
364 if (obsrv%BndFound)
then
365 do n = 1, obsrv%indxbnds_count
367 jj = obsrv%indxbnds(n)
368 select case (obsrv%ObsTypeId)
370 if (this%imover == 1)
then
371 v = this%pakmvrobj%get_qtomvr(jj)
379 errmsg =
'Unrecognized observation type: '//trim(obsrv%ObsTypeId)
382 call this%obs%SaveOneSimval(obsrv, v)
385 call this%obs%SaveOneSimval(obsrv,
dnodata)
402 integer(I4B) :: i, nlinks
406 nlinks = this%TsManager%boundtslinks%Count()
409 if (
associated(tslink))
then
410 if (tslink%JCol == 1)
then
422 integer(I4B),
intent(in) :: row
426 if (this%iauxmultcol > 0)
then
427 q = this%q(row) * this%auxvar(this%iauxmultcol, row)
444 integer(I4B),
intent(in) :: col
445 integer(I4B),
intent(in) :: row
451 bndval = this%q_mult(row)
453 errmsg =
'Programming error. FLW bound value requested column '&
454 &
'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_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.
type(timeserieslinktype) function, pointer, public gettimeserieslinkfromlist(list, indx)
Get time series link from a list.