From 7f478de242af9073a21b8d8004397f20bda9feed Mon Sep 17 00:00:00 2001
From: leufen1 <l.leufen@fz-juelich.de>
Date: Mon, 16 Nov 2020 10:39:42 +0100
Subject: [PATCH] make color scale robust for PlotSeparationOfScales,
 important: the separation of scales data handler can cause memory errors
 depending on your system's abilities

---
 mlair/plotting/postprocessing_plotting.py | 7 ++++++-
 run_mixed_sampling.py                     | 2 +-
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/mlair/plotting/postprocessing_plotting.py b/mlair/plotting/postprocessing_plotting.py
index 63b31d33..caefbd82 100644
--- a/mlair/plotting/postprocessing_plotting.py
+++ b/mlair/plotting/postprocessing_plotting.py
@@ -25,6 +25,11 @@ from mlair.helpers import TimeTrackingWrapper
 logging.getLogger('matplotlib').setLevel(logging.WARNING)
 
 
+# import matplotlib
+# matplotlib.use("TkAgg")
+# import matplotlib.pyplot as plt
+
+
 class AbstractPlotClass:
     """
     Abstract class for all plotting routines to unify plot workflow.
@@ -1015,7 +1020,7 @@ class PlotSeparationOfScales(AbstractPlotClass):
             station = dh.id_class.station[0]
             data = data.sel(Stations=station)
             # plt.subplots()
-            data.plot(x="datetime", y="window", col="filter", row="variables")
+            data.plot(x="datetime", y="window", col="filter", row="variables", robust=True)
             self.plot_name = f"{orig_plot_name}_{station}"
             self._save()
 
diff --git a/run_mixed_sampling.py b/run_mixed_sampling.py
index ca678690..5b377509 100644
--- a/run_mixed_sampling.py
+++ b/run_mixed_sampling.py
@@ -11,7 +11,7 @@ from mlair.data_handler.data_handler_mixed_sampling import DataHandlerMixedSampl
 def main(parser_args):
     args = dict(sampling="daily",
                 sampling_inputs="hourly",
-                window_history_size=72,
+                window_history_size=24,
                 **parser_args.__dict__,
                 data_handler=DataHandlerMixedSamplingSeparationOfScales,
                 kz_filter_length=[100 * 24, 15 * 24],
-- 
GitLab