RE: Problem with GridDataset

We have tracked down the problem we encountered to the fact that we were
missing a conventions attribute in the output netcdf file:

Conventions = "CF-1.0";

This meant that we were inadvertantly defaulting to some other
convention which output our lat and long dimensions as GeoY and GeoX
instead of 'lat' and 'lon'.  Following on from that the GridDataset
could not create GeoGrid entries.

So, now it is fixed.

Thanks for your help.
Brian

-----Original Message-----
From: John Caron [mailto:caron@xxxxxxxxxxxxxxxx] 
Sent: 03 April 2007 02:24
To: Brian Etheridge
Cc: netcdfgroup@xxxxxxxxxxxxxxxx
Subject: Re: Problem with GridDataset

ncdump will dump any valid netcdf file.

A GridDataset must have a coordinate system recognized by the Netcdf
Java library, for example, by being a valid CF or COARDS file. This can
be a subtle problem to diagnose, it can depend on global attributes,
etc. Did the original file have Grids in it?

You could try running it through here:

  http://motherlode.ucar.edu:8080/thredds/cdmValidate.html

and see if the results are helpful.

Or look at it in the ToolsUI program (coordinate system Tab) and see
what the INFO button tells you.

 
http://www.unidata.ucar.edu/content/software/netcdf-java/v2.2/webstart/i
ndex.html0

Brian Etheridge wrote:
> Hi,
> I am using the NetCDF data format and utility library
> (netcdfUI-2.2.16.jar) to transfer weather data across the web and to 
> render a weather map image in a web page.  I have an application which

> can render the data correctly, however, certain data extracts are 
> failing when I try to use a*** ucar.nc2.dataset.grid.GridDataset. * 
> Here's the code:
> 
> NetcdfDataset nc = NetcdfDataset.openDataset(location);
> GridDataset gd = new GridDataset(nc);
> Iterator it = gd.getGrids().iterator();
> while (it.hasNext()) {                 
>         GeoGrid gg = (GeoGrid)it.next();
>         etc...
> }
> 
> The problem is that there are are no GeoGrids available in the 
> GridDataset, so the code does go into the iteration, and there should
be.
> 
> This problem could be the result of the way I am constructing the 
> NetCDF file because there is a complex subset and reduction mechanism 
> being used to extract a portion of the original NetCDF data provided 
> by the UK Meteorological Office.  Thus, I am quite confident that the 
> original NetCDF file is correct.
> 
> I am able to render the NetCDF data in both ncdump and ncbrowse and it

> looks ok.
> 
> What could be missing in the NetCDF file which would allow it to look 
> ok in ncdump and ncbrowse but that would prevent GeoGrids being 
> produced from a GridDataset of the same data?
> 
> Any assistance most gratefully received.
> 
> Thanks
> Brian
> 

==============================================================================
To unsubscribe netcdfgroup, visit:
http://www.unidata.ucar.edu/mailing-list-delete-form.html
==============================================================================


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