148 integer(I4B),
intent(in) :: iu, iout
149 integer(I4B),
intent(in) :: jj, ii
150 integer(I4B),
dimension(jj, ii),
intent(inout) :: iarr
151 character(len=*),
intent(in) :: aname
152 integer(I4B),
intent(in) :: ndim
153 integer(I4B),
intent(in) :: k
156 integer(I4B) :: i, iclose, iconst, iprn, j, locat, ncpl, ndig
158 logical :: prowcolnum
159 character(len=100) :: prfmt
160 integer(I4B) :: istat
161 character(len=30) :: arrname
162 character(len=MAXCHARLEN) :: ermsgr
164 2
format(/, 1x, a,
' = ', i0,
' FOR LAYER ', i0)
165 3
format(/, 1x, a,
' = ', i0)
168 call read_control_int(iu, iout, aname, locat, iconst, iclose, iprn)
180 write (iout, 2) trim(aname), iconst, k
182 write (iout, 3) trim(aname), iconst
185 elseif (locat > 0)
then
188 read (locat, *, iostat=istat, iomsg=ermsgr) (iarr(j, i), j=1, jj)
190 arrname = adjustl(aname)
191 errmsg =
"Error reading data for array '"//trim(arrname)// &
192 "'. "//trim(adjustl(ermsgr))
193 call store_error(errmsg)
194 call store_error_unit(locat)
197 iarr(j, i) = iarr(j, i) * iconst
200 if (iclose == 1)
then
206 call read_binary_header(locat, iout, aname, nval)
207 isok = check_binary_size(nval, 0,
size(iarr), aname, locat)
210 read (locat, iostat=istat, iomsg=ermsgr) (iarr(j, i), j=1, jj)
212 arrname = adjustl(aname)
213 errmsg =
"Error reading data for array '"//trim(arrname)// &
214 "'. "//trim(adjustl(ermsgr))
215 call store_error(errmsg)
216 call store_error_unit(locat)
219 iarr(j, i) = iarr(j, i) * iconst
223 if (iclose == 1)
then
229 if (iprn >= 0 .and. locat /= 0)
then
230 prowcolnum = (ndim == 3)
231 call build_format_int(iprn, prfmt, prowcolnum, ncpl, ndig)
232 call print_array_int(iarr, aname, iout, jj, ii, k, prfmt, ncpl, &