Skip to content
Open
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
2 changes: 0 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,6 @@ jobs:
persist-credentials: false
- uses: Parcels-code/pixi-lock/create-and-cache@38495788b79a5ff26009aecc15daa9a8310b8832 # v0.1.0
id: pixi-lock
with:
pixi-version: v0.70.2
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: pixi-lock
Expand Down
4 changes: 2 additions & 2 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ build:
jobs:
create_environment:
- asdf plugin add pixi
- asdf install pixi 0.70.2
- asdf global pixi 0.70.2
- asdf install pixi latest
- asdf global pixi latest
install:
- pixi install -e docs
build:
Expand Down
8 changes: 4 additions & 4 deletions pixi.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ exclude-newer = "5d" # security pre-caution against compromised packages
preview = ["pixi-build"]
channels = ["conda-forge"]
platforms = ["win-64", "linux-64", "osx-64", "osx-arm64"]
requires-pixi = ">=0.67.0,!=0.68.0,<0.71.0"
requires-pixi = ">=0.72.0"

[package]
name = "parcels"
version = "dynamic" # dynamic versioning needs better support in pixi https://github.com/prefix-dev/pixi/issues/2923#issuecomment-2598460666 . Putting `version = "dynamic"` here for now until pixi recommends something else.

[package.build]
backend = { name = "pixi-build-python", version = "0.4.*" }
backend = { name = "pixi-build-python", version = "0.7.*" }

[package.host-dependencies]
setuptools = "*"
Expand All @@ -30,7 +30,7 @@ holoviews = ">=1.22.0" # https://github.com/prefix-dev/rattler-build/issues/2326
uxarray = ">=2026.04.1"
dask = ">=2024.5.1"
zarr = ">=3"
xgcm = { git = "https://github.com/xgcm/xgcm", rev = "532a3c567c475cbe192f49b9961f8117806bbfb7" } # TODO: Switch to release version after release is cut
xgcm = { git = "https://github.com/xgcm/xgcm", rev = "master" } # TODO: Switch to release version after release is cut
cf_xarray = ">=0.8.6"
cftime = ">=1.6.3"
pooch = ">=1.8.0"
Expand Down Expand Up @@ -61,7 +61,7 @@ pyarrow = "20.0.*"
uxarray = "==2026.04.1"
dask = "2024.6.*"
zarr = "3.0.*"
xgcm = { version = "0.9.*", channel = "conda-forge" }
xgcm = { git = "https://github.com/xgcm/xgcm", rev = "master" } # TODO: Switch to release version after release is cut
cf_xarray = "0.10.*"
cftime = "1.6.*"
pooch = "1.8.*"
Expand Down
9 changes: 6 additions & 3 deletions src/parcels/_core/xgrid.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from collections.abc import Hashable, Sequence
from dataclasses import dataclass
from functools import cached_property
from typing import Any, Literal, cast
from typing import TYPE_CHECKING, Any, Literal, cast

import numpy as np
import numpy.typing as npt
Expand All @@ -17,13 +17,16 @@
from parcels._sgrid.accessor import _get_dim_to_axis_mapping
from parcels._sgrid.core import SGRID_PADDING_TO_XGCM_POSITION

if TYPE_CHECKING:
import xgcm._core

_FIELD_DATA_ORDERING: Sequence[ptyping.XgcmAxisDirection] = "TZYX"
_XGRID_AXES_ORDERING: Sequence[ptyping.XgridAxis] = "ZYX"

_DEFAULT_XGCM_KWARGS: dict[str, Any] = {"periodic": False}
_DEFAULT_XGCM_KWARGS: dict[str, Any] = {"padding": "fill"}


def get_cell_count_along_dim(ds: xr.Dataset, axis: xgcm.Axis) -> int:
def get_cell_count_along_dim(ds: xr.Dataset, axis: xgcm._core.Axis) -> int:
first_coord = list(axis.coords.items())[0]
_, coord_var = first_coord

Expand Down
Loading