16 integer(I4B) :: constant_array_value = 0
17 integer(I4B) :: factor = 1
18 integer(I4B),
dimension(:),
contiguous,
pointer :: int1d => null()
37 integer(I4B),
dimension(:),
contiguous,
target :: int1d
38 character(len=*),
intent(in) :: aname
44 this%array_name = aname
46 call this%read_array()
54 integer(I4B),
dimension(:),
contiguous,
target :: int1d
55 character(len=*),
intent(in) :: aname
56 integer(I4B),
intent(in) :: nlay
57 integer(I4B),
dimension(:),
intent(in) :: layer_shape
60 integer(I4B) :: ncpl, nrow, ncol
61 integer(I4B) :: index_start, index_stop
62 integer(I4B),
dimension(:, :),
contiguous,
pointer :: int2d_ptr
64 ncpl = product(layer_shape)
67 index_stop = index_start + ncpl - 1
68 if (
size(layer_shape) == 2)
then
71 int2d_ptr(1:ncol, 1:nrow) => int1d(index_start:index_stop)
74 call read_int1d(parser, int1d(index_start:index_stop), aname)
76 index_start = index_stop + 1
83 call this%ArrayReaderBaseType%reset_reader()
84 this%constant_array_value = 0
90 this%constant_array_value = this%parser%GetInteger()
96 do i = 1,
size(this%int1d)
97 this%int1d(i) = this%constant_array_value
104 integer(I4B) :: nvals
105 integer(I4B) :: istat
106 nvals =
size(this%int1d)
107 read (this%input_unit, *, iostat=istat, iomsg=
errmsg) &
108 (this%int1d(i), i=1,
size(this%int1d))
110 errmsg =
'Error reading data for array '//trim(this%array_name)// &
120 integer(I4B) :: nvals
121 integer(I4B) :: istat
123 read (this%input_unit, iostat=istat, iomsg=
errmsg) &
124 (this%int1d(i), i=1,
size(this%int1d))
126 errmsg =
'Error reading data for array '//trim(this%array_name)// &
135 this%factor = this%parser%GetInteger()
141 if (this%factor /= 0)
then
142 do i = 1,
size(this%int1d)
143 this%int1d(i) = this%int1d(i) * this%factor
subroutine, public read_binary_header(locat, iout, arrname, nval)
This module contains block parser methods.
subroutine read_ascii(this)
subroutine read_binary(this)
subroutine apply_factor(this)
subroutine reset_reader(this)
subroutine set_constant(this)
subroutine set_factor(this)
subroutine, public read_int1d(parser, int1d, aname)
subroutine fill_constant(this)
subroutine, public read_int1d_layered(parser, int1d, aname, nlay, layer_shape)
subroutine, public read_int2d(parser, int2d, aname)
This module defines variable data types.
This module contains simulation methods.
subroutine, public store_error(msg, terminate)
Store an error message.
subroutine, public store_error_unit(iunit, terminate)
Store the file unit number.
This module contains simulation variables.
character(len=maxcharlen) errmsg
error message string