[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: a couple of questions (fwd)



> Date: Friday, January 17, 2003 10:11 AM -0800
> From: Linda Hill <address@hidden>
> To: Ben Domenico <address@hidden>
> Subject: a couple of questions

Hi Linda,

You asked:

> I also have another question. This came up because I'm preparing an
> introductory tutorial on georeferencing in digital libraries and it related
> to conventions for ordering lat/long coordinates (or long/lat - which is
> the question). The usual verbal order is lat/long, I believe - at least in
> my experience. But, the Geography Markup Language (GML) has specified
> long/lat which maps directly to the x/y of graphs. I was just looking at
> the description of Panoply
> http://www.giss.nasa.gov/tools/panoply/format.html which says
> 
> "First, does the Variable have at least two dimensions, and are the last
> two dimensions latitude and longitude (in that order)?"
> 
> This seems to say that Panoply is counting on the coordinates to be in
> lat/long order within netCDF. So, my question is whether there is a netCDF
> convention that specifes coordinate order? and, if so, is that lat/long?

Generic netCDF does not specify any particular order for latitude or
longitude coordinates, but you should give each coordinate variable at
least "unit" and "long_name" attributes to document their meaning.  In
the document " Writing NetCDF Files: Best Practices"

  http://www.unidata.ucar.edu/packages/netcdf/BestPractices.html

we recommend the use of one of the existing set of netCDF conventions,
if practical:

  http://www.unidata.ucar.edu/packages/netcdf/conventions.html

Some of these do specify a preferred order for latitude and longitude
dimensions, for example the COARDS conventions specify:


  Order of dimensions:

  If any or all of the dimensions of a variable have the
  interpretations of "date or time" (a.k.a. "T"), "height or depth"
  (a.k.a. "Z"), "latitude" (a.k.a. "Y"), or "longitude" (a.k.a. "X")
  then those dimensions should appear in the relative order T, then Z,
  then Y, then X in the CDL definition corresponding to the file.

This means the longitude dimension would be varying most rapidly, then
the latitude dimension, then the height, and so on.  The later CF
conventions loosened this rule to permit other orders for the coordinate
dimensions.

Applications such as Panoply may require more restrictive conventions
or order for coordinates than the CF conventions, just because
programming an application to handle all possible orders is difficult.
However, there are some netCDF applications that handle arbitrary
coordinate orders.

--Russ

_____________________________________________________________________

Russ Rew                                         UCAR Unidata Program
address@hidden                     http://www.unidata.ucar.edu