[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

20010525: How to read arrays correctly



Stefan,

>Date: Fri, 25 May 2001 10:22:09 +0200
>From: Stefan Maehlmann <address@hidden>
>Organization: Aerodynamisches Institut Aachen
>To: Steve Emmerson <address@hidden>
>Subject: Re: 20010523: How to read arrays correctly
>Keywords: 200105231132.f4NBWZp12260

The above message contained the following:

> this means that i have to know if the .nc file is written with the netcdf 
> fortran of c interface, because the sequence the data are stored is not 
> compatible. Is this right?

No. You do not need to know how the netCDF file was created in order to
read it. The elements of an array in a netCDF file are always stored in
the same order as the elements of the in-memory array -- regardless of
whether the C or Fortran API is used to access the data. The innermost
(i.e. most rapidly varying) dimension is always the innermost dimension
in both C and Fortran.

I suggest that you carefully examine the examples in the email message
that I previously referenced.

> ----------------------------------
>            Stefan Maehlmann               Email:   address@hidden 
> Aerodynamisches Institut der RWTH-Aachen  WWW: http://www.aia.rwth-aachen.de
>       Wuellnerstr. zw. 5 u. 7             Ftp:  ftp://ftp.aia.rwth-aachen.de
>       D-52062 Aachen, Germany   Phone: +49-241-80-5426 Fax: +49-241-8888-257
> ----------------------------------------------------------------------------
> !!!!!!!!!!!!!!  Sending unsolicited commercial e-mail (UCE)  to this address
> !Legal Notice!  is indication of your consent to pay me $120/hour for 1 hour
> !!!!!!!!!!!!!!  minimum for professional proofreading& technical assessment.

Regards,
Steve Emmerson   <http://www.unidata.ucar.edu>