diff --git a/modules/icing/util.py b/modules/icing/util.py index 06fcc7cf33f882d4363fd4a2bc6f66b347500611..98e9517b9ab50a714c75645a7d41593bce3f4dce 100644 --- a/modules/icing/util.py +++ b/modules/icing/util.py @@ -365,12 +365,8 @@ def prepare_evaluate1x1(h5f, name_list, satellite='GOES16', domain='FD', res_fac for ds_name in name_list: 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) - print(gvals.shape) - gvals = np.expand_dims(gvals, axis=0) - print(gvals.shape) - print('--------------------') if gvals is not None: - grd_dct_n[ds_name] = gvals + grd_dct_n[ds_name] = gvals.flatten() cnt_a += 1 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 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] - 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)} @@ -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', 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 # # 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 probs_2d_dct[flvl] = fd_probs 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: preds = preds_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 fd_probs[day_idxs] = probs[day_idxs] 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: preds = preds_nght_dct[flvl].flatten() probs = probs_nght_dct[flvl].flatten()