grib2: consolidate scaled value decoding - #1605
Conversation
|
This looks great - thank you for the cleanup! We do have one new failing test in our extended test suite. In netcdf-java/cdm-test/src/test/java/ucar/nc2/iosp/grib/TestGribSpheroids.java Lines 105 to 112 in 9a528fc the assert now throws:
|
|
The change from 6377397.0 to 6377397.16 is due to widening the Grib2Gds earthRadius, majorAxis, and minorAxis fields from float to double (and also using double for scaled value decoding). I checked the grib octets and they have the majorAxis as 637739716 with a scale factor of 2. So I think this increase in precision is correct. I will update the test. |
… scaled values are read from bytes
74649a7 to
1f3c8e7
Compare
|
Looks great - thank you! |
Description of Changes
The code for decoding GRIB2 scaled values is duplicated in a few places. The decoding process also accumulates more floating point rounding error than it needs to.
This change:
PR Checklist
until ready for review