diff --git a/climada/hazard/storm_europe.py b/climada/hazard/storm_europe.py index c4b49e7fc..a527b6165 100644 --- a/climada/hazard/storm_europe.py +++ b/climada/hazard/storm_europe.py @@ -551,9 +551,15 @@ def from_icon_grib( + run_datetime.strftime("%Y%m%d%H") ) + # Starting with eccodes 2.28 the name of the data variable in `stacked` is + # [i10fg](https://codes.ecmwf.int/grib/param-db/228029). + # Before, it used to be the less precise + # [gust](https://codes.ecmwf.int/grib/param-db/260065) + [data_variable] = list(stacked) + # Create Hazard haz = cls( - intensity=sparse.csr_matrix(stacked["gust"].T), + intensity=sparse.csr_matrix(stacked[data_variable].T), centroids=cls._centroids_from_nc(nc_centroids_file), event_id=event_id, date=date, @@ -1069,7 +1075,7 @@ def generate_WS_forecast_hazard( if haz_model == "cosmo1e_file": haz_model = "C1E" full_model_name_temp = "COSMO-1E" - if haz_model == "cosmo2e_file": + else: # if haz_model == "cosmo2e_file": haz_model = "C2E" full_model_name_temp = "COSMO-2E" haz_file_name = ( diff --git a/requirements/env_climada.yml b/requirements/env_climada.yml index c7cf9b823..f2f287090 100644 --- a/requirements/env_climada.yml +++ b/requirements/env_climada.yml @@ -5,12 +5,12 @@ channels: dependencies: - bottleneck>=1.4 - cartopy>=0.23 - - cfgrib>=0.9.9,<0.9.10 # 0.9.10 cannot read the icon_grib files from https://opendata.dwd.de + - cfgrib>=0.9.9 - contextily>=1.6 - dask>=2024.5 - - eccodes>=2.27,<2.28 # 2.28 changed some labels, in particular: gust -> i20fg + - eccodes>=2.27 - gdal>=3.6 - - geopandas>=0.14 + - geopandas>=0.14,<1.0 # geopandas 1.0 does not depend on fiona anymore, hence fiona would need to be added as dependency - h5py>=3.8 - haversine>=2.8 - matplotlib-base>=3.9