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

Home » Public Forums » archive » Reading fortran
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Reading fortran [message #64046 is a reply to message #45591] Mon, 01 December 2008 07:39 Go to previous messageGo to previous message
Norbert Hahn is currently offline  Norbert Hahn
Messages: 46
Registered: May 2003
Member
"R.G. Stockwell" <nothanks@noemail.com> wrote:

>
> "Andres" <panblosky@gmail.com> wrote in message
> news:2ee32df7-524b-4cc9-901f-40ec0fe87288@f40g2000pri.google groups.com...
>> Hi all,
>>
>> perhaps it is an easy one, but I am having problems reading the
>> following in IDL:
>>
>> open(11,file='file_name',form='unformatted')
>> rewind 11
>> do i3=1,np3
>> write(11) ((delta(i1,i2,i3),i1=1,np1),i2=1,np2)
>> end do
>> close(11)
>
> wild guess, but i'd say it looks like you are writing
> a 3D array in binary, and i'll guess it is a floating point number array.

Fortran writes the number of bytes of each logical record implicitly to
the data, so ...
> so in IDL do
>
> datain = fltarr(np1, np2, np3)
>
> openr,1,'filename'

openr,1,'filename', /F77_UNFORMATTED

should be added to make IDL aware of the additional bytes in the records.

Norbert
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: REGRESS Question
Next Topic: Re: IDL Programming Techniques, 3rd edition

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

Current Time: Fri Oct 10 08:05:29 PDT 2025

Total time taken to generate the page: 1.99906 seconds