diff --git a/modules/icing/pirep_goes.py b/modules/icing/pirep_goes.py index 93f222d5aa1615613dfbcecd739bf0021bb7fdab..8c041d211731aeb64612aaa9dc106231d76c23d9 100644 --- a/modules/icing/pirep_goes.py +++ b/modules/icing/pirep_goes.py @@ -1335,22 +1335,22 @@ def spatial_filter(icing_dict): grd_x_hi = lon_space.shape[0] - 1 grd_y_hi = lat_space.shape[0] - 1 - for key in keys: - - grd_bins = np.full((lat_space.shape[0], lon_space.shape[0]), 0) + grd_bins = np.full((lat_space.shape[0], lon_space.shape[0]), 0) - tup = icing_dict.get(key) - lat = tup[0] - lon = tup[1] + for key in keys: + rpts = icing_dict.get(key) + for tup in rpts: + lat = tup[0] + lon = tup[1] - lon_idx = np.searchsorted(lon_space, lon) - lat_idx = np.searchsorted(lat_space, lat) + lon_idx = np.searchsorted(lon_space, lon) + lat_idx = np.searchsorted(lat_space, lat) - if lon_idx < 0 or lon_idx > grd_x_hi: - continue - if lat_idx < 0 or lat_idx > grd_y_hi: - continue + if lon_idx < 0 or lon_idx > grd_x_hi: + continue + if lat_idx < 0 or lat_idx > grd_y_hi: + continue - grd_bins[lat_idx, lon_idx] += 1 + grd_bins[lat_idx, lon_idx] += 1 return grd_bins