diff --git a/modules/icing/pirep_goes.py b/modules/icing/pirep_goes.py index 9785d63e655f65eb631cb3e4813a70c51b23506f..cc926ede14a11b5fbdc9affd2f2a50c8cb35c6a0 100644 --- a/modules/icing/pirep_goes.py +++ b/modules/icing/pirep_goes.py @@ -1820,7 +1820,8 @@ def tiles_info(filename): def run_make_images(clvrx_dir='/Users/tomrink/data/clavrx/RadC/', ckpt_dir_s_path='/Users/tomrink/tf_model/', prob_thresh=0.5, satellite='GOES16', domain='CONUS', extent=[-105, -70, 15, 50], - pirep_file='/Users/tomrink/data/pirep/pireps_202109200000_202109232359.csv'): + pirep_file='/Users/tomrink/data/pirep/pireps_202109200000_202109232359.csv', + obs_lons=None, obs_lats=None, obs_times=None): if pirep_file is not None: ice_dict, no_ice_dict, neg_ice_dict = setup(pirep_file) @@ -1842,10 +1843,11 @@ def run_make_images(clvrx_dir='/Users/tomrink/data/clavrx/RadC/', ckpt_dir_s_pat ts_0 = dto_0.timestamp() ts_1 = dto_1.timestamp() if pirep_file is not None: - obs_times, obs_lons, obs_lats, _ = time_filter_3(ice_dict, ts_0, ts_1) + _, obs_lons, obs_lats, _ = time_filter_3(ice_dict, ts_0, ts_1) else: - obs_lons = None - obs_lats = None + keep = np.logical_and(obs_times >= ts_0, obs_times < ts_1) + obs_lons = obs_lons[keep] + obs_lats = obs_lats[keep] ice_lons, ice_lats = run_evaluate_static(h5f, ckpt_dir_s_path=ckpt_dir_s_path, prob_thresh=prob_thresh, satellite=satellite, domain=domain) make_icing_image(h5f, ice_lons, ice_lats, clvrx_str_time, satellite, domain, ice_lons_vld=obs_lons, ice_lats_vld=obs_lats, extent=extent) print('Done: ', clvrx_str_time)