-
Notifications
You must be signed in to change notification settings - Fork 44
Description
A recent problem example reported by @Eyvoll and @GAndrsn shows that some messages with compressed data as-per using template 5.3 are ignoring missing points in the data.
The problem is that our loading code assumes that missing data is always stored in a bitmap, but that is not always true ,,,
So, we simply extract data with data = sections[7]["codedValues"]](https://github.com/SciTools/iris-grib/blob/v0.21.0/src/iris_grib/message.py#L295)
However, it turns out that in these cases, ecCodes will fill missing points with its fill-value. Which defaults to '9999'.
In the above testcase file, I've shown this by hacking the code to use codes_set(imessage, "missingValue", ...), which does change the relevant value as it is returned. NaN or a large value can be used.
At some point, we should probably fix this. Though, if data can be integers, that would pose a general problem.
Example data, from the above problem report:
corrected_source_file.grib2.zip
This contains compressed data, which represents a 2D array (145, 288).
There is a missing point at [32, 242] -- or [9458] in the flat data as returned from "codedValues".
Metadata
Metadata
Assignees
Labels
Type
Projects
Status