diff --git a/modules/deeplearning/cloud_fraction_fcn_abi.py b/modules/deeplearning/cloud_fraction_fcn_abi.py index 8f23e9966f159fd1476702ad859dee3d6eecee5e..c0b2c15e270b8743825970dcbfb842835ead685e 100644 --- a/modules/deeplearning/cloud_fraction_fcn_abi.py +++ b/modules/deeplearning/cloud_fraction_fcn_abi.py @@ -824,8 +824,8 @@ def run_evaluate_static_full_disk(in_file, out_file, ckpt_dir): refl_hi = get_grid_values_all(h5f, 'refl_0_65um_nom_max_sub') refl_std = get_grid_values_all(h5f, 'refl_0_65um_nom_stddev_sub') cp = get_grid_values_all(h5f, label_param) - lons = get_grid_values_all(h5f, 'longitude') - lats = get_grid_values_all(h5f, 'latitude') + # lons = get_grid_values_all(h5f, 'longitude') + # lats = get_grid_values_all(h5f, 'latitude') bt_nh = bt[0:h_y_len+1, :] refl_nh = refl[0:h_y_len+1, :] @@ -841,8 +841,6 @@ def run_evaluate_static_full_disk(in_file, out_file, ckpt_dir): refl_std_sh = refl_std[h_y_len-1:y_len, :] cp_sh = cp[h_y_len-1:y_len, :] - h5f.close() - cld_frac_nh = run_evaluate_static_(bt_nh, refl_nh, refl_lo_nh, refl_hi_nh, refl_std_nh, cp_nh, ckpt_dir) cld_frac_sh = run_evaluate_static_(bt_sh, refl_sh, refl_lo_sh, refl_hi_sh, refl_std_sh, cp_sh, ckpt_dir) @@ -852,17 +850,20 @@ def run_evaluate_static_full_disk(in_file, out_file, ckpt_dir): cld_frac_out[border:h_y_len, border:x_len - border] = cld_frac_nh[0, :, :] cld_frac_out[h_y_len:y_len - border, border:x_len - border] = cld_frac_sh[0, :, :] - var_names = ['cloud_fraction', 'temp_11_0um', 'refl_0_65um'] - dims = ['num_params', 'y', 'x'] - da = xr.DataArray(np.stack([cld_frac_out, bt, refl], axis=0), dims=dims) - da.assign_coords({ - 'num_params': var_names, - 'lat': (['y', 'x'], lats), - 'lon': (['y', 'x'], lons) - }) + # make DataArray + # var_names = ['cloud_fraction', 'temp_11_0um', 'refl_0_65um'] + # dims = ['num_params', 'y', 'x'] + # da = xr.DataArray(np.stack([cld_frac_out, bt, refl], axis=0), dims=dims) + # da.assign_coords({ + # 'num_params': var_names, + # 'lat': (['y', 'x'], lats), + # 'lon': (['y', 'x'], lons) + # }) + + h5f.close() if out_file is not None: - np.save(out_file, (cld_frac_out, bt, refl, cp, lons, lats)) + np.save(out_file, (cld_frac_out, bt, refl, cp)) else: # return [cld_frac_out, bt, refl, cp, lons, lats] return cld_frac_out