MODFLOW 6  version 6.9.0.dev0
USGS Modular Hydrologic Model
Mf6FileKeystring.f90
Go to the documentation of this file.
1 !> @brief Period block keystring-based input loader
2 !!
3 !! Each keystring member maps to a typed column in a StructArrayType.
4 !! A dispatch keyword on each input row selects the target column.
5 !!
6 !! Simple dispatch: keyword matches a DOUBLE/STRING/INTEGER column;
7 !! one value token is read into that column.
8 !!
9 !! Compound dispatch: keyword matches a KEYWORD-type column (e.g.
10 !! FLOWING_WELL). The keyword token is stored directly; subsequent
11 !! non-KEYWORD sub-member columns are read in order.
12 !!
13 !<
15 
16  use kindmodule, only: dp, i4b, lgp
30 
31  implicit none
32  private
33  public :: keystringloadtype
34 
35  !> @brief Keystring period block loader
36  !!
37  !! Leading fixed columns (e.g. CELLID) followed by a dispatch
38  !! keyword that routes each input row to a typed member column.
39  !!
40  !<
42  type(timeseriesmanagertype), pointer :: tsmanager => null()
43  type(structarraytype), pointer :: structarray => null()
44  type(loadcontexttype) :: ctx !< input load context
45  type(loadmf6filetype) :: static_loader !< persistent static loader
46  logical(LGP) :: ts_active !< .true. if TS files are loaded
47  integer(I4B) :: nleading !< number of leading (pre-keystring) columns
48  contains
49  procedure :: ainit
50  procedure :: df
51  procedure :: ts_advance
52  procedure :: rp
53  procedure :: reset
54  procedure :: destroy
55  procedure :: create_structarray
57  procedure :: apply_period_settings
58  procedure :: resolve_nfeatures
61  procedure :: apply_setting_value
64  end type keystringloadtype
65 
66 contains
67 
68  subroutine ainit(this, mf6_input, component_name, component_input_name, &
69  input_name, iperblock, parser, iout)
70  use inputoutputmodule, only: getunit
75  class(keystringloadtype), intent(inout) :: this
76  type(modflowinputtype), intent(in) :: mf6_input
77  character(len=*), intent(in) :: component_name
78  character(len=*), intent(in) :: component_input_name
79  character(len=*), intent(in) :: input_name
80  integer(I4B), intent(in) :: iperblock
81  type(blockparsertype), pointer, intent(inout) :: parser
82  integer(I4B), intent(in) :: iout
83  type(characterstringtype), dimension(:), pointer, contiguous :: ts_fnames
84  character(len=LINELENGTH) :: fname
85  character(len=LENVARNAME), allocatable :: named_bound(:)
86  character(len=LINELENGTH), dimension(:), allocatable :: member_names
87  integer(I4B) :: n, nmembers, isize
88 
89  call this%DynamicPkgLoadType%init(mf6_input, component_name, &
90  component_input_name, input_name, &
91  iperblock, iout)
92  this%ts_active = .false.
93  this%nleading = 0
94 
95  allocate (this%tsmanager)
96  call tsmanager_cr(this%tsmanager, iout)
97 
98  ! load static input (TS6_FILENAME tag sets static_loader%ts_active)
99  call this%static_loader%load(parser, mf6_input, this%nc_vars, &
100  this%input_name, iout)
101 
102  ! add declared TS files to tsmanager
103  if (this%static_loader%ts_active) then
104  this%ts_active = .true.
105  call get_isize('TS6_FILENAME', mf6_input%mempath, isize)
106  if (isize > 0) then
107  call mem_setptr(ts_fnames, 'TS6_FILENAME', mf6_input%mempath)
108  do n = 1, size(ts_fnames)
109  fname = ts_fnames(n)
110  call this%tsmanager%add_tsfile(fname, getunit())
111  end do
112  end if
113  end if
114 
115  ! collect DIMENSIONS block parameter names for LoadContext;
116  ! absent for TVK/TVS — LoadContext falls back to nodes * nmembers
117  do n = 1, size(mf6_input%param_dfns)
118  if (mf6_input%param_dfns(n)%blockname == 'DIMENSIONS') then
119  call expandarray(named_bound)
120  named_bound(size(named_bound)) = trim(mf6_input%param_dfns(n)%mf6varname)
121  end if
122  end do
123 
124  ! init load context
125  if (allocated(named_bound)) then
126  call this%ctx%init(mf6_input, named_bound=named_bound)
127  else
128  call this%ctx%init(mf6_input)
129  end if
130 
131  call this%ctx%tags(this%param_names, this%nparam, this%input_name)
132  this%nleading = this%ctx%nleading
133 
134  ! append keystring member column names
135  call this%ctx%keystring_member_names(member_names, nmembers)
136  do n = 1, nmembers
137  this%nparam = this%nparam + 1
138  call expandarray(this%param_names)
139  this%param_names(this%nparam) = trim(member_names(n))
140  end do
141 
142  ! finalize context setup (allocates NBOUND, NODEULIST, etc.)
143  call this%ctx%allocate_arrays()
144 
145  ! pre-allocate structarray; reused across all periods
146  call this%create_structarray()
147  end subroutine ainit
148 
149  subroutine df(this)
151  class(keystringloadtype), intent(inout) :: this
152  type(structarraytype), pointer :: sa
153  integer(I4B) :: n
154  ! init tsmanager (TDIS now available)
155  call this%tsmanager%tsmanager_df()
156  ! link static TS strlocs; preserve for re-registration after reset()
157  do n = 1, this%static_loader%ts_sa_count()
158  sa => this%static_loader%get_ts_sa(n)
159  if (associated(sa)) then
160  call sa%ts_update(this%tsmanager, &
161  this%mf6_input%subcomponent_name, &
162  this%ctx%iprpak, this%input_name, &
163  clear_strlocs=.false.)
164  end if
165  end do
166  ! DIMENSIONS-scoped packages (e.g. SPC): allocate permanent,
167  ! feature-indexed storage for every PERIOD setting in scope, so a
168  ! value survives across periods that don't reissue it
169  if (this%ctx%is_dimensions_scoped) call this%allocate_period_settings()
170  ! CELLID-addressed packages (TVK/TVS): same persistence goal, but
171  ! node-indexed and package-resolved -- see allocate_period_node_settings
172  if (this%ctx%is_cellid_scoped) call this%allocate_period_node_settings()
173  end subroutine df
174 
175  subroutine ts_advance(this)
176  class(keystringloadtype), intent(inout) :: this
177  call this%tsmanager%ad()
178  end subroutine ts_advance
179 
180  subroutine rp(this, parser)
182  class(keystringloadtype), intent(inout) :: this
183  type(blockparsertype), pointer, intent(inout) :: parser
184 
185  call this%reset()
186 
187  call idm_log_header(this%mf6_input%component_name, &
188  this%mf6_input%subcomponent_name, this%iout)
189 
190  this%ctx%nbound = &
191  this%structarray%read_from_parser_keystring(parser, this%ts_active, &
192  this%nleading, this%iout, &
193  this%input_name)
194 
195  if (this%ctx%is_dimensions_scoped) call this%apply_period_settings()
196  if (this%ctx%is_cellid_scoped) call this%apply_period_node_settings()
197 
198  if (this%ts_active) then
199  call this%structarray%ts_update(this%tsmanager, &
200  this%mf6_input%subcomponent_name, &
201  this%ctx%iprpak, this%input_name)
202  end if
203 
204  call idm_log_close(this%mf6_input%component_name, &
205  this%mf6_input%subcomponent_name, this%iout)
206  end subroutine rp
207 
208  subroutine reset(this)
210  class(keystringloadtype), intent(inout) :: this
211  type(structarraytype), pointer :: sa
212  integer(I4B) :: n
213  ! PERIOD settings persist across periods unless reissued, so TS links
214  ! for packages with sticky, permanently-addressed settings are never
215  ! reset (SETTING column dispatch keeps them current instead)
216  if (.not. this%ctx%has_setting_dispatch) then
217  ! clear TS links
218  call this%tsmanager%reset(this%mf6_input%subcomponent_name)
219  end if
220  ! re-register static TS links (strlocs preserved in df); unrelated to
221  ! PERIOD-block sticky-setting persistence, so this runs regardless of
222  ! has_setting_dispatch
223  if (this%ts_active) then
224  do n = 1, this%static_loader%ts_sa_count()
225  sa => this%static_loader%get_ts_sa(n)
226  if (associated(sa)) then
227  call sa%ts_update(this%tsmanager, &
228  this%mf6_input%subcomponent_name, &
229  this%ctx%iprpak, this%input_name, &
230  clear_strlocs=.false.)
231  end if
232  end do
233  end if
234  end subroutine reset
235 
236  subroutine destroy(this)
237  class(keystringloadtype), intent(inout) :: this
238 
239  call this%static_loader%cleanup()
240 
241  call this%tsmanager%da()
242  deallocate (this%tsmanager)
243  nullify (this%tsmanager)
244 
245  if (associated(this%structarray)) then
246  call destructstructarray(this%structarray)
247  end if
248 
249  call this%ctx%destroy()
250  call this%DynamicPkgLoadType%destroy()
251  end subroutine destroy
252 
253  !> @brief Resolve the permanent array's feature count: ctx%maxbound
254  !! divided by the keystring member count, reversing the
255  !! nodes*nmembers/DIMENSIONS-based scaling LoadContext applies.
256  !<
257  function resolve_nfeatures(this) result(nfeatures)
258  class(keystringloadtype), intent(inout) :: this
259  integer(I4B) :: nfeatures
260  character(len=LINELENGTH), allocatable :: member_names(:)
261  integer(I4B) :: nmembers
262 
263  nfeatures = 0
264  call this%ctx%keystring_member_names(member_names, nmembers)
265  if (nmembers > 0 .and. associated(this%ctx%maxbound)) then
266  if (this%ctx%maxbound > 0) nfeatures = this%ctx%maxbound / nmembers
267  end if
268  end function resolve_nfeatures
269 
270  !> @brief Return idt for param_names(icol) if it's an in-scope PERIOD
271  !! setting (STRING type with TIME_SERIES TRUE), else a disassociated
272  !! pointer.
273  !<
274  function resolve_in_scope_setting(this, icol) result(idt)
276  class(keystringloadtype), intent(inout) :: this
277  integer(I4B), intent(in) :: icol
278  type(inputparamdefinitiontype), pointer :: idt
279 
280  idt => get_param_definition_type(this%mf6_input%param_dfns, &
281  this%mf6_input%component_type, &
282  this%mf6_input%subcomponent_type, &
283  'PERIOD', this%param_names(icol), &
284  this%input_name)
285  if (idt%datatype /= 'STRING' .or. .not. idt%timeseries) idt => null()
286  end function resolve_in_scope_setting
287 
288  !> @brief Allocate idt's permanent array with init_value, unless already
289  !! allocated.
290  !<
291  subroutine allocate_permanent_array(this, idt, nfeatures, init_value)
293  class(keystringloadtype), intent(inout) :: this
294  type(inputparamdefinitiontype), intent(in) :: idt
295  integer(I4B), intent(in) :: nfeatures
296  real(DP), intent(in) :: init_value
297  real(DP), dimension(:), pointer, contiguous :: featarr => null()
298  integer(I4B) :: isize
299 
300  call get_isize(trim(idt%tagname), this%mf6_input%mempath, isize)
301  if (isize > 0) return ! already allocated (shouldn't happen; df() runs once)
302  call mem_allocate(featarr, nfeatures, trim(idt%tagname), &
303  this%mf6_input%mempath)
304  featarr = init_value
305  end subroutine allocate_permanent_array
306 
307  !> @brief Resolve token (row i of period_val) as a literal or TS name
308  !! directly against featarr(address).
309  !<
310  subroutine apply_setting_value(this, idt, period_val, i, address, featarr)
311  class(keystringloadtype), intent(inout) :: this
312  type(inputparamdefinitiontype), intent(in) :: idt
313  type(characterstringtype), dimension(:), pointer, contiguous, &
314  intent(in) :: period_val
315  integer(I4B), intent(in) :: i
316  integer(I4B), intent(in) :: address
317  real(DP), dimension(:), pointer, contiguous, intent(inout) :: featarr
318  real(DP), pointer :: bndElem
319  character(len=LINELENGTH) :: token
320 
321  token = period_val(i)
322  if (len_trim(token) == 0) return
323  bndelem => featarr(address)
324  call read_value_or_time_series_adv(token, address, 0, bndelem, &
325  this%mf6_input%subcomponent_name, &
326  'BND', this%tsmanager, &
327  this%ctx%iprpak, trim(idt%tagname))
328  end subroutine apply_setting_value
329 
330  !> @brief Allocate permanent, feature-indexed storage for every in-scope
331  !! PERIOD setting, keyed by the field's public tag (e.g. CONCENTRATION).
332  !<
333  subroutine allocate_period_settings(this)
334  class(keystringloadtype), intent(inout) :: this
335  type(inputparamdefinitiontype), pointer :: idt
336  integer(I4B) :: icol, nfeatures
337 
338  nfeatures = this%resolve_nfeatures()
339  if (nfeatures < 1) return
340 
341  do icol = this%nleading + 1, this%nparam
342  idt => this%resolve_in_scope_setting(icol)
343  if (.not. associated(idt)) cycle
344  call this%allocate_permanent_array(idt, nfeatures, dzero)
345  end do
346  end subroutine allocate_period_settings
347 
348  !> @brief Apply PERIOD settings (SPC) to their permanent, feature-indexed
349  !! arrays
350  !!
351  !! Resolves each token (literal or TS name) directly against the
352  !! permanent, BNDNO-addressed array, so a later period that doesn't
353  !! repeat the setting leaves the prior value untouched.
354  !<
355  subroutine apply_period_settings(this)
357  use simmodule, only: store_error
358  use simvariablesmodule, only: errmsg
359  class(keystringloadtype), intent(inout) :: this
360  integer(I4B), pointer :: nbound => null()
361  integer(I4B), dimension(:), pointer, contiguous :: period_bndno => null()
362  type(characterstringtype), dimension(:), pointer, contiguous :: &
363  period_setting => null()
364  type(characterstringtype), dimension(:), pointer, contiguous :: &
365  period_val => null()
366  type(inputparamdefinitiontype), pointer :: idt
367  real(DP), dimension(:), pointer, contiguous :: featarr => null()
368  integer(I4B) :: i, icol, bndno, isize, nfeatures
369  character(len=LINELENGTH) :: setting
370 
371  call get_isize('NBOUND', this%mf6_input%mempath, isize)
372  if (isize < 1) return
373  call mem_setptr(nbound, 'NBOUND', this%mf6_input%mempath)
374  if (nbound <= 0) return
375 
376  nfeatures = this%resolve_nfeatures()
377  if (nfeatures < 1) return
378 
379  ! the sole leading column is the permanent, stably-numbered feature
380  ! address (BNDNO) -- resolved via its own idt, since the
381  ! memory-manager key (mf6varname) isn't always the doc-facing tag
382  idt => get_param_definition_type(this%mf6_input%param_dfns, &
383  this%mf6_input%component_type, &
384  this%mf6_input%subcomponent_type, &
385  'PERIOD', this%param_names(1), &
386  this%input_name)
387  call mem_setptr(period_bndno, trim(idt%mf6varname), this%mf6_input%mempath)
388  call mem_setptr(period_setting, 'SETTING', this%mf6_input%mempath)
389 
390  do icol = this%nleading + 1, this%nparam
391  idt => this%resolve_in_scope_setting(icol)
392  if (.not. associated(idt)) cycle
393  call mem_setptr(featarr, trim(idt%tagname), this%mf6_input%mempath)
394  call mem_setptr(period_val, trim(idt%mf6varname), this%mf6_input%mempath)
395 
396  do i = 1, nbound
397  setting = period_setting(i)
398  if (trim(setting) /= trim(idt%mf6varname)) cycle
399  bndno = period_bndno(i)
400  if (bndno < 1 .or. bndno > nfeatures) then
401  write (errmsg, '(2(a,1x),i0,a)') &
402  'BNDNO must be greater than 0 and', &
403  'less than or equal to ', nfeatures, '.'
404  call store_error(errmsg)
405  cycle
406  end if
407  call this%apply_setting_value(idt, period_val, i, bndno, featarr)
408  end do
409  end do
410  end subroutine apply_period_settings
411 
412  !> @brief Allocate permanent, node-indexed storage for every PERIOD
413  !! setting in scope, for CELLID-addressed packages (TVK/TVS)
414  !!
415  !! Sized by ctx%nodes (product(MSHAPE), the unreduced node count).
416  !! DNODATA marks "never set" so the package knows which nodes to
417  !! copy into its own target array (e.g. NPF's K11) at the reduced
418  !! node number.
419  !<
421  class(keystringloadtype), intent(inout) :: this
422  type(inputparamdefinitiontype), pointer :: idt
423  integer(I4B) :: icol, nfeatures
424 
425  if (.not. associated(this%ctx%nodes)) return
426  nfeatures = this%ctx%nodes
427  if (nfeatures < 1) return
428 
429  do icol = this%nleading + 1, this%nparam
430  idt => this%resolve_in_scope_setting(icol)
431  if (.not. associated(idt)) cycle
432  call this%allocate_permanent_array(idt, nfeatures, dnodata)
433  end do
434  end subroutine allocate_period_node_settings
435 
436  !> @brief Apply PERIOD settings to their permanent, node-indexed arrays,
437  !! for CELLID-addressed packages (TVK/TVS)
438  !!
439  !! Mirrors apply_period_settings, but addresses by the unreduced node
440  !! number (nodeu) computed from CELLID via MSHAPE. The reduced-node
441  !! lookup stays package-side, where the real dis object is available.
442  !<
443  subroutine apply_period_node_settings(this)
444  use geomutilmodule, only: get_node
445  class(keystringloadtype), intent(inout) :: this
446  integer(I4B), pointer :: nbound => null()
447  integer(I4B), dimension(:, :), pointer, contiguous :: cellid => null()
448  type(characterstringtype), dimension(:), pointer, contiguous :: &
449  period_setting => null()
450  type(characterstringtype), dimension(:), pointer, contiguous :: &
451  period_val => null()
452  type(inputparamdefinitiontype), pointer :: idt
453  real(DP), dimension(:), pointer, contiguous :: featarr => null()
454  integer(I4B) :: i, icol, nodeu, isize, nfeatures, ndim
455  character(len=LINELENGTH) :: setting
456 
457  call get_isize('NBOUND', this%mf6_input%mempath, isize)
458  if (isize < 1) return
459  call mem_setptr(nbound, 'NBOUND', this%mf6_input%mempath)
460  if (nbound <= 0) return
461 
462  if (.not. associated(this%ctx%nodes)) return
463  nfeatures = this%ctx%nodes
464  if (nfeatures < 1) return
465  if (.not. associated(this%ctx%mshape)) return
466  ndim = size(this%ctx%mshape)
467 
468  call mem_setptr(cellid, 'CELLID', this%mf6_input%mempath)
469  call mem_setptr(period_setting, 'SETTING', this%mf6_input%mempath)
470 
471  do icol = this%nleading + 1, this%nparam
472  idt => this%resolve_in_scope_setting(icol)
473  if (.not. associated(idt)) cycle
474  call mem_setptr(featarr, trim(idt%tagname), this%mf6_input%mempath)
475  call mem_setptr(period_val, trim(idt%mf6varname), this%mf6_input%mempath)
476 
477  do i = 1, nbound
478  setting = period_setting(i)
479  if (trim(setting) /= trim(idt%mf6varname)) cycle
480  if (ndim == 1) then
481  nodeu = cellid(1, i)
482  else if (ndim == 2) then
483  nodeu = get_node(cellid(1, i), 1, cellid(2, i), &
484  this%ctx%mshape(1), 1, this%ctx%mshape(2))
485  else
486  nodeu = get_node(cellid(1, i), cellid(2, i), cellid(3, i), &
487  this%ctx%mshape(1), this%ctx%mshape(2), &
488  this%ctx%mshape(3))
489  end if
490  if (nodeu < 1 .or. nodeu > nfeatures) cycle
491  call this%apply_setting_value(idt, period_val, i, nodeu, featarr)
492  end do
493  end do
494  end subroutine apply_period_node_settings
495 
496  subroutine create_structarray(this)
499  use inputoutputmodule, only: upcase
500  class(keystringloadtype), intent(inout) :: this
501  type(inputparamdefinitiontype), pointer :: idt, pidt
502  character(len=LINELENGTH), allocatable :: rec_cols(:)
503  character(len=LINELENGTH) :: kwname, first_col
504  integer(I4B) :: iparam, sa_icol, padj, nrow_prealloc, jparam, nrec_col, nsub
505  logical(LGP) :: has_setting
506 
507  has_setting = this%ctx%has_setting_dispatch
508  padj = 0
509  if (has_setting) padj = 1
510 
511  ! use pre-allocated managed memory (maxbound = features * nmembers);
512  ! fall back to deferred shape (-1) if maxbound is unavailable
513  if (associated(this%ctx%maxbound) .and. this%ctx%maxbound > 0) then
514  nrow_prealloc = this%ctx%maxbound
515  else
516  nrow_prealloc = -1
517  end if
518 
519  this%structarray => &
520  constructstructarray(this%mf6_input, this%nparam + padj, &
521  nrow_prealloc, 0, this%mf6_input%mempath, &
522  this%mf6_input%component_mempath)
523 
524  ! create leading (pre-keystring) columns unchanged
525  do iparam = 1, this%nleading
526  idt => get_param_definition_type(this%mf6_input%param_dfns, &
527  this%mf6_input%component_type, &
528  this%mf6_input%subcomponent_type, &
529  'PERIOD', &
530  this%param_names(iparam), this%input_name)
531  call this%structarray%mem_create_vector(iparam, idt)
532  end do
533 
534  ! create SETTING column (ctx owns setting_idt); records which keystring
535  ! member was dispatched to on each row, for sticky-setting persistence
536  if (has_setting) then
537  call this%structarray%mem_create_vector(this%nleading + 1, &
538  this%ctx%setting_idt)
539  end if
540 
541  ! create keystring member columns, shifted past SETTING when present
542  do iparam = this%nleading + 1, this%nparam
543  sa_icol = iparam + padj
544  idt => get_param_definition_type(this%mf6_input%param_dfns, &
545  this%mf6_input%component_type, &
546  this%mf6_input%subcomponent_type, &
547  'PERIOD', &
548  this%param_names(iparam), this%input_name)
549  call this%structarray%mem_create_vector(sa_icol, idt)
550 
551  ! For KEYWORD member columns, store the compound sub-member count
552  ! from the RECORD definition so read_from_parser_keystring reads
553  ! exactly the right number of sub-values.
554  if (trim(idt%datatype) == 'KEYWORD') then
555  kwname = trim(idt%tagname)
556  call upcase(kwname)
557  nsub = 0
558  do jparam = 1, size(this%mf6_input%param_dfns)
559  pidt => this%mf6_input%param_dfns(jparam)
560  if (pidt%blockname /= 'PERIOD') cycle
561  if (pidt%datatype(1:6) /= 'RECORD') cycle
562  call idt_parse_rectype(pidt, rec_cols, nrec_col)
563  if (nrec_col >= 1) then
564  first_col = trim(rec_cols(1))
565  call upcase(first_col)
566  if (trim(first_col) == trim(kwname)) then
567  nsub = nrec_col - 1
568  if (allocated(rec_cols)) deallocate (rec_cols)
569  exit
570  end if
571  end if
572  if (allocated(rec_cols)) deallocate (rec_cols)
573  end do
574  this%structarray%struct_vectors(sa_icol)%nsubmembers = nsub
575  end if
576  end do
577  end subroutine create_structarray
578 
579 end module mf6filekeystringmodule
This module contains the AsciiInputLoadTypeModule.
This module contains block parser methods.
Definition: BlockParser.f90:7
This module contains simulation constants.
Definition: Constants.f90:9
integer(i4b), parameter linelength
maximum length of a standard line
Definition: Constants.f90:45
real(dp), parameter dnodata
real no data constant
Definition: Constants.f90:95
integer(i4b), parameter lenvarname
maximum length of a variable name
Definition: Constants.f90:17
real(dp), parameter dzero
real constant zero
Definition: Constants.f90:65
This module contains the DefinitionSelectModule.
subroutine, public idt_parse_rectype(idt, cols, ncol)
allocate and set RECARRAY, KEYSTRING or RECORD param list
type(inputparamdefinitiontype) function, pointer, public get_param_definition_type(input_definition_types, component_type, subcomponent_type, blockname, tagname, filename, found)
Return parameter definition.
integer(i4b) function, public get_node(ilay, irow, icol, nlay, nrow, ncol)
Get node number, given layer, row, and column indices for a structured grid. If any argument is inval...
Definition: GeomUtil.f90:92
This module contains the Input Data Model Logger Module.
Definition: IdmLogger.f90:7
subroutine, public idm_log_close(component, subcomponent, iout)
@ brief log the closing message
Definition: IdmLogger.f90:56
subroutine, public idm_log_header(component, subcomponent, iout)
@ brief log a header message
Definition: IdmLogger.f90:44
Input definition module.
integer(i4b) function, public getunit()
Get a free unit number.
subroutine, public upcase(word)
Convert to upper case.
This module defines variable data types.
Definition: kind.f90:8
This module contains the LoadContextModule.
Definition: LoadContext.f90:10
This module contains the LoadMf6FileModule.
Definition: LoadMf6File.f90:8
subroutine, public get_isize(name, mem_path, isize)
@ brief Get the number of elements for this variable
Period block keystring-based input loader.
subroutine allocate_period_node_settings(this)
Allocate permanent, node-indexed storage for every PERIOD setting in scope, for CELLID-addressed pack...
subroutine apply_setting_value(this, idt, period_val, i, address, featarr)
Resolve token (row i of period_val) as a literal or TS name directly against featarr(address).
subroutine ainit(this, mf6_input, component_name, component_input_name, input_name, iperblock, parser, iout)
integer(i4b) function resolve_nfeatures(this)
Resolve the permanent array's feature count: ctxmaxbound divided by the keystring member count,...
subroutine allocate_permanent_array(this, idt, nfeatures, init_value)
Allocate idt's permanent array with init_value, unless already allocated.
subroutine allocate_period_settings(this)
Allocate permanent, feature-indexed storage for every in-scope PERIOD setting, keyed by the field's p...
subroutine ts_advance(this)
subroutine apply_period_settings(this)
Apply PERIOD settings (SPC) to their permanent, feature-indexed arrays.
subroutine create_structarray(this)
subroutine apply_period_node_settings(this)
Apply PERIOD settings to their permanent, node-indexed arrays, for CELLID-addressed packages (TVK/TVS...
type(inputparamdefinitiontype) function, pointer resolve_in_scope_setting(this, icol)
Return idt for param_names(icol) if it's an in-scope PERIOD setting (STRING type with TIME_SERIES TRU...
subroutine rp(this, parser)
This module contains the ModflowInputModule.
Definition: ModflowInput.f90:9
This module contains simulation methods.
Definition: Sim.f90:10
subroutine, public store_error(msg, terminate)
Store an error message.
Definition: Sim.f90:92
This module contains simulation variables.
Definition: SimVariables.f90:9
character(len=maxcharlen) errmsg
error message string
This module contains the StructArrayModule.
Definition: StructArray.f90:8
type(structarraytype) function, pointer, public constructstructarray(mf6_input, ncol, nrow, blocknum, mempath, component_mempath)
constructor for a struct_array
Definition: StructArray.f90:80
subroutine, public destructstructarray(struct_array)
destructor for a struct_array
subroutine, public read_value_or_time_series_adv(textInput, ii, jj, bndElem, pkgName, auxOrBnd, tsManager, iprpak, varName)
Call this subroutine from advanced packages to define timeseries link for a variable (varName).
subroutine, public tsmanager_cr(this, iout, removeTsLinksOnCompletion, extendTsToEndOfSimulation)
Create the tsmanager.
base abstract type for ascii source dynamic load
This class is used to store a single deferred-length character string. It was designed to work in an ...
Definition: CharString.f90:23
Input parameter definition. Describes an input parameter.
derived type for boundary package input context
Definition: LoadContext.f90:65
Static parser based input loader.
Definition: LoadMf6File.f90:54
derived type for storing input definition for a file
type for structured array
Definition: StructArray.f90:41