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

snapshot...

parent f92ccdcd
No related branches found
No related tags found
No related merge requests found
......@@ -434,21 +434,37 @@ def run_icing_predict_image(clvrx_dir='/Users/tomrink/data/clavrx/RadC/', output
satzen = ancil_data_dct['sensor_zenith_angle']
solzen = ancil_data_dct['solar_zenith_angle']
cth = ancil_data_dct['cld_height_acha']
day_idxs = []
nght_idxs = []
day_cth_max = []
nght_cth_max = []
for j in range(num_lines):
for i in range(num_elems):
k = i + j*num_elems
c = cth[k].flatten()
c_m = np.mean(np.sort(c[np.invert(np.isnan(c))])[-2:])
c_m = 0 if 2000 > c_m >= 0 else c_m
c_m = 1 if 4000 > c_m >= 2000 else c_m
c_m = 2 if 6000 > c_m >= 4000 else c_m
c_m = 3 if 8000 > c_m >= 6000 else c_m
c_m = 4 if 15000 > c_m >= 8000 else c_m
if not check_oblique(satzen[k]):
continue
if is_day(solzen[k]):
day_idxs.append(k)
day_cth_max.append(c_m)
else:
nght_idxs.append(k)
nght_cth_max.append(c_m)
num_tiles = num_lines * num_elems
num_day_tiles = len(day_idxs)
num_nght_tiles = len(nght_idxs)
day_cth_max = np.array(day_cth_max)
nght_cth_max = np.array(nght_cth_max)
# initialize output arrays
probs_2d_dct = {flvl: None for flvl in flight_levels}
......@@ -471,7 +487,7 @@ def run_icing_predict_image(clvrx_dir='/Users/tomrink/data/clavrx/RadC/', output
for ds_name in day_train_params:
day_grd_dct[ds_name] = np.stack(day_data_dct[ds_name])
preds_day_dct, probs_day_dct = model_module.run_evaluate_static_2(day_model, day_grd_dct, num_day_tiles,
preds_day_dct, probs_day_dct = model_module.run_evaluate_static_2(day_model, day_grd_dct, num_day_tiles, day_cth_max,
day_night='DAY', l1b_or_l2=l1b_andor_l2,
prob_thresh=prob_thresh,
use_flight_altitude=use_flight_altitude,
......@@ -496,7 +512,7 @@ def run_icing_predict_image(clvrx_dir='/Users/tomrink/data/clavrx/RadC/', output
for ds_name in nght_train_params:
nght_grd_dct[ds_name] = np.stack(nght_data_dct[ds_name])
preds_nght_dct, probs_nght_dct = model_module.run_evaluate_static_2(night_model, nght_grd_dct, num_nght_tiles,
preds_nght_dct, probs_nght_dct = model_module.run_evaluate_static_2(night_model, nght_grd_dct, num_nght_tiles, nght_cth_max,
day_night='NIGHT', l1b_or_l2=l1b_andor_l2,
prob_thresh=prob_thresh,
use_flight_altitude=use_flight_altitude,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment