Skip to content

Commit 971b867

Browse files
Simplifying grid creation
1 parent 0003519 commit 971b867

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

tests/test_xgrid.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
import numpy as np
55
import pytest
66
import xarray as xr
7-
import xgcm
87
from numpy.testing import assert_allclose
98

109
from parcels import Field
@@ -14,7 +13,6 @@
1413
_search_1d_array,
1514
)
1615
from parcels._core.xgrid import (
17-
_DEFAULT_XGCM_KWARGS,
1816
XGrid,
1917
_transpose_xfield_data_to_tzyx,
2018
)
@@ -143,7 +141,7 @@ def test_vertical1D_field():
143141
{"z1d": (["depth"], np.linspace(0, 10, nz))},
144142
coords={"depth": (["depth"], np.linspace(0, 1, nz), {"axis": "Z"})},
145143
)
146-
grid = XGrid(xgcm.Grid(ds, **_DEFAULT_XGCM_KWARGS))
144+
grid = XGrid.from_dataset(ds)
147145
field = Field("z1d", ds["z1d"], grid)
148146

149147
assert field.eval(np.timedelta64(0, "s"), 0.45, 0, 0) == 4.5

0 commit comments

Comments
 (0)