From 2c7ba5ebe399fa9f8f69aec6d43d68038b518cec Mon Sep 17 00:00:00 2001
From: tomrink <rink@ssec.wisc.edu>
Date: Wed, 21 Jul 2021 21:42:18 -0500
Subject: [PATCH] minor...

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

diff --git a/modules/icing/pirep_goes.py b/modules/icing/pirep_goes.py
index 9407a655..6efd4149 100644
--- a/modules/icing/pirep_goes.py
+++ b/modules/icing/pirep_goes.py
@@ -666,7 +666,7 @@ def run_daynight(filename, filename_l1b, day_night='ANY'):
     f_l1b.close()
 
 
-def run_qc(filename, filename_l1b, day_night='ANY', pass_thresh_frac=0.20):
+def run_qc(filename, filename_l1b, day_night='ANY', pass_thresh_frac=0.20, icing=True):
 
     f = h5py.File(filename, 'r')
     icing_alt = f['icing_altitude'][:]
@@ -693,7 +693,11 @@ def run_qc(filename, filename_l1b, day_night='ANY', pass_thresh_frac=0.20):
     keep_idxs = []
 
     for i in range(len(mask)):
-        if (np.sum(mask[i]) / nx_x_ny) > pass_thresh_frac:
+        frac = np.sum(mask[i]) / nx_x_ny
+        if icing:
+            if frac > pass_thresh_frac:
+                keep_idxs.append(idxs[i])
+        elif frac < 0.05:
             keep_idxs.append(idxs[i])
 
     print('num valid pireps: ', len(keep_idxs))
-- 
GitLab