[Thread Prev][Thread Next][Index]

Re: axis order when useing SAVE?



Hi Crystal,
This is a non-standard netCDF file. The coordinate axes (dimensions) in a netcdf file must have unique names. If the file does not have enough information or encounters non-standard axis ordering, then Ferret will use the dimensions in the order in which they are encountered. This lets you open and look at files which do not meet the standards and perhaps fix them.

The CF conventions that Ferret adheres to for reading NetCDF files is at

http://www.cgd.ucar.edu/cms/eaton/cf-metadata/CF-1.0.html

And the description of coordinate variables and grids can be found at
http://www.cgd.ucar.edu/cms/eaton/cf-metadata/CF-1.0.html#grids

To see what Ferret is doing with the SAVE statements, look at the header information of your NetCDF file with ncdump -h.

yes? save/file=my_file.nc Var_a
yes? spawn ncdump -h my_file.nc

! are you redefining axis abc here?

yes? save/append/file=my_file.nc Var_b
yes? spawn ncdump -h my_file.nc

I think you'll see that coordinate variable abc keeps the direction it had when the file is first written. I would suggest using unique names for the axes within Ferret, and if you want to change the names for use in another application, then you could edit the file using NCO operators after exiting Ferret.

Ansley

Gene-Hua Crystal Ng wrote:

Hi,

How can I save 2 variables to a netCDF file that have grids with the same
axis describing two different axes (e.g. x and y axis)?

For example, I have Var_a defined on a grid with "abc" as the X axis.
I also have Var_b defined on a grid with "abc" as the Y axis. I then use
the following to try to save both to file:

save/file=my_file.nc Var_a
save/append/file=my_file.nc Var_b

Ferret allows me to do this without any error message. However, when I
then try to USE my_file.nc, I get the following message:

*** NOTE: unsupported ordering of axes in variable VAR_B
*** NOTE: The default ordering will be used

When I then look at the data in the file with ferret, everything looks
fine, but I know something isn't right because the model I'm trying to
input the data file to (CLM) gives an error when trying to read the file.

I tried using the command qualifier /order=y with SAVE but am not having
any luck.

Thanks,
Crystal







[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / PMEL / TMAP

Contact Us | Privacy Policy | Disclaimer | Accessibility Statement