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

snapshot...

parent 61832776
Branches
No related tags found
No related merge requests found
...@@ -357,32 +357,11 @@ def run_icing_predict_image(clvrx_dir='/Users/tomrink/data/clavrx/RadC/', output ...@@ -357,32 +357,11 @@ def run_icing_predict_image(clvrx_dir='/Users/tomrink/data/clavrx/RadC/', output
model_module = icing_fcn model_module = icing_fcn
if day_model_path is not None: if day_model_path is not None:
ckpt_dir_s = os.listdir(day_model_path) day_model = model_module.load_model(day_model_path, day_night='DAY', l1b_andor_l2=l1b_andor_l2,
ckpt_dir = day_model_path + ckpt_dir_s[0] satellite=satellite, use_flight_altitude=use_flight_altitude)
day_model = IcingIntensityFCN(day_night='DAY', l1b_or_l2=l1b_andor_l2, satellite=satellite, use_flight_altitude=use_flight_altitude)
day_model.num_data_samples = 10000
day_model.build_model()
day_model.build_training()
day_model.build_evaluation()
ckpt = tf.train.Checkpoint(step=tf.Variable(1), model=day_model.model)
ckpt_manager = tf.train.CheckpointManager(ckpt, ckpt_dir, max_to_keep=3)
ckpt.restore(ckpt_manager.latest_checkpoint)
if night_model_path is not None: if night_model_path is not None:
ckpt_dir_s = os.listdir(night_model_path) night_model = model_module.load_model(night_model_path, day_night='NIGHT', l1b_andor_l2=l1b_andor_l2,
ckpt_dir = night_model_path + ckpt_dir_s[0] satellite=satellite, use_flight_altitude=use_flight_altitude)
night_model = IcingIntensityFCN(day_night='NIGHT', l1b_or_l2=l1b_andor_l2, satellite=satellite, use_flight_altitude=use_flight_altitude)
night_model.num_data_samples = 10000
night_model.build_model()
night_model.build_training()
night_model.build_evaluation()
ckpt = tf.train.Checkpoint(step=tf.Variable(1), model=night_model.model)
ckpt_manager = tf.train.CheckpointManager(ckpt, ckpt_dir, max_to_keep=3)
ckpt.restore(ckpt_manager.latest_checkpoint)
alt_lo, alt_hi = 0.0, 15000.0 alt_lo, alt_hi = 0.0, 15000.0
if use_flight_altitude is True: if use_flight_altitude is True:
...@@ -487,9 +466,9 @@ def run_icing_predict_image(clvrx_dir='/Users/tomrink/data/clavrx/RadC/', output ...@@ -487,9 +466,9 @@ def run_icing_predict_image(clvrx_dir='/Users/tomrink/data/clavrx/RadC/', output
for ds_name in day_train_params: for ds_name in day_train_params:
day_grd_dct[ds_name] = np.stack(day_data_dct[ds_name]) 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, day_cth_max, preds_day_dct, probs_day_dct = \
day_night='DAY', l1b_or_l2=l1b_andor_l2, model_module.run_evaluate_static_2(day_model, day_grd_dct, num_day_tiles, day_cth_max, day_night='DAY',
prob_thresh=prob_thresh, l1b_or_l2=l1b_andor_l2, prob_thresh=prob_thresh,
use_flight_altitude=use_flight_altitude, use_flight_altitude=use_flight_altitude,
flight_levels=flight_levels) flight_levels=flight_levels)
...@@ -512,11 +491,10 @@ def run_icing_predict_image(clvrx_dir='/Users/tomrink/data/clavrx/RadC/', output ...@@ -512,11 +491,10 @@ def run_icing_predict_image(clvrx_dir='/Users/tomrink/data/clavrx/RadC/', output
for ds_name in nght_train_params: for ds_name in nght_train_params:
nght_grd_dct[ds_name] = np.stack(nght_data_dct[ds_name]) 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, nght_cth_max, preds_nght_dct, probs_nght_dct = \
day_night='NIGHT', l1b_or_l2=l1b_andor_l2, model_module.run_evaluate_static_2(night_model, nght_grd_dct, num_nght_tiles, nght_cth_max,
prob_thresh=prob_thresh, day_night='NIGHT', l1b_or_l2=l1b_andor_l2, prob_thresh=prob_thresh,
use_flight_altitude=use_flight_altitude, use_flight_altitude=use_flight_altitude, flight_levels=flight_levels)
flight_levels=flight_levels)
nght_idxs = np.array(nght_idxs) nght_idxs = np.array(nght_idxs)
for flvl in flight_levels: for flvl in flight_levels:
nght_preds = preds_nght_dct[flvl] nght_preds = preds_nght_dct[flvl]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment