From 76eb0d6a25fae16bf11a36b855385a10c49640fe Mon Sep 17 00:00:00 2001 From: tomrink <rink@ssec.wisc.edu> Date: Tue, 14 Dec 2021 16:02:06 -0600 Subject: [PATCH] snapshot... --- modules/icing/pirep_goes.py | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/modules/icing/pirep_goes.py b/modules/icing/pirep_goes.py index b47de8cd..449dc398 100644 --- a/modules/icing/pirep_goes.py +++ b/modules/icing/pirep_goes.py @@ -1973,7 +1973,9 @@ def run_make_images(clvrx_dir='/Users/tomrink/data/clavrx/RadC/', ckpt_dir_s_pat clvrx_ds = CLAVRx(clvrx_dir) clvrx_files = clvrx_ds.flist - alt_lo, alt_hi = flt_level_ranges[flight_level] + alt_lo, alt_hi = 0.0, 15000.0 + if flight_level is not None: + alt_lo, alt_hi = flt_level_ranges[flight_level] train_params = get_training_parameters(day_night=day_night, l1b_andor_l2=l1b_andor_l2) @@ -1984,6 +1986,7 @@ def run_make_images(clvrx_dir='/Users/tomrink/data/clavrx/RadC/', ckpt_dir_s_pat clvrx_str_time = dto.strftime('%Y-%m-%d_%H:%M') data_dct, ll, cc = make_for_full_domain_predict(h5f, name_list=train_params, satellite=satellite, domain=domain) + num_elems, num_lines = len(cc), len(ll) dto, _ = get_time_tuple_utc(ts) dto_0 = dto - datetime.timedelta(minutes=30) @@ -2002,8 +2005,20 @@ def run_make_images(clvrx_dir='/Users/tomrink/data/clavrx/RadC/', ckpt_dir_s_pat keep_lons = None keep_lats = None - ice_lons, ice_lats, preds_2d = run_evaluate_static(data_dct, ll, cc, ckpt_dir_s_path=ckpt_dir_s_path, flight_level=flight_level, prob_thresh=prob_thresh, satellite=satellite, domain=domain) - make_icing_image(h5f, ice_lons, ice_lats, clvrx_str_time, satellite, domain, ice_lons_vld=keep_lons, ice_lats_vld=keep_lats, extent=extent) + ice_lons, ice_lats, preds_2d = run_evaluate_static(data_dct, ll, cc, ckpt_dir_s_path=ckpt_dir_s_path, + flight_level=flight_level, prob_thresh=prob_thresh, + satellite=satellite, domain=domain) + + make_icing_image(h5f, None, ice_lons, ice_lats, clvrx_str_time, satellite, domain, + ice_lons_vld=keep_lons, ice_lats_vld=keep_lats, extent=extent) + + # preds_2d_dct, probs_2d_dct = run_evaluate_static_new(data_dct, num_lines, num_elems, day_night=day_night, + # ckpt_dir_s_path=ckpt_dir_s_path, prob_thresh=prob_thresh, + # flight_levels=[0]) + # + # make_icing_image(None, probs_2d_dct[0], None, None, clvrx_str_time, satellite, domain, + # ice_lons_vld=keep_lons, ice_lats_vld=keep_lats, extent=extent) + h5f.close() print('Done: ', clvrx_str_time) -- GitLab