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%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
157 character(len=LINELENGTH) :: keyword, param_tag
159 integer(I4B) :: iaux, iparam
160 character(len=LENTIMESERIESNAME) :: tas_name
167 this%mf6_input%subcomponent_name, this%iout)
175 call parser%GetNextLine(endofblock)
179 call parser%GetStringCaps(param_tag)
182 iaux =
ifind_charstr(this%bound_context%auxname_cst, param_tag)
185 if (iaux > 0) param_tag =
'AUX'
189 this%mf6_input%component_type, &
190 this%mf6_input%subcomponent_type, &
191 'PERIOD', param_tag, this%input_name)
194 if (this%tas_active /= 0)
then
195 call parser%GetStringCaps(keyword)
197 if (keyword ==
'TIMEARRAYSERIES')
then
198 call parser%GetStringCaps(tas_name)
200 if (param_tag ==
'AUX')
then
201 this%aux_tasnames(iaux) = tas_name
203 iparam =
ifind(this%param_names, param_tag)
204 this%param_tasnames(iparam) = tas_name
205 this%param_reads(iparam)%invar = 2
209 call idm_log_var(param_tag, this%mf6_input%mempath, this%iout, .true.)
218 call this%param_load(parser, idt%datatype, idt%mf6varname, idt%tagname, &
219 idt%shape, this%mf6_input%mempath, iaux)
224 if (this%tas_active /= 0)
then
225 call this%tas_links_create(parser%iuactive)
230 this%mf6_input%subcomponent_name, this%iout)
240 deallocate (this%tasmanager)
251 if (this%tas_active /= 0)
then
254 call this%tasmanager%reset(this%mf6_input%subcomponent_name)
257 call this%init_charstr1d(
'AUXTASNAME', this%input_name)
258 call this%init_charstr1d(
'PARAMTASNAME', this%input_name)
261 do n = 1, this%nparam
263 this%param_reads(n)%invar = 0
267 do m = 1, this%bound_context%ncpl
268 do n = 1, this%bound_context%naux
269 this%bound_context%auxvar(n, m) =
dzero
282 character(len=*),
intent(in) :: varname
283 character(len=*),
intent(in) :: input_name
286 contiguous :: charstr1d
289 call mem_setptr(charstr1d, varname, this%mf6_input%mempath)
290 do n = 1,
size(charstr1d)
299 character(len=LENVARNAME) :: rs_varname
300 integer(I4B),
pointer :: intvar
301 integer(I4B) :: iparam
304 call this%bound_context%bound_params(this%param_names, this%nparam, &
307 call this%bound_context%allocate_arrays()
310 allocate (this%param_reads(this%nparam))
313 do iparam = 1, this%nparam
315 rs_varname = this%bound_context%rsv_alloc(this%param_names(iparam))
316 call mem_setptr(intvar, rs_varname, this%mf6_input%mempath)
317 this%param_reads(iparam)%invar => intvar
318 this%param_reads(iparam)%invar = 0
326 tagname, shapestr, mempath, iaux)
339 character(len=*),
intent(in) :: datatype
340 character(len=*),
intent(in) :: varname
341 character(len=*),
intent(in) :: tagname
342 character(len=*),
intent(in) :: shapestr
343 character(len=*),
intent(in) :: mempath
344 integer(I4B),
intent(in) :: iaux
346 integer(I4B),
dimension(:),
pointer,
contiguous :: int1d
347 real(DP),
dimension(:),
pointer,
contiguous :: dbl1d
348 real(DP),
dimension(:, :),
pointer,
contiguous :: dbl2d
349 integer(I4B) :: iparam, n
351 select case (datatype)
356 call idm_log_var(int1d, tagname, mempath, this%iout)
362 call idm_log_var(dbl1d, tagname, mempath, this%iout)
367 allocate (dbl1d(this%bound_context%ncpl))
369 do n = 1, this%bound_context%ncpl
370 dbl2d(iaux, n) = dbl1d(n)
372 call idm_log_var(dbl1d, tagname, mempath, this%iout)
377 errmsg =
'IDM unimplemented. Mf6FileGridInput::param_load &
378 &datatype='//trim(datatype)
384 iparam =
ifind(this%param_names, varname)
388 this%param_reads(iparam)%invar = 1
401 if (this%tas_active /= 0)
then
404 this%bound_context%naux,
'AUXTASNAME', &
405 this%mf6_input%mempath)
407 'PARAMTASNAME', this%mf6_input%mempath)
409 call this%init_charstr1d(
'AUXTASNAME', this%input_name)
410 call this%init_charstr1d(
'PARAMTASNAME', this%input_name)
415 'AUXTASNAME', this%mf6_input%mempath)
417 'PARAMTASNAME', this%mf6_input%mempath)
432 integer(I4B),
intent(in) :: inunit
436 real(DP),
dimension(:),
pointer :: auxArrayPtr, bndArrayPtr
437 real(DP),
dimension(:),
pointer,
contiguous :: bound
438 integer(I4B),
dimension(:),
pointer,
contiguous :: nodelist
439 character(len=LENTIMESERIESNAME) :: tas_name
440 character(len=LENAUXNAME) :: aux_name
441 logical :: convertFlux
445 nullify (auxarrayptr)
446 nullify (bndarrayptr)
448 convertflux = .false.
451 do n = 1, this%bound_context%naux
452 tas_name = this%aux_tasnames(n)
454 if (tas_name /=
'')
then
456 auxarrayptr => this%bound_context%auxvar(n, :)
457 aux_name = this%bound_context%auxname_cst(n)
458 call this%tasmanager%MakeTasLink(this%mf6_input%subcomponent_name, &
459 auxarrayptr, this%bound_context%iprpak, &
460 tas_name, aux_name, convertflux, &
466 do n = 1, this%nparam
469 this%mf6_input%component_type, &
470 this%mf6_input%subcomponent_type, &
471 'PERIOD', this%param_names(n), &
474 if (idt%timeseries)
then
475 if (this%param_reads(n)%invar == 2)
then
476 tas_name = this%param_tasnames(n)
477 call mem_setptr(bound, idt%mf6varname, this%mf6_input%mempath)
479 bndarrayptr => bound(:)
480 call this%tasmanager%MakeTasLink(this%mf6_input%subcomponent_name, &
482 this%bound_context%iprpak, &
483 tas_name, idt%mf6varname, &
484 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)
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.