[netcdfgroup] 2D coordinate variables

Hello,

While converting HDF-EOS2 files to files that can be read by netCDF4, I got
a question regarding coordinate variables. There is a variable that has two
coordinate variables: XDim and YDim. I found the following webpage defines
what coordinate variable is, but it doesn't mention my case.

https://www.unidata.ucar.edu/software/netcdf/guidec/guidec-7.html#HEADING7-6
7

The problem is that longitude and latitude cannot be represented as 1d
array. To handle this, I referred to CF convention which can be found from

http://cf-pcmdi.llnl.gov/documents/cf-conventions/1.1/cf-conventions.html#id
2617539

According to the above convention, I generated a file like the following:

  group: Data Fields {
    dimensions:
        XDim = 2400 ;
        YDim = 2400 ;
    variables:
        ubyte Snow_Cover_Daily_Tile(YDim, XDim) ;
           Snow_Cover_Daily_Tile:coordinates = "lon lat" ;
        double lon(YDim, XDim) ;
        double lat(YDim, XDim) ;

It seems this file is a legal netcdf4 file in that ncdump in the latest
netCDF4 snapshot does not reject this file. However, I'm wondering if netcdf
library recognizes "coordinates" attribute and relates "lon" and "lat" as
coordinate variables. If netcdf library does not recognize them, is there
any standardized way to inject two-dimensional coordinate variables? I read
one draft written in 1997, but I have no idea if this draft was published.


Thanks,
Choonghwan Lee



  • 2008 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the netcdfgroup archives: