diff --git a/modules/icing/pirep_goes.py b/modules/icing/pirep_goes.py index 1f5c71dc20ae0ec351b2ab9392e7e6f188d97cf4..685ae33f425cf19abbf6e03f114392c5a140df75 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):