File tree Expand file tree Collapse file tree 4 files changed +262
-277
lines changed
Expand file tree Collapse file tree 4 files changed +262
-277
lines changed Original file line number Diff line number Diff line change @@ -551,9 +551,15 @@ def from_icon_grib(
551551 + run_datetime .strftime ("%Y%m%d%H" )
552552 )
553553
554+ # Starting with eccodes 2.28 the name of the data variable in `stacked` is
555+ # [i10fg](https://codes.ecmwf.int/grib/param-db/228029).
556+ # Before, it used to be the less precise
557+ # [gust](https://codes.ecmwf.int/grib/param-db/260065)
558+ [data_variable ] = list (stacked )
559+
554560 # Create Hazard
555561 haz = cls (
556- intensity = sparse .csr_matrix (stacked ["gust" ].T ),
562+ intensity = sparse .csr_matrix (stacked [data_variable ].T ),
557563 centroids = cls ._centroids_from_nc (nc_centroids_file ),
558564 event_id = event_id ,
559565 date = date ,
@@ -1069,7 +1075,7 @@ def generate_WS_forecast_hazard(
10691075 if haz_model == "cosmo1e_file" :
10701076 haz_model = "C1E"
10711077 full_model_name_temp = "COSMO-1E"
1072- if haz_model == "cosmo2e_file" :
1078+ else : # if haz_model == "cosmo2e_file":
10731079 haz_model = "C2E"
10741080 full_model_name_temp = "COSMO-2E"
10751081 haz_file_name = (
Original file line number Diff line number Diff line change @@ -94,13 +94,9 @@ def test_optimizer_params(self):
9494 )
9595 result = contr .optimizer_params ()
9696
97- self .assertDictContainsSubset (
98- {
99- "init_points" : 1 ,
100- "n_iter" : 2 ,
101- },
102- result ,
103- )
97+ self .assertEqual (result .get ("init_points" ), 1 )
98+ self .assertEqual (result .get ("n_iter" ), 2 )
99+
104100 util_func = result ["acquisition_function" ]
105101 self .assertEqual (util_func .kappa , 3 )
106102 self .assertEqual (util_func ._kappa_decay , contr ._calc_kappa_decay ())
You can’t perform that action at this time.
0 commit comments