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

Home » Public Forums » archive » Re: Read & write data files b/w IDL & Fortran 90
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: Read & write data files b/w IDL & Fortran 90 [message #39009] Wed, 14 April 2004 13:56 Go to previous message
Paul Van Delst[1] is currently offline  Paul Van Delst[1]
Messages: 1157
Registered: April 2002
Senior Member
bridgemat wrote:
> Hey, thanks Paul! I'll give it a try. My actual data is all float/real
> kind of stuff, so I hopefully wouldn't have this problem there. I was
> just trying to see if I could do it with an "easy" case, but I guess
> simple isn't always easy! :)

Hello,

Best thing is to present the case that is causing the problem.

You're right, though. You shouldn't have the problem I rabbited on about with regular
floats - assuming you have the default declarations in IDL, e.g.

x = 0.0

and Fortran90,

REAL :: x
x = 0.0

If you have either

; IDL
x = 0.0d

or

; Fortran90
INTEGER, PARAMETER :: dp = SELECTED_REAL_KIND( 15 )
REAL( dp ) :: x
x = 0.0_dp

but not both, then the same problem may be occurring.

BTW, I read/write datafiles in IDL and write/read them in Fortran90 all the time (both the
sequential and direct unfromatted variety). Never had any problems - as long as I'm on
the same system. Otherwise you may have byte-sex issues, i.e. reading files created on a
little-endian system (PC,Alpha) on a big-endian one (IBM,SGI,Sun,HP,...) or vice-versa.

paulv
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: How to rebin complex array?
Next Topic: processor for idl on MoinMoin

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

Current Time: Wed Oct 08 15:59:50 PDT 2025

Total time taken to generate the page: 0.00900 seconds