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

snapshot...

parent c007a8b2
No related branches found
No related tags found
No related merge requests found
...@@ -365,12 +365,8 @@ def prepare_evaluate1x1(h5f, name_list, satellite='GOES16', domain='FD', res_fac ...@@ -365,12 +365,8 @@ def prepare_evaluate1x1(h5f, name_list, satellite='GOES16', domain='FD', res_fac
for ds_name in name_list: for ds_name in name_list:
fill_value, fill_value_name = get_fill_attrs(ds_name) fill_value, fill_value_name = get_fill_attrs(ds_name)
gvals = get_grid_values(h5f, ds_name, j_0, i_0, None, num_j=ylen, num_i=xlen, fill_value_name=fill_value_name, fill_value=fill_value) gvals = get_grid_values(h5f, ds_name, j_0, i_0, None, num_j=ylen, num_i=xlen, fill_value_name=fill_value_name, fill_value=fill_value)
print(gvals.shape)
gvals = np.expand_dims(gvals, axis=0)
print(gvals.shape)
print('--------------------')
if gvals is not None: if gvals is not None:
grd_dct_n[ds_name] = gvals grd_dct_n[ds_name] = gvals.flatten()
cnt_a += 1 cnt_a += 1
if cnt_a > 0 and cnt_a != len(name_list): if cnt_a > 0 and cnt_a != len(name_list):
...@@ -383,7 +379,7 @@ def prepare_evaluate1x1(h5f, name_list, satellite='GOES16', domain='FD', res_fac ...@@ -383,7 +379,7 @@ def prepare_evaluate1x1(h5f, name_list, satellite='GOES16', domain='FD', res_fac
satzen = satzen[0:n_y*s_y:s_y, 0:n_x*s_x:s_x] satzen = satzen[0:n_y*s_y:s_y, 0:n_x*s_x:s_x]
cldmsk = cldmsk[0:n_y*s_y:s_y, 0:n_x*s_x:s_x] cldmsk = cldmsk[0:n_y*s_y:s_y, 0:n_x*s_x:s_x]
return grd_dct_n, solzen, satzen, cldmsk, ll, cc return grd_dct_n, solzen.flatten(), satzen.flatten(), cldmsk.flatten(), ll, cc
flt_level_ranges_str = {k: None for k in range(6)} flt_level_ranges_str = {k: None for k in range(6)}
...@@ -1485,7 +1481,7 @@ def run_icing_predict_image_1x1(clvrx_dir='/Users/tomrink/data/clavrx/RadC/', ou ...@@ -1485,7 +1481,7 @@ def run_icing_predict_image_1x1(clvrx_dir='/Users/tomrink/data/clavrx/RadC/', ou
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, obs_alt=None, flight_level=None, obs_intensity=None): obs_lons=None, obs_lats=None, obs_times=None, obs_alt=None, flight_level=None, obs_intensity=None):
import deeplearning.icing_fcn as icing_fcn # import deeplearning.icing_fcn as icing_fcn
# model_module = icing_fcn # model_module = icing_fcn
# #
# if day_model_path is not None: # if day_model_path is not None:
...@@ -1579,9 +1575,7 @@ def run_icing_predict_image_1x1(clvrx_dir='/Users/tomrink/data/clavrx/RadC/', ou ...@@ -1579,9 +1575,7 @@ def run_icing_predict_image_1x1(clvrx_dir='/Users/tomrink/data/clavrx/RadC/', ou
probs_2d_dct[flvl] = fd_probs probs_2d_dct[flvl] = fd_probs
if (day_night == 'AUTO' or day_night == 'DAY') and num_day_tiles > 0: if (day_night == 'AUTO' or day_night == 'DAY') and num_day_tiles > 0:
preds_day_dct, probs_day_dct = icing_fcn.run_evaluate_static_2(day_model, data_dct, 1,
prob_thresh=prob_thresh,
flight_levels=flight_levels)
for flvl in flight_levels: for flvl in flight_levels:
preds = preds_day_dct[flvl].flatten() preds = preds_day_dct[flvl].flatten()
probs = probs_day_dct[flvl].flatten() probs = probs_day_dct[flvl].flatten()
...@@ -1591,9 +1585,7 @@ def run_icing_predict_image_1x1(clvrx_dir='/Users/tomrink/data/clavrx/RadC/', ou ...@@ -1591,9 +1585,7 @@ def run_icing_predict_image_1x1(clvrx_dir='/Users/tomrink/data/clavrx/RadC/', ou
fd_probs[day_idxs] = probs[day_idxs] fd_probs[day_idxs] = probs[day_idxs]
if (day_night == 'AUTO' or day_night == 'NIGHT') and num_nght_tiles > 0: if (day_night == 'AUTO' or day_night == 'NIGHT') and num_nght_tiles > 0:
preds_nght_dct, probs_nght_dct = icing_fcn.run_evaluate_static_2(night_model, data_dct, 1,
prob_thresh=prob_thresh,
flight_levels=flight_levels)
for flvl in flight_levels: for flvl in flight_levels:
preds = preds_nght_dct[flvl].flatten() preds = preds_nght_dct[flvl].flatten()
probs = probs_nght_dct[flvl].flatten() probs = probs_nght_dct[flvl].flatten()
......
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