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()
173 call this%BndExtType%source_options()
179 call this%log_flw_options()
191 write (this%iout,
'(/1x,a)')
'PROCESSING '//trim(adjustl(this%text)) &
195 write (this%iout,
'(1x,a)') &
196 'END OF '//trim(adjustl(this%text))//
' OPTIONS'
209 integer(I4B) :: i, node
213 if (this%nbound == 0)
return
216 do i = 1, this%nbound
217 node = this%nodelist(i)
219 if (this%ibound(node) <= 0)
then
234 subroutine flw_fc(this, rhs, ia, idxglo, matrix_sln)
237 real(DP),
dimension(:),
intent(inout) :: rhs
238 integer(I4B),
dimension(:),
intent(in) :: ia
239 integer(I4B),
dimension(:),
intent(in) :: idxglo
247 if (this%imover == 1)
then
248 call this%pakmvrobj%fc()
252 do i = 1, this%nbound
254 rhs(n) = rhs(n) + this%rhs(i)
256 call matrix_sln%add_value_pos(idxglo(ipos), this%hcof(i))
260 if (this%imover == 1 .and. this%rhs(i) >
dzero)
then
261 call this%pakmvrobj%accumulate_qformvr(i, this%rhs(i))
277 this%listlabel = trim(this%filtyp)//
' NO.'
278 if (this%dis%ndim == 3)
then
279 write (this%listlabel,
'(a, a7)') trim(this%listlabel),
'LAYER'
280 write (this%listlabel,
'(a, a7)') trim(this%listlabel),
'ROW'
281 write (this%listlabel,
'(a, a7)') trim(this%listlabel),
'COL'
282 elseif (this%dis%ndim == 2)
then
283 write (this%listlabel,
'(a, a7)') trim(this%listlabel),
'LAYER'
284 write (this%listlabel,
'(a, a7)') trim(this%listlabel),
'CELL2D'
286 write (this%listlabel,
'(a, a7)') trim(this%listlabel),
'NODE'
288 write (this%listlabel,
'(a, a16)') trim(this%listlabel),
'FLOW RATE'
289 if (this%inamedbound == 1)
then
290 write (this%listlabel,
'(a, a16)') trim(this%listlabel),
'BOUNDARY NAME'
324 call this%obs%StoreObsType(
'flw', .true., indx)
329 call this%obs%StoreObsType(
'to-mvr', .true., indx)
349 call this%obs%obs_bd_clear()
352 do i = 1, this%obs%npakobs
353 obsrv => this%obs%pakobs(i)%obsrv
354 if (obsrv%BndFound)
then
355 do n = 1, obsrv%indxbnds_count
357 jj = obsrv%indxbnds(n)
358 select case (obsrv%ObsTypeId)
360 if (this%imover == 1)
then
361 v = this%pakmvrobj%get_qtomvr(jj)
369 errmsg =
'Unrecognized observation type: '//trim(obsrv%ObsTypeId)
372 call this%obs%SaveOneSimval(obsrv, v)
375 call this%obs%SaveOneSimval(obsrv,
dnodata)
392 integer(I4B) :: i, nlinks
396 nlinks = this%TsManager%boundtslinks%Count()
399 if (
associated(tslink))
then
400 if (tslink%JCol == 1)
then
412 integer(I4B),
intent(in) :: row
416 if (this%iauxmultcol > 0)
then
417 q = this%q(row) * this%auxvar(this%iauxmultcol, row)
434 integer(I4B),
intent(in) :: col
435 integer(I4B),
intent(in) :: row
441 bndval = this%q_mult(row)
443 errmsg =
'Programming error. FLW bound value requested column '&
444 &
'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 log_flw_options(this)
@ brief Log SWF specific package options
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 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.