From 9656a81bdcfb05235233e2949edd77304ab84a6c Mon Sep 17 00:00:00 2001
From: tomrink <rink@ssec.wisc.edu>
Date: Mon, 30 Oct 2023 14:53:17 -0500
Subject: [PATCH] snapshot...

---
 modules/icing/util.py | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/modules/icing/util.py b/modules/icing/util.py
index c374b30f..786356cd 100644
--- a/modules/icing/util.py
+++ b/modules/icing/util.py
@@ -625,9 +625,11 @@ def run_icing_predict_image_fcn(clvrx_dir='/Users/tomrink/data/clavrx/RadC/', ou
             lons_2d, lats_2d, x_rad, y_rad = get_lon_lat_2d_mesh(nav, ll, cc)
 
         day_idxs = solzen < 80.0
+        day_idxs = day_idxs.flatten()
         num_day_tiles = np.sum(day_idxs)
 
         nght_idxs = solzen > 100.0
+        nght_idxs = nght_idxs.flatten()
         num_nght_tiles = np.sum(nght_idxs)
 
         # initialize output arrays
@@ -649,8 +651,8 @@ def run_icing_predict_image_fcn(clvrx_dir='/Users/tomrink/data/clavrx/RadC/', ou
                                                                          use_flight_altitude=use_flight_altitude,
                                                                          flight_levels=flight_levels)
             for flvl in flight_levels:
-                preds = preds_day_dct[flvl]
-                probs = probs_day_dct[flvl]
+                preds = preds_day_dct[flvl].flatten()
+                probs = probs_day_dct[flvl].flatten()
                 fd_preds = preds_2d_dct[flvl]
                 fd_probs = probs_2d_dct[flvl]
                 fd_preds[day_idxs] = preds[day_idxs]
@@ -663,8 +665,8 @@ def run_icing_predict_image_fcn(clvrx_dir='/Users/tomrink/data/clavrx/RadC/', ou
                                                                            use_flight_altitude=use_flight_altitude,
                                                                            flight_levels=flight_levels)
             for flvl in flight_levels:
-                preds = preds_nght_dct[flvl]
-                probs = probs_nght_dct[flvl]
+                preds = preds_nght_dct[flvl].flatten()
+                probs = probs_nght_dct[flvl].flatten()
                 fd_preds = preds_2d_dct[flvl]
                 fd_probs = probs_2d_dct[flvl]
                 fd_preds[nght_idxs] = preds[nght_idxs]
@@ -684,8 +686,8 @@ def run_icing_predict_image_fcn(clvrx_dir='/Users/tomrink/data/clavrx/RadC/', ou
         max_prob = np.max(prob_s, axis=2)
         max_prob = np.where(max_prob < 0.5, np.nan, max_prob)
 
-        make_icing_image(h5f, max_prob, None, None, clvrx_str_time, satellite, domain,
-                         ice_lons_vld=keep_lons, ice_lats_vld=keep_lats, extent=extent)
+        # make_icing_image(h5f, max_prob, None, None, clvrx_str_time, satellite, domain,
+        #                  ice_lons_vld=keep_lons, ice_lats_vld=keep_lats, extent=extent)
 
         print('Done: ', clvrx_str_time)
         h5f.close()
-- 
GitLab