From bcee1e0308f8fbd737fb2730344883f124f96afc Mon Sep 17 00:00:00 2001 From: tomrink <rink@ssec.wisc.edu> Date: Tue, 12 Dec 2023 11:13:31 -0600 Subject: [PATCH] snapshot... --- modules/icing/util.py | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/modules/icing/util.py b/modules/icing/util.py index fd6b48ab..233d7a44 100644 --- a/modules/icing/util.py +++ b/modules/icing/util.py @@ -334,7 +334,7 @@ flt_level_ranges_str[1] = '2000_4000' flt_level_ranges_str[2] = '4000_6000' flt_level_ranges_str[3] = '6000_8000' flt_level_ranges_str[4] = '8000_15000' -flt_level_ranges_str[5] = 'CTH_layer' +flt_level_ranges_str[-1] = 'CTH_layer' # flt_level_ranges_str = {k: None for k in range(1)} # flt_level_ranges_str[0] = 'column' @@ -735,6 +735,8 @@ def run_icing_predict(clvrx_dir='/Users/tomrink/data/clavrx/RadC/', output_dir=h flight_levels = [0] if use_flight_altitude is True: flight_levels = [0, 1, 2, 3, 4] + if use_max_cth_level: + flight_levels = [-1] day_train_params, _, _ = get_training_parameters(day_night='DAY', l1b_andor_l2=l1b_andor_l2) nght_train_params, _, _ = get_training_parameters(day_night='NIGHT', l1b_andor_l2=l1b_andor_l2, use_dnb=False) @@ -862,10 +864,9 @@ def run_icing_predict(clvrx_dir='/Users/tomrink/data/clavrx/RadC/', output_dir=h day_grd_dct['cth_high_avg'] = day_cth_max preds_day_dct, probs_day_dct = \ - model_module.run_evaluate_static_2(day_model, day_grd_dct, num_day_tiles, prob_thresh=prob_thresh, - use_flight_altitude=use_flight_altitude, - flight_levels=flight_levels, - use_max_cth_level=use_max_cth_level) + model_module.run_evaluate_static_2(day_model, day_grd_dct, num_day_tiles, + prob_thresh=prob_thresh, + flight_levels=flight_levels) day_idxs = np.array(day_idxs) for flvl in flight_levels: day_preds = preds_day_dct[flvl] @@ -896,9 +897,7 @@ def run_icing_predict(clvrx_dir='/Users/tomrink/data/clavrx/RadC/', output_dir=h preds_nght_dct, probs_nght_dct = \ model_module.run_evaluate_static_2(night_model, nght_grd_dct, num_nght_tiles, prob_thresh=prob_thresh, - use_flight_altitude=use_flight_altitude, - flight_levels=flight_levels, - use_max_cth_level=use_max_cth_level) + flight_levels=flight_levels) nght_idxs = np.array(nght_idxs) for flvl in flight_levels: nght_preds = preds_nght_dct[flvl] @@ -929,9 +928,7 @@ def run_icing_predict(clvrx_dir='/Users/tomrink/data/clavrx/RadC/', output_dir=h preds_nght_dct, probs_nght_dct = \ model_module.run_evaluate_static_2(night_model, nght_grd_dct, num_nght_tiles, prob_thresh=prob_thresh, - use_flight_altitude=use_flight_altitude, - flight_levels=flight_levels, - use_max_cth_level=use_max_cth_level) + flight_levels=flight_levels) for flvl in flight_levels: nght_preds = preds_nght_dct[flvl] nght_probs = probs_nght_dct[flvl] -- GitLab