19 integer(I4B) :: constant_array_value = 0
20 integer(I4B) :: factor = 1
21 integer(I4B),
dimension(:),
contiguous,
pointer :: int1d => null()
40 integer(I4B),
dimension(:),
contiguous,
target :: int1d
41 character(len=*),
intent(in) :: aname
47 this%array_name = aname
49 call this%read_array()
57 integer(I4B),
dimension(:),
contiguous,
target :: int1d
58 character(len=*),
intent(in) :: aname
59 integer(I4B),
intent(in) :: nlay
60 integer(I4B),
dimension(:),
intent(in) :: layer_shape
63 integer(I4B) :: ncpl, nrow, ncol
64 integer(I4B) :: index_start, index_stop
65 integer(I4B),
dimension(:, :),
contiguous,
pointer :: int2d_ptr
67 ncpl = product(layer_shape)
70 index_stop = index_start + ncpl - 1
71 if (
size(layer_shape) == 2)
then
74 int2d_ptr(1:ncol, 1:nrow) => int1d(index_start:index_stop)
77 call read_int1d(parser, int1d(index_start:index_stop), aname)
79 index_start = index_stop + 1
86 call this%ArrayReaderBaseType%reset_reader()
87 this%constant_array_value = 0
93 this%constant_array_value = this%parser%GetInteger()
99 do i = 1,
size(this%int1d)
100 this%int1d(i) = this%constant_array_value
107 integer(I4B) :: nvals
108 integer(I4B) :: istat
109 nvals =
size(this%int1d)
110 read (this%input_unit, *, iostat=istat, iomsg=
errmsg) &
111 (this%int1d(i), i=1,
size(this%int1d))
113 errmsg =
'Error reading data for array '//trim(this%array_name)// &
123 integer(I4B) :: nvals
124 integer(I4B) :: istat
125 integer(I4B) :: expected_size
129 read (this%input_unit, iostat=istat, iomsg=
errmsg) &
130 (this%int1d(i), i=1,
size(this%int1d))
132 errmsg =
'Error reading data for array '//trim(this%array_name)// &
141 this%factor = this%parser%GetInteger()
147 if (this%factor /= 0)
then
148 do i = 1,
size(this%int1d)
149 this%int1d(i) = this%int1d(i) * this%factor
subroutine, public read_binary_header(locat, iout, arrname, nval)
subroutine, public check_binary_filesize(locat, expected_size, arrname)
integer(i4b), parameter, public binary_int_bytes
integer(i4b), parameter, public binary_header_bytes
array text
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