This module contains the DynamicPackageParamsModule.
|
subroutine | init (this, mf6_input, readasarrays, naux, inamedbound) |
| initialize dynamic param filter More...
|
|
subroutine | destroy (this) |
| destroy More...
|
|
subroutine | set_filtered_grid (this) |
| array based input dynamic param filter More...
|
|
subroutine | set_filtered_list (this) |
| create array of in scope list input columns More...
|
|
subroutine | package_params (this, params, nparam) |
| allocate and set input array to filtered param set More...
|
|
subroutine, public | allocate_param_charstr (strlen, nrow, varname, mempath) |
| allocate character string type array More...
|
|
subroutine, public | allocate_param_int1d (nrow, varname, mempath) |
| allocate int1d More...
|
|
subroutine, public | allocate_param_int2d (ncol, nrow, varname, mempath) |
| allocate int2d More...
|
|
subroutine, public | allocate_param_dbl1d (nrow, varname, mempath) |
| allocate dbl1d More...
|
|
subroutine, public | allocate_param_dbl2d (ncol, nrow, varname, mempath) |
| allocate dbl2d More...
|
|
logical(lgp) function | pkg_param_in_scope (mf6_input, tagname) |
| determine if input param is in scope for a package More...
|
|
◆ allocate_param_charstr()
subroutine, public dynamicpackageparamsmodule::allocate_param_charstr |
( |
integer(i4b), intent(in) |
strlen, |
|
|
integer(i4b), intent(in) |
nrow, |
|
|
character(len=*), intent(in) |
varname, |
|
|
character(len=*), intent(in) |
mempath |
|
) |
| |
- Parameters
-
[in] | strlen | string number of characters |
[in] | nrow | integer array number of rows |
[in] | varname | variable name |
[in] | mempath | variable mempath |
Definition at line 250 of file DynamicPackageParams.f90.
251 integer(I4B),
intent(in) :: strlen
252 integer(I4B),
intent(in) :: nrow
253 character(len=*),
intent(in) :: varname
254 character(len=*),
intent(in) :: mempath
255 type(CharacterStringType),
dimension(:),
pointer, &
256 contiguous :: charstr1d
259 call mem_allocate(charstr1d, strlen, nrow, varname, mempath)
◆ allocate_param_dbl1d()
subroutine, public dynamicpackageparamsmodule::allocate_param_dbl1d |
( |
integer(i4b), intent(in) |
nrow, |
|
|
character(len=*), intent(in) |
varname, |
|
|
character(len=*), intent(in) |
mempath |
|
) |
| |
- Parameters
-
[in] | nrow | integer array number of rows |
[in] | varname | variable name |
[in] | mempath | variable mempath |
Definition at line 300 of file DynamicPackageParams.f90.
301 integer(I4B),
intent(in) :: nrow
302 character(len=*),
intent(in) :: varname
303 character(len=*),
intent(in) :: mempath
304 real(DP),
dimension(:),
pointer,
contiguous :: dbl1d
307 call mem_allocate(dbl1d, nrow, varname, mempath)
◆ allocate_param_dbl2d()
subroutine, public dynamicpackageparamsmodule::allocate_param_dbl2d |
( |
integer(i4b), intent(in) |
ncol, |
|
|
integer(i4b), intent(in) |
nrow, |
|
|
character(len=*), intent(in) |
varname, |
|
|
character(len=*), intent(in) |
mempath |
|
) |
| |
- Parameters
-
[in] | ncol | integer array number of cols |
[in] | nrow | integer array number of rows |
[in] | varname | variable name |
[in] | mempath | variable mempath |
Definition at line 315 of file DynamicPackageParams.f90.
316 integer(I4B),
intent(in) :: ncol
317 integer(I4B),
intent(in) :: nrow
318 character(len=*),
intent(in) :: varname
319 character(len=*),
intent(in) :: mempath
320 real(DP),
dimension(:, :),
pointer,
contiguous :: dbl2d
323 call mem_allocate(dbl2d, ncol, nrow, varname, mempath)
◆ allocate_param_int1d()
subroutine, public dynamicpackageparamsmodule::allocate_param_int1d |
( |
integer(i4b), intent(in) |
nrow, |
|
|
character(len=*), intent(in) |
varname, |
|
|
character(len=*), intent(in) |
mempath |
|
) |
| |
- Parameters
-
[in] | nrow | integer array number of rows |
[in] | varname | variable name |
[in] | mempath | variable mempath |
Definition at line 267 of file DynamicPackageParams.f90.
268 integer(I4B),
intent(in) :: nrow
269 character(len=*),
intent(in) :: varname
270 character(len=*),
intent(in) :: mempath
271 integer(I4B),
dimension(:),
pointer,
contiguous :: int1d
274 call mem_allocate(int1d, nrow, varname, mempath)
◆ allocate_param_int2d()
subroutine, public dynamicpackageparamsmodule::allocate_param_int2d |
( |
integer(i4b), intent(in) |
ncol, |
|
|
integer(i4b), intent(in) |
nrow, |
|
|
character(len=*), intent(in) |
varname, |
|
|
character(len=*), intent(in) |
mempath |
|
) |
| |
- Parameters
-
[in] | ncol | integer array number of cols |
[in] | nrow | integer array number of rows |
[in] | varname | variable name |
[in] | mempath | variable mempath |
Definition at line 282 of file DynamicPackageParams.f90.
283 integer(I4B),
intent(in) :: ncol
284 integer(I4B),
intent(in) :: nrow
285 character(len=*),
intent(in) :: varname
286 character(len=*),
intent(in) :: mempath
287 integer(I4B),
dimension(:, :),
pointer,
contiguous :: int2d
290 call mem_allocate(int2d, ncol, nrow, varname, mempath)
◆ destroy()
Definition at line 79 of file DynamicPackageParams.f90.
82 class(DynamicPackageParamsType) :: this
85 if (
allocated(this%params))
deallocate (this%params)
◆ init()
subroutine dynamicpackageparamsmodule::init |
( |
class(dynamicpackageparamstype) |
this, |
|
|
type(modflowinputtype), intent(in) |
mf6_input, |
|
|
logical(lgp), intent(in) |
readasarrays, |
|
|
integer(i4b), intent(in) |
naux, |
|
|
integer(i4b), intent(in) |
inamedbound |
|
) |
| |
|
private |
Definition at line 50 of file DynamicPackageParams.f90.
53 class(DynamicPackageParamsType) :: this
54 type(ModflowInputType),
intent(in) :: mf6_input
55 logical(LGP),
intent(in) :: readasarrays
56 integer(I4B),
intent(in) :: naux
57 integer(I4B),
intent(in) :: inamedbound
60 this%mf6_input = mf6_input
63 this%inamedbound = inamedbound
66 if (readasarrays)
then
67 call this%set_filtered_grid()
69 call this%set_filtered_list()
◆ package_params()
subroutine dynamicpackageparamsmodule::package_params |
( |
class(dynamicpackageparamstype) |
this, |
|
|
character(len=linelength), dimension(:), intent(inout), allocatable |
params, |
|
|
integer(i4b), intent(inout) |
nparam |
|
) |
| |
|
private |
Definition at line 225 of file DynamicPackageParams.f90.
228 class(DynamicPackageParamsType) :: this
229 character(len=LINELENGTH),
dimension(:),
allocatable, &
230 intent(inout) :: params
231 integer(I4B),
intent(inout) :: nparam
234 if (
allocated(params))
deallocate (params)
238 allocate (params(nparam))
241 params(n) = this%params(n)
◆ pkg_param_in_scope()
logical(lgp) function dynamicpackageparamsmodule::pkg_param_in_scope |
( |
type(modflowinputtype), intent(in) |
mf6_input, |
|
|
character(len=*), intent(in) |
tagname |
|
) |
| |
|
private |
Definition at line 334 of file DynamicPackageParams.f90.
338 type(ModflowInputType),
intent(in) :: mf6_input
339 character(len=*),
intent(in) :: tagname
341 logical(LGP) :: in_scope
343 type(InputParamDefinitionType),
pointer :: idt
344 integer(I4B) :: pdim_isize, popt_isize
345 integer(I4B),
pointer :: pdim
350 idt => get_param_definition_type(mf6_input%param_dfns, &
351 mf6_input%component_type, &
352 mf6_input%subcomponent_type, &
353 'PERIOD', tagname,
'')
355 if (idt%required)
then
361 select case (mf6_input%subcomponent_type)
364 if (tagname ==
'PXDP' .or. tagname ==
'PETM')
then
365 call get_isize(
'NSEG', mf6_input%mempath, pdim_isize)
366 if (pdim_isize > 0)
then
367 call mem_setptr(pdim,
'NSEG', mf6_input%mempath)
372 else if (tagname ==
'PETM0')
then
373 call get_isize(
'SURFRATESPEC', mf6_input%mempath, popt_isize)
374 if (popt_isize > 0)
then
380 errmsg =
'IDM unimplemented. DynamicPackageParamsType::pkg_param_in_scope &
381 &add case tagname='//trim(idt%tagname)
382 call store_error(errmsg, .true.)
subroutine, public get_isize(name, mem_path, isize)
@ brief Get the number of elements for this variable
◆ set_filtered_grid()
Definition at line 94 of file DynamicPackageParams.f90.
97 class(DynamicPackageParamsType) :: this
99 type(InputParamDefinitionType),
pointer :: idt
100 integer(I4B),
dimension(:),
allocatable :: idt_idxs
101 integer(I4B) :: keepcnt, iparam
108 do iparam = 1,
size(this%mf6_input%param_dfns)
113 idt => this%mf6_input%param_dfns(iparam)
115 if (idt%blockname /=
'PERIOD')
then
119 if (idt%tagname ==
'AUX')
then
120 if (this%naux == 0)
then
126 keepcnt = keepcnt + 1
127 call expandarray(idt_idxs)
128 idt_idxs(keepcnt) = iparam
133 this%nparam = keepcnt
136 allocate (this%params(this%nparam))
139 do iparam = 1, this%nparam
140 idt => this%mf6_input%param_dfns(idt_idxs(iparam))
141 this%params(iparam) = trim(idt%tagname)
145 deallocate (idt_idxs)
◆ set_filtered_list()
Filter the recarray description of list input parameters to determine which columns are to be read in this run.
Definition at line 156 of file DynamicPackageParams.f90.
159 class(DynamicPackageParamsType) :: this
161 type(InputParamDefinitionType),
pointer :: ra_idt, idt
162 character(len=LINELENGTH),
dimension(:),
allocatable :: ra_cols
163 integer(I4B) :: ra_ncol, icol, keepcnt
171 get_aggregate_definition_type(this%mf6_input%aggregate_dfns, &
172 this%mf6_input%component_type, &
173 this%mf6_input%subcomponent_type, &
177 call idt_parse_rectype(ra_idt, ra_cols, ra_ncol)
185 idt => get_param_definition_type(this%mf6_input%param_dfns, &
186 this%mf6_input%component_type, &
187 this%mf6_input%subcomponent_type, &
188 'PERIOD', ra_cols(icol),
'')
190 if (ra_cols(icol) ==
'RECARRAY')
then
192 else if (ra_cols(icol) ==
'AUX')
then
193 if (this%naux > 0)
then
196 else if (ra_cols(icol) ==
'BOUNDNAME')
then
197 if (this%inamedbound /= 0)
then
202 keep = pkg_param_in_scope(this%mf6_input, ra_cols(icol))
206 keepcnt = keepcnt + 1
207 call expandarray(this%params)
208 this%params(keepcnt) = trim(ra_cols(icol))
213 this%nparam = keepcnt