Parcels (Probably A Really Computationally Efficient Lagrangian Simulator) is an experimental prototype code aimed at exploring novel approaches for Lagrangian tracking of virtual ocean particles in the petascale age.
Animation of virtual particles carried by ocean surface flow in the Agulhas Current off South Africa. The particles are advected with PARCELS in data from the GlobCurrent Project.
In the last two decades, Lagrangian tracking of virtual particles in Ocean General Circulation Models has vastly increased our understanding of ocean dynamics and how currents move stuff around.
However, we are now facing a situation where our Lagrangian codes severely lag the next generation of these ocean circulation models. These ocean models are so big and massively parallel, and they produce so much data, that in a few years we may face a situation where many of the Lagrangian frameworks cannot be used on the latest data anymore.
In this project, we will scope out and develop a new generic, open-source community prototype code for Lagrangian tracking of water particles through any type of ocean circulation models.
The latest version of PARCELS, including tests and examples, can be obtained directly from github via:
git clone https://github.com/OceanPARCELS/parcels.git
cd parcels; pip install -r requirements.txt
export PYTHONPATH="$PYTHONPATH:$PWD"
As an alternative, PARCELS can also be installed directly via pip:
pip install git+https://github.com/OceanPARCELS/parcels.git
The above assumes that all dependencies are met, which can be achieved with:
curl -O https://raw.githubusercontent.com/OceanPARCELS/parcels/master/requirements.txt
pip install -r requirements.txt
In both cases a functional NetCDF install is required.
For a brief guide to running PARCELS and some sample output, have a look at the interactive tutorial.
This tutorial covers the basics of a particle simulation within PARCELS and a sample of its key features, including custom kernels.
There are also a number of worked-out examples in the examples/
directory. Run these with e.g.
python examples/example_peninsula.py --grid 100 50 -p 10
And then plot the resulting particles using PARCELS simple plotting script
python scripts/plotParticles.py 2d -p MyParticle.nc
Showing the trajectories of 10 particles around an idealised peninsula (see also page 18 of the report here).