From dac969e92ffc0473c5476336323ef3c85250d3d4 Mon Sep 17 00:00:00 2001
From: tomrink <rink@ssec.wisc.edu>
Date: Tue, 21 Sep 2021 14:59:23 -0500
Subject: [PATCH] snapshot...

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

diff --git a/modules/icing/pirep_goes.py b/modules/icing/pirep_goes.py
index 83e79caa..b808b62d 100644
--- a/modules/icing/pirep_goes.py
+++ b/modules/icing/pirep_goes.py
@@ -1490,9 +1490,6 @@ def run_mean_std_2(check_cloudy=False, no_icing_to_icing_ratio=5, params=train_p
     pickle.dump(mean_std_dct, f)
     f.close()
 
-    # return mean_std_dct
-
-
 # def split_data(num_obs, perc=0.2, skip=1, shuffle=True, seed=None):
 #     idxs = np.arange(num_obs)
 #     idxs = list(idxs)
@@ -1740,6 +1737,18 @@ def collect(icing_times, icing_intensity, jdays=['071', '072', '074', '079', '08
     return keep_idxs_no, keep_idxs_yes, ice_intsy
 
 
+def tiles_info(filename):
+    h5f = h5py.File(filename, 'r')
+    iint = h5f['icing_intensity'][:]
+    print('No Icing: ', np.sum(iint == -1))
+    print('Icing:    ', np.sum(iint > 0))
+    print('Icing 1:  ', np.sum(iint == 1))
+    print('Icing 2:  ', np.sum(iint == 2))
+    print('Icing 3:  ', np.sum(iint == 3))
+    print('Icing 4:  ', np.sum(iint == 4))
+    print('Icing 5:  ', np.sum(iint == 5))
+    print('Icing 6:  ', np.sum(iint == 6))
+
 # ------------ This code will not be needed when we implement a Fully Connected CNN -----------------------------------
 # Example GOES file to retrieve GEOS parameters in MetPy form (CONUS)
 exmp_file_conus = '/Users/tomrink/data/OR_ABI-L1b-RadC-M6C14_G16_s20193140811215_e20193140813588_c20193140814070.nc'
-- 
GitLab