This archive contains answers to questions sent to Unidata support through mid-2025. Note that the archive is no longer being updated. We provide the archive for reference; many of the answers presented here remain technically correct, even if somewhat outdated. For the most up-to-date information on the use of NSF Unidata software and data services, please consult the Software Documentation first.
Brian Etheridge wrote:
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.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 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