Matthew Hanna wrote:
Hello!  Please forgive my lack of technical terminology and such.  I 
am new to this NetCDF stuff.  I am trying to write a utility to 
convert our in-house data files used for storing data about water 
velocity, temperature and salinity to NetCDF.  The data is organized 
in grids.  My employer has asked me to keep the NetCDF file compatible 
with Navo NetCDF which follows the COARDS convention.  I have done 
well with the regular grids until now.  My problem is that the grid I 
am now considering is not a regular grid.  Before, I would store the 
latitude numbers in a coordinate variable and the longitude in another 
coordinate variable.  The grid was formed by intersecting these 
coordinates.  Now my grid is irregular -- few, if any, longitudes or 
latitudes are the same.  They still form a grid but not a nice easy 
grid.  How should I store something like this?  If you need better 
details please let me know and I will try to be more specific.
 
Thanks!
Matthew Hanna
Hi Mathew:
The COARDS conventions are restricted to lat/lon 1D coordinate 
variables. Grids that are on a projection coordinate system (eg Lambert, 
Stereographic, etc) need 2D lat/lon coordinates, eg lat(x, y), lon(x,y). 
Typically, they are still regular on the projection plane. The best 
thing is to include everything in the netcdf file: 1) the "natural" 
projection coordinates as 1D coordinate variables, 2) the 2D lat/lon 
coordinates, and 3) the projection info that maps between the two.
The CF Conventions extend COARDS to handle, among other things, 
projection coordinates. I would recommend that you use them if possible:
 http://www.cgd.ucar.edu/cms/eaton/cf-metadata/
They are a bit daunting in length, but i would be happy to help if you 
want to send me more info.