From a6cc30e19ace58d5ce7d4757ccd665c4104f02b0 Mon Sep 17 00:00:00 2001 From: tomrink <rink@ssec.wisc.edu> Date: Mon, 31 Jan 2022 12:57:19 -0600 Subject: [PATCH] fix indexing problem --- modules/util/util.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/modules/util/util.py b/modules/util/util.py index f2b0a928..62578c7e 100644 --- a/modules/util/util.py +++ b/modules/util/util.py @@ -586,9 +586,15 @@ def make_for_full_domain_predict(h5f, name_list=None, satellite='GOES16', domain for ds_name in name_list: for j in range(n_y-1): j_ul = j * s_y + j_ul_b = j_ul + w_y + if j_ul_b >= ylen: + continue for i in range(n_x-1): i_ul = i * s_x - grd_dct_n[ds_name].append(grd_dct[ds_name][j_ul:j_ul+w_y, i_ul:i_ul+w_x]) + i_ul_b = i_ul + w_x + if i_ul_b >= xlen: + continue + grd_dct_n[ds_name].append(grd_dct[ds_name][j_ul:j_ul_b, i_ul:i_ul_b]) grd_dct = {name: None for name in name_list} for ds_name in name_list: -- GitLab