From 70815c2ec125d2ec1f7aa814c071b3649f22a8b4 Mon Sep 17 00:00:00 2001 From: tomrink <rink@ssec.wisc.edu> Date: Wed, 27 Jul 2022 11:13:20 -0500 Subject: [PATCH] account for mode = 'AUTO' --- modules/util/util.py | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/modules/util/util.py b/modules/util/util.py index 1edb4f85..f5e7c582 100644 --- a/modules/util/util.py +++ b/modules/util/util.py @@ -736,7 +736,7 @@ def make_for_full_domain_predict_viirs_clavrx(h5f, name_list=None, res_fac=1, da xlen = h5f['pixel_elements_along_scan_direction'].shape[0] use_nl_comp = False - if day_night == 'NIGHT' and use_dnb: + if (day_night == 'NIGHT' or day_night == 'AUTO') and use_dnb: use_nl_comp = True grd_dct = {name: None for name in name_list} @@ -759,16 +759,16 @@ def make_for_full_domain_predict_viirs_clavrx(h5f, name_list=None, res_fac=1, da if cnt_a > 0 and cnt_a != len(name_list): raise GenericException('weirdness') - # if False: - if use_nl_comp: - cld_phase = get_grid_values(h5f, 'cloud_phase', j_0, i_0, None, num_j=ylen, num_i=xlen) - cld_dz = get_grid_values(h5f, 'cld_geo_thick', j_0, i_0, None, num_j=ylen, num_i=xlen) - reff = grd_dct['cld_reff_dcomp'] - opd = grd_dct['cld_opd_dcomp'] - - lwc_nlcomp, iwc_nlcomp = compute_lwc_iwc(cld_phase, reff, opd, cld_dz) - grd_dct['iwc_dcomp'] = iwc_nlcomp - grd_dct['lwc_dcomp'] = lwc_nlcomp + # TODO: need to investigate discrepencies with compute_lwc_iwc + # if use_nl_comp: + # cld_phase = get_grid_values(h5f, 'cloud_phase', j_0, i_0, None, num_j=ylen, num_i=xlen) + # cld_dz = get_grid_values(h5f, 'cld_geo_thick', j_0, i_0, None, num_j=ylen, num_i=xlen) + # reff = grd_dct['cld_reff_dcomp'] + # opd = grd_dct['cld_opd_dcomp'] + # + # lwc_nlcomp, iwc_nlcomp = compute_lwc_iwc(cld_phase, reff, opd, cld_dz) + # grd_dct['iwc_dcomp'] = iwc_nlcomp + # grd_dct['lwc_dcomp'] = lwc_nlcomp grd_dct_n = {name: [] for name in name_list} -- GitLab