Skip to content

Commit

Permalink
Add more debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
mpiannucci committed Jul 22, 2024
1 parent 7ccef5e commit b33e55a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions xarray_subset_grid/grids/ugrid.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,9 @@ def subset_polygon(
# can't use uints because of the -1 fill value
int_type = np.min_scalar_type(-1 * np.max(node_inside.shape))
print('int type', int_type)
print('tris max', tris.max().values)
valid_tris = tris.where(tris >= 0, drop=False).astype(int_type)
print('valid tris max', valid_tris.max().values)
print('valid tris', valid_tris.shape)
print('node inside', node_inside.shape)
tri_mask = node_inside[valid_tris]
Expand Down

0 comments on commit b33e55a

Please sign in to comment.