-
Notifications
You must be signed in to change notification settings - Fork 80
Description
Versions impacted by the bug
All versions up to and including netcdf-java-5.5.3
What went wrong?
Our team is currently preparing to read Grib2 files featuring oceanographic data encoded with ECMWF's second order packing.
However it seems that, while the second order packing type is fully supported by netCDF-Java, the library's read process does not take into account the presence of a bitmap section.
Reading the source code, we think this is because Grib2DataReader.getData50002 method doesn't use the bitmap array (*) (while other packing types like 40 - JPEG2000 do and work perfectly on oceanographic data).
For this reason, we think any attempt to read a Grib2 file featuring oceanographic data encoded using second order packing and a bitmap section will either fail or produce a random array of points.
(*) To be more precise, at the end of the method, the loop converting the data to the return array should be using the GribNumbers.testIsBitSet method (like in Grib2DataReader.getData40 for example)
Thank you for your help.
Relevant stack trace
No response
Relevant log messages
No response
If you have an example file that you can share, please attach it to this issue.
If so, may we include it in our test datasets to help ensure the bug does not return once fixed?
Note: the test datasets are publicly accessible without restriction.
No
Code of Conduct
- I agree to follow the UCAR/Unidata Code of Conduct