opening/reading binary data [message #7188] |
Fri, 04 October 1996 00:00 |
rawlins
Messages: 4 Registered: August 1996
|
Junior Member |
|
|
Hi All,
I'm somewhat of a novice with IDL, and am having some trouble reading
a data file stored in binary mode. The data file is the etopo5
elevation data. We run a Sun Sparc machine with SunOS 5.4 (UNIX)
The FORTRAN open and read statements that work for
this file are:
open (13, file = '/usr2/home/rawlins/Global/dem/etopo5.dat',
$ access = 'direct', recl = nlonnod*2)
read (13, rec=i) (demval(i,j), j = 1, nlonnod)
in an i loop.
In IDL I did:
IDL>openr,1,'Global/dem/etopo5.dat',f77_unformatted
IDL>dat=fltarr(540,4320)
IDL>readu,1,dat
which caused no errors. But when I printed out the first value in the
array:
IDL>print,dat(0,0)
I got: -5.90914e+28
Obviously not a reasonable elevation. Is there something I'm
missing??????
Thanks for any help!
-Michael Rawlins
Department of Geography
University of Delaware
|
|
|