diff --git a/modules/icing/pirep_goes.py b/modules/icing/pirep_goes.py index df4d4325d93c3aa93c1cdc31910912703886c5b4..39e5a34ecd4a74cf0bd448e7b663c611d209b5aa 100644 --- a/modules/icing/pirep_goes.py +++ b/modules/icing/pirep_goes.py @@ -2240,7 +2240,6 @@ def run_icing_predict(clvrx_dir='/Users/tomrink/data/clavrx/RadC/', output_dir=h fd_preds[:] = -1 fd_probs = np.zeros(num_lines * num_elems, dtype=np.float32) fd_probs[:] = -1.0 - preds_2d_dct[flvl] = fd_preds probs_2d_dct[flvl] = fd_probs @@ -2257,11 +2256,14 @@ def run_icing_predict(clvrx_dir='/Users/tomrink/data/clavrx/RadC/', output_dir=h preds_day_dct, probs_day_dct = run_evaluate_static(day_grd_dct, num_day_tiles, day_night='DAY', ckpt_dir_s_path=day_model_path, prob_thresh=prob_thresh, use_flight_altitude=use_flight_altitude) - day_preds = preds_day_dct[flvl] - day_probs = probs_day_dct[flvl] day_idxs = np.array(day_idxs) - fd_preds[day_idxs] = day_preds[:] - fd_probs[day_idxs] = day_probs[:] + for flvl in flight_levels: + day_preds = preds_day_dct[flvl] + day_probs = probs_day_dct[flvl] + fd_preds = preds_2d_dct[flvl] + fd_probs = probs_2d_dct[flvl] + fd_preds[day_idxs] = day_preds[:] + fd_probs[day_idxs] = day_probs[:] if (day_night == 'AUTO' or day_night == 'NIGHT') and num_nght_tiles > 0: @@ -2276,11 +2278,14 @@ def run_icing_predict(clvrx_dir='/Users/tomrink/data/clavrx/RadC/', output_dir=h preds_nght_dct, probs_nght_dct = run_evaluate_static(nght_grd_dct, num_nght_tiles, day_night='NIGHT', ckpt_dir_s_path=night_model_path, prob_thresh=prob_thresh, use_flight_altitude=use_flight_altitude) - nght_preds = preds_nght_dct[flvl] - nght_probs = probs_nght_dct[flvl] nght_idxs = np.array(nght_idxs) - fd_preds[nght_idxs] = nght_preds[:] - fd_probs[nght_idxs] = nght_probs[:] + for flvl in flight_levels: + nght_preds = preds_nght_dct[flvl] + nght_probs = probs_nght_dct[flvl] + fd_preds = preds_2d_dct[flvl] + fd_probs = probs_2d_dct[flvl] + fd_preds[nght_idxs] = nght_preds[:] + fd_probs[nght_idxs] = nght_probs[:] for flvl in flight_levels: fd_preds = preds_2d_dct[flvl]