@b8raoult the proposed change breaks GRIB files with float levels, because eccodes accesses level as an int by default and drops the fractional part.
The proper fix should probably be to try accessing with the "level:float" and only in the case of a KeyError using the "level" key plus a type conversion.
What we want to support is like field["level:float"] == 5.5
@b8raoult the proposed change breaks GRIB files with float levels, because eccodes accesses level as an
int
by default and drops the fractional part.The proper fix should probably be to
try
accessing with the"level:float"
and only in the case of aKeyError
using the"level"
key plus a type conversion.What we want to support is like
field["level:float"] == 5.5