Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
correction bug
problem when indices is on edge of datas
  • Loading branch information
ludwigVonKoopa committed May 12, 2021
commit 13177b657e3f37b88e734a0aac1c8254d5547fca
5 changes: 5 additions & 0 deletions src/py_eddy_tracker/dataset/grid.py
Original file line number Diff line number Diff line change
Expand Up @@ -2551,6 +2551,11 @@ def get_uv_quad(i0, j0, u, v, m, nb_x=0):
i1, j1 = i0 + 1, j0 + 1
if nb_x != 0:
i1 %= nb_x
i_max, j_max = m.shape

# if i1 >= i_max or j1 >= j_max:
# return True, nan, nan, nan, nan, nan, nan, nan, nan

if m[i0, j0] or m[i0, j1] or m[i1, j0] or m[i1, j1]:
return True, nan, nan, nan, nan, nan, nan, nan, nan
# Extract value for u and v
Expand Down