32 character(len=LINELENGTH),
dimension(:),
allocatable :: params
33 character(len=LINELENGTH) :: blockname
34 integer(I4B) :: iauxiliary
35 integer(I4B) :: inamedbound
36 integer(I4B) :: nparam
51 subroutine init(this, mf6_input, blockname, readasarrays, iauxiliary, &
57 character(len=*) :: blockname
58 logical(LGP),
intent(in) :: readasarrays
59 integer(I4B),
intent(in) :: iauxiliary
60 integer(I4B),
intent(in) :: inamedbound
64 this%mf6_input = mf6_input
65 this%blockname = blockname
67 this%iauxiliary = iauxiliary
68 this%inamedbound = inamedbound
71 if (readasarrays)
then
72 call this%set_filtered_grid()
74 call this%set_filtered_list()
87 if (
allocated(this%params))
deallocate (this%params)
99 integer(I4B),
dimension(:),
allocatable :: idt_idxs
101 real(DP),
dimension(:, :),
pointer,
contiguous :: auxvar
102 integer(I4B) :: keepcnt, iparam
109 do iparam = 1,
size(this%mf6_input%param_dfns)
114 idt => this%mf6_input%param_dfns(iparam)
116 if (idt%blockname /= this%blockname)
then
120 if (idt%tagname ==
'AUX')
then
121 if (this%iauxiliary == 0)
then
123 call mem_allocate(auxvar, 0, 0,
'AUXVAR', this%mf6_input%mempath)
125 if (this%inamedbound == 0)
then
127 this%mf6_input%mempath)
132 keepcnt = keepcnt + 1
134 idt_idxs(keepcnt) = iparam
139 this%nparam = keepcnt
142 allocate (this%params(this%nparam))
145 do iparam = 1, this%nparam
146 idt => this%mf6_input%param_dfns(idt_idxs(iparam))
147 this%params(iparam) = trim(idt%tagname)
151 deallocate (idt_idxs)
165 character(len=LINELENGTH),
dimension(:),
allocatable :: ra_cols
167 real(DP),
dimension(:, :),
pointer,
contiguous :: auxvar
168 integer(I4B) :: ra_ncol, icol, keepcnt
177 this%mf6_input%component_type, &
178 this%mf6_input%subcomponent_type, &
191 this%mf6_input%component_type, &
192 this%mf6_input%subcomponent_type, &
193 this%blockname, ra_cols(icol),
'')
195 if (ra_cols(icol) ==
'RECARRAY')
then
197 else if (ra_cols(icol) ==
'AUX')
then
198 if (this%iauxiliary > 0)
then
201 call mem_allocate(auxvar, 0, 0,
'AUXVAR', this%mf6_input%mempath)
203 else if (ra_cols(icol) ==
'BOUNDNAME')
then
204 if (this%inamedbound /= 0)
then
208 this%mf6_input%mempath)
216 keepcnt = keepcnt + 1
218 this%params(keepcnt) = trim(ra_cols(icol))
223 this%nparam = keepcnt
236 character(len=LINELENGTH),
dimension(:),
allocatable, &
237 intent(inout) :: params
238 integer(I4B),
intent(inout) :: nparam
241 if (
allocated(params))
deallocate (params)
245 allocate (params(nparam))
248 params(n) = this%params(n)
255 integer(I4B),
intent(in) :: strlen
256 integer(I4B),
intent(in) :: nrow
257 character(len=*),
intent(in) :: varname
258 character(len=*),
intent(in) :: mempath
260 contiguous :: charstr1d
263 call mem_allocate(charstr1d, strlen, nrow, varname, mempath)
272 integer(I4B),
intent(in) :: nrow
273 character(len=*),
intent(in) :: varname
274 character(len=*),
intent(in) :: mempath
275 integer(I4B),
dimension(:),
pointer,
contiguous :: int1d
287 integer(I4B),
intent(in) :: ncol
288 integer(I4B),
intent(in) :: nrow
289 character(len=*),
intent(in) :: varname
290 character(len=*),
intent(in) :: mempath
291 integer(I4B),
dimension(:, :),
pointer,
contiguous :: int2d
305 integer(I4B),
intent(in) :: nrow
306 character(len=*),
intent(in) :: varname
307 character(len=*),
intent(in) :: mempath
308 real(dp),
dimension(:),
pointer,
contiguous :: dbl1d
320 integer(I4B),
intent(in) :: ncol
321 integer(I4B),
intent(in) :: nrow
322 character(len=*),
intent(in) :: varname
323 character(len=*),
intent(in) :: mempath
324 real(dp),
dimension(:, :),
pointer,
contiguous :: dbl2d
343 character(len=*),
intent(in) :: blockname
344 character(len=*),
intent(in) :: tagname
346 logical(LGP) :: in_scope
349 integer(I4B) :: pdim_isize, popt_isize
350 integer(I4B),
pointer :: pdim
356 mf6_input%component_type, &
357 mf6_input%subcomponent_type, &
358 blockname, tagname,
'')
360 if (idt%required)
then
366 select case (mf6_input%subcomponent_type)
369 if (tagname ==
'PXDP' .or. tagname ==
'PETM')
then
370 call get_isize(
'NSEG', mf6_input%mempath, pdim_isize)
371 if (pdim_isize > 0)
then
372 call mem_setptr(pdim,
'NSEG', mf6_input%mempath)
377 else if (tagname ==
'PETM0')
then
378 call get_isize(
'SURFRATESPEC', mf6_input%mempath, popt_isize)
379 if (popt_isize > 0)
then
387 errmsg =
'IDM unimplemented. DynamicPackageParamsType::pkg_param_in_scope &
388 &add case tagname='//trim(idt%tagname)
This module contains simulation constants.
integer(i4b), parameter linelength
maximum length of a standard line
integer(i4b), parameter lenboundname
maximum length of a bound name
integer(i4b), parameter izero
integer constant zero
real(dp), parameter dzero
real constant zero
This module contains the DefinitionSelectModule.
type(inputparamdefinitiontype) function, pointer, public get_param_definition_type(input_definition_types, component_type, subcomponent_type, blockname, tagname, filename)
Return parameter definition.
type(inputparamdefinitiontype) function, pointer, public get_aggregate_definition_type(input_definition_types, component_type, subcomponent_type, blockname)
Return aggregate definition.
subroutine, public idt_parse_rectype(idt, cols, ncol)
allocate and set RECARRAY, KEYSTRING or RECORD param list
This module contains the DynamicPackageParamsModule.
subroutine set_filtered_list(this)
create array of in scope list input columns
subroutine, public allocate_param_int2d(ncol, nrow, varname, mempath)
allocate int2d
subroutine, public allocate_param_int1d(nrow, varname, mempath)
allocate int1d
subroutine set_filtered_grid(this)
array based input dynamic param filter
subroutine destroy(this)
destroy
subroutine package_params(this, params, nparam)
allocate and set input array to filtered param set
logical(lgp) function pkg_param_in_scope(mf6_input, blockname, tagname)
determine if input param is in scope for a package
subroutine, public allocate_param_dbl1d(nrow, varname, mempath)
allocate dbl1d
subroutine, public allocate_param_charstr(strlen, nrow, varname, mempath)
allocate character string type array
subroutine, public allocate_param_dbl2d(ncol, nrow, varname, mempath)
allocate dbl2d
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 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 class is used to store a single deferred-length character string. It was designed to work in an ...
dynamic parameter filter type