Re: [netcdfgroup] 2D coordinate variables

First off, I must say that I use NetCDF for Java; however, the basic
guidelines still apply.  To make sure that applications recognize the
structure of your data file, it is important to use the CF conventions
-- and this includes units.  One of the biggest issues I have here is
people not knowing what valid unit names and abbreviations are.  If
you put the wrong specificaiton in your file for some important
variable either the netcdf or the application may not understand.  For
example, just using the name "lon" is not sufficient without naming
the unit as "degrees_east" (or whatever is appropriate.

I should also add that John Caron (Netcdf java guru) has been working
hard to allow the Java library to directly read HDF4 and HDF5 files,
which might help alleviate the need to convert the file formats.....as
long as the HDF files were put together something like the CF-style
conventions, of course.    I also often use the NCML to "correct"
problems with such files (just using the NetCDF  toolsUI.jar file to
first generate the NCML and then I hand-edit it and save it).

One other test you can do is see if the file will open and display in
the IDV -- this (evolving) toolkit/application from Unidata is
becoming the application of choice for display and analysis.

Hope that helps.

Best regards,

tom

On Fri, Apr 4, 2008 at 11:20 AM, Choonghwan Lee <cholee@xxxxxxxxxxxx> wrote:
> Thank you for correcting my mistake. I forgot to make XDim and YDim
>  coordinate variables.
>
>  However, my question still remains. Regardless of this modification, ncdump
>  can open and dump data. However, I don't know if this is standardized way
>  and netCDF4 recognizes "lon" and "lat".
>
>  Thanks,
>  Choonghwan Lee
>
>
>
>
>  -----Original Message-----
>  From: tomw.ssec@xxxxxxxxx [mailto:tomw.ssec@xxxxxxxxx] On Behalf Of Tom
>  Whittaker
>  Sent: Thursday, April 03, 2008 6:47 PM
>  To: Choonghwan Lee
>  Cc: netcdfgroup@xxxxxxxxxxxxxxxx
>  Subject: 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
>
>



-- 
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: