Skip to content

Commit d6d6277

Browse files
committed
Remove outdated methods from GridAdapter
1 parent a226945 commit d6d6277

1 file changed

Lines changed: 5 additions & 13 deletions

File tree

parcels/gridadapter.py

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,11 @@
33
import numpy as np
44
import numpy.typing as npt
55

6+
from parcels import xgcm
67
from parcels.tools.converters import TimeConverter
7-
from parcels.xgcm.grid import Axis
8-
from parcels.xgcm.grid import Grid as NewGrid
98

109

11-
def get_dimensionality(axis: Axis | None) -> int:
10+
def get_dimensionality(axis: xgcm.Axis | None) -> int:
1211
if axis is None:
1312
return 1
1413
first_coord = list(axis.coords.items())[0]
@@ -26,12 +25,12 @@ def get_dimensionality(axis: Axis | None) -> int:
2625
return pos_to_dim[pos](n)
2726

2827

29-
def get_time(axis: Axis) -> npt.NDArray:
28+
def get_time(axis: xgcm.Axis) -> npt.NDArray:
3029
return axis._ds[axis.coords["center"]].values
3130

3231

3332
class GridAdapter:
34-
def __init__(self, grid: NewGrid, mesh="flat"):
33+
def __init__(self, grid: xgcm.Grid, mesh="flat"):
3534
self.grid = grid
3635
self.mesh = mesh
3736

@@ -106,7 +105,7 @@ def _z4d(self) -> Literal[0, 1]:
106105
return 1 if self.depth.shape == 4 else 0
107106

108107
@property
109-
def zonal_periodic(self): ... # ? hmmm
108+
def zonal_periodic(self): ... # ? hmmm, from v3, do we still need this?
110109

111110
@property
112111
def _gtype(self):
@@ -127,10 +126,3 @@ def _gtype(self):
127126
return GridType.CurvilinearZGrid
128127
else:
129128
return GridType.CurvilinearSGrid
130-
131-
@staticmethod
132-
def create_grid(lon, lat, depth, time, time_origin, mesh, **kwargs): ... # ? hmmm
133-
134-
def _check_zonal_periodic(self): ... # ? hmmm
135-
136-
def _add_Sdepth_periodic_halo(self, zonal, meridional, halosize): ... # ? hmmm

0 commit comments

Comments
 (0)