diff --git a/modules/icing/util.py b/modules/icing/util.py index eed139e1645cb2ef8cc215dc8b6b6f47e1ae8580..7fe9b4db527a61ed680dc316923fafbf4098e614 100644 --- a/modules/icing/util.py +++ b/modules/icing/util.py @@ -1477,7 +1477,7 @@ def run_icing_predict_image_fcn(clvrx_dir='/Users/tomrink/data/clavrx/RadC/', ou def run_icing_predict_image_1x1(clvrx_dir='/Users/tomrink/data/clavrx/RadC/', output_dir=homedir, day_model_path=model_path_day, night_model_path=model_path_night, - prob_thresh=0.5, satellite='GOES16', domain='CONUS', day_night='AUTO', + prob_thresh=0.52, satellite='GOES16', domain='CONUS', day_night='AUTO', l1b_andor_l2='BOTH', use_flight_altitude=True, use_max_cth_level=False, extent=[-105, -70, 15, 50], pirep_file='/Users/tomrink/data/pirep/pireps_202109200000_202109232359.csv', @@ -1583,11 +1583,12 @@ def run_icing_predict_image_1x1(clvrx_dir='/Users/tomrink/data/clavrx/RadC/', ou fd_probs[np.invert(day_idxs)] = probs[np.invert(day_idxs)] fd_probs[clr_idxs] = -1.0 + fd_probs = np.where(fd_probs < prob_thresh, np.nan, fd_probs) max_prob = fd_probs.reshape((num_lines, num_elems)) 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) + ice_lons_vld=keep_lons, ice_lats_vld=keep_lats, extent=extent, prob_thresh=prob_thresh) print('Done: ', clvrx_str_time) h5f.close() diff --git a/modules/util/plot.py b/modules/util/plot.py index 98f22192d9f32b151e50d761c9b3c7d8d3a49964..931260c28ac8cf95cbcb338b2a52e5c3cd3366b9 100644 --- a/modules/util/plot.py +++ b/modules/util/plot.py @@ -254,7 +254,7 @@ def plot_image3(image, bt, cmap='Greys'): def make_icing_image(h5f, probs, ice_lons, ice_lats, clvrx_str_time, satellite, domain, ice_lons_vld=None, ice_lats_vld=None, - ice_intensity=None, imagename='icing', extent=[-110, -60, 10, 55]): + ice_intensity=None, imagename='icing', extent=[-110, -60, 10, 55], prob_thresh=0.50): # keep for reference # mrkr_styl = MarkerStyle('o', fillstyle=None) geos, xlen, xmin, xmax, ylen, ymin, ymax = get_cartopy_crs(satellite, domain) @@ -277,7 +277,7 @@ def make_icing_image(h5f, probs, ice_lons, ice_lats, clvrx_str_time, satellite, # p_im = ax.imshow(probs, cmap='Purples', origin='upper', extent=(xmin, xmax, ymin, ymax), p_im = ax.imshow(probs, cmap='jet', origin='upper', extent=(xmin, xmax, ymin, ymax), # p_im = ax.imshow(probs, cmap=icing_cmap, origin='upper', extent=(xmin, xmax, ymin, ymax), - vmin=0.52, vmax=1.0, alpha=0.8, transform=geos) + vmin=prob_thresh, vmax=1.0, alpha=0.8, transform=geos) ax.coastlines(resolution='50m', color='green', linewidth=1.50) ax.add_feature(ccrs.cartopy.feature.STATES, linewidth=1.50, edgecolor='green') ax.add_feature(ccrs.cartopy.feature.BORDERS, linewidth=1.50, edgecolor='green')