diff --git a/modules/deeplearning/cloud_opd_srcnn_viirs.py b/modules/deeplearning/cloud_opd_srcnn_viirs.py index 29521abbc0199a550011e4f41b84f459a393ddc7..fde9fd6dad0a6720e44251aed8bd2d202151b11d 100644 --- a/modules/deeplearning/cloud_opd_srcnn_viirs.py +++ b/modules/deeplearning/cloud_opd_srcnn_viirs.py @@ -683,6 +683,15 @@ def run_evaluate_static(in_file, out_file, ckpt_dir): h5f = h5py.File(in_file, 'r') refl = get_grid_values_all(h5f, 'super/refl_0_65um') + ylen, xlen = refl.shape + refl = refl[0:int(ylen/2), :] + bt = get_grid_values_all(h5f, 'orig/temp_11_0um') + ylen, xlen = bt.shape + bt = bt[0:int(ylen/2), :] + cld_opd = get_grid_values_all(h5f, 'super/' + label_param) + ylen, xlen = cld_opd.shape + cld_opd = cld_opd[0:int(ylen/2), :] + LEN_Y, LEN_X = refl.shape LEN_Y -= 16 LEN_X -= 16 @@ -694,7 +703,6 @@ def run_evaluate_static(in_file, out_file, ckpt_dir): refl = refl[nn.slc_y, nn.slc_x] refl = np.expand_dims(refl, axis=0) - bt = get_grid_values_all(h5f, 'orig/temp_11_0um') bt = np.where(np.isnan(bt), 0, bt) bt = bt[nn.slc_y_m, nn.slc_x_m] bt = np.expand_dims(bt, axis=0) @@ -712,7 +720,6 @@ def run_evaluate_static(in_file, out_file, ckpt_dir): # refl_hi = np.squeeze(refl_hi) # refl_avg = np.squeeze(refl_avg) - cld_opd = get_grid_values_all(h5f, 'super/'+label_param) cld_opd = np.where(np.isnan(cld_opd), 0, cld_opd) cld_opd = cld_opd[nn.slc_y_2, nn.slc_x_2] cld_opd = np.expand_dims(cld_opd, axis=0)