44 integer(I4B) :: blocknum
45 logical(LGP) :: deferred_shape = .false.
46 integer(I4B) :: deferred_size_init = 5
47 character(len=LENMEMPATH) :: mempath
48 character(len=LENMEMPATH) :: component_mempath
50 integer(I4B),
dimension(:),
allocatable :: startidx
51 integer(I4B),
dimension(:),
allocatable :: numcols
79 component_mempath)
result(struct_array)
81 integer(I4B),
intent(in) :: ncol
82 integer(I4B),
intent(in) :: nrow
83 integer(I4B),
intent(in) :: blocknum
84 character(len=*),
intent(in) :: mempath
85 character(len=*),
intent(in) :: component_mempath
89 allocate (struct_array)
92 struct_array%mf6_input = mf6_input
95 struct_array%ncol = ncol
98 struct_array%nrow = nrow
99 if (struct_array%nrow == -1)
then
100 struct_array%nrow = 0
101 struct_array%deferred_shape = .true.
105 if (blocknum > 0)
then
106 struct_array%blocknum = blocknum
108 struct_array%blocknum = 0
112 struct_array%mempath = mempath
113 struct_array%component_mempath = component_mempath
116 allocate (struct_array%struct_vectors(ncol))
117 allocate (struct_array%startidx(ncol))
118 allocate (struct_array%numcols(ncol))
125 deallocate (struct_array%struct_vectors)
126 deallocate (struct_array%startidx)
127 deallocate (struct_array%numcols)
128 deallocate (struct_array)
129 nullify (struct_array)
136 integer(I4B),
intent(in) :: icol
139 integer(I4B) :: numcol
147 if (this%deferred_shape)
then
148 sv%size = this%deferred_size_init
154 select case (idt%datatype)
156 call this%allocate_int_type(sv)
158 call this%allocate_dbl_type(sv)
159 case (
'STRING',
'KEYWORD')
160 call this%allocate_charstr_type(sv)
162 call this%allocate_int1d_type(sv)
167 call this%allocate_dbl1d_type(sv)
170 errmsg =
'IDM unimplemented. StructArray::mem_create_vector &
171 &type='//trim(idt%datatype)
176 this%struct_vectors(icol) = sv
177 this%numcols(icol) = numcol
179 this%startidx(icol) = 1
181 this%startidx(icol) = this%startidx(icol - 1) + this%numcols(icol - 1)
187 integer(I4B) ::
count
188 count =
size(this%struct_vectors)
197 function get(this, idx)
result(sv)
199 integer(I4B),
intent(in) :: idx
209 integer(I4B),
dimension(:),
pointer,
contiguous :: int1d
210 integer(I4B) :: j, nrow
212 if (this%deferred_shape)
then
214 nrow = this%deferred_size_init
215 allocate (int1d(this%deferred_size_init))
219 call mem_allocate(int1d, this%nrow, sv%idt%mf6varname, this%mempath)
236 real(DP),
dimension(:),
pointer,
contiguous :: dbl1d
237 integer(I4B) :: j, nrow
239 if (this%deferred_shape)
then
241 nrow = this%deferred_size_init
242 allocate (dbl1d(this%deferred_size_init))
246 call mem_allocate(dbl1d, this%nrow, sv%idt%mf6varname, this%mempath)
266 if (this%deferred_shape)
then
267 allocate (charstr1d(this%deferred_size_init))
270 sv%idt%mf6varname, this%mempath)
278 sv%charstr1d => charstr1d
289 integer(I4B),
dimension(:, :),
pointer,
contiguous :: int2d
291 integer(I4B),
pointer :: ncelldim, exgid
292 character(len=LENMEMPATH) :: input_mempath
293 character(len=LENMODELNAME) :: mname
296 integer(I4B) :: nrow, n, m
298 if (sv%idt%shape ==
'NCELLDIM')
then
300 if (this%mf6_input%component_type ==
'EXG')
then
302 call mem_setptr(exgid,
'EXGID', this%mf6_input%mempath)
305 if (sv%idt%tagname ==
'CELLIDM1')
then
306 call mem_setptr(charstr1d,
'EXGMNAMEA', input_mempath)
307 else if (sv%idt%tagname ==
'CELLIDM2')
then
308 call mem_setptr(charstr1d,
'EXGMNAMEB', input_mempath)
312 mname = charstr1d(exgid)
316 call mem_setptr(ncelldim, sv%idt%shape, input_mempath)
318 call mem_setptr(ncelldim, sv%idt%shape, this%component_mempath)
321 if (this%deferred_shape)
then
323 nrow = this%deferred_size_init
324 allocate (int2d(ncelldim, this%deferred_size_init))
329 sv%idt%mf6varname, this%mempath)
341 sv%intshape => ncelldim
346 call intvector%init()
348 sv%intvector => intvector
351 call mem_setptr(sv%intvector_shape, sv%idt%shape, this%mempath)
361 real(DP),
dimension(:, :),
pointer,
contiguous :: dbl2d
362 integer(I4B),
pointer :: naux, nseg, nseg_1
363 integer(I4B) :: nseg1_isize, n, m
365 if (sv%idt%shape ==
'NAUX')
then
366 call mem_setptr(naux, sv%idt%shape, this%mempath)
367 call mem_allocate(dbl2d, naux, this%nrow, sv%idt%mf6varname, this%mempath)
379 else if (sv%idt%shape ==
'NSEG-1')
then
381 call get_isize(
'NSEG_1', this%mempath, nseg1_isize)
383 if (nseg1_isize < 0)
then
387 call mem_setptr(nseg_1,
'NSEG_1', this%mempath)
391 call mem_allocate(dbl2d, nseg_1, this%nrow, sv%idt%mf6varname, this%mempath)
402 sv%intshape => nseg_1
404 errmsg =
'IDM unimplemented. StructArray::allocate_dbl1d_type &
405 & unsupported shape "'//trim(sv%idt%shape)//
'".'
413 integer(I4B),
intent(in) :: icol
414 integer(I4B) :: i, j, isize
415 integer(I4B),
dimension(:),
pointer,
contiguous :: p_int1d
416 integer(I4B),
dimension(:, :),
pointer,
contiguous :: p_int2d
417 real(DP),
dimension(:),
pointer,
contiguous :: p_dbl1d
419 character(len=LENVARNAME) :: varname
420 logical(LGP) :: overwrite
423 if (this%struct_vectors(icol)%idt%blockname ==
'SOLUTIONGROUP') &
427 varname = this%struct_vectors(icol)%idt%mf6varname
429 call get_isize(varname, this%mempath, isize)
432 select case (this%struct_vectors(icol)%memtype)
436 call mem_setptr(p_int1d, varname, this%mempath)
440 if (this%nrow > isize)
then
447 p_int1d(i) = this%struct_vectors(icol)%int1d(i)
450 if (isize > this%nrow)
then
452 do i = this%nrow + 1, isize
458 call mem_reallocate(p_int1d, this%nrow + isize, varname, this%mempath)
462 p_int1d(isize + i) = this%struct_vectors(icol)%int1d(i)
467 call mem_allocate(p_int1d, this%nrow, varname, this%mempath)
471 p_int1d(i) = this%struct_vectors(icol)%int1d(i)
476 deallocate (this%struct_vectors(icol)%int1d)
479 this%struct_vectors(icol)%int1d => p_int1d
480 this%struct_vectors(icol)%size = this%nrow
483 call mem_setptr(p_dbl1d, varname, this%mempath)
486 if (this%nrow > isize)
then
491 p_dbl1d(i) = this%struct_vectors(icol)%dbl1d(i)
494 if (isize > this%nrow)
then
495 do i = this%nrow + 1, isize
503 p_dbl1d(isize + i) = this%struct_vectors(icol)%dbl1d(i)
507 call mem_allocate(p_dbl1d, this%nrow, varname, this%mempath)
510 p_dbl1d(i) = this%struct_vectors(icol)%dbl1d(i)
514 deallocate (this%struct_vectors(icol)%dbl1d)
516 this%struct_vectors(icol)%dbl1d => p_dbl1d
517 this%struct_vectors(icol)%size = this%nrow
521 call mem_setptr(p_charstr1d, varname, this%mempath)
524 if (this%nrow > isize)
then
530 p_charstr1d(i) = this%struct_vectors(icol)%charstr1d(i)
533 if (isize > this%nrow)
then
534 do i = this%nrow + 1, isize
540 varname, this%mempath)
542 p_charstr1d(isize + i) = this%struct_vectors(icol)%charstr1d(i)
549 p_charstr1d(i) = this%struct_vectors(icol)%charstr1d(i)
550 call this%struct_vectors(icol)%charstr1d(i)%destroy()
554 deallocate (this%struct_vectors(icol)%charstr1d)
556 this%struct_vectors(icol)%charstr1d => p_charstr1d
557 this%struct_vectors(icol)%size = this%nrow
559 errmsg =
'StructArray::load_deferred_vector &
560 &intvector reallocate unimplemented.'
564 errmsg =
'StructArray::load_deferred_vector &
565 &int2d reallocate unimplemented.'
568 call mem_allocate(p_int2d, this%struct_vectors(icol)%intshape, &
569 this%nrow, varname, this%mempath)
571 do j = 1, this%struct_vectors(icol)%intshape
572 p_int2d(j, i) = this%struct_vectors(icol)%int2d(j, i)
577 deallocate (this%struct_vectors(icol)%int2d)
579 this%struct_vectors(icol)%int2d => p_int2d
580 this%struct_vectors(icol)%size = this%nrow
582 errmsg =
'StructArray::load_deferred_vector &
583 &dbl2d reallocate unimplemented.'
593 integer(I4B) :: icol, j
594 integer(I4B),
dimension(:),
pointer,
contiguous :: p_intvector
595 character(len=LENVARNAME) :: varname
597 do icol = 1, this%ncol
599 varname = this%struct_vectors(icol)%idt%mf6varname
601 if (this%struct_vectors(icol)%memtype ==
mtype_intvec)
then
604 call this%struct_vectors(icol)%intvector%shrink_to_fit()
608 this%struct_vectors(icol)%intvector%size, &
609 varname, this%mempath)
612 do j = 1, this%struct_vectors(icol)%intvector%size
613 p_intvector(j) = this%struct_vectors(icol)%intvector%at(j)
617 call this%struct_vectors(icol)%intvector%destroy()
618 deallocate (this%struct_vectors(icol)%intvector)
619 nullify (this%struct_vectors(icol)%intvector_shape)
620 else if (this%deferred_shape)
then
622 call this%load_deferred_vector(icol)
631 integer(I4B),
intent(in) :: iout
632 integer(I4B) :: j, nts
633 integer(I4B),
dimension(:),
pointer,
contiguous :: int1d
634 character(len=LINELENGTH) :: ts_count_str
639 select case (this%struct_vectors(j)%memtype)
642 this%struct_vectors(j)%idt%tagname, &
645 nts = this%struct_vectors(j)%ts_strlocs%count()
647 write (ts_count_str,
'(i0, " time-series bound entries")') nts
648 call idm_log_var(this%struct_vectors(j)%idt%tagname, &
649 this%mempath, iout, .false., trim(ts_count_str))
652 this%struct_vectors(j)%idt%tagname, &
656 call mem_setptr(int1d, this%struct_vectors(j)%idt%mf6varname, &
658 call idm_log_var(int1d, this%struct_vectors(j)%idt%tagname, &
662 this%struct_vectors(j)%idt%tagname, &
665 nts = this%struct_vectors(j)%ts_strlocs%count()
667 write (ts_count_str,
'(i0, " time-series bound entries")') nts
668 call idm_log_var(this%struct_vectors(j)%idt%tagname, &
669 this%mempath, iout, .false., trim(ts_count_str))
672 this%struct_vectors(j)%idt%tagname, &
683 integer(I4B) :: i, j, k, newsize
684 integer(I4B),
dimension(:),
pointer,
contiguous :: p_int1d
685 integer(I4B),
dimension(:, :),
pointer,
contiguous :: p_int2d
686 real(DP),
dimension(:),
pointer,
contiguous :: p_dbl1d
688 integer(I4B) :: reallocate_mult
695 select case (this%struct_vectors(j)%memtype)
698 if (this%nrow > this%struct_vectors(j)%size)
then
700 newsize = this%struct_vectors(j)%size * reallocate_mult
702 allocate (p_int1d(newsize))
705 do i = 1, this%struct_vectors(j)%size
706 p_int1d(i) = this%struct_vectors(j)%int1d(i)
710 deallocate (this%struct_vectors(j)%int1d)
713 this%struct_vectors(j)%int1d => p_int1d
714 this%struct_vectors(j)%size = newsize
717 if (this%nrow > this%struct_vectors(j)%size)
then
718 newsize = this%struct_vectors(j)%size * reallocate_mult
719 allocate (p_dbl1d(newsize))
721 do i = 1, this%struct_vectors(j)%size
722 p_dbl1d(i) = this%struct_vectors(j)%dbl1d(i)
725 deallocate (this%struct_vectors(j)%dbl1d)
727 this%struct_vectors(j)%dbl1d => p_dbl1d
728 this%struct_vectors(j)%size = newsize
732 if (this%nrow > this%struct_vectors(j)%size)
then
733 newsize = this%struct_vectors(j)%size * reallocate_mult
734 allocate (p_charstr1d(newsize))
736 do i = 1, this%struct_vectors(j)%size
737 p_charstr1d(i) = this%struct_vectors(j)%charstr1d(i)
738 call this%struct_vectors(j)%charstr1d(i)%destroy()
741 deallocate (this%struct_vectors(j)%charstr1d)
743 this%struct_vectors(j)%charstr1d => p_charstr1d
744 this%struct_vectors(j)%size = newsize
747 if (this%nrow > this%struct_vectors(j)%size)
then
748 newsize = this%struct_vectors(j)%size * reallocate_mult
749 allocate (p_int2d(this%struct_vectors(j)%intshape, newsize))
751 do i = 1, this%struct_vectors(j)%size
752 do k = 1, this%struct_vectors(j)%intshape
753 p_int2d(k, i) = this%struct_vectors(j)%int2d(k, i)
757 deallocate (this%struct_vectors(j)%int2d)
759 this%struct_vectors(j)%int2d => p_int2d
760 this%struct_vectors(j)%size = newsize
764 errmsg =
'IDM unimplemented. StructArray::check_reallocate &
765 &unsupported memtype.'
771 subroutine read_param(this, parser, sv_col, irow, timeseries, iout, auxcol)
774 integer(I4B),
intent(in) :: sv_col
775 integer(I4B),
intent(in) :: irow
776 logical(LGP),
intent(in) :: timeseries
777 integer(I4B),
intent(in) :: iout
778 integer(I4B),
optional,
intent(in) :: auxcol
779 integer(I4B) :: n, intval, numval, icol
780 character(len=LINELENGTH) :: str
781 character(len=:),
allocatable :: line
782 logical(LGP) :: preserve_case
784 select case (this%struct_vectors(sv_col)%memtype)
787 if (sv_col == 1 .and. this%blocknum > 0)
then
789 this%struct_vectors(sv_col)%int1d(irow) = this%blocknum
792 this%struct_vectors(sv_col)%int1d(irow) = parser%GetInteger()
795 if (this%struct_vectors(sv_col)%idt%timeseries .and. timeseries)
then
796 call parser%GetString(str)
797 if (
present(auxcol))
then
802 this%struct_vectors(sv_col)%dbl1d(irow) = &
803 this%struct_vectors(sv_col)%read_token(str, this%startidx(sv_col), &
806 this%struct_vectors(sv_col)%dbl1d(irow) = parser%GetDouble()
809 if (this%struct_vectors(sv_col)%idt%shape /=
'')
then
811 if (sv_col == this%ncol)
then
812 call parser%GetRemainingLine(line)
813 this%struct_vectors(sv_col)%charstr1d(irow) = line
818 preserve_case = (.not. this%struct_vectors(sv_col)%idt%preserve_case)
819 call parser%GetString(str, preserve_case)
820 this%struct_vectors(sv_col)%charstr1d(irow) = str
824 numval = this%struct_vectors(sv_col)%intvector_shape(irow)
827 intval = parser%GetInteger()
828 call this%struct_vectors(sv_col)%intvector%push_back(intval)
832 do n = 1, this%struct_vectors(sv_col)%intshape
833 this%struct_vectors(sv_col)%int2d(n, irow) = parser%GetInteger()
837 do n = 1, this%struct_vectors(sv_col)%intshape
838 if (this%struct_vectors(sv_col)%idt%timeseries .and. timeseries)
then
839 call parser%GetString(str)
840 icol = this%startidx(sv_col) + n - 1
841 this%struct_vectors(sv_col)%dbl2d(n, irow) = &
842 this%struct_vectors(sv_col)%read_token(str, icol, n, irow)
844 this%struct_vectors(sv_col)%dbl2d(n, irow) = parser%GetDouble()
856 logical(LGP),
intent(in) :: timeseries
857 integer(I4B),
intent(in) :: iout
858 character(len=*),
intent(in) :: input_name
859 integer(I4B) :: irow, j
860 logical(LGP) :: endofblock
866 if (this%deferred_shape)
then
873 call parser%GetNextLine(endofblock)
877 else if (this%deferred_shape)
then
879 this%nrow = this%nrow + 1
881 call this%check_reallocate()
885 if (this%deferred_shape)
then
888 if (irow > this%nrow)
then
889 write (
errmsg,
'(a,i0,a)') &
890 'Input error: line count exceeds input dimension. Expected rows=', &
898 call this%read_param(parser, j, irow, timeseries, iout)
902 call this%memload_vectors()
905 call this%log_structarray_vars(iout)
931 iout, input_name)
result(irow)
936 logical(LGP),
intent(in) :: timeseries
937 integer(I4B),
intent(in) :: nleading
938 integer(I4B),
intent(in) :: iout
939 character(len=*),
intent(in) :: input_name
941 logical(LGP) :: endofblock, is_keyword_dispatch
942 character(len=LINELENGTH) :: keyword
943 integer(I4B) :: icol, found_col, last_set_col, setting_icol
949 if (nleading + 1 <= this%ncol)
then
950 if (trim(this%struct_vectors(nleading + 1)%idt%tagname) ==
'SETTING')
then
951 setting_icol = nleading + 1
956 if (this%deferred_shape)
then
961 call parser%GetNextLine(endofblock)
964 if (this%deferred_shape)
then
965 this%nrow = this%nrow + 1
966 call this%check_reallocate()
971 if (.not. this%deferred_shape)
then
972 if (irow > this%nrow)
then
973 write (
errmsg,
'(a,i0,a)') &
974 'Input error: keystring row count exceeds pre-allocated maxbound=', &
983 do icol = 1, nleading
984 call this%read_param(parser, icol, irow, .false., iout)
988 call parser%GetString(keyword)
993 do icol = nleading + 1, this%ncol
994 if (icol == setting_icol) cycle
995 if (trim(this%struct_vectors(icol)%idt%tagname) == trim(keyword))
then
1001 if (found_col < 1)
then
1002 write (
errmsg,
'(a,a,a)') &
1003 'Unrecognized keystring keyword "', trim(keyword), &
1004 '" in PERIOD block.'
1011 if (setting_icol > 0)
then
1012 this%struct_vectors(setting_icol)%charstr1d(irow) = &
1013 trim(this%struct_vectors(found_col)%idt%mf6varname)
1017 is_keyword_dispatch = &
1018 (this%struct_vectors(found_col)%idt%datatype ==
'KEYWORD')
1020 if (is_keyword_dispatch)
then
1024 this%struct_vectors(found_col)%charstr1d(irow) = trim(keyword)
1025 last_set_col = found_col
1028 do icol = found_col + 1, &
1029 found_col + this%struct_vectors(found_col)%nsubmembers
1030 if (icol > this%ncol)
exit
1031 call this%read_param(parser, icol, irow, timeseries, iout)
1036 call this%read_param(parser, found_col, irow, timeseries, iout)
1037 last_set_col = found_col
1041 do icol = nleading + 1, this%ncol
1042 if (icol == setting_icol) cycle
1043 if (icol >= found_col .and. icol <= last_set_col) cycle
1044 select case (this%struct_vectors(icol)%memtype)
1046 this%struct_vectors(icol)%dbl1d(irow) =
dnodata
1048 this%struct_vectors(icol)%charstr1d(irow) =
''
1053 call this%memload_vectors()
1056 call this%log_structarray_vars(iout)
1064 integer(I4B),
intent(in) :: inunit
1065 integer(I4B),
intent(in) :: iout
1066 integer(I4B) :: irow, ierr
1067 integer(I4B) :: j, k
1068 integer(I4B) :: intval, numval
1069 character(len=LINELENGTH) :: fname
1070 character(len=*),
parameter :: fmtlsterronly = &
1071 "('Error reading LIST from file: ',&
1072 &1x,a,1x,' on UNIT: ',I0)"
1075 if (this%deferred_shape)
then
1076 errmsg =
'IDM unimplemented. StructArray::read_from_binary deferred shape &
1077 ¬ supported for binary inputs.'
1088 select case (this%struct_vectors(j)%memtype)
1090 read (inunit, iostat=ierr) this%struct_vectors(j)%int1d(irow)
1092 read (inunit, iostat=ierr) this%struct_vectors(j)%dbl1d(irow)
1094 errmsg =
'List style binary inputs not supported &
1095 &for text columns, tag='// &
1096 trim(this%struct_vectors(j)%idt%tagname)//
'.'
1100 numval = this%struct_vectors(j)%intvector_shape(irow)
1104 read (inunit, iostat=ierr) intval
1105 call this%struct_vectors(j)%intvector%push_back(intval)
1110 do k = 1, this%struct_vectors(j)%intshape
1112 read (inunit, iostat=ierr) this%struct_vectors(j)%int2d(k, irow)
1116 do k = 1, this%struct_vectors(j)%intshape
1118 read (inunit, iostat=ierr) this%struct_vectors(j)%dbl2d(k, irow)
1133 inquire (unit=inunit, name=fname)
1134 write (
errmsg, fmtlsterronly) trim(adjustl(fname)), inunit
1139 if (irow == this%nrow)
exit readloop
1148 call this%memload_vectors()
1152 call this%log_structarray_vars(iout)
1164 subroutine ts_update(this, tsmanager, subcomp_name, iprpak, input_name, &
1165 auxname_cst, clear_strlocs)
1168 character(len=*),
intent(in) :: subcomp_name
1169 integer(I4B),
intent(in) :: iprpak
1170 character(len=*),
intent(in) :: input_name
1172 optional :: auxname_cst
1173 logical(LGP),
optional,
intent(in) :: clear_strlocs
1176 real(DP),
pointer :: bndElem
1177 character(len=LENBOUNDNAME) :: boundname
1178 integer(I4B) :: m, n, iboundname
1179 logical(LGP) :: do_clear
1182 if (
present(clear_strlocs)) do_clear = clear_strlocs
1187 if (this%struct_vectors(m)%idt%mf6varname ==
'BOUNDNAME')
then
1194 if (.not. this%struct_vectors(m)%idt%timeseries) cycle
1195 do n = 1, this%struct_vectors(m)%ts_strlocs%count()
1196 ts_strloc => this%struct_vectors(m)%get_ts_strloc(n)
1198 select case (this%struct_vectors(m)%memtype)
1200 bndelem => this%struct_vectors(m)%dbl1d(ts_strloc%row)
1202 ts_strloc%structarray_col, bndelem, &
1203 subcomp_name,
'BND', tsmanager, &
1205 if (
associated(tslink))
then
1206 tslink%Text = this%struct_vectors(m)%idt%mf6varname
1207 if (iboundname > 0)
then
1209 this%struct_vectors(iboundname)%charstr1d(ts_strloc%row)
1210 tslink%BndName = boundname
1214 if (.not.
present(auxname_cst)) cycle
1215 if (.not.
associated(auxname_cst)) cycle
1216 bndelem => this%struct_vectors(m)%dbl2d(ts_strloc%col, ts_strloc%row)
1218 ts_strloc%structarray_col, bndelem, &
1219 subcomp_name,
'AUX', tsmanager, &
1221 if (
associated(tslink))
then
1222 tslink%Text = auxname_cst(ts_strloc%col)
1223 if (iboundname > 0)
then
1225 this%struct_vectors(iboundname)%charstr1d(ts_strloc%row)
1226 tslink%BndName = boundname
1231 if (do_clear)
call this%struct_vectors(m)%clear()
This module contains block parser methods.
This module contains simulation constants.
integer(i4b), parameter linelength
maximum length of a standard line
integer(i4b), parameter lenmodelname
maximum length of the model name
real(dp), parameter dnodata
real no data constant
integer(i4b), parameter lenvarname
maximum length of a variable name
integer(i4b), parameter lenboundname
maximum length of a bound name
integer(i4b), parameter izero
integer constant zero
real(dp), parameter dzero
real constant zero
integer(i4b), parameter lenmempath
maximum length of the memory path
This module contains the Input Data Model Logger Module.
This module defines variable data types.
character(len=lenmempath) function create_mem_path(component, subcomponent, context)
returns the path to the memory object
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.
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
character(len=linelength) idm_context
This module contains the StructArrayModule.
integer(i4b) function count(this)
subroutine mem_create_vector(this, icol, idt)
create new vector in StructArrayType
type(structarraytype) function, pointer, public constructstructarray(mf6_input, ncol, nrow, blocknum, mempath, component_mempath)
constructor for a struct_array
integer(i4b) function read_from_binary(this, inunit, iout)
read from binary input to fill the StructArrayType
subroutine read_param(this, parser, sv_col, irow, timeseries, iout, auxcol)
subroutine memload_vectors(this)
load deferred vectors into managed memory
integer(i4b) function read_from_parser_keystring(this, parser, timeseries, nleading, iout, input_name)
read keystring period block into the StructArrayType
subroutine set_pointer(sv, sv_target)
subroutine allocate_dbl1d_type(this, sv)
allocate dbl1d input type
subroutine ts_update(this, tsmanager, subcomp_name, iprpak, input_name, auxname_cst, clear_strlocs)
link time-series strings in this struct array to a tsmanager
subroutine check_reallocate(this)
reallocate local memory for deferred vectors if necessary
subroutine load_deferred_vector(this, icol)
subroutine allocate_dbl_type(this, sv)
allocate double input type
subroutine allocate_charstr_type(this, sv)
allocate charstr input type
integer(i4b) function read_from_parser(this, parser, timeseries, iout, input_name)
read from the block parser to fill the StructArrayType
subroutine allocate_int_type(this, sv)
allocate integer input type
subroutine log_structarray_vars(this, iout)
log information about the StructArrayType
subroutine, public destructstructarray(struct_array)
destructor for a struct_array
subroutine allocate_int1d_type(this, sv)
allocate int1d input type
type(structvectortype) function, pointer get(this, idx)
This module contains the StructVectorModule.
@, public mtype_intvec
intvector column
@, public mtype_dbl
dbl1d column
@, public mtype_int2d
int2d (NCELLDIM) column
@, public mtype_int
int1d column
@, public mtype_dbl2d
dbl2d (NAUX/NSEG) column
@, public mtype_str
charstr1d column
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 ...
type for structured array
derived type for generic vector
derived type which describes time series string field