32 integer(I4B),
dimension(:),
pointer,
contiguous :: nodeulist
46 subroutine ainit(this, mf6_input, component_name, &
47 component_input_name, input_name, &
48 iperblock, parser, iout)
54 character(len=*),
intent(in) :: component_name
55 character(len=*),
intent(in) :: component_input_name
56 character(len=*),
intent(in) :: input_name
57 integer(I4B),
intent(in) :: iperblock
59 integer(I4B),
intent(in) :: iout
62 integer(I4B),
pointer :: maxbound
65 call this%DynamicPkgLoadType%init(mf6_input, component_name, &
66 component_input_name, &
67 input_name, iperblock, iout)
72 call loader%load(parser, mf6_input, this%nc_vars, this%input_name, iout)
75 call get_isize(
'MAXBOUND', mf6_input%mempath, isize)
78 call mem_allocate(maxbound,
'MAXBOUND', mf6_input%mempath)
79 maxbound = product(loader%mshape)
83 call this%ctx%init(mf6_input)
87 'NODEULIST', mf6_input%mempath)
90 call this%params_alloc()
101 subroutine rp(this, parser)
110 logical(LGP) :: endOfBlock, netcdf, layered
111 character(len=LINELENGTH) :: keyword, param_tag
120 this%mf6_input%subcomponent_name, this%iout)
130 call parser%GetNextLine(endofblock)
133 call parser%GetStringCaps(param_tag)
139 if (iaux > 0) param_tag =
'AUX'
143 this%mf6_input%component_type, &
144 this%mf6_input%subcomponent_type, &
145 'PERIOD', param_tag, this%input_name)
147 call parser%GetStringCaps(keyword)
148 if (keyword ==
'LAYERED' .and. idt%layered)
then
150 else if (keyword ==
'NETCDF')
then
155 call this%param_load(parser, idt, this%mf6_input%mempath, layered, &
161 this%mf6_input%subcomponent_name, this%iout)
177 do n = 1, this%nparam
179 this%param_reads(n)%invar = 0
185 character(len=LENVARNAME) :: rs_varname
186 integer(I4B),
pointer :: intvar
187 integer(I4B) :: iparam
190 call this%ctx%tags(this%param_names, this%nparam, this%input_name, &
192 call this%ctx%allocate_arrays()
195 allocate (this%param_reads(this%nparam))
198 do iparam = 1, this%nparam
200 rs_varname = this%ctx%rsv_alloc(this%param_names(iparam))
201 call mem_setptr(intvar, rs_varname, this%mf6_input%mempath)
202 this%param_reads(iparam)%invar => intvar
203 this%param_reads(iparam)%invar = 0
207 subroutine param_load(this, parser, idt, mempath, layered, netcdf, iaux)
222 character(len=*),
intent(in) :: mempath
223 logical(LGP),
intent(in) :: layered
224 logical(LGP),
intent(in) :: netcdf
225 real(DP),
dimension(:),
pointer,
contiguous :: dbl1d, nodes
226 real(DP),
dimension(:, :),
pointer,
contiguous :: dbl2d
227 integer(I4B),
dimension(:),
allocatable :: layer_shape
228 integer(I4B) :: iaux, iparam, n, nlay, nnode
232 select case (idt%datatype)
234 call mem_setptr(dbl1d, idt%mf6varname, mempath)
235 allocate (nodes(this%ctx%nodes))
238 this%mf6_input, this%nc_vars, this%input_name, &
240 else if (layered)
then
244 call read_dbl1d(parser, nodes, idt%mf6varname)
247 call idm_log_var(nodes, idt%tagname, mempath, this%iout)
249 do n = 1, this%ctx%nodes
252 dbl1d(nnode) = nodes(n)
253 if (this%ctx%nbound == 0)
then
254 this%nodeulist(nnode) = n
255 else if (this%nodeulist(nnode) /= n)
then
256 write (
errmsg,
'(a,i0)')
'Grid input position mismatch param='// &
257 trim(idt%tagname)//
', period=',
kper
265 call mem_setptr(dbl2d, idt%mf6varname, mempath)
266 allocate (nodes(this%ctx%nodes))
270 this%mf6_input, this%nc_vars, this%input_name, &
271 this%iout,
kper, iaux)
272 else if (layered)
then
276 call read_dbl1d(parser, nodes, idt%mf6varname)
279 call idm_log_var(nodes, idt%tagname, mempath, this%iout)
281 do n = 1, this%ctx%nodes
284 dbl2d(iaux, nnode) = nodes(n)
285 if (this%ctx%nbound == 0)
then
286 this%nodeulist(nnode) = n
287 else if (this%nodeulist(nnode) /= n)
then
288 write (
errmsg,
'(a,i0)')
'Grid input position mismatch param='// &
289 trim(idt%tagname)//
', period=',
kper
297 errmsg =
'IDM unimplemented. GridArrayLoad::param_load &
298 &datatype='//trim(idt%datatype)
304 if (this%ctx%nbound == 0) this%ctx%nbound = nnode
307 iparam =
ifind(this%param_names, idt%tagname)
309 this%param_reads(iparam)%invar = 1
This module contains block parser methods.
This module contains simulation constants.
integer(i4b), parameter linelength
maximum length of a standard line
real(dp), parameter dnodata
real no data constant
integer(i4b), parameter lentimeseriesname
maximum length of a time series name
integer(i4b), parameter lenvarname
maximum length of a variable name
integer(i4b), parameter lenauxname
maximum length of a aux variable
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.
subroutine, public read_dbl1d(parser, dbl1d, aname)
subroutine, public read_dbl2d(parser, dbl2d, aname)
This module contains the GridArrayLoadModule.
subroutine param_load(this, parser, idt, mempath, layered, netcdf, iaux)
subroutine rp(this, parser)
subroutine ainit(this, mf6_input, component_name, component_input_name, input_name, iperblock, parser, iout)
subroutine params_alloc(this)
This module contains the Input Data Model Logger Module.
subroutine, public idm_log_close(component, subcomponent, iout)
@ brief log the closing message
subroutine, public idm_log_header(component, subcomponent, iout)
@ brief log a header message
This module defines variable data types.
subroutine, public read_dbl1d_layered(parser, dbl1d, aname, nlay, layer_shape)
This module contains the LoadContextModule.
This module contains the LoadMf6FileModule.
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 module contains the SourceCommonModule.
subroutine, public get_layered_shape(mshape, nlay, layer_shape)
subroutine, public get_shape_from_string(shape_string, array_shape, memoryPath)
integer(i4b) function, public ifind_charstr(array, str)
integer(i4b), pointer, public kper
current stress period number
This class is used to store a single deferred-length character string. It was designed to work in an ...
Ascii grid based dynamic loader type.
derived type for boundary package input context
Pointer type for read state variable.
Static parser based input loader.