From ebd2a962478cb87f920ab7bf056b7264303fe3be Mon Sep 17 00:00:00 2001
From: tomrink <rink@ssec.wisc.edu>
Date: Wed, 11 Oct 2023 10:47:20 -0500
Subject: [PATCH] snapshot...

---
 modules/util/infer_cloud_products.py | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/modules/util/infer_cloud_products.py b/modules/util/infer_cloud_products.py
index f3cddfb4..ac8ce95c 100644
--- a/modules/util/infer_cloud_products.py
+++ b/modules/util/infer_cloud_products.py
@@ -54,10 +54,15 @@ def infer_cloud_products(clvrx_path, output_dir, full_disk=True, satellite='GOES
         cld_opd_1[clr_cat] = opd[clr_cat]
         cld_opd_1[cld_cat] = opd[cld_cat]
 
+        cld_opd_2 = cld_opd_1.copy()
+        cld_opd_2 = np.where(cld_frac == 1, cld_opd_2 / 0.25, cld_opd_2)
+        cld_opd_2 = np.where(cld_frac == 2, cld_opd_2 / 0.50, cld_opd_2)
+        cld_opd_2 = np.where(cld_frac == 3, cld_opd_2 / 0.75, cld_opd_2)
+
         cld_opd_1[np.invert(np.logical_and(cld_opd_1 < 0.0, cld_opd_1 > 160.0))] = -1.0
         cld_opd_1[np.isnan(opd)] = -1.0
 
-        write_cld_prods_file_nc4(clvrx_str_time, out_file, cld_frac, cld_opd_1, x_rad, y_rad, None, None,
+        write_cld_prods_file_nc4(clvrx_str_time, out_file, cld_frac, cld_opd_1, cld_opd_2, x_rad, y_rad, None, None,
                                 satellite=satellite, domain=domain, has_time=True)
         t1 = time.time()
         print('total time: ', (t1 - t0))
-- 
GitLab