From f6b06655d748a05b9fb897a29e647a46fdb62495 Mon Sep 17 00:00:00 2001 From: tomrink <rink@ssec.wisc.edu> Date: Thu, 16 Mar 2023 14:02:31 -0500 Subject: [PATCH] snapshot... --- modules/util/viirs_l1b_l2.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/modules/util/viirs_l1b_l2.py b/modules/util/viirs_l1b_l2.py index 004ec88a..80b62305 100644 --- a/modules/util/viirs_l1b_l2.py +++ b/modules/util/viirs_l1b_l2.py @@ -74,18 +74,18 @@ def keep_tile(p_idx, tile): return None -def process_cld_prob(grd_k): - keep = np.invert(np.isnan(grd_k)) - num_keep = np.sum(keep) - keep_clr = np.where(keep, grd_k < 0.20, False) - frac_keep = np.sum(keep_clr)/num_keep - if not (0.30 < frac_keep < 0.70): - return None - grd_k = np.where(np.invert(keep), 0, grd_k) # Convert NaN to 0 - return grd_k +# def process_cld_prob(grd_k): +# keep = np.invert(np.isnan(grd_k)) +# num_keep = np.sum(keep) +# keep_clr = np.where(keep, grd_k < 0.20, False) +# frac_keep = np.sum(keep_clr)/num_keep +# if not (0.30 < frac_keep < 0.70): +# return None +# grd_k = np.where(np.invert(keep), 0, grd_k) # Convert NaN to 0 +# return grd_k -def process_cld_prob_2(grd_k): +def process_cld_prob(grd_k): keep = np.invert(np.isnan(grd_k)) num_keep = np.sum(keep) keep_clr = np.where(keep, grd_k < 0.20, False) -- GitLab