From 4249cbc8dd70784ee8c30d0515f49cb1804d8967 Mon Sep 17 00:00:00 2001
From: tomrink <rink@ssec.wisc.edu>
Date: Thu, 13 Jan 2022 17:26:43 -0600
Subject: [PATCH] snapshot...

---
 modules/icing/pirep_goes.py | 26 +++++++-------------------
 1 file changed, 7 insertions(+), 19 deletions(-)

diff --git a/modules/icing/pirep_goes.py b/modules/icing/pirep_goes.py
index b416b51c..08f1e15a 100644
--- a/modules/icing/pirep_goes.py
+++ b/modules/icing/pirep_goes.py
@@ -67,12 +67,12 @@ a_clvr_file = homedir+'data/clavrx/clavrx_OR_ABI-L1b-RadC-M3C01_G16_s20190020002
 
 # Location of files for tile/FOV extraction
 # icing_files = [f for f in glob.glob('/data/Personal/rink/icing_ml/icing_2*_DAY.h5')]
-icing_files = [f for f in glob.glob('/data/Personal/rink/icing_ml/icing_l1b_2*_DAY.h5')]
+# icing_files = [f for f in glob.glob('/data/Personal/rink/icing_ml/icing_l1b_2*_DAY.h5')]
 # icing_files = [f for f in glob.glob('/data/Personal/rink/icing_ml/icing_l1b_2*_ANY.h5')]
 icing_l1b_files = []
 
 # no_icing_files = [f for f in glob.glob('/data/Personal/rink/icing_ml/no_icing_2*_DAY.h5')]
-no_icing_files = [f for f in glob.glob('/data/Personal/rink/icing_ml/no_icing_l1b_2*_DAY.h5')]
+# no_icing_files = [f for f in glob.glob('/data/Personal/rink/icing_ml/no_icing_l1b_2*_DAY.h5')]
 # no_icing_files = [f for f in glob.glob('/data/Personal/rink/icing_ml/no_icing_l1b_2*_ANY.h5')]
 no_icing_l1b_files = []
 
@@ -870,20 +870,8 @@ def apply_qc_icing_pireps(icing_alt, cld_top_hgt, cld_phase, cld_opd, cld_mask,
         if num_keep == 0:
             continue
 
-        # Test1
-        keep = np.where(keep, cld_top_hgt[i,] > icing_alt[i], False)
-
-        # Test2
-        keep = np.where(keep,
-            np.invert((cld_phase[i,] == 4) &
-                np.logical_and(cld_top_hgt[i,]+closeness > icing_alt[i], cld_top_hgt[i,]-closeness < icing_alt[i])),
-                     False)
-
-        # Test4
-        keep = np.where(keep, np.invert((cld_phase[i,] == 4) & (cld_opd[i,] < opd_thin_threshold) & (cld_top_hgt[i,] > icing_alt[i])), False)
-
-        # Test5
-        keep = np.where(keep, np.invert(bt_11um[i,] > 270.0), False)
+        # Exp
+        # keep = np.where(keep, (cld_top_hgt[i,] + closeness) > icing_alt[i], False)
 
         # Test6
         keep = np.where(keep, np.invert(bt_11um[i,] < 228.0), False)
@@ -938,8 +926,8 @@ def apply_qc_no_icing_pireps(icing_alt, cld_top_hgt, cld_phase, cld_opd, cld_mas
         if num_keep == 0:
             continue
 
-        # Test1
-        keep = np.where(keep, cld_top_hgt[i,] > icing_alt[i], False)
+        # Exp
+        # keep = np.where(keep, (cld_top_hgt[i,] + closeness) > icing_alt[i], False)
 
         # Test3
         keep = np.where(keep, np.invert((cld_opd[i,] >= opd_thick_threshold) & (cld_phase[i,] == 4) & (cld_top_hgt[i,] > icing_alt[i])), False)
@@ -1147,7 +1135,7 @@ def fov_extract(trnfile='/home/rink/fovs_l1b_train.h5', tstfile='/home/rink/fovs
         h5f.close()
 
 
-def tile_extract(trnfile='/home/rink/tiles_l1b_train.h5', tstfile='/home/rink/tiles_l1b_test.h5', L1B_or_L2='L1B',
+def tile_extract(icing_files, no_icing_files, trnfile='/home/rink/tiles_train.h5', tstfile='/home/rink/tiles_test.h5', L1B_or_L2='L1B',
                  cld_mask_name='cloud_mask', augment=False, do_split=True):
     icing_int_s = []
     ice_time_s = []
-- 
GitLab