Problem with GridDataset
Brian Etheridge
Brian.Etheridge at lostwax.com
Mon Apr 2 03:54:10 MDT 2007
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
More information about the netcdfgroup
mailing list