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

Question about netCDF perl examples



Hi Heiko,

A netCDF user who was looking at your simple_xy_wr.pl perl example from

  http://www.unidata.ucar.edu/software/netcdf/examples/programs/

found this comment confusing:

# note that ncdump uses fortran order, while perl/PDL uses C order indices
# data(x,y) in ncdump switches to data(y,x) in perl

The CDL output of ncdump actually uses C order (last dimension varying
fastest).  I think PDL may use Fortran order (first dimension varying
fastest), at least according to this document:

   http://search.cpan.org/~dhunt/PDL-NetCDF-0.92/netcdf.pd

where it says:

   ... the 'put' function will write variables in FORTRAN order (as
   before) and will reverse the dimension names so they fit this
   order

I'm leaving your example alone, but if you want to clarify or change
the comment, please let me know.  Thanks!

--Russ