From f3d1b293192ef81c7851f8d5d684c999d0ffe04a Mon Sep 17 00:00:00 2001
From: lukas leufen <l.leufen@fz-juelich.de>
Date: Tue, 19 Jul 2022 11:06:48 +0200
Subject: [PATCH] update stations parameter when loading snapshot

---
 mlair/run_modules/post_processing.py | 5 +++--
 mlair/run_modules/pre_processing.py  | 3 ++-
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/mlair/run_modules/post_processing.py b/mlair/run_modules/post_processing.py
index d4a3c4f0..6b3895f3 100644
--- a/mlair/run_modules/post_processing.py
+++ b/mlair/run_modules/post_processing.py
@@ -221,8 +221,9 @@ class PostProcessing(RunEnvironment):
         for station in all_stations:
             # test data
             external_data = self._get_external_data(station, self.forecast_path)
-            if external_data is not None:
-                pass
+            if external_data is None:
+                logging.info(f"skip calculate_block_mse for {station} as no external_data are available")
+                continue
             # competitors
             if evaluate_competitors is True:
                 competitor = self.load_competitors(station)
diff --git a/mlair/run_modules/pre_processing.py b/mlair/run_modules/pre_processing.py
index 41d863a1..64d1bfa2 100644
--- a/mlair/run_modules/pre_processing.py
+++ b/mlair/run_modules/pre_processing.py
@@ -428,7 +428,8 @@ class PreProcessing(RunEnvironment):
 
         if check_nested_equality(self.data_store._store, snapshot._store, skip_args=excluded_params) is True:
             self.update_datastore(snapshot, excluded_params=remove_items(excluded_params, ["transformation",
-                                                                                           "data_collection"]))
+                                                                                           "data_collection",
+                                                                                           "stations"]))
         else:
             raise ReferenceError("provided snapshot does not match with the current experiment setup. Abort this run!")
 
-- 
GitLab