From b3c051a22b11e97da019e2523938d2719ebc5c6b Mon Sep 17 00:00:00 2001
From: tomrink <rink@ssec.wisc.edu>
Date: Wed, 15 Dec 2021 10:34:17 -0600
Subject: [PATCH] snapshot...

---
 modules/deeplearning/icing_cnn.py | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/modules/deeplearning/icing_cnn.py b/modules/deeplearning/icing_cnn.py
index 0418dd8d..9e15c938 100644
--- a/modules/deeplearning/icing_cnn.py
+++ b/modules/deeplearning/icing_cnn.py
@@ -1051,7 +1051,9 @@ def run_restore_static(filename_l1b, filename_l2, ckpt_dir_s_path, day_night='DA
     return labels, prob_avg, cm_avg
 
 
-def run_evaluate_static(data_dct, ll, cc, ckpt_dir_s_path, day_night='DAY', flight_level=4, prob_thresh=0.5, satellite='GOES16', domain='FD'):
+def run_evaluate_static(data_dct, ll, cc, ckpt_dir_s_path, day_night='DAY', flight_level=4,
+                        use_flight_altitude=False, prob_thresh=0.5,
+                        satellite='GOES16', domain='FD'):
     num_elems = len(cc)
     num_lines = len(ll)
     cc = np.array(cc)
@@ -1066,7 +1068,7 @@ def run_evaluate_static(data_dct, ll, cc, ckpt_dir_s_path, day_night='DAY', flig
         ckpt_dir = ckpt_dir_s_path + ckpt
         if not os.path.isdir(ckpt_dir):
             continue
-        nn = IcingIntensityNN(day_night=day_night)
+        nn = IcingIntensityNN(day_night=day_night, use_flight_altitude=use_flight_altitude)
         nn.flight_level = flight_level
         nn.setup_eval_pipeline(data_dct, num_lines * num_elems)
         nn.build_model()
@@ -1101,7 +1103,8 @@ def run_evaluate_static(data_dct, ll, cc, ckpt_dir_s_path, day_night='DAY', flig
     return ice_lons, ice_lats, preds_2d
 
 
-def run_evaluate_static_new(data_dct, num_lines, num_elems, ckpt_dir_s_path, day_night='DAY', flight_levels=[0, 1, 2, 3, 4], prob_thresh=0.5):
+def run_evaluate_static_new(data_dct, num_lines, num_elems, ckpt_dir_s_path, day_night='DAY', prob_thresh=0.5,
+                            flight_levels=[0, 1, 2, 3, 4], use_flight_altitude=False):
 
     ckpt_dir_s = os.listdir(ckpt_dir_s_path)
     ckpt_dir = ckpt_dir_s_path + ckpt_dir_s[0]
@@ -1110,7 +1113,7 @@ def run_evaluate_static_new(data_dct, num_lines, num_elems, ckpt_dir_s_path, day
     preds_2d_dct = {flvl: None for flvl in flight_levels}
 
     for flvl in flight_levels:
-        nn = IcingIntensityNN(day_night=day_night)
+        nn = IcingIntensityNN(day_night=day_night, use_flight_altitude=use_flight_altitude)
         nn.flight_level = flvl
         nn.setup_eval_pipeline(data_dct, num_lines * num_elems)
         nn.build_model()
-- 
GitLab