[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: netCDF and complex numbers
- Subject: Re: netCDF and complex numbers
- Date: Tue, 19 Nov 1996 11:18:58 -0700
Piotr,
Whoops, I wrote:
> From FORTRAN, you should just be able to access complex arrays directly
> this way, without any kind of skipping, since the storage order for a
> complex array is with the real and imaginary parts of each value in
> successive locations. Thus from FORTRAN with the above structure, you
> should be able to read all eight complex values into a single complex
> array with one call to NCVGT:
>
> COMPLEX C(8)
> INTEGER NCID, VARID, RCODE
> ...
> CALL NCVGT(NCID, VARID, 1, 8, C, RCODE)
>
> and similarly for higher-dimensional arrays.
but it's not quite that transparent. To get all 16 real values for the
8 complex numbers, you need to
CALL NCVGT(NCID, VARID, 1, 16, C, RCODE)
--Russ
_____________________________________________________________________
Russ Rew UCAR Unidata Program
address@hidden http://www.unidata.ucar.edu