Skip to content

Commit 89dc3dc

Browse files
Updating script to new v4 structure
1 parent 6c8c9fa commit 89dc3dc

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

MOi-Curvilinear/benchmark_moi_curvilinear.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@
1616
parcelsv4 = True
1717
try:
1818
import xgcm
19-
from parcels.xgrid import _XGRID_AXES
20-
from parcels.application_kernels.interpolation import XLinear
19+
from parcels.interpolators import XLinear
2120
except ImportError:
2221
parcelsv4 = False
2322

@@ -76,7 +75,7 @@ def run_benchmark(interpolator: str, trace_memory: bool = False, surface_simulat
7675
coords["Z"] = {"center": "deptht", "left": "depth"}
7776
print(ds)
7877

79-
grid = parcels.xgrid.XGrid(xgcm.Grid(ds, coords=coords, autoparse_metadata=False, periodic=False), mesh="spherical")
78+
grid = parcels._core.xgrid.XGrid(xgcm.Grid(ds, coords=coords, autoparse_metadata=False, periodic=False), mesh="spherical")
8079

8180
U = parcels.Field("U", ds["U"], grid, interp_method=interp_method)
8281
V = parcels.Field("V", ds["V"], grid, interp_method=interp_method)
@@ -127,7 +126,7 @@ def run_benchmark(interpolator: str, trace_memory: bool = False, surface_simulat
127126
else:
128127
start = time.time()
129128

130-
pset.execute(parcels.AdvectionEE, runtime=runtime, dt=dt, verbose_progress=False)
129+
pset.execute(parcels.kernels.AdvectionEE, runtime=runtime, dt=dt, verbose_progress=False)
131130

132131
if trace_memory:
133132
current, peak = tracemalloc.get_traced_memory()

0 commit comments

Comments
 (0)