diff --git a/mlair/plotting/postprocessing_plotting.py b/mlair/plotting/postprocessing_plotting.py index 6e9a2a401f2990fe1fa7cfddf8711f37eda4bf48..5cc449aac88ebab58689656820769fe7751f6098 100644 --- a/mlair/plotting/postprocessing_plotting.py +++ b/mlair/plotting/postprocessing_plotting.py @@ -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): diff --git a/mlair/run_modules/model_setup.py b/mlair/run_modules/model_setup.py index 8a2951ef336680b9515b1f6538ab3190ef61035c..3dc56f01c4f37ce9fc53086d837386af81e5f53d 100644 --- a/mlair/run_modules/model_setup.py +++ b/mlair/run_modules/model_setup.py @@ -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") diff --git a/mlair/run_modules/post_processing.py b/mlair/run_modules/post_processing.py index c781d593d9bf8d8747ebc823fc15038c083ac81a..da76d939ae0e8a09a517be400c08686d1e9b184d 100644 --- a/mlair/run_modules/post_processing.py +++ b/mlair/run_modules/post_processing.py @@ -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 diff --git a/mlair/run_script.py b/mlair/run_script.py index a4451c6bda3cea1d6e1f433750984d1e40b583f0..aa197190637bdb93a49c0ad2febc27414e305662 100644 --- a/mlair/run_script.py +++ b/mlair/run_script.py @@ -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)