-
Notifications
You must be signed in to change notification settings - Fork 179
GRIB1 without Grid Definition NullPointer #39
Comments
Hi Cameron: ucar.grib.* is deprecated and has been removed in 4.4. All versions of 4.3+ use ucar.nc2.grib.* However, Im not sure that your case is being handled correctly in later versions. Do you have a sample file with a missing GDS ? John |
Hi John I've uploaded a small example GRIB1 file that doesn't specify GDS here: |
Seems to be working in 4.3. Apparently we have a number of predefined NCEP grids, and #24 is one of them. |
OTOH, doesnt particularly look correct. let me know what you think, or send me a picture of what it should look like. |
Converting to use ucar.nc2.grib.* now, so perhaps that will resolve the issue, but I could submit a fix for the deprecated code if you'd like? |
if youd like, we will incorporate; as i said, its been removed in 4.4 |
In grib/src/main/java/ucar/grib/grib1/Grib1Data.java, "gdsv" doesn't get set if the GRIB file does not contain a Grid Definition Section, so will throw a NullPointerException further down:
(on line 136:)
new Grib1BinaryDataSection(raf, decimalScale, bms, gdsv.getScanMode(), gdsv.getNx(), gdsv.getNy() );
This could potentially be solved by using the alternate Grib1BinaryDataSection constructor when gdsv is null
The text was updated successfully, but these errors were encountered: