Unidata - To provide the data services, tools, and cyberinfrastructure leadership that advance Earth system science, enhance educational opportunities, and broaden participation. Unidata
         
  advanced  
 

Re: NetCDF metadata and selected data variables.

Brian Etheridge wrote:

Hi,
I am reading in a netcdf file and applying subsetting and reduction criteria. I am trying to get my head around the fact that a variable can be based on less than the full set of available coordinate variables. For example, in a FOAM netcdf file I am looking at there are depth, lat and lon coordinate variables and a number of data variables. One such variable is called ICEC and it is recorded at only lat and lon.

My question is, if I am creating an output netcdf file which is going to contain just the ICEC variable what should I output in the global metadata? Should I output all three coordinate variables? What shape should they be? What shape should they be when I include another variable which is based on different coordinate variables and has different shape?

Thanks
Brian

You need to match the coordinate variables exactly with what the data variable needs. If there are multiple coordinate systems, you must write different coordinate variables for each.

You might want to look at some of the established conventions, especially COARDS and CF-1, at:

http://my.unidata.ucar.edu/content/software/netcdf/conventions.html


 
 
  Contact Us     Site Map     Search     Terms and Conditions     Privacy Policy     Participation Policy
 
National Science Foundation (NSF) UCAR Community Programs   Unidata is a member of the UCAR Community Programs, is managed by the University Corporation for Atmospheric Research, and is sponsored by the National Science Foundation.
P.O. Box 3000     Boulder, CO 80307-3000 USA     Tel: 303-497-8643     Fax: 303-497-8690