[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
970812: ncdump output order for fortran
- Subject: 970812: ncdump output order for fortran
- Date: Tue, 12 Aug 97 14:54:19 -0600
Michael,
> To: address@hidden
> From: Michael Watts <address@hidden>
> Subject: bug in ncdump
> Organization: NASA/ARC
> Keywords: 199708121910.NAA09780
In the above message, you wrote:
> I think there is a bug in ncdump. When I create a variable
>
> var(dim1,dim2,dim3)
>
> using C and use ncdump to look at it, it shows up correctly but when I use
> ncdump -b fortran it still shows up as var(dim1,dim2,dim3) even though in
> the fortran code I have to the indexes like var(dim3,dim2,dim1) to read it
> correctly. I know fortran and C save in different order but ncdump should
> reflect the correct dimension order based on the language you request.
> This cost our project a few days as we were taking the ncdump order as
> correct and not checking the dim order in the variable. I know that wasnt
> good proceedure but I still think ncdump should reflect the language you
> request.
>
> Thanks,
> Mike Watts
You raise an interesting point. I'll forward your suggestion to the
ncdump(1) developer.
I note, however, the following description of the "-b lang" option in
the ncdump(1) manual page:
-b lang
A brief annotation in the form of a CDL comment (text beginning with
the characters ``//'') will be included in the data section of the
output for each `row' of data, to help identify data values for mul-
tidimensional variables. If lang begins with `C' or `c', then C
language conventions will be used (zero-based indices, last dimension
varying fastest). If lang begins with `F' or `f', then Fortran
language conventions will be used (one-based indices, first dimension
varying fastest). In either case, the data will be presented in the
same order; only the annotations will differ. This option is useful
for browsing through large volumes of multidimensional data.
Regards,
Steve Emmerson <http://www.unidata.ucar.edu>