42 integer(I4B),
dimension(:),
allocatable :: vals
56 logical(LGP) :: ts_active
57 integer(I4B) :: nleading
60 integer(I4B),
dimension(:),
allocatable :: subindex_nfeatures
62 integer(I4B),
dimension(:),
allocatable :: subindex_icol
63 integer(I4B),
dimension(:),
allocatable :: subindex_head_icol
64 character(len=LENVARNAME) :: subindex_id_varname =
''
87 subroutine ainit(this, mf6_input, component_name, component_input_name, &
88 input_name, iperblock, parser, iout)
95 character(len=*),
intent(in) :: component_name
96 character(len=*),
intent(in) :: component_input_name
97 character(len=*),
intent(in) :: input_name
98 integer(I4B),
intent(in) :: iperblock
100 integer(I4B),
intent(in) :: iout
102 character(len=LINELENGTH) :: fname
103 character(len=LENVARNAME) :: named_bound
104 logical(LGP) :: has_named_bound
105 integer(I4B) :: n, isize
107 call this%DynamicPkgLoadType%init(mf6_input, component_name, &
108 component_input_name, input_name, &
110 this%ts_active = .false.
113 allocate (this%tsmanager)
117 call this%static_loader%load(parser, mf6_input, this%nc_vars, &
118 this%input_name, iout)
121 if (this%static_loader%ts_active)
then
122 this%ts_active = .true.
123 call get_isize(
'TS6_FILENAME', mf6_input%mempath, isize)
125 call mem_setptr(ts_fnames,
'TS6_FILENAME', mf6_input%mempath)
126 do n = 1,
size(ts_fnames)
128 call this%tsmanager%add_tsfile(fname,
getunit())
135 has_named_bound = .false.
137 do n = 1,
size(mf6_input%param_dfns)
138 if (mf6_input%param_dfns(n)%blockname ==
'DIMENSIONS')
then
139 named_bound = trim(mf6_input%param_dfns(n)%mf6varname)
140 has_named_bound = .true.
147 if (has_named_bound)
then
148 call this%ctx%init(mf6_input, named_bound=named_bound)
150 call this%ctx%init(mf6_input)
154 this%param_names = this%ctx%params
155 this%nparam =
size(this%ctx%params)
156 this%nleading = this%ctx%nleading
157 call this%ctx%check_developmode(this%input_name)
160 call this%ctx%allocate_arrays()
163 call this%create_structarray()
175 integer(I4B),
dimension(:),
pointer,
contiguous :: pkg_ifno => null()
176 integer(I4B) :: n, naux
178 call this%tsmanager%tsmanager_df()
180 call get_isize(
'AUXILIARY', this%mf6_input%mempath, naux)
181 if (naux > 0)
call mem_setptr(auxnames,
'AUXILIARY', this%mf6_input%mempath)
184 if (this%ctx%is_advanced)
then
185 call mem_setptr(pkg_ifno,
'PACKAGEDATA_IFNO', this%mf6_input%mempath)
188 do n = 1, this%static_loader%ts_sa_count()
189 sa => this%static_loader%get_ts_sa(n)
190 if (
associated(sa))
then
191 if (
associated(pkg_ifno))
then
192 call sa%ts_update(this%tsmanager, &
193 this%mf6_input%subcomponent_name, &
194 this%ctx%iprpak, this%input_name, &
195 clear_strlocs=.false., auxname_cst=auxnames, &
198 call sa%ts_update(this%tsmanager, &
199 this%mf6_input%subcomponent_name, &
200 this%ctx%iprpak, this%input_name, &
201 clear_strlocs=.false., auxname_cst=auxnames)
206 call this%allocate_items()
208 if (this%ctx%is_advanced)
call this%allocate_subindex()
213 call this%tsmanager%ad()
216 subroutine rp(this, parser)
224 this%mf6_input%subcomponent_name, this%iout)
227 this%structarray%read_from_parser_keystring(parser, this%ts_active, &
228 this%nleading, this%iout, &
231 if (this%ctx%is_advanced)
call this%apply_auxiliary()
232 if (this%ctx%is_advanced)
call this%apply_subindex()
234 call this%apply_items()
236 if (this%ts_active)
then
237 call this%structarray%ts_update(this%tsmanager, &
238 this%mf6_input%subcomponent_name, &
239 this%ctx%iprpak, this%input_name)
243 this%mf6_input%subcomponent_name, this%iout)
254 character(len=LENVARNAME) :: dimname, subindex_tagname
255 integer(I4B) :: icol, sa_icol, padj, nfeatures, n
256 logical(LGP) :: found
258 if (.not.
allocated(this%subindex_nfeatures))
then
259 allocate (this%subindex_nfeatures(this%structarray%count()))
260 allocate (this%subindex_offsets(this%structarray%count()))
261 allocate (this%subindex_icol(this%structarray%count()))
262 allocate (this%subindex_head_icol(this%structarray%count()))
263 this%subindex_nfeatures = 0
264 this%subindex_icol = 0
265 this%subindex_head_icol = 0
269 if (this%ctx%has_setting_dispatch) padj = 1
272 this%mf6_input%component_type, &
273 this%mf6_input%subcomponent_type, &
274 this%ctx%blockname, &
275 this%param_names(1), &
277 this%subindex_id_varname = trim(id_idt%mf6varname)
279 do icol = this%nleading + 1, this%nparam
280 if (.not. this%ctx%keystring_items(icol - this%nleading)%is_body) cycle
282 this%mf6_input%component_type, &
283 this%mf6_input%subcomponent_type, &
284 this%ctx%blockname, &
285 this%param_names(icol), &
287 found = this%ctx%subindex_dependency(idt%tagname, dimname, &
289 if (.not. found) cycle
291 sa_icol = icol + padj
292 nfeatures = this%ctx%resolve_item_nfeatures(idt%tagname, dimname, 0)
293 if (nfeatures < 1) cycle
294 this%subindex_nfeatures(sa_icol) = nfeatures
295 this%subindex_offsets(sa_icol)%vals = &
296 this%resolve_subindex_offsets(dimname)
297 call this%allocate_permanent_array( &
298 trim(idt%mf6varname), nfeatures,
dzero)
302 do n = 1, this%structarray%count()
303 if (trim(this%structarray%struct_vectors(n)%idt%tagname) == &
304 trim(subindex_tagname)) this%subindex_icol(sa_icol) = n
305 if (this%structarray%struct_vectors(n)%head_nbody > 0)
then
306 if (sa_icol >= this%structarray%struct_vectors(n)%body_start .and. &
307 sa_icol < this%structarray%struct_vectors(n)%body_start + &
308 this%structarray%struct_vectors(n)%head_nbody) &
309 this%subindex_head_icol(sa_icol) = n
313 if (this%subindex_icol(sa_icol) == 0 .or. &
314 this%subindex_head_icol(sa_icol) == 0) &
315 this%subindex_nfeatures(sa_icol) = 0
325 character(len=*),
intent(in) :: name
326 integer(I4B),
intent(in) :: nfeatures
327 real(DP),
intent(in) :: init_value
328 real(DP),
dimension(:),
pointer,
contiguous :: featarr => null()
329 integer(I4B) :: isize
331 call get_isize(name, this%mf6_input%mempath, isize)
332 if (isize > 0)
return
333 call mem_allocate(featarr, nfeatures, name, this%mf6_input%mempath)
345 if (.not.
allocated(this%ctx%keystring_items))
return
347 do k = 1,
size(this%ctx%keystring_items)
348 if (.not. this%ctx%keystring_items(k)%idm_managed) cycle
351 if (this%ctx%keystring_items(k)%addr_mode ==
addr_subindex) cycle
352 if (this%ctx%keystring_items(k)%nfeatures < 1) cycle
353 call this%allocate_permanent_array( &
354 this%ctx%keystring_items(k)%idt%mf6varname, &
355 this%ctx%keystring_items(k)%nfeatures, &
356 this%ctx%keystring_items(k)%init_value)
366 function valid_address(this, ifno, nfeatures, ifno_tagname, row)
result(valid)
370 integer(I4B),
intent(in) :: ifno
371 integer(I4B),
intent(in) :: nfeatures
372 character(len=*),
intent(in) :: ifno_tagname
373 integer(I4B),
intent(in) :: row
374 logical(LGP) :: valid
376 valid = (ifno >= 1 .and. ifno <= nfeatures)
377 if (.not. valid)
then
378 write (
errmsg,
'(a,1x,i0,1x,a,1x,i0,1x,a,1x,i0,a)') &
379 trim(ifno_tagname), ifno,
'on row', row, &
380 'must be greater than 0 and less than or equal to', nfeatures,
'.'
394 integer(I4B),
pointer :: nbound => null()
395 integer(I4B),
dimension(:),
pointer,
contiguous :: period_ifno => null()
397 period_setting => null()
399 period_auxname => null()
402 real(DP),
dimension(:, :),
pointer,
contiguous :: aux => null()
403 real(DP),
pointer :: bndElem
406 integer(I4B) :: i, n, ifno, jj, isize, naux, nfeatures, sa_icol, k, nts
407 logical(LGP) :: found
408 logical(LGP),
dimension(:),
allocatable :: handled
409 character(len=LINELENGTH) :: setting, auxname, thisauxname
410 character(len=LENVARNAME) :: ifno_tagname
412 call get_isize(
'AUXILIARY', this%mf6_input%mempath, naux)
413 if (naux <= 0)
return
415 call get_isize(
'NBOUND', this%mf6_input%mempath, isize)
416 if (isize < 1)
return
417 call mem_setptr(nbound,
'NBOUND', this%mf6_input%mempath)
418 if (nbound <= 0)
return
420 call get_isize(
'AUXNAME', this%mf6_input%mempath, isize)
421 if (isize < 1)
return
426 this%mf6_input%component_type, &
427 this%mf6_input%subcomponent_type, &
428 this%ctx%blockname, &
429 this%param_names(1), &
431 ifno_tagname = trim(idt%tagname)
436 this%mf6_input%component_type, &
437 this%mf6_input%subcomponent_type, &
438 this%ctx%blockname,
'AUXILIARY', &
441 call mem_setptr(period_ifno,
'IFNO', this%mf6_input%mempath)
442 call mem_setptr(period_setting,
'SETTING', this%mf6_input%mempath)
443 call mem_setptr(period_auxname,
'AUXNAME', this%mf6_input%mempath)
444 call mem_setptr(auxnames,
'AUXILIARY', this%mf6_input%mempath)
445 call mem_setptr(aux,
'AUX', this%mf6_input%mempath)
446 nfeatures =
size(aux, 2)
449 do n = 1, this%structarray%count()
450 if (
is_auxval(this%structarray%struct_vectors(n)%idt))
then
455 if (sa_icol == 0)
return
457 allocate (handled(nbound))
461 nts = this%structarray%struct_vectors(sa_icol)%ts_strlocs%count()
463 ts_strloc => this%structarray%struct_vectors(sa_icol)%get_ts_strloc(k)
465 ifno = period_ifno(i)
466 if (.not. this%valid_address(ifno, nfeatures, ifno_tagname, i)) cycle
467 auxname = period_auxname(i)
470 thisauxname = auxnames(jj)
471 bndelem => aux(jj, ifno)
473 this%mf6_input%subcomponent_name, &
474 'AUX', this%tsmanager, &
475 this%ctx%iprpak, trim(thisauxname))
481 if (handled(i)) cycle
482 setting = period_setting(i)
483 if (trim(setting) /= trim(idt%mf6varname)) cycle
484 ifno = period_ifno(i)
485 if (.not. this%valid_address(ifno, nfeatures, ifno_tagname, i)) cycle
486 auxname = period_auxname(i)
489 thisauxname = auxnames(jj)
491 this%mf6_input%subcomponent_name, &
492 'AUX', trim(thisauxname))
493 aux(jj, ifno) = this%structarray%struct_vectors(sa_icol)%dbl1d(i)
499 call this%structarray%struct_vectors(sa_icol)%clear()
510 real(DP),
dimension(:),
pointer,
contiguous :: featarr => null()
511 integer(I4B),
pointer :: nbound => null()
512 integer(I4B),
dimension(:),
allocatable :: row_addr
513 integer(I4B) :: icol, sa_icol, padj, isize
515 if (.not.
allocated(this%subindex_nfeatures))
return
517 call get_isize(
'NBOUND', this%mf6_input%mempath, isize)
518 if (isize < 1)
return
519 call mem_setptr(nbound,
'NBOUND', this%mf6_input%mempath)
520 if (nbound <= 0)
return
523 if (this%ctx%has_setting_dispatch) padj = 1
525 do icol = this%nleading + 1, this%nparam
526 sa_icol = icol + padj
527 if (sa_icol >
size(this%subindex_nfeatures)) cycle
528 if (this%subindex_nfeatures(sa_icol) < 1) cycle
530 idt => this%structarray%struct_vectors(sa_icol)%idt
532 this%structarray%struct_vectors(this%subindex_head_icol(sa_icol))%idt
533 call mem_setptr(featarr, trim(idt%mf6varname), this%mf6_input%mempath)
535 this%resolve_subindex_address( &
536 this%subindex_id_varname, trim(head_idt%mf6varname), &
537 this%subindex_icol(sa_icol), &
538 this%subindex_offsets(sa_icol)%vals, &
539 this%subindex_nfeatures(sa_icol), nbound)
540 call this%structarray%ts_update_indexed( &
541 sa_icol, this%tsmanager, this%mf6_input%subcomponent_name, &
542 this%ctx%iprpak, nbound, row_addr, trim(idt%tagname), featarr)
554 integer(I4B),
pointer :: nbound => null()
555 integer(I4B),
dimension(:, :),
pointer,
contiguous :: cellid => null()
556 integer(I4B),
dimension(:),
pointer,
contiguous :: period_ifno => null()
558 period_setting => null()
559 real(DP),
dimension(:),
pointer,
contiguous :: featarr => null()
560 integer(I4B),
dimension(:),
allocatable :: row_addr
561 integer(I4B) :: i, k, isize, ndim
562 character(len=LINELENGTH) :: setting
563 character(len=LENVARNAME) :: dispatch_key
564 character(len=LENVARNAME) :: leading_tag
567 if (.not.
allocated(this%ctx%keystring_items))
return
569 call get_isize(
'NBOUND', this%mf6_input%mempath, isize)
570 if (isize < 1)
return
571 call mem_setptr(nbound,
'NBOUND', this%mf6_input%mempath)
572 if (nbound <= 0)
return
574 call mem_setptr(period_setting,
'SETTING', this%mf6_input%mempath)
579 if (this%ctx%keystring_by_node)
then
580 if (.not.
associated(this%ctx%mshape))
return
581 ndim =
size(this%ctx%mshape)
582 call mem_setptr(cellid,
'CELLID', this%mf6_input%mempath)
584 call mem_setptr(period_ifno, this%ctx%feature_id_varname, &
585 this%mf6_input%mempath)
590 this%mf6_input%component_type, &
591 this%mf6_input%subcomponent_type, &
592 this%ctx%blockname, &
593 this%param_names(1), &
595 leading_tag = trim(lead_idt%tagname)
598 do k = 1,
size(this%ctx%keystring_items)
599 if (.not. this%ctx%keystring_items(k)%idm_managed) cycle
600 if (this%ctx%keystring_items(k)%addr_mode ==
addr_subindex) cycle
601 if (this%ctx%keystring_items(k)%nfeatures < 1) cycle
602 call mem_setptr(featarr, this%ctx%keystring_items(k)%idt%mf6varname, &
603 this%mf6_input%mempath)
608 if (this%ctx%keystring_items(k)%is_body)
then
609 dispatch_key = this%ctx%keystring_items(k)%head_setting_varname
611 dispatch_key = this%ctx%keystring_items(k)%idt%mf6varname
614 allocate (row_addr(nbound))
617 setting = period_setting(i)
618 if (trim(setting) /= trim(dispatch_key)) cycle
620 this%resolve_row_addr(this%ctx%keystring_items(k), i, period_ifno, &
621 cellid, ndim, leading_tag)
623 call this%structarray%ts_update_indexed( &
624 this%ctx%keystring_items(k)%sa_icol, this%tsmanager, &
625 this%mf6_input%subcomponent_name, this%ctx%iprpak, nbound, row_addr, &
626 this%ctx%keystring_items(k)%idt%tagname, featarr)
627 deallocate (row_addr)
643 integer(I4B),
intent(in) :: irow
644 integer(I4B),
dimension(:),
pointer,
contiguous,
intent(in) :: period_ifno
645 integer(I4B),
dimension(:, :),
pointer,
contiguous,
intent(in) :: cellid
646 integer(I4B),
intent(in) :: ndim
647 character(len=*),
intent(in) :: leading_tag
649 integer(I4B) :: ifno, nodeu
652 select case (item%addr_mode)
654 ifno = period_ifno(irow)
655 if (.not. this%valid_address(ifno, item%nfeatures, leading_tag, irow)) &
660 nodeu = cellid(1, irow)
661 else if (ndim == 2)
then
662 nodeu =
get_node(cellid(1, irow), 1, cellid(2, irow), &
663 this%ctx%mshape(1), 1, this%ctx%mshape(2))
665 nodeu =
get_node(cellid(1, irow), cellid(2, irow), cellid(3, irow), &
666 this%ctx%mshape(1), this%ctx%mshape(2), &
669 if (nodeu < 1 .or. nodeu > item%nfeatures)
return
680 character(len=*),
intent(in) :: dimname
681 integer(I4B),
dimension(:),
allocatable :: offsets
682 integer(I4B),
dimension(:),
pointer,
contiguous :: counts_raw => null()
683 integer(I4B),
dimension(:),
pointer,
contiguous :: pkg_ifno => null()
684 integer(I4B),
dimension(:),
allocatable :: counts
685 integer(I4B) :: i, n, running, ndomain
687 call mem_setptr(counts_raw, trim(dimname), this%mf6_input%mempath)
688 call mem_setptr(pkg_ifno,
'PACKAGEDATA_IFNO', this%mf6_input%mempath)
689 ndomain =
size(counts_raw)
690 allocate (counts(ndomain))
692 do i = 1,
size(counts_raw)
694 if (n < 1 .or. n > ndomain) cycle
695 counts(n) = counts_raw(i)
698 allocate (offsets(ndomain))
702 running = running + counts(n)
710 subindex_icol, offsets, nfeatures, nbound) &
715 character(len=*),
intent(in) :: id_mf6varname
716 character(len=*),
intent(in) :: head_mf6varname
717 integer(I4B),
intent(in) :: subindex_icol
718 integer(I4B),
dimension(:),
intent(in) :: offsets
719 integer(I4B),
intent(in) :: nfeatures
720 integer(I4B),
intent(in) :: nbound
721 integer(I4B),
dimension(:),
allocatable :: row_addr
722 integer(I4B),
dimension(:),
pointer,
contiguous :: period_ifno => null()
724 period_setting => null()
725 integer(I4B) :: i, ifno, idx_local, nlocal
726 character(len=LINELENGTH) :: setting
727 character(len=LENVARNAME) :: id_tag, idx_tag
729 call mem_setptr(period_ifno, id_mf6varname, this%mf6_input%mempath)
730 call mem_setptr(period_setting,
'SETTING', this%mf6_input%mempath)
731 id_tag = trim(this%structarray%struct_vectors(1)%idt%tagname)
732 idx_tag = trim(this%structarray%struct_vectors(subindex_icol)%idt%tagname)
733 allocate (row_addr(nbound))
736 setting = period_setting(i)
737 if (trim(setting) /= trim(head_mf6varname)) cycle
738 ifno = period_ifno(i)
739 if (ifno < 1 .or. ifno >
size(offsets)) cycle
741 if (ifno <
size(offsets))
then
742 nlocal = offsets(ifno + 1) - offsets(ifno)
744 nlocal = nfeatures - offsets(ifno) + 1
746 idx_local = this%structarray%struct_vectors(subindex_icol)%int1d(i)
747 if (idx_local < 1 .or. idx_local > nlocal)
then
748 write (
errmsg,
'(a,1x,a,1x,i0,1x,a,1x,i0,1x,a,1x,a,1x,i0,a)') &
749 'index', trim(idx_tag), idx_local,
'must be between 1 and', nlocal, &
750 'for', trim(id_tag), ifno,
'.'
754 row_addr(i) = offsets(ifno) + idx_local - 1
766 integer(I4B) :: n, naux
769 if (this%ctx%has_setting_dispatch)
return
771 call this%tsmanager%reset(this%mf6_input%subcomponent_name)
773 if (this%ts_active)
then
774 call get_isize(
'AUXILIARY', this%mf6_input%mempath, naux)
775 if (naux > 0)
call mem_setptr(auxnames,
'AUXILIARY', this%mf6_input%mempath)
776 do n = 1, this%static_loader%ts_sa_count()
777 sa => this%static_loader%get_ts_sa(n)
778 if (
associated(sa))
then
779 call sa%ts_update(this%tsmanager, &
780 this%mf6_input%subcomponent_name, &
781 this%ctx%iprpak, this%input_name, &
782 clear_strlocs=.false., auxname_cst=auxnames)
791 call this%static_loader%cleanup()
793 call this%tsmanager%da()
794 deallocate (this%tsmanager)
795 nullify (this%tsmanager)
797 if (
associated(this%structarray))
then
801 call this%ctx%destroy()
802 call this%DynamicPkgLoadType%destroy()
809 integer(I4B) :: icol, sa_icol, nrow_prealloc, nsub, padj
810 logical(LGP) :: has_setting
812 has_setting = this%ctx%has_setting_dispatch
816 if (
associated(this%ctx%maxbound) .and. this%ctx%maxbound > 0)
then
817 nrow_prealloc = this%ctx%maxbound
824 if (has_setting) padj = 1
826 if (has_setting .and. nrow_prealloc < 0)
then
829 this%structarray => &
831 nrow_prealloc, 0, this%mf6_input%mempath, &
832 this%mf6_input%component_mempath, size_init=64)
834 this%structarray => &
836 nrow_prealloc, 0, this%mf6_input%mempath, &
837 this%mf6_input%component_mempath)
841 do icol = 1, this%nleading
843 this%mf6_input%component_type, &
844 this%mf6_input%subcomponent_type, &
845 this%ctx%blockname, &
846 this%param_names(icol), this%input_name)
847 call this%structarray%mem_create_vector(icol, idt)
851 if (has_setting)
then
852 sa_icol = this%nleading + 1
853 call this%structarray%mem_create_vector(sa_icol, this%ctx%setting_idt, &
858 do icol = this%nleading + 1, this%nparam
859 sa_icol = icol + padj
861 this%mf6_input%component_type, &
862 this%mf6_input%subcomponent_type, &
863 this%ctx%blockname, &
864 this%param_names(icol), this%input_name)
866 nsub = this%ctx%keystring_items(icol - this%nleading)%head_nbody
869 call this%structarray%mem_create_metadata_vector(sa_icol, idt, &
871 else if (trim(idt%datatype) ==
'STRING')
then
873 call this%structarray%mem_create_vector(sa_icol, idt, &
875 else if (idt%datatype ==
'DOUBLE' .and. &
876 (this%ctx%keystring_items(icol - this%nleading)%idm_managed .or. &
877 this%ctx%keystring_items(icol - this%nleading)%addr_mode == &
881 call this%structarray%mem_create_vector(sa_icol, idt, &
884 call this%structarray%mem_create_vector(sa_icol, idt)
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
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, 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...
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.
Load context for IDM generic dynamic loaders.
integer(i4b), parameter, public addr_feature
addressed by leading id (IFNO/BNDNO)
integer(i4b), parameter, public addr_subindex
addressed by (id, subindex)
logical(lgp) function, public is_advanced(mf6_input)
Return .true. if mf6_input is an advanced package.
integer(i4b), parameter, public addr_node
addressed by CELLID
This module contains the LoadMf6FileModule.
subroutine, public get_isize(name, mem_path, isize)
@ brief Get the number of elements for this variable
Period block keystring-based input loader.
subroutine ainit(this, mf6_input, component_name, component_input_name, input_name, iperblock, parser, iout)
integer(i4b) function resolve_row_addr(this, item, irow, period_ifno, cellid, ndim, leading_tag)
Resolve one row's target index for an item, dispatching on addr_mode. Returns 0 (skip) if out of rang...
subroutine ts_advance(this)
subroutine apply_items(this)
Apply IDM-managed feature- and node-addressed settings to their permanent arrays; each row's address ...
subroutine allocate_subindex(this)
Allocate ctxsubindex_dependency targets (subindex params excluded from allocate_items),...
subroutine allocate_permanent_array(this, name, nfeatures, init_value)
Allocate a permanent per-feature array named name with init_value, unless already allocated.
integer(i4b) function, dimension(:), allocatable resolve_subindex_offsets(this, dimname)
Per-feature cumulative offset table from an array-valued dimension, permuted into feature-index order...
subroutine apply_auxiliary(this)
Apply PERIOD AUXILIARY settings to the permanent AUX array. TS-linked rows resolve via the struct arr...
logical(lgp) function valid_address(this, ifno, nfeatures, ifno_tagname, row)
Validate ifno against nfeatures, storing an error keyed by ifno_tagname (the leading column's public ...
subroutine allocate_items(this)
Allocate a permanent array for every IDM-managed item, using the descriptor's per-item feature count ...
subroutine apply_subindex(this)
Apply PERIOD settings for ctxsubindex_dependency's targets, via ts_update_indexed – same mechanism as...
integer(i4b) function, dimension(:), allocatable resolve_subindex_address(this, id_mf6varname, head_mf6varname, subindex_icol, offsets, nfeatures, nbound)
Row -> resolved feature index for an item whose local position comes from a subindex field,...
subroutine create_structarray(this)
subroutine rp(this, parser)
This module contains simulation methods.
subroutine, public store_error(msg, terminate)
Store an error message.
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 simulation variables.
character(len=maxcharlen) errmsg
error message string
This module contains the StructArrayModule.
character(len=lenvarname) function, public idm_input_varname(idt)
Derive a TS-capable setting's raw input array name, distinct from its persistent array (allocated und...
logical(lgp) function, public is_auxval(idt)
True if idt is AUXVAL: its AUX index is resolved dynamically from a sibling AUXNAME,...
integer(i4b) function, public find_auxname_index(auxname, auxnames, naux)
Find the AUX array position matching auxname, 0 if none.
subroutine, public destructstructarray(struct_array)
destructor for a struct_array
type(structarraytype) function, pointer, public constructstructarray(mf6_input, ncol, nrow, blocknum, mempath, component_mempath, size_init)
constructor for a struct_array
This module contains the StructVectorModule.
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).
logical function, public remove_existing_link(tsManager, ii, jj, pkgName, auxOrBnd, varName)
Remove an existing timeseries link if it is defined.
subroutine, public tsmanager_cr(this, iout, removeTsLinksOnCompletion, extendTsToEndOfSimulation)
Create the tsmanager.
This class is used to store a single deferred-length character string. It was designed to work in an ...
One descriptor per expanded keystring item, so loaders iterate uniformly instead of re-deriving per-m...
Input load context for generic dynamic loaders and StructArray based static loads....
Static parser based input loader.
Wraps an allocatable int array for a per-column cache table.
Keystring period block loader.
type for structured array
derived type which describes time series string field