[Thread Prev][Thread Next][Index]

Problem with dimensions in variables.

Dear Ferret users,

I've hit a problem with trying to get Ferret to read my netCDF file. The
problem relates to the COARDS standard which appears to conflict with the
netCDF documentation.

I have a set of tracers in my model which are defined in the netCDF file as:

        float   tracers(ntrcr,time,theta,nface);

where nface is the no. of grid cells, theta is the no. of model levels and
time is the unlimited dimension. ntrcr is the no. of tracers which can vary
from run to run.

Now my reading of the COARDS standard is that this is correct, as the
convention document specifically says that, "If it is necessary to create a
netCDF file with more than 4 dimensions it is recommended that the
additional dimension(s) be added "to the left" of the space and time
dimensions as represented in CDL. For example : float

However, if time is the unlimited dimension, then this is wrong as netCDF
files must have the unlimited dimension as the leftmost (ie the slowest
varying). See section 2.2 in the netCDF guide. ncgen complains and refuses
to generate any code.

If I change it around to, what to me is a more natural ordering:
    float tracers(time,ntrcr,theta,nface);

then netCDF is happy but now Ferret complains:

    yes? set data/format=cdf out19941220_0000.nc
     *** NOTE: unsupported ordering of axes in variable tracers
     *** NOTE: The default ordering will be used

I'm new to netCDFs and Ferret but this looks like a problem with the COARDS

I could obviously declare each tracer separately, but as these change from
run to run, it makes it inconvenient and when we load > 50 tracers, the
netCDF code would be enormous.  I suspect this might be the only way
forward, but I'd welcome comments and suggestions from anyone that's come
across this before.


Dr. Glenn Carver, Senior Research Associate    Phone: +44 (1223) 336524
Centre for Atmospheric Science,                Fax:   +44 (1223) 336473
Cambridge University, Chemistry Dept.,    Glenn.Carver@atm.ch.cam.ac.uk
Lensfield Road, Cambridge, CB2 1EW, UK    www.atm.ch.cam.ac.uk/~glenn/

         "Genius is one percent inspiration and ninety nine
          percent perspiration"   Thomas Edison.

[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / PMEL / TMAP

Contact Us | Privacy Policy | Disclaimer | Accessibility Statement