From fb05c0f61d0e17b46f60a86768c8b8df106bcc3c Mon Sep 17 00:00:00 2001
From: tomrink <rink@ssec.wisc.edu>
Date: Wed, 9 Feb 2022 14:09:45 -0600
Subject: [PATCH] snapshot...

---
 modules/util/util.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/modules/util/util.py b/modules/util/util.py
index 11c74bec..788400ab 100644
--- a/modules/util/util.py
+++ b/modules/util/util.py
@@ -859,7 +859,9 @@ def write_icing_file_nc4(clvrx_str_time, output_dir, preds_dct, probs_dct,
         icing_prob_ds.setncattr('missing', np.nan)
     icing_prob_ds[:,] = max_prob
 
-    max_lvl = np.argmax(prob_s, axis=2)
+    prob_s = np.where(prob_s < prob_thresh, -1.0, prob_s)
+    max_lvl = np.where(np.all(prob_s == -1, axis=2), -1, np.argmax(prob_s, axis=2))
+    # max_lvl = np.argmax(prob_s, axis=2)
     if has_time:
         max_lvl = max_lvl.reshape((1, y.shape[0], x.shape[0]))
 
-- 
GitLab