This archive contains answers to questions sent to Unidata support through mid-2025. Note that the archive is no longer being updated. We provide the archive for reference; many of the answers presented here remain technically correct, even if somewhat outdated. For the most up-to-date information on the use of NSF Unidata software and data services, please consult the Software Documentation first.
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