From bef9ccc64de2e166713706a31434c8a1bc75a97f Mon Sep 17 00:00:00 2001 From: tomrink <rink@ssec.wisc.edu> Date: Thu, 15 Jul 2021 14:41:30 -0500 Subject: [PATCH] minor... --- modules/icing/pirep_goes.py | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/modules/icing/pirep_goes.py b/modules/icing/pirep_goes.py index 1f5c71dc..685ae33f 100644 --- a/modules/icing/pirep_goes.py +++ b/modules/icing/pirep_goes.py @@ -311,16 +311,16 @@ def make_for_full_domain_predict(clvrx_file, name_list=l1b_ds_list): h5f = h5py.File(clvrx_file, 'r') - grd_dct = {name: [] for name in name_list} + grd_dct = {name: None for name in name_list} cnt_a = 0 for didx, ds_name in enumerate(name_list): gvals = get_grid_values_all(h5f, ds_name) if gvals is not None: - grd_dct[ds_name].append(gvals) + grd_dct[ds_name] = gvals cnt_a += 1 - if cnt_a > 0 and cnt_a != len(ds_list): + if cnt_a > 0 and cnt_a != len(name_list): raise GenericException('weirdness') grd_dct_n = {name: [] for name in name_list} @@ -331,14 +331,19 @@ def make_for_full_domain_predict(clvrx_file, name_list=l1b_ds_list): i_0 = 0 j_0 = 0 - for didx, ds_name in enumerate(ds_list): + for didx, ds_name in enumerate(name_list): + print(ds_name) for j in range(4, n_y-4, 1): j_ul = j_0 + j * w_y for i in range(4, n_x-4, 1): i_ul = i_0 + i * w_x grd_dct_n[ds_name].append(grd_dct[ds_name][j_ul:j_ul+w_y, i_ul:i_ul+w_x]) - return grd_dct_n + grd_dct = {name: None for name in name_list} + for didx, ds_name in enumerate(name_list): + grd_dct[ds_name] = np.concatenate(grd_dct_n[ds_name]) + + return grd_dct def analyze(ice_dct, no_ice_dct): -- GitLab