NOTICE: This version of the NSF Unidata web site (archive.unidata.ucar.edu) is no longer being updated.
Current content can be found at unidata.ucar.edu.

To learn about what's going on, see About the Archive Site.

Re: [netcdfgroup] 2D coordinate variables

If I am not mistaken, you need to define your variable XDim and YDim
as the "coordinate variables", such that the ncdump (or equivalent)
shows:

XDim(XDim);
YDim(YDim);

See section 5.2 of the CF 1 conventions in the document you referenced.

Hope that helps.

tom
On Thu, Apr 3, 2008 at 4:59 PM, Choonghwan Lee <cholee@xxxxxxxxxxxx> wrote:
> 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
>
>  _______________________________________________
>  netcdfgroup mailing list
>  netcdfgroup@xxxxxxxxxxxxxxxx
>  For list information or to unsubscribe,  visit: 
> http://www.unidata.ucar.edu/mailing_lists/
>



-- 
Tom Whittaker
University of Wisconsin-Madison
Space Science & Engineering Center (SSEC)
Cooperative Institute for Meteorological Satellite Studies (CIMSS)
1225 W. Dayton Street
Madison, WI 53706 USA
ph: +1 608 262 2759


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