27 integer(I4B),
dimension(:, :),
pointer,
contiguous :: cellid => null()
28 logical(LGP) :: ts_active = .false.
69 integer(I4B),
intent(in) :: n
70 integer(I4B),
intent(in) :: node
84 integer(I4B),
intent(in) :: kper
85 integer(I4B),
intent(in) :: kstp
115 integer(I4B),
intent(in) :: n
116 character(len=*),
intent(in) :: varName
127 subroutine init(this, name_model, pakname, ftype, mempath, inunit, iout)
130 character(len=*),
intent(in) :: name_model
131 character(len=*),
intent(in) :: pakname
132 character(len=*),
intent(in) :: ftype
133 character(len=*),
intent(in) :: mempath
134 integer(I4B),
intent(in) :: inunit
135 integer(I4B),
intent(in) :: iout
137 call this%set_names(1, name_model, pakname, ftype, mempath)
138 call this%tvbase_allocate_scalars()
152 call this%NumericalPackageType%allocate_scalars()
166 integer(I4B) :: isize
167 logical(LGP) :: found_print_input
169 write (this%iout,
'(1x,a)') &
170 'PROCESSING '//trim(adjustl(this%packName))//
' OPTIONS'
172 call mem_set_value(this%iprpak,
'PRINT_INPUT', this%input_mempath, &
175 if (found_print_input)
then
176 write (this%iout,
'(4x,a)')
'TIME-VARYING INPUT WILL BE PRINTED.'
179 call get_isize(
'TS6_FILENAME', this%input_mempath, isize)
180 if (isize > 0) this%ts_active = .true.
183 call this%source_package_options()
185 write (this%iout,
'(1x,a)') &
186 'END OF '//trim(adjustl(this%packName))//
' OPTIONS'
203 subroutine ar(this, dis)
209 call this%ar_set_pointers()
211 call this%source_options()
214 call mem_setptr(this%cellid,
'CELLID', this%input_mempath)
227 integer(I4B),
pointer :: iper, nbound
228 integer(I4B) :: n, node
229 character(len=LINELENGTH) :: cellstr
232 call mem_setptr(iper,
'IPER', this%input_mempath)
233 if (iper /=
kper)
return
236 if (this%ts_active)
return
238 call mem_setptr(nbound,
'NBOUND', this%input_mempath)
241 call this%reset_change_flags()
244 node = this%tv_get_node(n)
245 if (node < 1 .or. node > this%dis%nodes)
then
246 call this%dis%noder_to_string(node, cellstr)
247 write (
errmsg,
'(a,2(1x,a))') &
248 'CELLID', trim(cellstr),
'is not in the active model domain.'
253 call this%apply_row_changes(n, node)
258 call this%set_changed_at(
kper,
kstp)
272 integer(I4B),
pointer :: nbound
273 integer(I4B) :: n, node
276 if (.not. this%ts_active)
return
278 call mem_setptr(nbound,
'NBOUND', this%input_mempath)
281 call this%set_changed_at(
kper,
kstp)
283 call this%reset_change_flags()
286 node = this%tv_get_node(n)
287 if (node < 1 .or. node > this%dis%nodes) cycle
288 call this%apply_row_changes(n, node)
305 nullify (this%cellid)
306 call this%NumericalPackageType%da()
314 integer(I4B),
intent(in) :: n
318 integer(I4B) :: nodeu
320 if (this%dis%ndim == 1)
then
321 nodeu = this%cellid(1, n)
322 elseif (this%dis%ndim == 2)
then
323 nodeu =
get_node(this%cellid(1, n), 1, &
325 this%dis%mshape(1), 1, &
328 nodeu =
get_node(this%cellid(1, n), &
331 this%dis%mshape(1), &
332 this%dis%mshape(2), &
335 node = this%dis%get_nodenumber(nodeu, 1)
Apply input column changes for period-data row n to node.
Announce package and set pointers to variables.
Clear all per-node change flags.
Mark property changes as having occurred at (kper, kstp)
Check that a given property value is valid.
This module contains simulation constants.
integer(i4b), parameter linelength
maximum length of a standard line
real(dp), parameter dzero
real constant zero
integer(i4b), parameter maxcharlen
maximum length of char string
integer(i4b) function, public get_node(ilay, irow, icol, nlay, nrow, ncol)
Get node number, given layer, row, and column indices for a structured grid. If any argument is inval...
This module defines variable data types.
subroutine, public get_isize(name, mem_path, isize)
@ brief Get the number of elements for this variable
This module contains the base numerical package type.
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 kstp
current time step number
integer(i4b), pointer, public kper
current stress period number
integer(i4b), pointer, public nper
number of stress period
This module contains common time-varying property functionality.
subroutine tvbase_source_options(this)
Source common options from the input memory path.
integer(i4b) function tv_get_node(this, n)
Return the reduced node number for CELLID row n; caller must bounds-check.
subroutine, public tvbase_da(this)
Deallocate package memory.
subroutine tvbase_allocate_scalars(this)
Allocate scalar variables.
subroutine rp(this)
Read and prepare stress period data for the package.
subroutine tvbase_source_package_options(this)
Source package-specific options from the input memory path.
subroutine ad(this)
Apply advanced values at each time step.
subroutine ar(this, dis)
Allocate and read static data for the package.