diff --git a/modules/deeplearning/cloud_opd_srcnn_abi.py b/modules/deeplearning/cloud_opd_srcnn_abi.py index 9001721bc49dbab434b7653f0b9f0da50b1e9e0c..83198e71e3ec65cca5f7201629b37837921c1498 100644 --- a/modules/deeplearning/cloud_opd_srcnn_abi.py +++ b/modules/deeplearning/cloud_opd_srcnn_abi.py @@ -269,6 +269,15 @@ class SRCNN: tmp = normalize(tmp, param, mean_std_dct) data_norm.append(tmp) + tmp = input_label[:, label_idx_i, :, :] + tmp = tmp.copy() + tmp = np.where(np.isnan(tmp), 0.0, tmp) + tmp = tmp[:, self.slc_y_2, self.slc_x_2] + tmp = self.upsample(tmp) + tmp = smooth_2d(tmp) + tmp = normalize(tmp, label_param, mean_std_dct) + data_norm.append(tmp) + # for param in sub_fields: # idx = params.index(param) # tmp = input_data[:, idx, :, :] @@ -293,15 +302,7 @@ class SRCNN: tmp = np.where(np.isnan(tmp), 0, tmp) data_norm.append(tmp) # --------------------------------------------------- - tmp = input_label[:, label_idx_i, :, :] - tmp = tmp.copy() - tmp = np.where(np.isnan(tmp), 0.0, tmp) - tmp = tmp[:, self.slc_y_2, self.slc_x_2] - tmp = self.upsample(tmp) - tmp = smooth_2d(tmp) - tmp = normalize(tmp, label_param, mean_std_dct) - data_norm.append(tmp) - # --------- + data = np.stack(data_norm, axis=3) data = data.astype(np.float32)