diff --git a/modules/icing/pirep_goes.py b/modules/icing/pirep_goes.py index a0c32e754fc34fcab97365d54d061d87c2c9d5e9..b47de8cd5bb44483ad7a475febc2a94663d40a0e 100644 --- a/modules/icing/pirep_goes.py +++ b/modules/icing/pirep_goes.py @@ -1657,6 +1657,31 @@ def spatial_filter(icing_dict): return grd_bins +# def spatial_filter2(icing_dict): +# keys = icing_dict.keys() +# grd_x_hi = lon_space.shape[0] - 1 +# grd_y_hi = lat_space.shape[0] - 1 +# +# grd_bins = np.full((lat_space.shape[0], lon_space.shape[0]), 0) +# +# for key in keys: +# tup = icing_dict.get(key) +# lat = tup[0] +# lon = tup[1] +# +# lon_idx = np.searchsorted(lon_space, lon) +# lat_idx = np.searchsorted(lat_space, lat) +# +# if lon_idx < 0 or lon_idx > grd_x_hi: +# continue +# if lat_idx < 0 or lat_idx > grd_y_hi: +# continue +# +# grd_bins[lat_idx, lon_idx] += 1 +# +# return grd_bins + + # dt_str_0: start datetime string in format YYYY-MM-DD_HH:MM (default) # dt_str_1: end datetime string in format YYYY-MM-DD_HH:MM (default) # format_code: Python Datetime format code, default: '%Y-%m-%d_%H:%M' @@ -2015,7 +2040,8 @@ def run_icing_predict(clvrx_dir='/Users/tomrink/data/clavrx/RadC/', output_dir=h lons_2d, lats_2d, x_rad, y_rad = get_lon_lat_2d_mesh(nav, ll, cc) preds_2d_dct, probs_2d_dct = run_evaluate_static_new(data_dct, num_lines, num_elems, day_night=day_night, - ckpt_dir_s_path=model_path, prob_thresh=prob_thresh) + ckpt_dir_s_path=model_path, prob_thresh=prob_thresh, + flight_levels=[0]) flt_lvls = list(preds_2d_dct.keys()) for flvl in flt_lvls: preds = preds_2d_dct[flvl]