Skip to content

Commit 15120eb

Browse files
committed
Update XGrid to be a BaseGrid
1 parent 5203e6c commit 15120eb

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

parcels/xgrid.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import numpy.typing as npt
55

66
from parcels import xgcm
7+
from parcels.basegrid import BaseGrid
78
from parcels.tools.converters import TimeConverter
89

910

@@ -29,7 +30,7 @@ def get_time(axis: xgcm.Axis) -> npt.NDArray:
2930
return axis._ds[axis.coords["center"]].values
3031

3132

32-
class XGrid:
33+
class XGrid(BaseGrid):
3334
"""
3435
Class to represent a structured grid in Parcels. Wraps a xgcm-like Grid object (we use a trimmed down version of the xgcm.Grid class that is vendored with Parcels).
3536
@@ -162,3 +163,5 @@ def _gtype(self):
162163
return GridType.CurvilinearZGrid
163164
else:
164165
return GridType.CurvilinearSGrid
166+
167+
def search(self, z, y, x, ei=None, search2D=False): ...

0 commit comments

Comments
 (0)