From 2021d9a51c98043c36beb90a885ce6b7b1272ccc Mon Sep 17 00:00:00 2001
From: tomrink <rink@ssec.wisc.edu>
Date: Sun, 26 Sep 2021 09:33:44 -0500
Subject: [PATCH] snapshot...

---
 modules/icing/pirep_goes.py | 20 ++++++++------------
 1 file changed, 8 insertions(+), 12 deletions(-)

diff --git a/modules/icing/pirep_goes.py b/modules/icing/pirep_goes.py
index 92b3be03..626e74e8 100644
--- a/modules/icing/pirep_goes.py
+++ b/modules/icing/pirep_goes.py
@@ -770,12 +770,10 @@ def apply_qc_icing_pireps(icing_alt, cld_top_hgt, cld_phase, cld_opd, cld_mask,
     for i in range(num_obs):
         if not check_oblique(satzen[i,]):
             continue
-        if day_night == 'NIGHT':
-            if is_day(solzen[i,]):
-                continue
-        elif day_night == 'DAY':
-            if is_night(solzen[i,]):
-                continue
+        if day_night == 'NIGHT' and not is_night(solzen[i,]):
+            continue
+        elif day_night == 'DAY' and not is_day(solzen[i,]):
+            continue
 
         keep_0 = np.logical_or(cld_mask[i,] == 2, cld_mask[i,] == 3)  # cloudy
         keep_1 = np.invert(np.isnan(cld_top_hgt[i,]))
@@ -834,12 +832,10 @@ def apply_qc_no_icing_pireps(icing_alt, cld_top_hgt, cld_phase, cld_opd, cld_mas
     for i in range(num_obs):
         if not check_oblique(satzen[i,]):
             continue
-        if day_night == 'NIGHT':
-            if is_day(solzen[i,]):
-                continue
-        elif day_night == 'DAY':
-            if is_night(solzen[i,]):
-                continue
+        if day_night == 'NIGHT' and not is_night(solzen[i,]):
+            continue
+        elif day_night == 'DAY' and not is_day(solzen[i,]):
+            continue
 
         keep_0 = np.logical_or(cld_mask[i,] == 2, cld_mask[i,] == 3)  # cloudy
         keep_1 = np.invert(np.isnan(cld_top_hgt[i,]))
-- 
GitLab