Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
ba7fe37
Initial 3d z coordinate implementation for unstructured grids
wyatt-fluidnumerics Oct 5, 2026
57cf6dd
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 5, 2026
4f921d6
Removing unused polars import
erikvansebille Oct 6, 2026
a12142d
Updated markdown cells in new tutorial
wyatt-fluidnumerics Oct 6, 2026
cf3725b
Merge branch 'sigma-vertical-grid-support' of github.com:Parcels-code…
wyatt-fluidnumerics Oct 6, 2026
85aa9d4
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 6, 2026
cc71804
Merge branch 'main' into sigma-vertical-grid-support
wyatt-fluidnumerics Oct 7, 2026
21c2cf5
Temporal Linear interpolatation of the z coordinate during grid search
wyatt-fluidnumerics Oct 8, 2026
c9bc913
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 8, 2026
37ac028
Merge branch 'main' into sigma-vertical-grid-support
wyatt-fluidnumerics Oct 8, 2026
dea15dc
Fixed ci failures
wyatt-fluidnumerics Oct 8, 2026
debe984
Added experimental/memory warning during 3D z coordinate fieldset con…
wyatt-fluidnumerics Oct 8, 2026
85c4d69
Merge branch 'main' into sigma-vertical-grid-support
wyatt-fluidnumerics Oct 9, 2026
09fee29
time varying z coordinate support for XGrids
wyatt-fluidnumerics Oct 9, 2026
0701f1c
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 9, 2026
0ab3022
Changed tutorial to include structured grids
wyatt-fluidnumerics Oct 9, 2026
a6788a0
Merge branch 'sigma-vertical-grid-support' of github.com:Parcels-code…
wyatt-fluidnumerics Oct 9, 2026
27b8192
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 9, 2026
096033d
Enforce correct dimensions for Z on XGrid construction
wyatt-fluidnumerics Oct 9, 2026
6dfa56d
Merge branch 'sigma-vertical-grid-support' of github.com:Parcels-code…
wyatt-fluidnumerics Oct 9, 2026
3ce43e4
Merge branch 'main' into sigma-vertical-grid-support
wyatt-fluidnumerics Oct 9, 2026
de18763
Switched tutorial kernel to 2D RK2 and bumped dt to 30min
wyatt-fluidnumerics Oct 13, 2026
f6c79f9
change wording of particle vertical position in ParticleSet error
wyatt-fluidnumerics Oct 13, 2026
35464a3
simplify simple_UV_sigma_dataset call signature
wyatt-fluidnumerics Oct 13, 2026
2bac6e2
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 13, 2026
40ed761
Changed simple xgrid dataset generators to use explicit dims rather t…
wyatt-fluidnumerics Oct 13, 2026
3f47436
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 13, 2026
b2b44c0
Moved uxgrid time varying vertical grid search to a helper function
wyatt-fluidnumerics Oct 13, 2026
30b4dce
Removed cell_columns transpose from grid searches
wyatt-fluidnumerics Oct 13, 2026
b2c15af
Merge branch 'main' into sigma-vertical-grid-support
wyatt-fluidnumerics Oct 13, 2026
73ce450
First attempt at converting croco notebook to use time-varying depth
erikvansebille Oct 14, 2026
d0948d4
Merge branch 'main' into croco_with_timevarying_depth
erikvansebille Oct 15, 2026
fb21fb1
Merge branch 'main' into croco_with_timevarying_depth
erikvansebille Nov 4, 2026
d722212
Merge branch 'main' into croco_with_timevarying_depth
erikvansebille Nov 8, 2026
0ea16cd
Updating CROCO tutorial to new overflow simulation data
erikvansebille Nov 8, 2026
8475f1a
Add temporary xfail to convert-test
erikvansebille Nov 8, 2026
3cd811b
Remove old _sigmagrids.py kernels
erikvansebille Nov 8, 2026
b834174
Adding xroms to pytest dependencies
erikvansebille Nov 8, 2026
84ca82d
Update sigma conversion link in grids tutorial
erikvansebille Nov 8, 2026
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
377 changes: 228 additions & 149 deletions docs/user_guide/convert_croco_3D.ipynb

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/user_guide/fieldsets_grids.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@
"source": [
"### Vertical coordinates\n",
"\n",
"Lastly, a short note on vertical coordinates. Parcels can handle two styles of vertical coordinates; z-levels which define fixed depth levels in physical space, and sigma-levels which define varying depth levels in physical space as a function of the water column depth. As sigma-levels are effectively \"terrain-following\", the grid cell faces may no longer be orthogonal to the domain surface. The bottom row of Figure 1 visualises these differences, and Parcels handles this all under the hood. See the [CROCO Tutorial](./convert_croco_3D.ipynb) for more details on the sigma-levels implementation.\n"
"Lastly, a short note on vertical coordinates. Parcels can handle two styles of vertical coordinates; z-levels which define fixed depth levels in physical space, and sigma-levels which define varying depth levels in physical space as a function of the water column depth. As sigma-levels are effectively \"terrain-following\", the grid cell faces may no longer be orthogonal to the domain surface. The bottom row of Figure 1 visualises these differences, and Parcels handles this all under the hood. See the [Sigma Coordinate Vertical Grids tutorial](./fieldsets_sigma_coordinates.ipynb) for more details on the sigma-levels implementation.\n"
]
}
],
Expand Down
4 changes: 2 additions & 2 deletions docs/user_guide/v4-migration.md
Original file line number Diff line number Diff line change
Expand Up @@ -176,10 +176,10 @@ Particle-particle interaction can be <a href="example_interaction.html">performe
<hr class="migration-divider" />

<div class="migration-bubble migration-change">
Automatic conversion from depth to sigma grids under the hood is removed
The Advection_CROCO methods have been removed
</div>
<div class="migration-bubble migration-how">
Explicitly use <code>convert_z_to_sigma_croco</code> in sampling kernels (such as the <code>AdvectionRK4_3D_CROCO</code> or <code>SampleOMegaCroco</code> kernels) when working with <a href="convert_croco_3D">CROCO data</a>
use the 4-D depth support when working with <a href="convert_croco_3D">CROCO data</a>
</div>
<hr class="migration-divider" />

Expand Down
2 changes: 2 additions & 0 deletions pixi.toml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ pytest-html = "*"
pytest-cov = "*"
pytest-reportlog = "*"
pytest-timeout = "*"
xroms = "*"

[feature.test.pypi-dependencies]
re-assert = "*"
Expand All @@ -92,6 +93,7 @@ gsw = "*"
py-triangle = "*"
cmocean = "*"
cartopy = "*"
xroms = "*"
xgcm = ">=0.10.0"

[feature.devtools.dependencies]
Expand Down
4 changes: 2 additions & 2 deletions src/parcels/_datasets/remote.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ def _get_data_home() -> Path:
"data/SWASH_data/field_0065557.nc",
]
# + [f"data/WOA_data/woa18_decav_t{m:02d}_04.nc" for m in range(1, 13)]
+ ["data/CROCOidealized_data/CROCO_idealized.nc"]
+ ["data/CROCOOverflow_data/over_his.nc"]
# These datasets are from v4 of Parcels where we're opting for Zipped zarr datasets
+ [
"data-zarr/Benchmarks_FESOM2-baroclinic-gyre/data.zip",
Expand Down Expand Up @@ -264,7 +264,7 @@ class _Purpose(enum.Enum):
# "POPSouthernOcean_data/t.x1_SAMOC_flux.16900*.nc", # TODO v4: In v3 but should not be in v4 https://github.com/Parcels-code/Parcels/issues/2571#issuecomment-4214476973
# ("SWASH_data/data", (_V3Dataset(_ODIE,"data/SWASH_data/field_00655*.nc"), _Purpose.TUTORIAL)),
# ("WOA_data/data", (_V3Dataset(_ODIE,"data/WOA_data/woa18_decav_t*_04.nc", _preprocess_set_cf_calendar_360_day), _Purpose.TUTORIAL)),
("CROCOidealized_data/data", (_V3Dataset(_ODIE,"data/CROCOidealized_data/CROCO_idealized.nc"), _Purpose.TUTORIAL)),
("CROCOoverflow_data/data", (_V3Dataset(_ODIE,"data/CROCOOverflow_data/over_his.nc"), _Purpose.TUTORIAL)),
("AIFSmeteo/data", (_V3Dataset(_ODIE,"data/AIFS-meteo-data/*.nc"), _Purpose.TUTORIAL))
] + [
("Benchmarks_FESOM2-baroclinic-gyre/data", (_ZarrZipDataset(_ODIE, 'data-zarr/Benchmarks_FESOM2-baroclinic-gyre/data.zip', zarr_format=2), _Purpose.TESTING)),
Expand Down
2 changes: 1 addition & 1 deletion src/parcels/_typing.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
from parcels._sgrid.core import Padding

PathLike = str | os.PathLike
VectorType = Literal["3D", "3DSigma", "2D"] | None # corresponds with `vector_type`
VectorType = Literal["3D", "2D"] | None # corresponds with `vector_type`
TimeLike = datetime | cftime_datetime | np.datetime64

CfAxisSpatial = Literal["X", "Y", "Z"]
Expand Down
3 changes: 1 addition & 2 deletions src/parcels/convert.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,6 @@ class _ModelConventions:
varnames_mapping={
"x_rho": "lon",
"y_rho": "lat",
"s_w": "depth",
},
)

Expand Down Expand Up @@ -605,7 +604,7 @@ def croco_to_sgrid(*, fields: dict[str, xr.Dataset | xr.DataArray], coords: xr.D
sgrid.FaceNodePadding("xi_u", "xi_rho", sgrid.Padding.NONE),
sgrid.FaceNodePadding("eta_v", "eta_rho", sgrid.Padding.NONE),
),
vertical_dimensions=(sgrid.FaceNodePadding("s_rho", "depth", sgrid.Padding.NONE),),
vertical_dimensions=(sgrid.FaceNodePadding("s_rho", "s_w", sgrid.Padding.NONE),),
),
)

Expand Down
9 changes: 0 additions & 9 deletions src/parcels/kernels/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,6 @@
DiffusionUniformKh,
)
from ._integration import RK2, RK4
from ._sigmagrids import (
AdvectionRK2_3D_CROCO,
SampleOmegaCroco,
convert_z_to_sigma_croco,
)

__all__ = [ # noqa: RUF022
# advection
Expand All @@ -32,10 +27,6 @@
"AdvectionDiffusionEM",
"AdvectionDiffusionM1",
"DiffusionUniformKh",
# sigmagrids
"AdvectionRK2_3D_CROCO",
"SampleOmegaCroco",
"convert_z_to_sigma_croco",
# integration
"RK2",
"RK4",
Expand Down
72 changes: 0 additions & 72 deletions src/parcels/kernels/_sigmagrids.py

This file was deleted.

4 changes: 4 additions & 0 deletions tests/test_convert.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import pytest
import uxarray as ux
import xarray as xr
import xroms

import parcels
import parcels.convert as convert
Expand Down Expand Up @@ -116,9 +117,12 @@ def test_convert_mitgcm_offsets():
assert offsets["Z"] == 0


@pytest.mark.xfail(reason="Compatibility issue between xroms v0.6.1 and xgcm v0.10.1")
def test_convert_croco_offsets():
ds = datasets_circulation_models["ds_CROCO_idealized"]
coords = ds[["x_rho", "y_rho", "s_w", "time"]]
ds, xgrid = xroms.roms_dataset(ds)
ds.xroms.set_grid(xgrid)

ds = convert.croco_to_sgrid(fields={"U": ds["u"], "V": ds["v"]}, coords=coords)
fieldset = FieldSet.from_sgrid_conventions(ds)
Expand Down
99 changes: 0 additions & 99 deletions tests/test_sigmagrids.py

This file was deleted.

Loading