Reputation: 33
I have been attempting to decode a GRIB2 file from the CMC-HRDPS model (https://dd.weather.gc.ca/model_hrdps/continental/grib2/12/000/CMC_hrdps_continental_TMP_TGL_2_ps2.5km_2020061412_P000-00.grib2 to be specific), and when attempting to decode it with WGRIB2, it gives me the following error: 1 [main] wgrib2 12312 exception::handle: Exception: STATUS_STACK_OVERFLOW
. When attempting to use the file in the Java library GRIB2Tools, the following exception is thrown.
Data Representation Template Number 5.40 not implemented.
Exception in thread "main" java.lang.NullPointerException
at com.ph.grib2tools.grib2file.GribSection7.readSection(GribSection7.java:43)
at com.ph.grib2tools.grib2file.GribSection7.readData(GribSection7.java:38)
at com.ph.grib2tools.grib2file.RandomAccessGribFile.importFromStream(RandomAccessGribFile.java:45)
at canada.drawReflMap.DrawCSVPoints.main(DrawCSVPoints.java:43)
Both of these methods work perfectly fine when I use files from NOAA, for example HRRR or GFS model runs. However, this error seems to be present in all Environment Canada GRIB2 files that I have tried. Is there some other tool that I need to use or some other source from which I need to download the data?
Upvotes: 1
Views: 328
Reputation: 11
Tested with current version of wgrib2.
Template number 5.40 means the grib file is encoded using jpeg2000. Wgrib2 uses jasper to decode jpeg2000, and you need an updated jasper library. Most wgrib2 executables include jasper, so you need a newer version of wgrib2 (probably 11/2015+).
Upvotes: 1