diff --git a/modules/deeplearning/cloud_opd_srcnn_viirs.py b/modules/deeplearning/cloud_opd_srcnn_viirs.py index cdca7e9d5e703357f340b60f9b85da43c82e67e8..a1f5db22ac10acfd4a807da6754a561f026d416e 100644 --- a/modules/deeplearning/cloud_opd_srcnn_viirs.py +++ b/modules/deeplearning/cloud_opd_srcnn_viirs.py @@ -747,30 +747,19 @@ def run_evaluate_static(in_file, out_file, ckpt_dir): # cld_opd = normalize(cld_opd, label_param, mean_std_dct) data = np.stack([bt, refl, cld_opd], axis=3) - print('input data shape: ', data.shape) h5f.close() cld_opd_sres = nn.run_evaluate(data, ckpt_dir) cld_opd_sres = denormalize(cld_opd_sres, label_param, mean_std_dct) # cld_opd_sres = descale(cld_opd_sres, label_param, mean_std_dct) - _, ylen, xlen, _ = cld_opd_sres.shape - - # cld_opd_sres_out = np.zeros((LEN_Y, LEN_X), dtype=np.float32) - # refl_out = np.zeros((LEN_Y, LEN_X), dtype=np.float32) - # cld_opd_out = np.zeros((LEN_Y, LEN_X), dtype=np.float32) - # - # cld_opd_sres_out[border:(border+ylen), border:(border+xlen)] = cld_opd_sres[0, :, :, 0] - # refl_out[0:(ylen+2*border), 0:(xlen+2*border)] = refl[0, :, :] - # cld_opd_out[0:(ylen+2*border), 0:(xlen+2*border)] = cld_opd[0, :, :] - print(refl.shape, cld_opd.shape, cld_opd_hres.shape) - ylen_in, xlen_in = cld_opd_hres.shape + + ylen, xlen = cld_opd_hres.shape cld_opd_sres_out = cld_opd_sres[0, :, :, 0] - refl_out = refl[0, 1:ylen_in-1, 1:xlen_in-1] - cld_opd_out = cld_opd[0, 1:ylen_in-1, 1:xlen_in-1] - cld_opd_hres = cld_opd_hres[1:ylen_in-1, 1:xlen_in-1] - print(cld_opd_sres_out.shape, refl_out.shape, cld_opd_out.shape, cld_opd_hres.shape) + refl_out = refl[0, border:ylen-border, border:xlen-border] + cld_opd_out = cld_opd[0, border:ylen-border, border:xlen-border] + cld_opd_hres = cld_opd_hres[border:ylen-border, border:xlen-border] refl_out = denormalize(refl_out, 'refl_0_65um_nom', mean_std_dct) cld_opd_out = denormalize(cld_opd_out, label_param, mean_std_dct)