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, &
55 character(len=*) :: blockname
56 logical(LGP),
intent(in) :: readasarrays
57 integer(I4B),
intent(in) :: iauxiliary
58 integer(I4B),
intent(in) :: inamedbound
60 this%mf6_input = mf6_input
61 this%blockname = blockname
63 this%iauxiliary = iauxiliary
64 this%inamedbound = inamedbound
67 if (readasarrays)
then
68 call this%set_filtered_grid()
70 call this%set_filtered_list()
79 if (
allocated(this%params))
deallocate (this%params)
88 integer(I4B),
dimension(:),
allocatable :: idt_idxs
90 real(DP),
dimension(:, :),
pointer,
contiguous :: auxvar
91 integer(I4B) :: keepcnt, iparam
98 do iparam = 1,
size(this%mf6_input%param_dfns)
102 idt => this%mf6_input%param_dfns(iparam)
104 if (idt%blockname /= this%blockname)
then
108 if (idt%tagname ==
'AUX')
then
109 if (this%iauxiliary == 0)
then
111 call mem_allocate(auxvar, 0, 0,
'AUXVAR', this%mf6_input%mempath)
113 if (this%inamedbound == 0)
then
115 this%mf6_input%mempath)
120 keepcnt = keepcnt + 1
122 idt_idxs(keepcnt) = iparam
127 this%nparam = keepcnt
130 allocate (this%params(this%nparam))
133 do iparam = 1, this%nparam
134 idt => this%mf6_input%param_dfns(idt_idxs(iparam))
135 this%params(iparam) = trim(idt%tagname)
139 deallocate (idt_idxs)
150 character(len=LINELENGTH),
dimension(:),
allocatable :: ra_cols
152 real(DP),
dimension(:, :),
pointer,
contiguous :: auxvar
153 integer(I4B) :: ra_ncol, icol, keepcnt
162 this%mf6_input%component_type, &
163 this%mf6_input%subcomponent_type, &
174 this%mf6_input%component_type, &
175 this%mf6_input%subcomponent_type, &
176 this%blockname, ra_cols(icol),
'')
177 if (ra_cols(icol) ==
'RECARRAY')
then
179 else if (ra_cols(icol) ==
'AUX')
then
180 if (this%iauxiliary > 0)
then
183 call mem_allocate(auxvar, 0, 0,
'AUXVAR', this%mf6_input%mempath)
185 else if (ra_cols(icol) ==
'BOUNDNAME')
then
186 if (this%inamedbound /= 0)
then
190 this%mf6_input%mempath)
198 keepcnt = keepcnt + 1
200 this%params(keepcnt) = trim(ra_cols(icol))
205 this%nparam = keepcnt
216 character(len=LINELENGTH),
dimension(:),
allocatable, &
217 intent(inout) :: params
218 integer(I4B),
intent(inout) :: nparam
220 if (
allocated(params))
deallocate (params)
222 allocate (params(nparam))
224 params(n) = this%params(n)
231 integer(I4B),
intent(in) :: strlen
232 integer(I4B),
intent(in) :: nrow
233 character(len=*),
intent(in) :: varname
234 character(len=*),
intent(in) :: mempath
236 contiguous :: charstr1d
238 call mem_allocate(charstr1d, strlen, nrow, varname, mempath)
247 integer(I4B),
intent(in) :: nrow
248 character(len=*),
intent(in) :: varname
249 character(len=*),
intent(in) :: mempath
250 integer(I4B),
dimension(:),
pointer,
contiguous :: int1d
261 integer(I4B),
intent(in) :: ncol
262 integer(I4B),
intent(in) :: nrow
263 character(len=*),
intent(in) :: varname
264 character(len=*),
intent(in) :: mempath
265 integer(I4B),
dimension(:, :),
pointer,
contiguous :: int2d
278 integer(I4B),
intent(in) :: nrow
279 character(len=*),
intent(in) :: varname
280 character(len=*),
intent(in) :: mempath
281 real(dp),
dimension(:),
pointer,
contiguous :: dbl1d
292 integer(I4B),
intent(in) :: ncol
293 integer(I4B),
intent(in) :: nrow
294 character(len=*),
intent(in) :: varname
295 character(len=*),
intent(in) :: mempath
296 real(dp),
dimension(:, :),
pointer,
contiguous :: dbl2d
312 character(len=*),
intent(in) :: blockname
313 character(len=*),
intent(in) :: tagname
314 logical(LGP) :: in_scope
316 integer(I4B) :: pdim_isize, popt_isize
317 integer(I4B),
pointer :: pdim
323 mf6_input%component_type, &
324 mf6_input%subcomponent_type, &
325 blockname, tagname,
'')
326 if (idt%required)
then
331 select case (mf6_input%subcomponent_type)
333 if (tagname ==
'PXDP' .or. tagname ==
'PETM')
then
334 call get_isize(
'NSEG', mf6_input%mempath, pdim_isize)
335 if (pdim_isize > 0)
then
336 call mem_setptr(pdim,
'NSEG', mf6_input%mempath)
341 else if (tagname ==
'PETM0')
then
342 call get_isize(
'SURFRATESPEC', mf6_input%mempath, popt_isize)
343 if (popt_isize > 0)
then
350 errmsg =
'IDM unimplemented. DynamicPackageParamsType::pkg_param_in_scope &
351 &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