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()
90 if (
allocated(this%params))
deallocate (this%params)
105 integer(I4B),
dimension(:),
allocatable :: idt_idxs
107 real(DP),
dimension(:, :),
pointer,
contiguous :: auxvar
108 integer(I4B) :: keepcnt, iparam
115 do iparam = 1,
size(this%mf6_input%param_dfns)
120 idt => this%mf6_input%param_dfns(iparam)
122 if (idt%blockname /= this%blockname)
then
126 if (idt%tagname ==
'AUX')
then
127 if (this%iauxiliary == 0)
then
129 call mem_allocate(auxvar, 0, 0,
'AUXVAR', this%mf6_input%mempath)
131 if (this%inamedbound == 0)
then
133 this%mf6_input%mempath)
138 keepcnt = keepcnt + 1
140 idt_idxs(keepcnt) = iparam
145 this%nparam = keepcnt
148 allocate (this%params(this%nparam))
151 do iparam = 1, this%nparam
152 idt => this%mf6_input%param_dfns(idt_idxs(iparam))
153 this%params(iparam) = trim(idt%tagname)
157 deallocate (idt_idxs)
174 character(len=LINELENGTH),
dimension(:),
allocatable :: ra_cols
176 real(DP),
dimension(:, :),
pointer,
contiguous :: auxvar
177 integer(I4B) :: ra_ncol, icol, keepcnt
186 this%mf6_input%component_type, &
187 this%mf6_input%subcomponent_type, &
200 this%mf6_input%component_type, &
201 this%mf6_input%subcomponent_type, &
202 this%blockname, ra_cols(icol),
'')
204 if (ra_cols(icol) ==
'RECARRAY')
then
206 else if (ra_cols(icol) ==
'AUX')
then
207 if (this%iauxiliary > 0)
then
210 call mem_allocate(auxvar, 0, 0,
'AUXVAR', this%mf6_input%mempath)
212 else if (ra_cols(icol) ==
'BOUNDNAME')
then
213 if (this%inamedbound /= 0)
then
217 this%mf6_input%mempath)
225 keepcnt = keepcnt + 1
227 this%params(keepcnt) = trim(ra_cols(icol))
232 this%nparam = keepcnt
248 character(len=LINELENGTH),
dimension(:),
allocatable, &
249 intent(inout) :: params
250 integer(I4B),
intent(inout) :: nparam
253 if (
allocated(params))
deallocate (params)
257 allocate (params(nparam))
260 params(n) = this%params(n)
270 integer(I4B),
intent(in) :: strlen
271 integer(I4B),
intent(in) :: nrow
272 character(len=*),
intent(in) :: varname
273 character(len=*),
intent(in) :: mempath
275 contiguous :: charstr1d
278 call mem_allocate(charstr1d, strlen, nrow, varname, mempath)
287 integer(I4B),
intent(in) :: nrow
288 character(len=*),
intent(in) :: varname
289 character(len=*),
intent(in) :: mempath
290 integer(I4B),
dimension(:),
pointer,
contiguous :: int1d
302 integer(I4B),
intent(in) :: ncol
303 integer(I4B),
intent(in) :: nrow
304 character(len=*),
intent(in) :: varname
305 character(len=*),
intent(in) :: mempath
306 integer(I4B),
dimension(:, :),
pointer,
contiguous :: int2d
320 integer(I4B),
intent(in) :: nrow
321 character(len=*),
intent(in) :: varname
322 character(len=*),
intent(in) :: mempath
323 real(dp),
dimension(:),
pointer,
contiguous :: dbl1d
335 integer(I4B),
intent(in) :: ncol
336 integer(I4B),
intent(in) :: nrow
337 character(len=*),
intent(in) :: varname
338 character(len=*),
intent(in) :: mempath
339 real(dp),
dimension(:, :),
pointer,
contiguous :: dbl2d
358 character(len=*),
intent(in) :: blockname
359 character(len=*),
intent(in) :: tagname
361 logical(LGP) :: in_scope
364 integer(I4B) :: pdim_isize, popt_isize
365 integer(I4B),
pointer :: pdim
371 mf6_input%component_type, &
372 mf6_input%subcomponent_type, &
373 blockname, tagname,
'')
375 if (idt%required)
then
381 select case (mf6_input%subcomponent_type)
384 if (tagname ==
'PXDP' .or. tagname ==
'PETM')
then
385 call get_isize(
'NSEG', mf6_input%mempath, pdim_isize)
386 if (pdim_isize > 0)
then
387 call mem_setptr(pdim,
'NSEG', mf6_input%mempath)
392 else if (tagname ==
'PETM0')
then
393 call get_isize(
'SURFRATESPEC', mf6_input%mempath, popt_isize)
394 if (popt_isize > 0)
then
402 errmsg =
'IDM unimplemented. DynamicPackageParamsType::pkg_param_in_scope &
403 &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