Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions environment.yml
Original file line numberDiff line numberDiff line change
Expand Up@@ -18,6 +18,7 @@ dependencies: #! Keep in sync with [tool.pixi.dependencies] in pyproject.toml
- scikit-learn
- zarr>=2.11.0,!=2.18.0,<3
- uxarray>=2025.3.0
- xgcm>=0.9.0
- pooch

# Notebooks
Expand Down
10 changes: 4 additions & 6 deletions parcels/fieldset.py
Original file line numberDiff line numberDiff line change
Expand Up@@ -6,8 +6,8 @@

import numpy as np
import xarray as xr
import xgcm

from parcels import xgcm
from parcels._core.utils.time import get_datetime_type_calendar
from parcels._core.utils.time import is_compatible as datetime_is_compatible
from parcels._typing import Mesh
Expand DownExpand Up@@ -130,14 +130,12 @@ def add_constant_field(self, name: str, value, mesh: Mesh = "flat"):
correction for zonal velocity U near the poles.
2. flat: No conversion, lat/lon are assumed to be in m.
"""
da = xr.DataArray(
data=np.full((1, 1, 1, 1), value),
)
grid = XGrid(xgcm.Grid(da))
ds = xr.Dataset({name: (["time", "lat", "lon", "depth"], np.full((1, 1, 1, 1), value))})
grid = XGrid(xgcm.Grid(ds))
self.add_field(
Field(
name,
da,
ds[name],
grid,
interp_method=None, # TODO : Need to define an interpolation method for constants
)
Expand Down
3 changes: 0 additions & 3 deletions parcels/xgcm/__init__.py

This file was deleted.

128 changes: 0 additions & 128 deletions parcels/xgcm/comodo.py

This file was deleted.

Loading
Loading