Using gradsnc to read the CCSM3 POP (ocean) data
Don Hooper
hoop at COLORADO.EDU
Thu Feb 9 11:02:23 EST 2006
Ching-Yee,
I'm going to make a long quote from:
http://grads.iges.org/grads/gadoc/SDFdescriptorfile.html
to answer your question:
"Reading NetCDF or HDF-SDS Files with GrADS
Data files in the NetCDF and HDF-SDS file formats are called self-describing
files (SDF) because the data and metadata are packaged together in the same
file. In order to read the data in these file formats, GrADS needs to extract
a certain amount of required metadata in order to place the data in the
internal 4-dimensional lon/lat/lev/time grid space. There are three ways to
do this:
1. Use the sdfopen command to open the file. This requires the least amount
of effort for the user -- simply provide the file name (or an OPeNDAP URL) and
GrADS does the rest. If you use the sdfopen command to open your SDF, then all
the metadata in the file that GrADS requires must conform to the COARDS
conventions. If sdfopen doesn't work, then ...
2. Use the xdfopen command to open the file. This requires a bit more
effort for the user -- you must write a data descriptor file to supplement or
replace the existing metadata so that GrADS can understand it. The syntax of
the descriptor file used with xdfopen is not exactly the same as that used in
a descriptor file for gridded binary data -- see the documentation page for
further details. The xdfopen command provides access to a greater number of
SDFs, including many that do not conform to any known standard. If xdfopen
doesn't work, then ...
3. Use the open command to open the file. This requires the user to write
a complete GrADS descriptor file to override all the metadata in the file.
Guidance for composing a complete descriptor file for NetCDF or HDF-SDS data
files is given below. Please also see the reference page Elements of a Data
Descriptor File. The 'open' interface is recommended if you are templating
large numbers of data files together, the data are pre-projected onto a
non-lat/lon grid, the variables in the file have different undefined values,
or the variables in the file have been packed in a non-standard way."
I made this long quote not only because it answers your question (and
from a reputable source, no less), but because I really like how these
words make the point succintly. Any way that I might have put it off
the cuff would likely not measure up to Jennifer Adam's fine words.
-Hoop
> From owner-gradsusr at LIST.CINECA.IT Thu Feb 9 08:43:22 2006
>
> Dear grads users,
> I would like to use gradsnc to read the CCSM3 ocean model (POP) output data
> (in netCDF format), but when I use sdfopen the data, it said that "SDF file
> has no discernable X coordinate."
> I know there are CCSM3 POP output data that are placed at PCMDI/IPCC website
> which are also in netCDF format, but accessible via gradsnc (sdfopen).
>
> Does anyone have any suggestions on how to use gradsnc to read the data?
>
> Thank you in advance.
>
> Ching-Yee
More information about the gradsusr
mailing list