Re: Grib2 / Re: Supporting other data formats

Hi Rob:

Actually, this should work, i believe its a bug, ill let you know when we have a fix.

BTW, a workaround is to open the file locally in the IDV, and then copy the generated index (*.gbx) onto the web server in the same directory. This will speed access up, so its a good thing to do anyway.


Rob Cermak wrote:

cc: to IDV group

the THREDDS package using nj22 already handles grib2 as well as grib1. the
grib decoders are written in java and can be used as a seperate package.
the IDV now can read grib1 and grib2 files directly.

robb...

Hmmm, I've got IDV 1.2b2 and tried to point it via URL (directly) to
a grib1 and grib2 file and fails.  I would be wonderful to have IDV work
directly on grib1 and grib2 files.
[cermak@glasgow bin]$ uname -a
Linux glasgow.ims.uaf.edu 2.6.8.1-10mdk #1 Wed Sep 8 17:00:52 CEST 2004 i686 Intel(R) Pentium(R) 4 CPU 2.26GHz unknown GNU/Linux

Java = j2re1.4.2_06, its old

Rob

Grib1:
 http://ak.aoos.org/ldm2/conduit/nam_216/20050415/1200/PRMSL_000

Grib2:
 http://ak.aoos.org/ldm2/conduit/gfs_000/20050415/1200/PMSL_000

Open data source via web -> Grid files (netCDF/GRIB/OPeNDAP). Looks like the grid types are correctly detected.

Grib1, error:
java.lang.NullPointerException
        at ucar.nc2.iosp.grib.Index2NC.open(Index2NC.java:20)
        at 
ucar.nc2.iosp.grib.Grib1ServiceProvider.open(Grib1ServiceProvider.java:75)
        at ucar.nc2.NetcdfFile.<init>(NetcdfFile.java:645)
        at ucar.nc2.NetcdfFile.open(NetcdfFile.java:263)
        at ucar.nc2.NetcdfFile.open(NetcdfFile.java:212)
        at ucar.nc2.dataset.NetcdfDataset.openFile(NetcdfDataset.java:226)
        at ucar.nc2.dataset.NetcdfDataset.openDataset(NetcdfDataset.java:125)
        at ucar.nc2.dataset.grid.GridDataset.open(GridDataset.java:65)
        at ucar.nc2.dataset.grid.GridDataset.factory(GridDataset.java:74)
        at 
ucar.unidata.data.grid.GeoGridDataSource.doMakeDataSet(GeoGridDataSource.java:266)
        at 
ucar.unidata.data.grid.GeoGridDataSource.getDataset(GeoGridDataSource.java:283)
        at 
ucar.unidata.data.grid.GeoGridDataSource.doMakeDataChoices(GeoGridDataSource.java:297)
        at 
ucar.unidata.data.DataSourceImpl.getDataChoices(DataSourceImpl.java:959)
        at ucar.unidata.data.DataManager.createDataSource(DataManager.java:850)
        at 
ucar.unidata.idv.IntegratedDataViewer.createDataSource(IntegratedDataViewer.java:1280)
        at 
ucar.unidata.idv.IntegratedDataViewer.makeDataSource(IntegratedDataViewer.java:1218)
        at 
ucar.unidata.idv.IntegratedDataViewer.handleAction(IntegratedDataViewer.java:1075)
        at ucar.unidata.idv.DefaultIdv.handleAction(DefaultIdv.java:111)
        at 
ucar.unidata.idv.IntegratedDataViewer.handleAction(IntegratedDataViewer.java:1022)
        at ucar.unidata.idv.chooser.UrlChooser.loadURLInner(UrlChooser.java:176)
        at ucar.unidata.idv.chooser.UrlChooser.loadURL(UrlChooser.java:152)
        at ucar.unidata.idv.chooser.UrlChooser.access$000(UrlChooser.java:72)
        at ucar.unidata.idv.chooser.UrlChooser$1.run(UrlChooser.java:191)
        at ucar.unidata.util.Misc$2.run(Misc.java:773)

grib2 error:

java.lang.NullPointerException
        at ucar.nc2.iosp.grib.Index2NC.open(Index2NC.java:20)
        at 
ucar.nc2.iosp.grib.Grib2ServiceProvider.open(Grib2ServiceProvider.java:75)
        at ucar.nc2.NetcdfFile.<init>(NetcdfFile.java:645)
        at ucar.nc2.NetcdfFile.open(NetcdfFile.java:263)
        at ucar.nc2.NetcdfFile.open(NetcdfFile.java:212)
        at ucar.nc2.dataset.NetcdfDataset.openFile(NetcdfDataset.java:226)
        at ucar.nc2.dataset.NetcdfDataset.openDataset(NetcdfDataset.java:125)
        at ucar.nc2.dataset.grid.GridDataset.open(GridDataset.java:65)
        at ucar.nc2.dataset.grid.GridDataset.factory(GridDataset.java:74)
        at 
ucar.unidata.data.grid.GeoGridDataSource.doMakeDataSet(GeoGridDataSource.java:266)
        at 
ucar.unidata.data.grid.GeoGridDataSource.getDataset(GeoGridDataSource.java:283)
        at 
ucar.unidata.data.grid.GeoGridDataSource.doMakeDataChoices(GeoGridDataSource.java:297)
        at 
ucar.unidata.data.DataSourceImpl.getDataChoices(DataSourceImpl.java:959)
        at ucar.unidata.data.DataManager.createDataSource(DataManager.java:850)
        at 
ucar.unidata.idv.IntegratedDataViewer.createDataSource(IntegratedDataViewer.java:1280)
        at 
ucar.unidata.idv.IntegratedDataViewer.makeDataSource(IntegratedDataViewer.java:1218)
        at 
ucar.unidata.idv.IntegratedDataViewer.handleAction(IntegratedDataViewer.java:1075)
        at ucar.unidata.idv.DefaultIdv.handleAction(DefaultIdv.java:111)
        at 
ucar.unidata.idv.IntegratedDataViewer.handleAction(IntegratedDataViewer.java:1022)
        at ucar.unidata.idv.chooser.UrlChooser.loadURLInner(UrlChooser.java:176)
        at ucar.unidata.idv.chooser.UrlChooser.loadURL(UrlChooser.java:152)
        at ucar.unidata.idv.chooser.UrlChooser.access$000(UrlChooser.java:72)
        at ucar.unidata.idv.chooser.UrlChooser$1.run(UrlChooser.java:191)
        at ucar.unidata.util.Misc$2.run(Misc.java:773)