30 integer(I4B),
dimension(:),
pointer,
contiguous :: nodeulist
44 subroutine ainit(this, mf6_input, component_name, &
45 component_input_name, input_name, &
46 iperblock, parser, iout)
52 character(len=*),
intent(in) :: component_name
53 character(len=*),
intent(in) :: component_input_name
54 character(len=*),
intent(in) :: input_name
55 integer(I4B),
intent(in) :: iperblock
57 integer(I4B),
intent(in) :: iout
60 integer(I4B),
pointer :: maxbound
63 call this%DynamicPkgLoadType%init(mf6_input, component_name, &
64 component_input_name, &
65 input_name, iperblock, iout)
70 call loader%load(parser, mf6_input, this%nc_vars, this%input_name, iout)
73 call get_isize(
'MAXBOUND', mf6_input%mempath, isize)
76 call mem_allocate(maxbound,
'MAXBOUND', mf6_input%mempath)
77 maxbound = product(loader%mshape)
81 call this%ctx%init(mf6_input)
85 'NODEULIST', mf6_input%mempath)
88 call this%params_alloc()
99 subroutine rp(this, parser)
108 logical(LGP) :: endOfBlock, netcdf, layered
109 character(len=LINELENGTH) :: keyword, param_tag
118 this%mf6_input%subcomponent_name, this%iout)
128 call parser%GetNextLine(endofblock)
131 call parser%GetStringCaps(param_tag)
137 if (iaux > 0) param_tag =
'AUX'
141 this%mf6_input%component_type, &
142 this%mf6_input%subcomponent_type, &
143 'PERIOD', param_tag, this%input_name)
145 call parser%GetStringCaps(keyword)
146 if (keyword ==
'LAYERED' .and. idt%layered)
then
148 else if (keyword ==
'NETCDF')
then
153 call this%param_load(parser, idt, this%mf6_input%mempath, layered, &
159 this%mf6_input%subcomponent_name, this%iout)
174 do n = 1, this%nparam
176 this%param_reads(n)%invar = 0
182 character(len=LENVARNAME) :: rs_varname
183 integer(I4B),
pointer :: intvar
184 integer(I4B) :: iparam
187 call this%ctx%tags(this%param_names, this%nparam, this%input_name, &
189 call this%ctx%allocate_arrays()
192 allocate (this%param_reads(this%nparam))
195 do iparam = 1, this%nparam
197 rs_varname = this%ctx%rsv_alloc(this%param_names(iparam))
198 call mem_setptr(intvar, rs_varname, this%mf6_input%mempath)
199 this%param_reads(iparam)%invar => intvar
200 this%param_reads(iparam)%invar = 0
204 subroutine param_load(this, parser, idt, mempath, layered, netcdf, iaux)
217 character(len=*),
intent(in) :: mempath
218 logical(LGP),
intent(in) :: layered
219 logical(LGP),
intent(in) :: netcdf
220 integer(I4B),
intent(in) :: iaux
221 real(DP),
dimension(:),
pointer,
contiguous :: dbl1d, nodes
222 real(DP),
dimension(:, :),
pointer,
contiguous :: dbl2d
223 integer(I4B),
dimension(:),
allocatable :: layer_shape
224 integer(I4B) :: iparam, n, nlay, nnode
228 select case (idt%datatype)
230 call mem_setptr(dbl1d, idt%mf6varname, mempath)
231 allocate (nodes(this%ctx%nodes))
234 this%mf6_input, this%nc_vars, this%input_name, &
236 else if (layered)
then
240 call read_dbl1d(parser, nodes, idt%mf6varname)
243 call idm_log_var(nodes, idt%tagname, mempath, this%iout)
245 if (this%ctx%nbound > 0)
then
247 do n = 1, this%ctx%nbound
248 dbl1d(n) = nodes(this%nodeulist(n))
252 do n = 1, this%ctx%nodes
255 dbl1d(nnode) = nodes(n)
256 this%nodeulist(nnode) = n
259 this%ctx%nbound = nnode
263 call mem_setptr(dbl2d, idt%mf6varname, mempath)
264 allocate (nodes(this%ctx%nodes))
268 this%mf6_input, this%nc_vars, this%input_name, &
269 this%iout,
kper, iaux)
270 else if (layered)
then
274 call read_dbl1d(parser, nodes, idt%mf6varname)
277 call idm_log_var(nodes, idt%tagname, mempath, this%iout)
279 if (this%ctx%nbound > 0)
then
281 do n = 1, this%ctx%nbound
282 dbl2d(iaux, n) = nodes(this%nodeulist(n))
286 do n = 1, this%ctx%nodes
289 dbl2d(iaux, nnode) = nodes(n)
290 this%nodeulist(nnode) = n
293 this%ctx%nbound = nnode
297 errmsg =
'IDM unimplemented. GridArrayLoad::param_load &
298 &datatype='//trim(idt%datatype)
304 iparam =
ifind(this%param_names, idt%tagname)
306 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 lenvarname
maximum length of a variable name
This module contains the DefinitionSelectModule.
type(inputparamdefinitiontype) function, pointer, public get_param_definition_type(input_definition_types, component_type, subcomponent_type, blockname, tagname, filename, found)
Return parameter definition.
subroutine, public read_dbl1d(parser, dbl1d, aname)
This module contains the GridArrayLoadModule.
subroutine param_load(this, parser, idt, mempath, layered, netcdf, iaux)
subroutine rp(this, parser)
subroutine ts_advance(this)
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)
integer(i4b) function, public ifind_charstr(array, str)
integer(i4b), pointer, public kper
current stress period number
Ascii grid based dynamic loader type.
derived type for boundary package input context
Pointer type for read state variable.
Static parser based input loader.