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

Home » Public Forums » archive » problem in reading unformatted data from a FORTRAN file
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: problem in reading unformatted data from a FORTRAN file [message #91246 is a reply to message #91244] Mon, 22 June 2015 07:23 Go to previous messageGo to previous message
Paul Van Delst[1] is currently offline  Paul Van Delst[1]
Messages: 1157
Registered: April 2002
Senior Member
What error did you get?


On 06/22/15 09:48, DK wrote:
> The output in the FORTRAN file wrote like this:
>
> -------------------------
>
> real, x(10, 722, 144)
>
> open(21, file='result.dat', form='unformatted')
> ...(some calculation about x)
> write(21) x
> close(21)
>
> -------------------------
>
>
> and reading program in IDL is like this:
>
> ----------------------------------
>
> data=fltarr(10,722,144)
> openr, lun, 'result.dat', /get_lun, /f77_unformatted
> readu, lun, data
> free_lun,lun
>
> --------------------------------
>
>
> But it looks like these code cannot read the file "result.dat" into
the array "data". Where is the problem? Thanks!
>
>
>
>
>
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: size(/dimen) that automatically fills in extra dimensions
Next Topic: Inconsistency in the position of the text() function

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

Current Time: Wed Oct 08 20:04:38 PDT 2025

Total time taken to generate the page: 0.00389 seconds