From d6580d039bdef141bbb0e0d40cc0c3b2e91dfe39 Mon Sep 17 00:00:00 2001
From: Peter Luenenschloss <peter.luenenschloss@ufz.de>
Date: Thu, 28 Nov 2019 16:33:05 +0100
Subject: [PATCH] ensured BAD-flaggedd-drop for harmonization

---
 saqc/funcs/harm_functions.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/saqc/funcs/harm_functions.py b/saqc/funcs/harm_functions.py
index 5fd514ca6..9dd31852b 100644
--- a/saqc/funcs/harm_functions.py
+++ b/saqc/funcs/harm_functions.py
@@ -69,6 +69,9 @@ def harmWrapper(heap={}):
         data, flagger = flagMissing(
             data, field, flagger, nodata=data_missing_value, **kwargs
         )
+        # and dropped for harmonization:
+        if drop_flags is not None:
+            drop_flags.append(flagger.BAD)
 
         # before sending the current flags and data frame to the future (for backtracking reasons), we clear it
         # from merge-nans that just resulted from harmonization of other variables!
-- 
GitLab