Skip to content

Commit be625b0

Browse files
committed
Merge remote-tracking branch 'upstream/main' into update-convert
2 parents 036fa09 + 1724158 commit be625b0

23 files changed

Lines changed: 572 additions & 450 deletions

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<!-- Feel free to remove check-list items aren't relevant to your change -->
2+
3+
- [ ] Closes #xxxx
4+
- [ ] Tests added
5+
- [ ] This PR targets the correct branch (`main` for normal development, `v3-support` for v3 support)
6+
7+
### AI Disclosure
8+
9+
<!--- Please review our AI & contribution guidelines (https://docs.oceanparcels.org/en/main/development/policies.html#use-of-ai-in-development). Remove this section if your PR does not contain AI-generated content. --->
10+
11+
- [ ] This PR contains AI-generated content.
12+
- [ ] I have tested any AI-generated content in my PR.
13+
- [ ] I take responsibility for any AI-generated content in my PR.
14+
- Describe how you used it (e.g., by pasting your prompt):

.github/workflows/ci.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ jobs:
7777
- uses: prefix-dev/setup-pixi@v0.9.0
7878
with:
7979
pixi-version: ${{ needs.cache-pixi-lock.outputs.pixi-version }}
80+
locked: false # TODO: Remove once v7 of the lock file is removed, or once we stop having external source dependencies https://github.com/Parcels-code/Parcels/pull/2550#issuecomment-4088660238
8081
cache: true
8182
cache-write: ${{ github.event_name == 'push' && github.ref_name == 'main' }}
8283
# https://github.com/actions/cache/blob/main/tips-and-workarounds.md#update-a-cache
@@ -137,6 +138,7 @@ jobs:
137138
- uses: prefix-dev/setup-pixi@v0.9.0
138139
with:
139140
pixi-version: ${{ needs.cache-pixi-lock.outputs.pixi-version }}
141+
locked: false # TODO: Remove once v7 of the lock file is removed, or once we stop having external source dependencies https://github.com/Parcels-code/Parcels/pull/2550#issuecomment-4088660238
140142
cache: true
141143
cache-write: ${{ github.event_name == 'push' && github.ref_name == 'main' }}
142144
- name: Integration test
@@ -180,6 +182,7 @@ jobs:
180182
- uses: prefix-dev/setup-pixi@v0.9.0
181183
with:
182184
pixi-version: ${{ needs.cache-pixi-lock.outputs.pixi-version }}
185+
locked: false # TODO: Remove once v7 of the lock file is removed, or once we stop having external source dependencies https://github.com/Parcels-code/Parcels/pull/2550#issuecomment-4088660238
183186
cache: true
184187
cache-write: ${{ github.event_name == 'push' && github.ref_name == 'main' }}
185188
- name: Typechecking
@@ -202,6 +205,7 @@ jobs:
202205
- uses: prefix-dev/setup-pixi@v0.9.0
203206
with:
204207
pixi-version: ${{ needs.cache-pixi-lock.outputs.pixi-version }}
208+
locked: false # TODO: Remove once v7 of the lock file is removed, or once we stop having external source dependencies https://github.com/Parcels-code/Parcels/pull/2550#issuecomment-4088660238
205209
cache: true
206210
cache-write: ${{ github.event_name == 'push' && github.ref_name == 'main' }}
207211
- name: Find the alpha version of Parcels
@@ -212,7 +216,7 @@ jobs:
212216
run: |
213217
for pkg in $(find output -type f \( -name "*.conda" -o -name "*.tar.bz2" \) ); do
214218
echo "Uploading ${pkg}"
215-
pixi run -e rattler-build rattler-build upload prefix -c parcels "${pkg}"
219+
pixi run -e build rattler-build upload prefix -c parcels "${pkg}"
216220
done
217221
env:
218222
PREFIX_API_KEY: ${{ secrets.PREFIX_API_KEY }}

CITATION.cff

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ authors:
44
- family-names: "Van Sebille"
55
given-names: "Erik"
66
orcid: "https://orcid.org/0000-0003-2041-0704"
7+
- family-names: "Hodgskin"
8+
given-names: "Nick"
9+
orcid: "https://orcid.org/0009-0003-0778-3183"
710
- family-names: "Kehl"
811
given-names: "Christian"
912
orcid: "https://orcid.org/0000-0003-4200-1450"

docs/getting_started/tutorial_output.ipynb

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -162,9 +162,7 @@
162162
"cell_type": "markdown",
163163
"metadata": {},
164164
"source": [
165-
"Note that if you are running Parcels on multiple processors with `mpirun`, you will need to concatenate the files of each processor, see also the [MPI documentation](https://docs.oceanparcels.org/en/latest/examples/documentation_MPI.html#Reading-in-the-ParticleFile-data-in-zarr-format).\n",
166-
"\n",
167-
"Also, once you have loaded the data as an `xarray` DataSet using `xr.open_zarr()`, you can always save the file to NetCDF if you prefer with the `.to_netcdf()` method.\n"
165+
"Once you have loaded the data as an `xarray` DataSet using `xr.open_zarr()`, you can always save the file to NetCDF if you prefer with the `.to_netcdf()` method.\n"
168166
]
169167
},
170168
{

docs/user_guide/examples_v3/documentation_LargeRunsOutput.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
"id": "4",
6161
"metadata": {},
6262
"source": [
63-
"## How to save the output of an MPI ocean parcels run to a single zarr dataset\n"
63+
"## (TODO: Remove section now that we don't support MPI) How to save the output of an MPI ocean parcels run to a single zarr dataset\n"
6464
]
6565
},
6666
{

docs/user_guide/examples_v3/documentation_MPI.ipynb

Lines changed: 0 additions & 207 deletions
This file was deleted.

docs/user_guide/examples_v3/example_stommel.py

Lines changed: 9 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -88,11 +88,6 @@ def AgeP(particle, fieldset, time): # pragma: no cover
8888
particle.delete()
8989

9090

91-
def simple_partition_function(coords, mpi_size=1):
92-
"""A very simple partition function that assigns particles to processors (for MPI testing purposes))"""
93-
return np.linspace(0, mpi_size, coords.shape[0], endpoint=False, dtype=np.int32)
94-
95-
9691
def stommel_example(
9792
npart=1,
9893
verbose=False,
@@ -101,7 +96,6 @@ def stommel_example(
10196
outfile="StommelParticle.zarr",
10297
repeatdt=None,
10398
maxage=None,
104-
custom_partition_function=False,
10599
):
106100
parcels.timer.fieldset = parcels.timer.Timer(
107101
"FieldSet", parent=parcels.timer.stommel
@@ -125,27 +119,15 @@ def stommel_example(
125119
]
126120
MyParticle = parcels.Particle.add_variables(extra_vars)
127121

128-
if custom_partition_function:
129-
pset = parcels.ParticleSet.from_line(
130-
fieldset,
131-
size=npart,
132-
pclass=MyParticle,
133-
repeatdt=repeatdt,
134-
start=(10e3, 5000e3),
135-
finish=(100e3, 5000e3),
136-
time=0,
137-
partition_function=simple_partition_function,
138-
)
139-
else:
140-
pset = parcels.ParticleSet.from_line(
141-
fieldset,
142-
size=npart,
143-
pclass=MyParticle,
144-
repeatdt=repeatdt,
145-
start=(10e3, 5000e3),
146-
finish=(100e3, 5000e3),
147-
time=0,
148-
)
122+
pset = parcels.ParticleSet.from_line(
123+
fieldset,
124+
size=npart,
125+
pclass=MyParticle,
126+
repeatdt=repeatdt,
127+
start=(10e3, 5000e3),
128+
finish=(100e3, 5000e3),
129+
time=0,
130+
)
149131

150132
if verbose:
151133
print(f"Initial particle positions:\n{pset}")
@@ -245,12 +227,6 @@ def main(args=None):
245227
type=int,
246228
help="max age of the particles (after which particles are deleted)",
247229
)
248-
p.add_argument(
249-
"-cpf",
250-
"--custom_partition_function",
251-
default=False,
252-
help="Use a custom partition_function (for MPI testing purposes)",
253-
)
254230
args = p.parse_args(args)
255231

256232
parcels.timer.args.stop()
@@ -262,7 +238,6 @@ def main(args=None):
262238
outfile=args.outfile,
263239
repeatdt=args.repeatdt,
264240
maxage=args.maxage,
265-
custom_partition_function=args.custom_partition_function,
266241
)
267242
parcels.timer.stommel.stop()
268243
parcels.timer.root.stop()

pixi.toml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ holoviews = ">=1.22.0" # https://github.com/prefix-dev/rattler-build/issues/2326
2727
uxarray = ">=2025.3.0"
2828
dask = ">=2024.5.1"
2929
zarr = ">=2.15.0,!=2.18.0,<3"
30-
xgcm = ">=0.9.0"
30+
xgcm = { git = "https://github.com/xgcm/xgcm", rev = "master" } # TODO: Switch to release version after release is cut
3131
cf_xarray = ">=0.8.6"
3232
cftime = ">=1.6.3"
3333
pooch = ">=1.8.0"
@@ -54,7 +54,7 @@ xarray = "2024.5.*"
5454
uxarray = "2025.3.*"
5555
dask = "2024.5.*"
5656
zarr = "2.15.*"
57-
xgcm = "0.9.*"
57+
xgcm = { version = "0.9.*", channel = "conda-forge" }
5858
cf_xarray = "0.8.*"
5959
cftime = "1.6.*"
6060
pooch = "1.8.*"
@@ -102,6 +102,9 @@ memray = "*"
102102
[feature.devtools.target.osx-arm64.dependencies]
103103
memray = "*"
104104

105+
[feature.devtools.pypi-dependencies]
106+
tuna = ">=0.5.11"
107+
105108
[feature.docs.dependencies]
106109
parcels = { path = "." }
107110
numpydoc = "*"

0 commit comments

Comments
 (0)