Commit a723612b authored by lukas leufen's avatar lukas leufen

current status that should run properly

parent dbc30525
......@@ -711,6 +711,8 @@ class PlotBootstrapSkillScore(AbstractPlotClass):
"""
data = helpers.dict_to_xarray(data, "station").sortby(self._x_name)
self._labels = [str(i) + "d" for i in data.coords["ahead"].values]
if "station" not in data.dims:
data = data.expand_dims("station")
return data.to_dataframe("data").reset_index(level=[0, 1, 2])
def _label_add(self, score_only: bool):
......
......@@ -165,7 +165,7 @@ class ModelSetup(RunEnvironment):
v = ",".join(self._clean_name(str(u)) for u in v)
if "<" in str(v):
v = self._clean_name(str(v))
df.loc[k] = v
df.loc[k] = str(v)
df.sort_index(inplace=True)
column_format = "ll"
path = os.path.join(self.data_store.get("experiment_path"), "latex_report")
......
......@@ -74,7 +74,7 @@ class PostProcessing(RunEnvironment):
self.plot_path: str = self.data_store.get("plot_path")
self.target_var = self.data_store.get("target_var")
self._sampling = self.data_store.get("sampling")
self.window_lead_time = extract_value(self.data_store.get("output_shape", "model"))
self.window_lead_time = extract_value(self.data_store.get("shape_outputs", "model"))
self.skill_scores = None
self.bootstrap_skill_scores = None
self._run()
......@@ -217,7 +217,7 @@ class PostProcessing(RunEnvironment):
skill.loc[boot_var] = np.array(boot_scores)
# collect all results in single dictionary
score[station] = xr.DataArray(skill, dims=["boot_var", "ahead"])
score[str(station)] = xr.DataArray(skill, dims=["boot_var", "ahead"])
return score
@staticmethod
......
......@@ -39,6 +39,6 @@ def run(stations=None,
if __name__ == "__main__":
from src.model_modules.model_class import MyBranchedModel
run(stations=["DEBW013","DEBW025"], statistics_per_var={'o3': 'dma8eu', "temp": "maximum"}, trainable=True,
from mlair.model_modules.model_class import MyBranchedModel
run(statistics_per_var={'o3': 'dma8eu', "temp": "maximum"}, trainable=True,
create_new_model=True, model=MyBranchedModel)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment