34 integer(I4B) :: ts_active
35 integer(I4B) :: iboundname
52 subroutine ainit(this, mf6_input, component_name, component_input_name, &
53 input_name, iperblock, parser, iout)
60 character(len=*),
intent(in) :: component_name
61 character(len=*),
intent(in) :: component_input_name
62 character(len=*),
intent(in) :: input_name
63 integer(I4B),
intent(in) :: iperblock
65 integer(I4B),
intent(in) :: iout
68 contiguous :: ts_fnames
69 character(len=LINELENGTH) :: fname
70 integer(I4B) :: ts6_size, n
73 call this%DynamicPkgLoadType%init(mf6_input, component_name, &
74 component_input_name, input_name, &
81 call loader%load(parser, mf6_input, this%nc_vars, this%input_name, iout)
84 allocate (this%tsmanager)
88 call get_isize(
'TS6_FILENAME', this%mf6_input%mempath, ts6_size)
89 if (ts6_size > 0)
then
91 call mem_setptr(ts_fnames,
'TS6_FILENAME', this%mf6_input%mempath)
92 do n = 1,
size(ts_fnames)
94 call this%tsmanager%add_tsfile(fname,
getunit())
99 call this%ctx%init(mf6_input)
102 call this%ctx%tags(this%param_names, this%nparam, this%input_name)
105 call this%create_structarray()
108 call this%ctx%allocate_arrays()
114 call this%tsmanager%tsmanager_df()
120 call this%tsmanager%ad()
126 call this%tsmanager%reset(this%mf6_input%subcomponent_name)
129 subroutine rp(this, parser)
136 integer(I4B) :: ibinary
137 integer(I4B) :: oc_inunit
138 logical(LGP) :: ts_active
145 this%mf6_input%subcomponent_name, this%iout)
147 if (ibinary == 1)
then
149 this%structarray%read_from_binary(oc_inunit, this%iout)
150 call parser%terminateblock()
153 ts_active = (this%ts_active /= 0)
155 this%structarray%read_from_parser(parser, ts_active, this%iout)
159 if (this%ts_active /= 0)
then
160 call this%ts_update(this%structarray)
165 this%mf6_input%subcomponent_name, this%iout)
172 call this%tsmanager%da()
173 deallocate (this%tsmanager)
174 nullify (this%tsmanager)
178 call this%ctx%destroy()
188 real(DP),
pointer :: bndElem
191 character(len=LENBOUNDNAME) :: boundname
196 bndelem => structvector%dbl1d(ts_strloc%row)
200 ts_strloc%structarray_col, bndelem, &
201 this%mf6_input%subcomponent_name, &
202 'BND', this%tsmanager, &
203 this%ctx%iprpak, tslinkbnd)
204 if (
associated(tslinkbnd))
then
206 tslinkbnd%Text = structvector%idt%mf6varname
208 if (this%ctx%boundnames > 0)
then
209 sv_bound => this%structarray%get(this%iboundname)
210 boundname = sv_bound%charstr1d(ts_strloc%row)
211 tslinkbnd%BndName = boundname
223 real(DP),
pointer :: bndElem
226 character(len=LENBOUNDNAME) :: boundname
231 bndelem => structvector%dbl2d(ts_strloc%col, ts_strloc%row)
235 ts_strloc%structarray_col, bndelem, &
236 this%mf6_input%subcomponent_name, &
237 'AUX', this%tsmanager, &
238 this%ctx%iprpak, tslinkaux)
239 if (
associated(tslinkaux))
then
241 tslinkaux%Text = this%ctx%auxname_cst(ts_strloc%col)
243 if (this%ctx%boundnames > 0)
then
244 sv_bound => this%structarray%get(this%iboundname)
245 boundname = sv_bound%charstr1d(ts_strloc%row)
246 tslinkaux%BndName = boundname
261 do m = 1, structarray%count()
262 sv => structarray%get(m)
263 if (sv%idt%timeseries)
then
264 do n = 1, sv%ts_strlocs%count()
265 ts_strloc => sv%get_ts_strloc(n)
266 call this%ts_link(sv, ts_strloc)
278 subroutine ts_link(this, structvector, ts_strloc)
283 select case (structvector%memtype)
285 call this%ts_link_bnd(structvector, ts_strloc)
287 call this%ts_link_aux(structvector, ts_strloc)
301 this%ctx%maxbound, 0, &
302 this%mf6_input%mempath, &
303 this%mf6_input%component_mempath)
305 do icol = 1, this%nparam
307 this%mf6_input%component_type, &
308 this%mf6_input%subcomponent_type, &
310 this%param_names(icol), this%input_name)
312 call this%structarray%mem_create_vector(icol, idt)
314 if (idt%mf6varname ==
'BOUNDNAME') this%iboundname = icol
This module contains block parser methods.
This module contains simulation constants.
integer(i4b), parameter linelength
maximum length of a standard line
integer(i4b), parameter lenboundname
maximum length of a bound 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)
Return parameter definition.
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.
This module contains the ListLoadModule.
subroutine ainit(this, mf6_input, component_name, component_input_name, input_name, iperblock, parser, iout)
subroutine ts_link_aux(this, structvector, ts_strloc)
subroutine rp(this, parser)
subroutine ts_link_bnd(this, structvector, ts_strloc)
subroutine create_structarray(this)
subroutine ts_update(this, structarray)
subroutine ts_link(this, structvector, ts_strloc)
This module contains the LoadContextModule.
This module contains the LoadMf6FileModule.
integer(i4b) function, public read_control_record(parser, oc_inunit, iout)
subroutine, public get_isize(name, mem_path, isize)
@ brief Get the number of elements for this variable
This module contains simulation methods.
integer(i4b) function, public count_errors()
Return number of errors.
subroutine, public store_error_filename(filename, terminate)
Store the erroring file name.
This module contains the StructArrayModule.
type(structarraytype) function, pointer, public constructstructarray(mf6_input, ncol, nrow, blocknum, mempath, component_mempath)
constructor for a struct_array
subroutine, public destructstructarray(struct_array)
destructor for a struct_array
This module contains the StructVectorModule.
subroutine, public tsmanager_cr(this, iout, removeTsLinksOnCompletion, extendTsToEndOfSimulation)
Create the tsmanager.
subroutine, public read_value_or_time_series(textInput, ii, jj, bndElem, pkgName, auxOrBnd, tsManager, iprpak, tsLink)
Call this subroutine if the time-series link is available or needed.
This class is used to store a single deferred-length character string. It was designed to work in an ...
list input loader for dynamic packages.
derived type for boundary package input context
Static parser based input loader.
type for structured array
derived type for generic vector
derived type which describes time series string field