Skip to content
Snippets Groups Projects
Commit 41211579 authored by v.gramlich1's avatar v.gramlich1
Browse files

Enabled window_lead_time=1

parent e75f14ae
No related branches found
No related tags found
5 merge requests!319add all changes of dev into release v1.4.0 branch,!318Resolve "release v1.4.0",!317enabled window_lead_time=1,!313Resolve "EnableWindowLeadTime_1",!259Draft: Resolve "WRF-Datahandler should inherit from SingleStationDatahandler"
Pipeline #74068 passed with warnings
......@@ -81,6 +81,8 @@ class PlotMonthlySummary(AbstractPlotClass):
data_nn = data.sel(type=self._model_name).squeeze()
if len(data_nn.shape) > 1:
data_nn = data_nn.assign_coords(ahead=[f"{days}d" for days in data_nn.coords["ahead"].values])
else:
data_nn.coords["ahead"].values = str(data_nn.coords["ahead"].values) + "d"
data_obs = data.sel(type="obs", ahead=1).squeeze()
data_obs.coords["ahead"] = "obs"
......
......@@ -533,7 +533,14 @@ class PostProcessing(RunEnvironment):
"""
tmp_ols = self.ols_model.predict(input_data)
target_shape = ols_prediction.values.shape
ols_prediction.values = np.swapaxes(tmp_ols, 2, 0) if target_shape != tmp_ols.shape else tmp_ols
if target_shape != tmp_ols.shape:
if len(target_shape)==2:
new_values = np.swapaxes(tmp_ols,1,0)
else:
new_values = np.swapaxes(tmp_ols, 2, 0)
else:
new_values = tmp_ols
ols_prediction.values = new_values
if not normalised:
ols_prediction = transformation_func(ols_prediction, "target", inverse=True)
return ols_prediction
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment