Re: [idvusers] gridded but rotated netCDF data

  • Subject: Re: [idvusers] gridded but rotated netCDF data
  • From: John Caron <caron@xxxxxxxxxxxxxxxx>
  • Date: Thu, 11 Oct 2007 11:04:20 -0600
To add on to Tom's post:

We actually prefer it if you can give us the projection. We only use 2d lat,lon if we dont have adequate projection info. The supported projections are listed in Appendix F of CF:

(we actually support a few more projections that we havent yet added to that 

Tom Whittaker wrote:
Hi Brian --

The key to this is to have your file conform to CF conventions.  There
is a definition there that does have 2D lat/lon variables, since this
is very common.

From Section 5.2 of the CF conventions document at
is this, which is what it sounds like you are describing.

  xc = 128 ;
  yc = 64 ;
  lev = 18 ;
  float T(lev,yc,xc) ;
    T:long_name = "temperature" ;
    T:units = "K" ;
    T:coordinates = "lon lat" ;
  float xc(xc) ;
    xc:long_name = "x-coordinate in Cartesian system" ;
    xc:units = "m" ;
  float yc(yc) ;
    yc:long_name = "y-coordinate in Cartesian system" ;
    yc:units = "m" ;
  float lev(lev) ;
    lev:long_name = "pressure level" ;
    lev:units = "hPa" ;
  float lon(yc,xc) ;
    lon:long_name = "longitude" ;
    lon:units = "degrees_east" ;
  float lat(yc,xc) ;
    lat:long_name = "latitude" ;
    lat:units = "degrees_north" ;

The thing most people leave out is the "float xc(xc)" and "float
yc(yc)" which is how these variables are identified as "coordinate

Anyway,  if your file is not like this but is "close", then you can
either have the author write files in CF conventions, or use NCML to
"fix up" the metadata.  The NetCDF Tools application has a very handy
tab for this -- you can load the file, select the NCML tab and then
edit the NCML to make the file structure adhere to CF conventions, and
then save the NCML.  You would then point the IDV at the NCML (it
contains a reference to the actual file).

Hope this helps.


On 10/11/07, Brian Blanton <brian_blanton@xxxxxxxxx> wrote:
Hi.  I have gridded (i.e., m X n) data in netCDF files, but the grid is
rotated.  So, the lon/lat variables in the netCDf file are 2-d and not 1-d.

Can I get these into IDV?


Brian O. Blanton
Renaissance Computing Institute
University of North Carolina at Chapel Hill
100 Europa Drive
Suite 540
Chapel Hill, NC, 27517

919-445-9620 (O)
919-445-9669 (F)

idvusers mailing list
For list information, to unsubscribe, visit: