From 770cb17a199dd7f815ed128ee0f1ad9ab5c0e96d Mon Sep 17 00:00:00 2001
From: tomrink <rink@ssec.wisc.edu>
Date: Fri, 11 Nov 2022 11:27:38 -0600
Subject: [PATCH] snapshot...

---
 modules/util/viirs_l1b_l2.py | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/modules/util/viirs_l1b_l2.py b/modules/util/viirs_l1b_l2.py
index e14c1d6c..5e2d0ea3 100644
--- a/modules/util/viirs_l1b_l2.py
+++ b/modules/util/viirs_l1b_l2.py
@@ -96,7 +96,6 @@ def process_cld_prob_(grd_k):
     if np.sum(keep)/num_keep < 0.25:
         return None
     grd_k = np.where(np.invert(keep), 0, grd_k)
-    # grd_k = np.where(grd_k < 0.5, 0.0, 1.0)
     return grd_k
 
 
@@ -148,9 +147,6 @@ def run_all(directory, out_directory, day_night='ANY', start=10):
             #     data_h5f.close()
             #     continue
 
-            data_tiles = []
-            label_tiles = []
-
             try:
                 run(data_h5f, data_params, data_train_tiles, data_valid_tiles, num_keep_x_tiles=num_keep_x_tiles, tile_width=128, kernel_size=11, day_night=day_night)
                 # run(data_h5f, label_params, label_data_tiles, label_valid_tiles, tile_width=128, kernel_size=7, day_night=day_night)
@@ -160,6 +156,7 @@ def run_all(directory, out_directory, day_night='ANY', start=10):
                 # label_h5f.close()
                 continue
             print(data_f)
+            f_cnt += 1
 
             data_h5f.close()
             # label_h5f.close()
@@ -167,7 +164,6 @@ def run_all(directory, out_directory, day_night='ANY', start=10):
             if len(data_train_tiles) == 0:
                 continue
 
-            f_cnt += 1
             if (f_cnt % 5) == 0:
                 num_valid_samples = 0
                 if len(data_valid_tiles) > 0:
-- 
GitLab