161 integer(I4B),
intent(in) :: iu, iout
162 integer(I4B),
intent(in) :: jj, ii
163 integer(I4B),
dimension(jj, ii),
intent(inout) :: iarr
164 character(len=*),
intent(in) :: aname
165 integer(I4B),
intent(in) :: ndim
166 integer(I4B),
intent(in) :: k
169 integer(I4B) :: i, iclose, iconst, iprn, j, locat, ncpl, ndig
171 logical :: prowcolnum
172 character(len=100) :: prfmt
173 integer(I4B) :: istat
174 character(len=30) :: arrname
175 character(len=MAXCHARLEN) :: ermsgr
177 2
format(/, 1x, a,
' = ', i0,
' FOR LAYER ', i0)
178 3
format(/, 1x, a,
' = ', i0)
181 call read_control_int(iu, iout, aname, locat, iconst, iclose, iprn)
193 write (iout, 2) trim(aname), iconst, k
195 write (iout, 3) trim(aname), iconst
198 elseif (locat > 0)
then
201 read (locat, *, iostat=istat, iomsg=ermsgr) (iarr(j, i), j=1, jj)
203 arrname = adjustl(aname)
204 errmsg =
"Error reading data for array '"//trim(arrname)// &
205 "'. "//trim(adjustl(ermsgr))
206 call store_error(errmsg)
207 call store_error_unit(locat)
210 iarr(j, i) = iarr(j, i) * iconst
213 if (iclose == 1)
then
219 call read_binary_header(locat, iout, aname, nval)
220 isok = check_binary_size(nval, 0,
size(iarr), aname, locat)
223 read (locat, iostat=istat, iomsg=ermsgr) (iarr(j, i), j=1, jj)
225 arrname = adjustl(aname)
226 errmsg =
"Error reading data for array '"//trim(arrname)// &
227 "'. "//trim(adjustl(ermsgr))
228 call store_error(errmsg)
229 call store_error_unit(locat)
232 iarr(j, i) = iarr(j, i) * iconst
236 if (iclose == 1)
then
242 if (iprn >= 0 .and. locat /= 0)
then
243 prowcolnum = (ndim == 3)
244 call build_format_int(iprn, prfmt, prowcolnum, ncpl, ndig)
245 call print_array_int(iarr, aname, iout, jj, ii, k, prfmt, ncpl, &