Skip to content
Snippets Groups Projects
Commit 0b6bd1d8 authored by tomrink's avatar tomrink
Browse files

another indexing fix

parent a6cc30e1
No related branches found
No related tags found
No related merge requests found
......@@ -577,23 +577,27 @@ def make_for_full_domain_predict(h5f, name_list=None, satellite='GOES16', domain
grd_dct_n = {name: [] for name in name_list}
n_x = int(xlen/s_x)
n_y = int(ylen/s_y)
n_x = int(xlen/s_x) - 1
n_y = int(ylen/s_y) - 1
r_x = xlen - (n_x * s_x)
x_d = 0 if r_x >= w_x else int((w_x - r_x)/s_x)
n_x -= x_d
r_y = ylen - (n_y * s_y)
y_d = 0 if r_y >= w_y else int((w_y - r_y)/s_y)
n_y -= y_d
ll = [j_0 + j*s_y for j in range(n_y-1)]
cc = [i_0 + i*s_x for i in range(n_x-1)]
ll = [j_0 + j*s_y for j in range(n_y)]
cc = [i_0 + i*s_x for i in range(n_x)]
for ds_name in name_list:
for j in range(n_y-1):
for j in range(n_y):
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):
for i in range(n_x):
i_ul = i * s_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}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment