Skip to content

Commit

Permalink
Keyfix eccodes 2v38 (#578)
Browse files Browse the repository at this point in the history
* Create key alias to fix eccodes v2.38 change, with backwards compatibility.

* Fix deprecated operation which fails for numpy 2.
  • Loading branch information
pp-mo authored Dec 2, 2024
1 parent 180c24e commit f835fc9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/iris_grib/_load_convert.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ def _masker(item):
# Non-standardised usage for negative forecast times.
def _hindcast_fix(forecast_time):
"""Return a forecast time interpreted as a possibly negative value."""
uft = np.uint32(forecast_time)
uft = np.array(forecast_time).astype(np.uint32)
HIGHBIT = 2**30

# Workaround grib api's assumption that forecast time is positive.
Expand Down
2 changes: 2 additions & 0 deletions src/iris_grib/message.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
"longitudes": "longitude",
# Support older form of key which used to exist before eccodes 2v36
"indicatorOfUnitForForecastTime": "indicatorOfUnitOfTimeRange",
# Support older name which became an alias at eccodes 2v38
"numberOfTimeRange": "numberOfTimeRanges",
}


Expand Down

0 comments on commit f835fc9

Please # to comment.