Skip to content

Commit a6043c3

Browse files
Fixing @CKehl's review comments
1 parent b56aed0 commit a6043c3

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

parcels/field.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1638,12 +1638,12 @@ def spatial_c_grid_interpolation3D(self, ti, z, y, x, time, particle=None):
16381638
def _is_land2D(self, di, yi, xi):
16391639
if self.U.data.ndim == 3:
16401640
if di < np.shape(self.U.data)[0]:
1641-
return (self.U.data[di, yi, xi] == 0.) and (self.V.data[di, yi, xi] == 0.)
1641+
return np.isclose(self.U.data[di, yi, xi], 0.) and np.isclose(self.V.data[di, yi, xi], 0.)
16421642
else:
16431643
return True
16441644
else:
16451645
if di < self.U.grid.zdim and yi < np.shape(self.U.data)[-2] and xi < np.shape(self.U.data)[-1]:
1646-
return (self.U.data[0, di, yi, xi] == 0.) and (self.V.data[0, di, yi, xi] == 0.)
1646+
return np.isclose(self.U.data[0, di, yi, xi], 0.) and np.isclose(self.V.data[0, di, yi, xi], 0.)
16471647
else:
16481648
return True
16491649

0 commit comments

Comments
 (0)