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
problem in reading unformatted data from a FORTRAN file [message #91244] Mon, 22 June 2015 06:48 Go to previous message
DK is currently offline  DK
Messages: 12
Registered: June 2015
Junior Member
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 09:19:36 PDT 2025

Total time taken to generate the page: 0.00393 seconds