Skip to content
Snippets Groups Projects
Commit b3c051a2 authored by tomrink's avatar tomrink
Browse files

snapshot...

parent fcbca22c
Branches
No related tags found
No related merge requests found
......@@ -1051,7 +1051,9 @@ def run_restore_static(filename_l1b, filename_l2, ckpt_dir_s_path, day_night='DA
return labels, prob_avg, cm_avg
def run_evaluate_static(data_dct, ll, cc, ckpt_dir_s_path, day_night='DAY', flight_level=4, prob_thresh=0.5, satellite='GOES16', domain='FD'):
def run_evaluate_static(data_dct, ll, cc, ckpt_dir_s_path, day_night='DAY', flight_level=4,
use_flight_altitude=False, prob_thresh=0.5,
satellite='GOES16', domain='FD'):
num_elems = len(cc)
num_lines = len(ll)
cc = np.array(cc)
......@@ -1066,7 +1068,7 @@ def run_evaluate_static(data_dct, ll, cc, ckpt_dir_s_path, day_night='DAY', flig
ckpt_dir = ckpt_dir_s_path + ckpt
if not os.path.isdir(ckpt_dir):
continue
nn = IcingIntensityNN(day_night=day_night)
nn = IcingIntensityNN(day_night=day_night, use_flight_altitude=use_flight_altitude)
nn.flight_level = flight_level
nn.setup_eval_pipeline(data_dct, num_lines * num_elems)
nn.build_model()
......@@ -1101,7 +1103,8 @@ def run_evaluate_static(data_dct, ll, cc, ckpt_dir_s_path, day_night='DAY', flig
return ice_lons, ice_lats, preds_2d
def run_evaluate_static_new(data_dct, num_lines, num_elems, ckpt_dir_s_path, day_night='DAY', flight_levels=[0, 1, 2, 3, 4], prob_thresh=0.5):
def run_evaluate_static_new(data_dct, num_lines, num_elems, ckpt_dir_s_path, day_night='DAY', prob_thresh=0.5,
flight_levels=[0, 1, 2, 3, 4], use_flight_altitude=False):
ckpt_dir_s = os.listdir(ckpt_dir_s_path)
ckpt_dir = ckpt_dir_s_path + ckpt_dir_s[0]
......@@ -1110,7 +1113,7 @@ def run_evaluate_static_new(data_dct, num_lines, num_elems, ckpt_dir_s_path, day
preds_2d_dct = {flvl: None for flvl in flight_levels}
for flvl in flight_levels:
nn = IcingIntensityNN(day_night=day_night)
nn = IcingIntensityNN(day_night=day_night, use_flight_altitude=use_flight_altitude)
nn.flight_level = flvl
nn.setup_eval_pipeline(data_dct, num_lines * num_elems)
nn.build_model()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment