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 :: row_key => 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)
186 do n = 1, this%static_loader%ts_sa_count()
187 sa => this%static_loader%get_ts_sa(n)
188 if (.not.
associated(sa)) cycle
190 if (this%ctx%is_advanced)
then
193 select case (sa%struct_vectors(1)%idt%blockname)
195 call mem_setptr(row_key,
'PACKAGEDATA_IFNO', this%mf6_input%mempath)
197 call mem_setptr(row_key,
'OUTLETS_OUTLETNO', this%mf6_input%mempath)
200 if (
associated(row_key))
then
201 call sa%ts_update(this%tsmanager, &
202 this%mf6_input%subcomponent_name, &
203 this%ctx%iprpak, this%input_name, &
204 clear_strlocs=.false., auxname_cst=auxnames, &
207 call sa%ts_update(this%tsmanager, &
208 this%mf6_input%subcomponent_name, &
209 this%ctx%iprpak, this%input_name, &
210 clear_strlocs=.false., auxname_cst=auxnames)
214 call this%allocate_items()
216 if (this%ctx%is_advanced)
call this%allocate_subindex()
221 call this%tsmanager%ad()
224 subroutine rp(this, parser)
232 this%mf6_input%subcomponent_name, this%iout)
235 this%structarray%read_from_parser_keystring(parser, this%ts_active, &
236 this%nleading, this%iout, &
239 if (this%ctx%is_advanced)
call this%apply_auxiliary()
240 if (this%ctx%is_advanced)
call this%apply_subindex()
242 call this%apply_items()
244 if (this%ts_active)
then
245 call this%structarray%ts_update(this%tsmanager, &
246 this%mf6_input%subcomponent_name, &
247 this%ctx%iprpak, this%input_name)
251 this%mf6_input%subcomponent_name, this%iout)
262 character(len=LENVARNAME) :: dimname, subindex_tagname
263 integer(I4B) :: icol, sa_icol, padj, nfeatures, n
264 logical(LGP) :: found
266 if (.not.
allocated(this%subindex_nfeatures))
then
267 allocate (this%subindex_nfeatures(this%structarray%count()))
268 allocate (this%subindex_offsets(this%structarray%count()))
269 allocate (this%subindex_icol(this%structarray%count()))
270 allocate (this%subindex_head_icol(this%structarray%count()))
271 this%subindex_nfeatures = 0
272 this%subindex_icol = 0
273 this%subindex_head_icol = 0
277 if (this%ctx%has_setting_dispatch) padj = 1
280 this%mf6_input%component_type, &
281 this%mf6_input%subcomponent_type, &
282 this%ctx%blockname, &
283 this%param_names(1), &
285 this%subindex_id_varname = trim(id_idt%mf6varname)
287 do icol = this%nleading + 1, this%nparam
288 if (.not. this%ctx%keystring_items(icol - this%nleading)%is_body) cycle
290 this%mf6_input%component_type, &
291 this%mf6_input%subcomponent_type, &
292 this%ctx%blockname, &
293 this%param_names(icol), &
295 found = this%ctx%subindex_dependency(idt%tagname, dimname, &
297 if (.not. found) cycle
299 sa_icol = icol + padj
300 nfeatures = this%ctx%resolve_item_nfeatures(idt%tagname, dimname, 0)
301 if (nfeatures < 1) cycle
302 this%subindex_nfeatures(sa_icol) = nfeatures
303 this%subindex_offsets(sa_icol)%vals = &
304 this%resolve_subindex_offsets(dimname)
305 call this%allocate_permanent_array( &
306 trim(idt%mf6varname), nfeatures,
dzero)
310 do n = 1, this%structarray%count()
311 if (trim(this%structarray%struct_vectors(n)%idt%tagname) == &
312 trim(subindex_tagname)) this%subindex_icol(sa_icol) = n
313 if (this%structarray%struct_vectors(n)%head_nbody > 0)
then
314 if (sa_icol >= this%structarray%struct_vectors(n)%body_start .and. &
315 sa_icol < this%structarray%struct_vectors(n)%body_start + &
316 this%structarray%struct_vectors(n)%head_nbody) &
317 this%subindex_head_icol(sa_icol) = n
321 if (this%subindex_icol(sa_icol) == 0 .or. &
322 this%subindex_head_icol(sa_icol) == 0) &
323 this%subindex_nfeatures(sa_icol) = 0
333 character(len=*),
intent(in) :: name
334 integer(I4B),
intent(in) :: nfeatures
335 real(DP),
intent(in) :: init_value
336 real(DP),
dimension(:),
pointer,
contiguous :: featarr => null()
337 integer(I4B) :: isize
339 call get_isize(name, this%mf6_input%mempath, isize)
340 if (isize > 0)
return
341 call mem_allocate(featarr, nfeatures, name, this%mf6_input%mempath)
353 if (.not.
allocated(this%ctx%keystring_items))
return
355 do k = 1,
size(this%ctx%keystring_items)
356 if (.not. this%ctx%keystring_items(k)%idm_managed) cycle
359 if (this%ctx%keystring_items(k)%addr_mode ==
addr_subindex) cycle
360 if (this%ctx%keystring_items(k)%nfeatures < 1) cycle
361 call this%allocate_permanent_array( &
362 this%ctx%keystring_items(k)%idt%mf6varname, &
363 this%ctx%keystring_items(k)%nfeatures, &
364 this%ctx%keystring_items(k)%init_value)
374 function valid_address(this, ifno, nfeatures, ifno_tagname, row)
result(valid)
378 integer(I4B),
intent(in) :: ifno
379 integer(I4B),
intent(in) :: nfeatures
380 character(len=*),
intent(in) :: ifno_tagname
381 integer(I4B),
intent(in) :: row
382 logical(LGP) :: valid
384 valid = (ifno >= 1 .and. ifno <= nfeatures)
385 if (.not. valid)
then
386 write (
errmsg,
'(a,1x,i0,1x,a,1x,i0,1x,a,1x,i0,a)') &
387 trim(ifno_tagname), ifno,
'on row', row, &
388 'must be greater than 0 and less than or equal to', nfeatures,
'.'
402 integer(I4B),
pointer :: nbound => null()
403 integer(I4B),
dimension(:),
pointer,
contiguous :: period_ifno => null()
404 type(characterstringtype),
dimension(:),
pointer,
contiguous :: &
405 period_setting => null()
406 type(characterstringtype),
dimension(:),
pointer,
contiguous :: &
407 period_auxname => null()
408 type(characterstringtype),
dimension(:),
pointer,
contiguous :: &
410 real(DP),
dimension(:, :),
pointer,
contiguous :: aux => null()
411 real(DP),
pointer :: bndElem
414 integer(I4B) :: i, n, ifno, jj, isize, naux, nfeatures, sa_icol, k, nts
415 logical(LGP) :: found
416 logical(LGP),
dimension(:),
allocatable :: handled
417 character(len=LINELENGTH) :: setting, auxname, thisauxname
418 character(len=LENVARNAME) :: ifno_tagname
420 call get_isize(
'AUXILIARY', this%mf6_input%mempath, naux)
421 if (naux <= 0)
return
423 call get_isize(
'NBOUND', this%mf6_input%mempath, isize)
424 if (isize < 1)
return
425 call mem_setptr(nbound,
'NBOUND', this%mf6_input%mempath)
426 if (nbound <= 0)
return
428 call get_isize(
'AUXNAME', this%mf6_input%mempath, isize)
429 if (isize < 1)
return
434 this%mf6_input%component_type, &
435 this%mf6_input%subcomponent_type, &
436 this%ctx%blockname, &
437 this%param_names(1), &
439 ifno_tagname = trim(idt%tagname)
444 this%mf6_input%component_type, &
445 this%mf6_input%subcomponent_type, &
446 this%ctx%blockname,
'AUXILIARY', &
449 call mem_setptr(period_ifno,
'IFNO', this%mf6_input%mempath)
450 call mem_setptr(period_setting,
'SETTING', this%mf6_input%mempath)
451 call mem_setptr(period_auxname,
'AUXNAME', this%mf6_input%mempath)
452 call mem_setptr(auxnames,
'AUXILIARY', this%mf6_input%mempath)
453 call mem_setptr(aux,
'AUX', this%mf6_input%mempath)
454 nfeatures =
size(aux, 2)
457 do n = 1, this%structarray%count()
458 if (is_auxval(this%structarray%struct_vectors(n)%idt))
then
463 if (sa_icol == 0)
return
465 allocate (handled(nbound))
469 nts = this%structarray%struct_vectors(sa_icol)%ts_strlocs%count()
471 ts_strloc => this%structarray%struct_vectors(sa_icol)%get_ts_strloc(k)
473 ifno = period_ifno(i)
474 if (.not. this%valid_address(ifno, nfeatures, ifno_tagname, i)) cycle
475 auxname = period_auxname(i)
476 jj = find_auxname_index(auxname, auxnames, naux)
478 thisauxname = auxnames(jj)
479 bndelem => aux(jj, ifno)
481 this%mf6_input%subcomponent_name, &
482 'AUX', this%tsmanager, &
483 this%ctx%iprpak, trim(thisauxname))
489 if (handled(i)) cycle
490 setting = period_setting(i)
491 if (trim(setting) /= trim(idt%mf6varname)) cycle
492 ifno = period_ifno(i)
493 if (.not. this%valid_address(ifno, nfeatures, ifno_tagname, i)) cycle
494 auxname = period_auxname(i)
495 jj = find_auxname_index(auxname, auxnames, naux)
497 thisauxname = auxnames(jj)
499 this%mf6_input%subcomponent_name, &
500 'AUX', trim(thisauxname))
501 aux(jj, ifno) = this%structarray%struct_vectors(sa_icol)%dbl1d(i)
507 call this%structarray%struct_vectors(sa_icol)%clear()
518 real(DP),
dimension(:),
pointer,
contiguous :: featarr => null()
519 integer(I4B),
pointer :: nbound => null()
520 integer(I4B),
dimension(:),
allocatable :: row_addr
521 integer(I4B) :: icol, sa_icol, padj, isize
523 if (.not.
allocated(this%subindex_nfeatures))
return
525 call get_isize(
'NBOUND', this%mf6_input%mempath, isize)
526 if (isize < 1)
return
527 call mem_setptr(nbound,
'NBOUND', this%mf6_input%mempath)
528 if (nbound <= 0)
return
531 if (this%ctx%has_setting_dispatch) padj = 1
533 do icol = this%nleading + 1, this%nparam
534 sa_icol = icol + padj
535 if (sa_icol >
size(this%subindex_nfeatures)) cycle
536 if (this%subindex_nfeatures(sa_icol) < 1) cycle
538 idt => this%structarray%struct_vectors(sa_icol)%idt
540 this%structarray%struct_vectors(this%subindex_head_icol(sa_icol))%idt
541 call mem_setptr(featarr, trim(idt%mf6varname), this%mf6_input%mempath)
543 this%resolve_subindex_address( &
544 this%subindex_id_varname, trim(head_idt%mf6varname), &
545 this%subindex_icol(sa_icol), &
546 this%subindex_offsets(sa_icol)%vals, &
547 this%subindex_nfeatures(sa_icol), nbound)
548 call this%structarray%ts_update_indexed( &
549 sa_icol, this%tsmanager, this%mf6_input%subcomponent_name, &
550 this%ctx%iprpak, nbound, row_addr, trim(idt%tagname), featarr)
562 integer(I4B),
pointer :: nbound => null()
563 integer(I4B),
dimension(:, :),
pointer,
contiguous :: cellid => null()
564 integer(I4B),
dimension(:),
pointer,
contiguous :: period_ifno => null()
565 type(characterstringtype),
dimension(:),
pointer,
contiguous :: &
566 period_setting => null()
567 real(DP),
dimension(:),
pointer,
contiguous :: featarr => null()
568 integer(I4B),
dimension(:),
allocatable :: row_addr
569 integer(I4B) :: i, k, isize, ndim
570 character(len=LINELENGTH) :: setting
571 character(len=LENVARNAME) :: dispatch_key
572 character(len=LENVARNAME) :: leading_tag
575 if (.not.
allocated(this%ctx%keystring_items))
return
577 call get_isize(
'NBOUND', this%mf6_input%mempath, isize)
578 if (isize < 1)
return
579 call mem_setptr(nbound,
'NBOUND', this%mf6_input%mempath)
580 if (nbound <= 0)
return
582 call mem_setptr(period_setting,
'SETTING', this%mf6_input%mempath)
587 if (this%ctx%keystring_by_node)
then
588 if (.not.
associated(this%ctx%mshape))
return
589 ndim =
size(this%ctx%mshape)
590 call mem_setptr(cellid,
'CELLID', this%mf6_input%mempath)
592 call mem_setptr(period_ifno, this%ctx%feature_id_varname, &
593 this%mf6_input%mempath)
598 this%mf6_input%component_type, &
599 this%mf6_input%subcomponent_type, &
600 this%ctx%blockname, &
601 this%param_names(1), &
603 leading_tag = trim(lead_idt%tagname)
606 do k = 1,
size(this%ctx%keystring_items)
607 if (.not. this%ctx%keystring_items(k)%idm_managed) cycle
608 if (this%ctx%keystring_items(k)%addr_mode ==
addr_subindex) cycle
609 if (this%ctx%keystring_items(k)%nfeatures < 1) cycle
610 call mem_setptr(featarr, this%ctx%keystring_items(k)%idt%mf6varname, &
611 this%mf6_input%mempath)
616 if (this%ctx%keystring_items(k)%is_body)
then
617 dispatch_key = this%ctx%keystring_items(k)%head_setting_varname
619 dispatch_key = this%ctx%keystring_items(k)%idt%mf6varname
622 allocate (row_addr(nbound))
625 setting = period_setting(i)
626 if (trim(setting) /= trim(dispatch_key)) cycle
628 this%resolve_row_addr(this%ctx%keystring_items(k), i, period_ifno, &
629 cellid, ndim, leading_tag)
631 call this%structarray%ts_update_indexed( &
632 this%ctx%keystring_items(k)%sa_icol, this%tsmanager, &
633 this%mf6_input%subcomponent_name, this%ctx%iprpak, nbound, row_addr, &
634 this%ctx%keystring_items(k)%idt%tagname, featarr)
635 deallocate (row_addr)
651 integer(I4B),
intent(in) :: irow
652 integer(I4B),
dimension(:),
pointer,
contiguous,
intent(in) :: period_ifno
653 integer(I4B),
dimension(:, :),
pointer,
contiguous,
intent(in) :: cellid
654 integer(I4B),
intent(in) :: ndim
655 character(len=*),
intent(in) :: leading_tag
657 integer(I4B) :: ifno, nodeu
660 select case (item%addr_mode)
662 ifno = period_ifno(irow)
663 if (.not. this%valid_address(ifno, item%nfeatures, leading_tag, irow)) &
668 nodeu = cellid(1, irow)
669 else if (ndim == 2)
then
670 nodeu =
get_node(cellid(1, irow), 1, cellid(2, irow), &
671 this%ctx%mshape(1), 1, this%ctx%mshape(2))
673 nodeu =
get_node(cellid(1, irow), cellid(2, irow), cellid(3, irow), &
674 this%ctx%mshape(1), this%ctx%mshape(2), &
677 if (nodeu < 1 .or. nodeu > item%nfeatures)
return
688 character(len=*),
intent(in) :: dimname
689 integer(I4B),
dimension(:),
allocatable :: offsets
690 integer(I4B),
dimension(:),
pointer,
contiguous :: counts_raw => null()
691 integer(I4B),
dimension(:),
pointer,
contiguous :: pkg_ifno => null()
692 integer(I4B),
dimension(:),
allocatable :: counts
693 integer(I4B) :: i, n, running, ndomain
695 call mem_setptr(counts_raw, trim(dimname), this%mf6_input%mempath)
696 call mem_setptr(pkg_ifno,
'PACKAGEDATA_IFNO', this%mf6_input%mempath)
697 ndomain =
size(counts_raw)
698 allocate (counts(ndomain))
700 do i = 1,
size(counts_raw)
702 if (n < 1 .or. n > ndomain) cycle
703 counts(n) = counts_raw(i)
706 allocate (offsets(ndomain))
710 running = running + counts(n)
718 subindex_icol, offsets, nfeatures, nbound) &
723 character(len=*),
intent(in) :: id_mf6varname
724 character(len=*),
intent(in) :: head_mf6varname
725 integer(I4B),
intent(in) :: subindex_icol
726 integer(I4B),
dimension(:),
intent(in) :: offsets
727 integer(I4B),
intent(in) :: nfeatures
728 integer(I4B),
intent(in) :: nbound
729 integer(I4B),
dimension(:),
allocatable :: row_addr
730 integer(I4B),
dimension(:),
pointer,
contiguous :: period_ifno => null()
731 type(characterstringtype),
dimension(:),
pointer,
contiguous :: &
732 period_setting => null()
733 integer(I4B) :: i, ifno, idx_local, nlocal
734 character(len=LINELENGTH) :: setting
735 character(len=LENVARNAME) :: id_tag, idx_tag
737 call mem_setptr(period_ifno, id_mf6varname, this%mf6_input%mempath)
738 call mem_setptr(period_setting,
'SETTING', this%mf6_input%mempath)
739 id_tag = trim(this%structarray%struct_vectors(1)%idt%tagname)
740 idx_tag = trim(this%structarray%struct_vectors(subindex_icol)%idt%tagname)
741 allocate (row_addr(nbound))
744 setting = period_setting(i)
745 if (trim(setting) /= trim(head_mf6varname)) cycle
746 ifno = period_ifno(i)
747 if (ifno < 1 .or. ifno >
size(offsets)) cycle
749 if (ifno <
size(offsets))
then
750 nlocal = offsets(ifno + 1) - offsets(ifno)
752 nlocal = nfeatures - offsets(ifno) + 1
754 idx_local = this%structarray%struct_vectors(subindex_icol)%int1d(i)
755 if (idx_local < 1 .or. idx_local > nlocal)
then
756 write (
errmsg,
'(a,1x,a,1x,i0,1x,a,1x,i0,1x,a,1x,a,1x,i0,a)') &
757 'index', trim(idx_tag), idx_local,
'must be between 1 and', nlocal, &
758 'for', trim(id_tag), ifno,
'.'
762 row_addr(i) = offsets(ifno) + idx_local - 1
774 integer(I4B) :: n, naux
777 if (this%ctx%has_setting_dispatch)
return
779 call this%tsmanager%reset(this%mf6_input%subcomponent_name)
781 if (this%ts_active)
then
782 call get_isize(
'AUXILIARY', this%mf6_input%mempath, naux)
783 if (naux > 0)
call mem_setptr(auxnames,
'AUXILIARY', this%mf6_input%mempath)
784 do n = 1, this%static_loader%ts_sa_count()
785 sa => this%static_loader%get_ts_sa(n)
786 if (
associated(sa))
then
787 call sa%ts_update(this%tsmanager, &
788 this%mf6_input%subcomponent_name, &
789 this%ctx%iprpak, this%input_name, &
790 clear_strlocs=.false., auxname_cst=auxnames)
799 call this%static_loader%cleanup()
801 call this%tsmanager%da()
802 deallocate (this%tsmanager)
803 nullify (this%tsmanager)
805 if (
associated(this%structarray))
then
806 call destructstructarray(this%structarray)
809 call this%ctx%destroy()
810 call this%DynamicPkgLoadType%destroy()
817 integer(I4B) :: icol, sa_icol, nrow_prealloc, nsub, padj
818 logical(LGP) :: has_setting
820 has_setting = this%ctx%has_setting_dispatch
824 if (
associated(this%ctx%maxbound) .and. this%ctx%maxbound > 0)
then
825 nrow_prealloc = this%ctx%maxbound
832 if (has_setting) padj = 1
834 if (has_setting .and. nrow_prealloc < 0)
then
837 this%structarray => &
838 constructstructarray(this%mf6_input, this%nparam + padj, &
839 nrow_prealloc, 0, this%mf6_input%mempath, &
840 this%mf6_input%component_mempath, size_init=64)
842 this%structarray => &
843 constructstructarray(this%mf6_input, this%nparam + padj, &
844 nrow_prealloc, 0, this%mf6_input%mempath, &
845 this%mf6_input%component_mempath)
849 do icol = 1, this%nleading
851 this%mf6_input%component_type, &
852 this%mf6_input%subcomponent_type, &
853 this%ctx%blockname, &
854 this%param_names(icol), this%input_name)
855 call this%structarray%mem_create_vector(icol, idt)
859 if (has_setting)
then
860 sa_icol = this%nleading + 1
861 call this%structarray%mem_create_vector(sa_icol, this%ctx%setting_idt, &
866 do icol = this%nleading + 1, this%nparam
867 sa_icol = icol + padj
869 this%mf6_input%component_type, &
870 this%mf6_input%subcomponent_type, &
871 this%ctx%blockname, &
872 this%param_names(icol), this%input_name)
874 nsub = this%ctx%keystring_items(icol - this%nleading)%head_nbody
877 call this%structarray%mem_create_metadata_vector(sa_icol, idt, &
879 else if (trim(idt%datatype) ==
'STRING')
then
881 call this%structarray%mem_create_vector(sa_icol, idt, &
883 else if (idt%datatype ==
'DOUBLE' .and. &
884 (this%ctx%keystring_items(icol - this%nleading)%idm_managed .or. &
885 this%ctx%keystring_items(icol - this%nleading)%addr_mode == &
889 call this%structarray%mem_create_vector(sa_icol, idt, &
890 varname=idm_input_varname(idt))
892 call this%structarray%mem_create_vector(sa_icol, idt)
This module contains block parser methods.
integer(i4b) function getunit(this)
Get the unit number.
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)
log the closing message
subroutine, public idm_log_header(component, subcomponent, iout)
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.
subroutine destroy(this)
destroy input context object
integer(i4b), parameter, public addr_node
addressed by CELLID
This module contains the LoadMf6FileModule.
subroutine, public get_isize(name, mem_path, isize)
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.
logical function, public remove_existing_link(tsmanager, ii, jj, pkgname, auxorbnd, varname)
Remove an existing timeseries link if it is defined.
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.
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