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.
Hi Tom, Sorry for the delay getting back to you on this. Besides adding a "coordinates" attribute to the data variables, you should also add a "Conventions" global attribute with the value "CF-1.5". The CDM is dealing with a number of conventions and the default behaviors (if a convention is not specified) can sometimes cause the CDM to not correctly understand the coordinate system. The initial problem was CDM support for the COARDS and CF support for recognizing coordinates by the units of a variable. Adding the "coordinates" attribute gets you past this issue and opening the dataset as a grid feature type looks fine. However, if you look at the dataset in the ToolsUI "CoordSys" tab, you will see that the variable with units "hPa" still shows up as a coordinate axis and not a data variable. By specifying CF conventions with the "Conventions" attribute, the correct coordinate system is recognized by the various CDM layers. Hope that helps. Ethan Ethan Davis wrote: > Tom Whittaker wrote: > > We are creating a netCDF file of grids. One of the variables in the > > file has units of "hPa". This variable (grid) does not show up in the > > list of valid Fields in the IDV Field Selector. If the units are > > changed to "1" then the grid shows up. It is the only grid in the > > file with hPa units, and I note when inspecting this in the ToolsUI, > > it is tagged as being a "coordinate axis", but it is otherwise never > > referenced by other 2D variables in the file. > > > > If I use NcML to add a "coordinates" attribute (with value "Latitude > > Longitude") to this pressure variable, then it also shows up in the > > Field Selector just fine. The person generating the file did not > > include the "coordinates" attribute for any of the other 2D variables > > because they displayed without difficulty. > > > The file is available (for about a week) at: > > ftp://ftp.ssec.wisc.edu/pub/ssec/tomw/foo.zip > > With 2D lat/lon variables without "coordinates" attributes, it has > to use units or standard names to identify the coordinate variables. > In this case, it doesn't know not to include the "hPa" variable as a > coordinate variable. > > So, my guess is that it will require a "coordinate" attribute to work. > But, I've grabbed the file and will take a closer look later today or > tomorrow. Ticket Details =================== Ticket ID: AGD-574507 Department: Support netCDF Java Priority: Normal Status: Closed