Skip to content

Commit 6df7035

Browse files
Merge branch 'v4-dev' into curvilinear_index_search_without_while_loop
2 parents 50f0e85 + abcfb91 commit 6df7035

File tree

19 files changed

+464
-281
lines changed

19 files changed

+464
-281
lines changed

.github/ci/recipe.yaml

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
# Recipe for https://github.com/prefix-dev/rattler-build used for nightly releases of Parcels
2+
# during version 4 alpha development
3+
#
4+
# Adapted from the conda forge recipe
5+
context:
6+
name: parcels
7+
version: 4.0.0alpha0 # The last number here needs to be bumped for each new alpha release
8+
9+
package:
10+
name: ${{ name|lower }}
11+
version: ${{ version }}
12+
13+
source:
14+
path: ../..
15+
16+
build:
17+
number: 0
18+
noarch: python
19+
script:
20+
- python -m pip install . -vv --no-deps --no-build-isolation
21+
22+
requirements:
23+
host:
24+
- python 3.11.*
25+
- pip
26+
- setuptools
27+
- setuptools_scm
28+
- setuptools_scm_git_archive
29+
- wheel
30+
run:
31+
- python >=3.11
32+
- cftime
33+
- dask
34+
- matplotlib-base >=2.0.2
35+
- netcdf4 >=1.1.9
36+
- numpy >=1.11
37+
- platformdirs
38+
- psutil
39+
- pymbolic
40+
- pytest
41+
- scipy >=0.16.0
42+
- trajan
43+
- tqdm
44+
- xarray >=0.10.8
45+
- zarr >=2.11.0,!=2.18.0,<3
46+
- uxarray>=2025.3.0
47+
- pyogrio # needed for geopandas (uxarray -> geoviews -> geopandas -> pyogrio, but for some reason conda doesn't pick it up automatically)
48+
- pooch
49+
50+
tests:
51+
- python:
52+
imports:
53+
- parcels
54+
55+
about:
56+
homepage: https://github.com/OceanParcels/parcels
57+
license: MIT
58+
license_file: LICENSE.md
59+
summary: Probably A Really Computationally Efficient Lagrangian Simulator
60+
description: |
61+
Parcels (Probably A Really Computationally Efficient Lagrangian Simulator)
62+
is a set of Python classes and methods to create customisable particle
63+
tracking simulations using output from Ocean Circulation models.
64+
Parcels can be used to track passive and active particulates such as
65+
water, nutrients, plankton, plastic and fish.
66+
documentation: https://oceanparcels.org/
67+
repository: https://github.com/OceanParcels/parcels
68+
69+
extra:
70+
recipe-maintainers:
71+
- VeckoTheGecko

.github/workflows/nightly.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
on:
2+
workflow_dispatch:
3+
4+
permissions:
5+
contents: read
6+
id-token: write
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v4
13+
- name: Build conda package
14+
uses: prefix-dev/rattler-build-action@v0.2.19
15+
with:
16+
recipe-path: .github/ci/recipe.yaml
17+
18+
- name: Upload all packages
19+
shell: bash
20+
run: |
21+
shopt -s nullglob
22+
EXIT_CODE=0
23+
for pkg in $(find output -type f \( -name "*.conda" -o -name "*.tar.bz2" \) ); do
24+
if ! rattler-build upload prefix -c parcels "${pkg}"; then
25+
EXIT_CODE=1
26+
fi
27+
done
28+
exit $EXIT_CODE

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
build/*
22
docs/_build/*
33
docs/_downloads
4+
output
45

56
*.log
67
*.nc

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@
1010
[![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/5353/badge)](https://bestpractices.coreinfrastructure.org/projects/5353)
1111
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/OceanParcels/parcels/main?labpath=docs%2Fexamples%2Fparcels_tutorial.ipynb)
1212

13+
> [!WARNING]
14+
> This branch is `v4-dev` - version 4 of Parcels which is in active development. See `main` (or the tags) to browse stable versions of Parcels.
15+
1316
**Parcels** (**P**robably **A** **R**eally **C**omputationally **E**fficient **L**agrangian **S**imulator) is a set of Python classes and methods to create customisable particle tracking simulations using output from Ocean Circulation models. Parcels can be used to track passive and active particulates such as water, plankton, [plastic](http://www.topios.org/) and [fish](https://github.com/Jacketless/IKAMOANA).
1417

1518
![Arctic-SO-medusaParticles](https://github.com/OceanParcels/oceanparcels_website/blob/main/images/homepage.gif)

docs/community/v4-migration.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ Version 4 of Parcels is unreleased at the moment. The information in this migrat
1111
- Sharing state between kernels must be done via the particle data (as the kernels are not combined under the hood anymore).
1212
- `particl_dlon`, `particle_dlat` etc have been renamed to `particle.dlon` and `particle.dlat`.
1313
- `particle.dt` is a np.timedelta64 object; be careful when multiplying `particle.dt` with a velocity, as its value may be cast to nanoseconds.
14-
- The `time` argument in the Kernel signature is now standard `None` (and may be removed in the Kernel API before release of v4), so can't be used. Use `particle.time` instead.
14+
- The `time` argument in the Kernel signature has been removed in the Kernel API, so can't be used. Use `particle.time` instead.
15+
- The `particle` argument in the Kernel signature has been renamed to `particles`.
1516
- `math` functions should be replaced with array compatible equivalents (e.g., `math.sin` -> `np.sin`). Instead of `ParcelsRandom` you should use numpy's random functions.
1617

1718
## FieldSet

docs/v4/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Collaboration on v4 development is happening on the [Parcels v4 Project Board](h
1717
The pages below provide further background on the development of Parcels v4. You can think of this page as a "living" document as we work towards the release of v4.
1818

1919
```{toctree}
20-
20+
installation
2121
api
2222
nojit
2323
TODO

docs/v4/installation.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Install an alpha version of Parcels v4
2+
3+
During development of Parcels v4, we are uploading versions of the package to an [index on prefix.dev](https://prefix.dev/channels/parcels/packages/parcels). This allows users to easily install an unreleased version without having to do a [development install](../installation.rst)! Give it a spin!
4+
5+
```{warning}
6+
Before installing an alpha version of Parcels, we *highly* recommend creating a new environment so that doesn't affect package versions in your current environment (which you may be using for your research).
7+
8+
You can see what your current environment is by doing `conda env list` and seeing which environment has a `*` next to it. At any point, you can use `conda activate ...` (replacing `...` with the name that had the `*` next to it) to return to your environment with version 3 of Parcels.
9+
10+
```
11+
12+
Do the following to create a new environment (called `parcels-v4-alpha`) with an alpha version of Parcels installed:
13+
14+
```sh
15+
conda create -n parcels-v4-alpha python=3.11
16+
conda activate parcels-v4-alpha
17+
conda install -c https://repo.prefix.dev/parcels parcels
18+
```
19+
20+
During the development of Parcels v4 we will be occasionally releasing these alpha package versions so that users can try them out. If you're installing Parcels normally (i.e., via Conda forge) you will receive version 3 of Parcels as usual until version 4 is officially released.

0 commit comments

Comments
 (0)