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

Home » Public Forums » archive » Re: Quick array question
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: Quick array question [message #21686 is a reply to message #21679] Wed, 13 September 2000 00:00 Go to previous message
Liam E. Gumley is currently offline  Liam E. Gumley
Messages: 378
Registered: January 2000
Senior Member
Ricardo Fonseca wrote:
> How does IDL store arrays in memory, does it use c style ordering or fortran
> style ordering?
>
> Here's my problem, I wrote a fortran program that writes a binary file to
> disk with an array (nx,ny,nz). Now when I read that file should I do
>
> data = fltarr(nx,ny,nz)
> readu, unit, data
>
> or should I do
>
> data = fltarr(nz,ny,nx)
> readu, unit, data
>
> and convert it later?

IDL uses FORTRAN-style ordering for arrays in memory. If you wrote the
array in FORTRAN with dimensions (nx, ny, nz), then read it in IDL with
dimensions (nx, ny, nz).

Cheers,
Liam.
http://cimss.ssec.wisc.edu/~gumley
[Message index]
 
Read Message
Read Message
Previous Topic: Re: String/integer use in variable definitions
Next Topic: Re: Odd string/index problem

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

Current Time: Mon Apr 27 00:40:08 PDT 2026

Total time taken to generate the page: 0.56003 seconds