From a1ee7c2a991d687bf780e47c4bd4f513718e5f2d Mon Sep 17 00:00:00 2001 From: tomrink <rink@ssec.wisc.edu> Date: Mon, 27 Mar 2023 16:14:09 -0500 Subject: [PATCH] snapshot... --- modules/util/viirs_surfrad.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/modules/util/viirs_surfrad.py b/modules/util/viirs_surfrad.py index 13e25331..38e11bb8 100644 --- a/modules/util/viirs_surfrad.py +++ b/modules/util/viirs_surfrad.py @@ -91,11 +91,12 @@ def process_cld_prob(grd_k): def process_cld_opd(grd_k): keep = np.invert(np.isnan(grd_k)) num_keep = np.sum(keep) - keep_vthin = np.where(keep, grd_k < 0.01, False) - keep_vthik = np.where(keep, grd_k < 150.0, False) - frac_vthin = np.sum(keep_vthin) / num_keep - frac_vthik = np.sum(keep_vthik) / num_keep - if not (frac_vthin >= 0.10 and frac_vthik >= 0.10): + keep_thin = np.where(keep, np.logical_and(grd_k > 0.1, grd_k < 4.0), False) + keep_thik = np.where(keep, np.logical_and(grd_k > 20.0, grd_k < 158.00), False) + frac_thin = np.sum(keep_thin) / num_keep + frac_thik = np.sum(keep_thik) / num_keep + # if not (frac_thin >= 0.10 and frac_thik >= 0.10): + if not (frac_thin >= 0.20): return None grd_k = np.where(np.invert(keep), 0, grd_k) return grd_k -- GitLab