[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Grib-to-NetCDF problems



Hi,

i currently try to read existing Grib-1 and Grib-2 data and create files in
the NetCDF format from these data. I ran into some problems:

1.) Most of my Grib files are not supported yet, as the center etc. is not
configured (missing table entries). I tried to add the tables myself, but
then i got an IOException:

GribServiceProvider open = 2004092000_000_2011_200.grib
Unknown Grid Type : 255
java.io.IOException: Negative seek offset
        at java.io.RandomAccessFile.seek(Native Method)
        at ucar.unidata.io.RandomAccessFile.read_(RandomAccessFile.java:399)
        at ucar.unidata.io.RandomAccessFile.seek(RandomAccessFile.java:214)
        at
ucar.unidata.io.RandomAccessFile.skipBytes(RandomAccessFile.java:486)
        at ucar.grib.grib1.Grib1Input.scan(Grib1Input.java:113)
        [...]

2. Trying to read am ECMWF Grib-1 (which should work by default), resulted
in an NegativeArraySizeException:

GribServiceProvider open = ecmwf_00-003
java.lang.NegativeArraySizeException
        at
ucar.grib.grib1.Grib1GridDefinitionSection.<init>(Grib1GridDefinitionSection
.java:160)
        at ucar.grib.grib1.Grib1Input.scan(Grib1Input.java:92)
        at
ucar.nc2.iosp.grib.Grib1ServiceProvider.open(Grib1ServiceProvider.java:50)
        [...]

Any suggestions on these problems?
Besides: i could not find the source code for the classes in grib.jar. Are
they open source? If yes: Where can i get the sources? If no: which license
di you use here?

Thanks for you effort.


Regards,
 Holger Janssen