From 4a48e4fb4b554a0ac8160fae313a9e787b234a14 Mon Sep 17 00:00:00 2001 From: tomrink <rink@ssec.wisc.edu> Date: Tue, 19 Jul 2022 10:11:22 -0500 Subject: [PATCH] fix some cf issues --- modules/util/util.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/modules/util/util.py b/modules/util/util.py index aca86e0b..3cfe094c 100644 --- a/modules/util/util.py +++ b/modules/util/util.py @@ -754,15 +754,20 @@ def make_for_full_domain_predict_viirs_clavrx(h5f, name_list=None, res_fac=1, da if use_nl_comp: cld_phase = get_grid_values(h5f, 'cloud_phase', j_0, i_0, None, num_j=ylen, num_i=xlen) + dims_2d = cld_phase.shape + cld_phase.flatten() keep_0 = np.invert(np.isnan(cld_phase)) cld_dz = get_grid_values(h5f, 'cld_geo_thick', j_0, i_0, None, num_j=ylen, num_i=xlen) + cld_dz.flatten() keep_1 = np.logical_and(np.invert(np.isnan(cld_dz)), cld_dz > 5.0) reff = grd_dct['cld_reff_dcomp'] + reff.flatten() keep_2 = np.invert(np.isnan(reff)) opd = grd_dct['cld_opd_dcomp'] + opd.flatten() keep_3 = np.invert(np.isnan(opd)) keep = keep_0 & keep_1 & keep_2 & keep_3 @@ -773,6 +778,8 @@ def make_for_full_domain_predict_viirs_clavrx(h5f, name_list=None, res_fac=1, da cld_dz = cld_dz[keep] lwc_nlcomp, iwc_nlcomp = compute_lwc_iwc(cld_phase, reff, opd, cld_dz) + lwc_nlcomp = np.reshape(lwc_nlcomp, dims_2d) + iwc_nlcomp = np.reshape(iwc_nlcomp, dims_2d) grd_dct['iwc_dcomp'] = iwc_nlcomp grd_dct['lwc_dcomp'] = lwc_nlcomp -- GitLab