Unidata / netcdf-java

The Unidata netcdf-java library
https://docs.unidata.ucar.edu/netcdf-java/current/userguide/index.html
BSD 3-Clause "New" or "Revised" License
144 stars 70 forks source link

Fix grib collection NaNs bug #1313

Closed tdrwenski closed 7 months ago

tdrwenski commented 7 months ago

Fix issue that a variable missing from one grib partition would result in all values of the variable after that time returning NaN for the "best" dataset. This was due to the runtime axis being marked regular if the number of missing values is less than 5%. With a regular runtime axis, the variable is assumed to have values for all runtimes which messes up the lookup for which partition contains which runtime.

The proposed fix is to not allow a tolerance of 5% in the case of the grib coverage runtime axis. The runtime axis with missing values will then be marked irregular instead of regular, so it will keep track of which exact values it has.

Related to previous issue: https://github.com/Unidata/netcdf-java/pull/1063 Integration test added to the TDS for this fix: https://github.com/Unidata/tds/pull/473 Jenkins tests passing on this branch: https://jenkins-aws.unidata.ucar.edu/job/tara-netcdf-java/51/