31 integer(I4B) :: tas_active
33 pointer :: aux_tasnames
35 pointer :: param_tasnames
56 component_input_name, input_name, &
57 iperblock, parser, iout)
63 character(len=*),
intent(in) :: component_name
64 character(len=*),
intent(in) :: component_input_name
65 character(len=*),
intent(in) :: input_name
66 integer(I4B),
intent(in) :: iperblock
68 integer(I4B),
intent(in) :: iout
71 contiguous :: tas_fnames
72 character(len=LINELENGTH) :: fname
73 integer(I4B) :: tas6_size, n
76 call this%DynamicPkgLoadType%init(mf6_input, component_name, &
77 component_input_name, &
78 input_name, iperblock, iout)
80 nullify (this%aux_tasnames)
81 nullify (this%param_tasnames)
86 call loader%load(parser, mf6_input, this%nc_vars, this%input_name, iout)
89 allocate (this%tasmanager)
90 call tasmanager_cr(this%tasmanager, modelname=this%mf6_input%component_name, &
94 call get_isize(
'TAS6_FILENAME', this%mf6_input%mempath, tas6_size)
96 if (tas6_size > 0)
then
100 call mem_setptr(tas_fnames,
'TAS6_FILENAME', this%mf6_input%mempath)
103 do n = 1,
size(tas_fnames)
104 fname = tas_fnames(n)
105 call this%tasmanager%add_tasfile(fname)
111 call this%bound_context%create(mf6_input, this%readasarrays)
114 call this%params_alloc()
117 call this%tas_arrays_alloc()
128 call this%tasmanager%tasmanager_df()
138 call this%tasmanager%ad()
156 logical(LGP) :: endOfBlock, netcdf
157 character(len=LINELENGTH) :: keyword, param_tag
159 integer(I4B) :: iaux, iparam
160 character(len=LENTIMESERIESNAME) :: tas_name
161 integer(I4B),
dimension(:),
pointer,
contiguous :: int1d
168 this%mf6_input%subcomponent_name, this%iout)
177 call parser%GetNextLine(endofblock)
181 call parser%GetStringCaps(param_tag)
184 iaux =
ifind_charstr(this%bound_context%auxname_cst, param_tag)
187 if (iaux > 0) param_tag =
'AUX'
191 this%mf6_input%component_type, &
192 this%mf6_input%subcomponent_type, &
193 'PERIOD', param_tag, this%input_name)
196 call parser%GetStringCaps(keyword)
198 if (keyword ==
'TIMEARRAYSERIES')
then
199 if (this%tas_active /= 0)
then
201 call parser%GetStringCaps(tas_name)
203 if (param_tag ==
'AUX')
then
204 this%aux_tasnames(iaux) = tas_name
206 iparam =
ifind(this%param_names, param_tag)
207 this%param_tasnames(iparam) = tas_name
208 this%param_reads(iparam)%invar = 2
212 call idm_log_var(param_tag, this%mf6_input%mempath, this%iout, .true.)
220 else if (keyword ==
'NETCDF')
then
225 call this%param_load(parser, idt, this%mf6_input%mempath, netcdf, iaux)
231 if (this%param_reads(1)%invar == 0)
then
234 this%mf6_input%component_type, &
235 this%mf6_input%subcomponent_type, &
236 'PERIOD', this%param_names(1), &
238 call mem_setptr(int1d, idt%mf6varname, this%mf6_input%mempath)
243 if (this%tas_active /= 0)
then
244 call this%tas_links_create(parser%iuactive)
249 this%mf6_input%subcomponent_name, this%iout)
259 deallocate (this%tasmanager)
270 if (this%tas_active /= 0)
then
273 call this%tasmanager%reset(this%mf6_input%subcomponent_name)
276 call this%init_charstr1d(
'AUXTASNAME', this%input_name)
277 call this%init_charstr1d(
'PARAMTASNAME', this%input_name)
280 do n = 1, this%nparam
282 this%param_reads(n)%invar = 0
286 do m = 1, this%bound_context%ncpl
287 do n = 1, this%bound_context%naux
288 this%bound_context%auxvar(n, m) =
dzero
301 character(len=*),
intent(in) :: varname
302 character(len=*),
intent(in) :: input_name
305 contiguous :: charstr1d
308 call mem_setptr(charstr1d, varname, this%mf6_input%mempath)
309 do n = 1,
size(charstr1d)
318 character(len=LENVARNAME) :: rs_varname
319 integer(I4B),
pointer :: intvar
320 integer(I4B) :: iparam
323 call this%bound_context%bound_params(this%param_names, this%nparam, &
326 call this%bound_context%allocate_arrays()
329 allocate (this%param_reads(this%nparam))
332 do iparam = 1, this%nparam
334 rs_varname = this%bound_context%rsv_alloc(this%param_names(iparam))
335 call mem_setptr(intvar, rs_varname, this%mf6_input%mempath)
336 this%param_reads(iparam)%invar => intvar
337 this%param_reads(iparam)%invar = 0
360 character(len=*),
intent(in) :: mempath
361 logical(LGP),
intent(in) :: netcdf
362 integer(I4B),
intent(in) :: iaux
364 integer(I4B),
dimension(:),
pointer,
contiguous :: int1d
365 real(DP),
dimension(:),
pointer,
contiguous :: dbl1d
366 real(DP),
dimension(:, :),
pointer,
contiguous :: dbl2d
367 integer(I4B) :: iparam, n
369 select case (idt%datatype)
372 call mem_setptr(int1d, idt%mf6varname, mempath)
375 this%mf6_input, this%nc_vars, this%input_name, &
378 call read_int1d(parser, int1d, idt%mf6varname)
380 call idm_log_var(int1d, idt%tagname, mempath, this%iout)
384 call mem_setptr(dbl1d, idt%mf6varname, mempath)
387 this%mf6_input, this%nc_vars, this%input_name, &
390 call read_dbl1d(parser, dbl1d, idt%mf6varname)
392 call idm_log_var(dbl1d, idt%tagname, mempath, this%iout)
396 call mem_setptr(dbl2d, idt%mf6varname, mempath)
397 allocate (dbl1d(this%bound_context%ncpl))
400 this%mf6_input, this%nc_vars, this%input_name, &
401 this%iout,
kper, iaux)
403 call read_dbl1d(parser, dbl1d, idt%mf6varname)
405 do n = 1, this%bound_context%ncpl
406 dbl2d(iaux, n) = dbl1d(n)
408 call idm_log_var(dbl1d, idt%tagname, mempath, this%iout)
413 errmsg =
'IDM unimplemented. Mf6FileGridInput::param_load &
414 &datatype='//trim(idt%datatype)
421 iparam =
ifind(this%param_names, idt%tagname)
423 this%param_reads(iparam)%invar = 1
436 if (this%tas_active /= 0)
then
439 this%bound_context%naux,
'AUXTASNAME', &
440 this%mf6_input%mempath)
442 'PARAMTASNAME', this%mf6_input%mempath)
444 call this%init_charstr1d(
'AUXTASNAME', this%input_name)
445 call this%init_charstr1d(
'PARAMTASNAME', this%input_name)
450 'AUXTASNAME', this%mf6_input%mempath)
452 'PARAMTASNAME', this%mf6_input%mempath)
467 integer(I4B),
intent(in) :: inunit
471 real(DP),
dimension(:),
pointer :: auxArrayPtr, bndArrayPtr
472 real(DP),
dimension(:),
pointer,
contiguous :: bound
473 integer(I4B),
dimension(:),
pointer,
contiguous :: nodelist
474 character(len=LENTIMESERIESNAME) :: tas_name
475 character(len=LENAUXNAME) :: aux_name
476 logical :: convertFlux
480 nullify (auxarrayptr)
481 nullify (bndarrayptr)
483 convertflux = .false.
486 do n = 1, this%bound_context%naux
487 tas_name = this%aux_tasnames(n)
489 if (tas_name /=
'')
then
491 auxarrayptr => this%bound_context%auxvar(n, :)
492 aux_name = this%bound_context%auxname_cst(n)
493 call this%tasmanager%MakeTasLink(this%mf6_input%subcomponent_name, &
494 auxarrayptr, this%bound_context%iprpak, &
495 tas_name, aux_name, convertflux, &
501 do n = 1, this%nparam
504 this%mf6_input%component_type, &
505 this%mf6_input%subcomponent_type, &
506 'PERIOD', this%param_names(n), &
509 if (idt%timeseries)
then
510 if (this%param_reads(n)%invar == 2)
then
511 tas_name = this%param_tasnames(n)
512 call mem_setptr(bound, idt%mf6varname, this%mf6_input%mempath)
514 bndarrayptr => bound(:)
515 call this%tasmanager%MakeTasLink(this%mf6_input%subcomponent_name, &
517 this%bound_context%iprpak, &
518 tas_name, idt%mf6varname, &
519 convertflux, nodelist, inunit)
This module contains block parser methods.
This module contains the BoundInputContextModule.
This module contains simulation constants.
integer(i4b), parameter linelength
maximum length of a standard line
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 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
subroutine, public read_int1d(parser, int1d, aname)
This module defines variable data types.
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.
integer(i4b) function, public ifind_charstr(array, str)
integer(i4b), pointer, public kper
current stress period number
subroutine, public tasmanager_cr(this, dis, modelname, iout)
Create the time-array series manager.
derived type for boundary package input context
Pointer type for read state variable.
This class is used to store a single deferred-length character string. It was designed to work in an ...
Static parser based input loader.