diff --git a/modules/icing/util.py b/modules/icing/util.py index 20ce4232549c3095d5848df12315e781fe60cbc3..1ca87308fee09f808b4e55f8b077934a0bc54560 100644 --- a/modules/icing/util.py +++ b/modules/icing/util.py @@ -802,6 +802,7 @@ def run_icing_predict(clvrx_dir='/Users/tomrink/data/clavrx/RadC/', output_dir=h day_cth_max = [] nght_cth_max = [] cth_max = [] + cth_avg = [] for j in range(num_lines): for i in range(num_elems): @@ -811,6 +812,7 @@ def run_icing_predict(clvrx_dir='/Users/tomrink/data/clavrx/RadC/', output_dir=h c = cth[k].flatten() c_m = np.mean(np.sort(c[np.invert(np.isnan(c))])[-2:]) cth_max.append(c_m) + cth_avg.append(np.mean(c[np.invert(np.isnan(c))])) c_m = 0 if 2000 > c_m >= 0 else c_m c_m = 1 if 4000 > c_m >= 2000 else c_m @@ -949,12 +951,14 @@ def run_icing_predict(clvrx_dir='/Users/tomrink/data/clavrx/RadC/', output_dir=h cth_max = np.array(cth_max) cth_max = cth_max.reshape((num_lines, num_elems)) + cth_avg = np.array(cth_avg) + cth_avg = cth_avg.reshape((num_lines, num_elems)) if satellite == 'GOES16' or satellite == 'H08' or satellite == 'H09': write_icing_file_nc4(clvrx_str_time, output_dir, preds_2d_dct, probs_2d_dct, x_rad, y_rad, lons_2d, lats_2d, cc, ll, satellite=satellite, domain=domain, use_nan=use_nan, has_time=has_time, - prob_thresh=prob_thresh, bt_10_4=bt_10_4_2d, cld_top_hgt_max=cth_max) + prob_thresh=prob_thresh, bt_10_4=bt_10_4_2d, cld_top_hgt_max=cth_avg) elif satellite == 'VIIRS': write_icing_file_nc4_viirs(clvrx_str_time, output_dir, preds_2d_dct, probs_2d_dct, lons_2d, lats_2d,