comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » opening/reading binary data
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
opening/reading binary data [message #7188] Fri, 04 October 1996 00:00
rawlins is currently offline  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
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Powell's ghost
Next Topic: Re: "Cannot allocate colormap entry" problem with Digital Unix 4.0

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Fri Oct 10 16:09:15 PDT 2025

Total time taken to generate the page: 0.72169 seconds