What is OceanParcels?

The OceanParcels project develops Parcels (Probably A Really Computationally Efficient Lagrangian Simulator), 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 and fish.

The code from the OceanParcels project is licensed under an open source MIT license and can be downloaded from github.com/OceanParcels/parcels or installed via anaconda.org/conda-forge/parcels:

The manuscript detailing this first release of Parcels, version 0.9, has been published in Geoscientific Model Development and can be cited as:

As ocean general circulation models (OGCMs) move into the petascale age, where the output of single simulations exceeds petabytes of storage space, tools to analyse the output of these models will need to scale up too. Lagrangian ocean analysis, where virtual particles are tracked through hydrodynamic fields, is an increasingly popular way to analyse OGCM output, by mapping pathways and connectivity of biotic and abiotic particulates. However, the current software stack of Lagrangian ocean analysis codes is not dynamic enough to cope with the increasing complexity, scale and need for customization of use-cases. Furthermore, most community codes are developed for stand-alone use, making it a nontrivial task to integrate virtual particles at runtime of the OGCM. Here, we introduce the new Parcels code, which was designed from the ground up to be sufficiently scalable to cope with petascale computing. We highlight its API design that combines flexibility and customization with the ability to optimize for HPC workflows, following the paradigm of domain-specific languages. Parcels is primarily written in Python, utilizing the wide range of tools available in the scientific Python ecosystem, while generating low-level C code and using just-in-time compilation for performance-critical computation. We show a worked-out example of its API, and validate the accuracy of the code against seven idealized test cases. This version 0.9 of Parcels is focused on laying out the API, with future work concentrating on support for curvilinear grids, optimization, efficiency and at-runtime coupling with OGCMs.

The manuscript detailing version 2.0 of Parcels is available at Geoscientific Model Development and can be cited as:

With the increasing amount of data produced by numerical ocean models, so increases the need for efficient tools to analyse these data. One of these tools is Lagrangian ocean analysis, where a set of virtual particles are released and their dynamics is integrated in time based on fields defining the ocean state, including the hydrodynamics and biogeochemistry if available. This popular methodology needs to adapt to the large variety of models producing these fields at different formats. This is precisely the aim of Parcels, a Lagrangian ocean analysis framework designed to combine (1) a wide flexibility to model particles of different natures and (2) an efficient implementation in accordance with modern computing infrastructure. In the new Parcels v2.0, we implement a set of interpolation schemes to read various types of discretised fields, from rectilinear to curvilinear grids in the horizontal direction, from z- to s- levels in the vertical and different variable distributions such as the Arakawa's A-, B- and C- grids. In particular, we develop a new interpolation scheme for a three-dimensional curvilinear C-grid and analyse its properties. Parcels v2.0 capabilities, including a suite of meta-field objects, are then illustrated in a brief study of the distribution of floating microplastic in the North West European continental shelf and its sensitivity to different physical processes.

Postdoc position in high-performance software development for numerical simulations of plastic litter in the ocean

We have an opening for a postdoc to join the OceanParcels development team. Development will focus on parallelization of the code and further improvements to the efficiency and scalability of the code.

We are looking for a candidate with a PhD (desirable) or MSc in Computer Science, Applied Mathematics, Physics or similar field; very strong programming skills (preferably python and C); and proven experience with the development of complex scientific models and software development practices such as version control and unit-testing.

Deadline for applications is 15 Semptember 2019. More information, including full list of qualifications, and submission form is available here.


Installing Parcels

The simplest way to install the Parcels code is to use Anaconda and the Parcels Conda-Forge package with the latest release of Parcels. This package will automatically install (almost) all the requirements for a fully functional installation of Parcels. This is the “batteries-included” solution probably suitable for most users.

The steps below are the installation instructions for Linux / macOS and for Windows. If the commands for Linux / macOS and Windows differ, this is indicated with a comment at the end of the line.

  1. Install Anaconda's Miniconda following the steps at https://conda.io/docs/user-guide/install/. All the code below assumes that you download the Python-3 version, although Parcels also works with Python-2. If you're on Linux / macOS, it also assumes that you installed Miniconda-3 to your home directory.
  2. Start a terminal (Linux / macOS) or the Anaconda prompt (Windows). Activate the root (or base) environment of your Miniconda and create an environment containing Parcels, all its essential dependencies, and the nice-to-have Jupyter, cartopy, and ffmpeg packages:
    source $HOME/miniconda3/bin/activate root  # Linux / macOS
    activate root                              # Windows
    
    conda create -n py3_parcels -c conda-forge python=3 parcels jupyter cartopy ffmpeg
  3. Activate the newly created Parcels environment.
    source $HOME/miniconda3/bin/activate py3_parcels  # Linux / macOS
    activate py3_parcels                              # Windows
  4. Get a copy of the Parcels tutorials and examples, as well as the data required to run these:
    parcels_get_examples parcels_examples
  5. *Note that if you are on Windows and you get a Fatal error in launcher error, you can instead download the data with
    curl https://raw.githubusercontent.com/OceanParcels/parcels/v2.0.0beta2/parcels/scripts/get_examples.py > parcels_get_examples.py
    python parcels_get_examples.py parcels_examples
  6. Run the simplest of the examples to validate that you have a working Parcels setup:
    cd parcels_examples
    python example_peninsula.py --fieldset 100 100
  7. *Note that if you are on macOS and get a compilation error, you may need to accept the Apple xcode license (xcode-select --install). If this does not solve the compilation error, you may want to try running export CC=gcc.

  8. Optionally, if you want to run all the examples and tutorials, start Jupyter and open the tutorial notebooks:
    jupyter notebook
  9. The next time you start a terminal and want to work with Parcels, activate the environment with:
    source $HOME/miniconda3/bin/activate py3_parcels  # Linux / macOS
    activate py3_parcels                              # Windows

Installing a non-released version of Parcels

There might be cases where you want to install a version of Parcels that has not been released yet. (Perhaps, if you want to use a bleeding-edge feature which already is included on Github, but not in the conda-forge package.) Then, just after step 2 of Installing Parcels above, use the following commands to remove the conda-forge package again, and use pip to install Parcels from Github:
source $HOME/miniconda3/bin/activate py3_parcels  # Linux / macOS
activate py3_parcels                              # Windows

conda remove parcels
pip install git+https://github.com/OceanParcels/parcels.git@master

Installation for developers

Parcels depends on a working Python installation, a netCDF installation, a C compiler, and various Python packages. If you prefer to maintain your own Python installation providing all this, git clone the master branch of Parcels and manually install all packages listed under dependencies in the environment files (environment_py3_linux.yml for Linux, environment_py3_osx.yml for OSX and environment_py3_win.yml for Windows), before running python setup.py install.

Contributing to Parcels development

OceanParcels is fully open-source community and strongly encourages contributions from users, as also stated in our Contributor Code of Conduct. If you want to help make OceanParcels even better, then please consider contributing to its development. To get started, see this excellent tutorial on the Git workflow and this great general overview of contributing to open source software.

Parcels tutorials

The best way to get started with Parcels is to explore the Jupyter notebooks below. You can either read them on the Jupyter notebook viewer, or interact with them on mybinder.org:

Parcels tutorial

The Parcels tutorial provides an overview of the main features of Parcels and is therefore a good starting point for new users

Periodic boundaries tutorial

A tutorial to explain how to implement periodic (east-west or north-south) boundaries in Parcels

Curvilinear grid tutorial

A tutorial to explain how to use Parcels with hydrodynamic models that use curvilinear grids, such as NEMO

Nemo 3D tutorial

A tutorial to create a FieldSet for three-dimensional NEMO data and other C-grids

Delay start tutorial

A tutorial on how to release particles after the start of a run

SummedFields tutorial

A tutorial on how to combine different Fields for advection

NestedFields tutorial

A tutorial on how to use Fields with (multiple) nested domains

UnitConverter tutorial

A tutorial on how Parcels automatically converts the units of velocity and diffusion fields from meters to degrees

Argo sampling Kernel tutorial

A tutorial on how to create a custom Kernel that mimics sampling of Argo floats

Plotting tutorial

A tutorial on how to plot particle trajectories


Parcels development status

The current release of Parcels, version 2.0, is a fully-functional, feature-complete code for offline Lagrangian ocean analysis. See below for a list of features, or keep an eye on the Github Development Timeline page

Major features

Experimental features

Future development goals


Frequently Asked Questions and further support

See the FAQ page for further information on using and developing Parcels. This includes information on the Parcels design overview, tips on construction of FieldSet objects, support for writing custom Kernels and an explanation of the NetCDF output format.

If you need help with Parcels, try our Gitter channels about the installation and running of Parcels. There is also an extensive documentation of all methods and classes in Parcels.

Peer-reviewed articles using Parcels

Buoyant microplastic in the ocean can be submerged to deeper layers through biofouling and the consequent loss of buoyancy or by wind induced turbulent mixing at the ocean surface. Yet the fact that particles in deeper layers are transported by currents that are different from those at the surface has not been explored so far. We compute 10‐year trajectories of 1 million virtual particles with the Parcels framework for different particle advection scenarios to investigate the effect of near‐surface currents on global particle dispersal. We simulate the global‐scale transport of passive microplastic for (i) particles constrained to different depths from the surface to 120 m depth, (ii) particles that are randomly displaced in the vertical with uniform distribution, (iii) particles subject to surface mixing and (iv) for a 3D passive advection model. Our results show that the so called 'garbage patches' become more 'leaky' in deeper layers, and completely disappear at about 60 m depth. At the same time, subsurface currents can transport significant amounts of microplastic from subtropical and subpolar regions to polar regions, providing a possible mechanism to explain why plastic is found in these remote areas. Finally, we show that the final distribution in the surface turbulent mixing scenario with particle rise speed wr=0.003 m/s is very similar to the distribution of plastic at the surface. This demonstrates that it is not necessary to incorporate surface mixing for global long‐term simulations, although this might change on more local scales and for particles with lower rise speeds.

With the increasing amount of data produced by numerical ocean models, so increases the need for efficient tools to analyse these data. One of these tools is Lagrangian ocean analysis, where a set of virtual particles are released and their dynamics is integrated in time based on fields defining the ocean state, including the hydrodynamics and biogeochemistry if available. This popular methodology needs to adapt to the large variety of models producing these fields at different formats. This is precisely the aim of Parcels, a Lagrangian ocean analysis framework designed to combine (1) a wide flexibility to model particles of different natures and (2) an efficient implementation in accordance with modern computing infrastructure. In the new Parcels v2.0, we implement a set of interpolation schemes to read various types of discretised fields, from rectilinear to curvilinear grids in the horizontal direction, from z- to s- levels in the vertical and different variable distributions such as the Arakawa's A-, B- and C- grids. In particular, we develop a new interpolation scheme for a three-dimensional curvilinear C-grid and analyse its properties. Parcels v2.0 capabilities, including a suite of meta-field objects, are then illustrated in a brief study of the distribution of floating microplastic in the North West European continental shelf and its sensitivity to different physical processes.

Microfossils from plankton are used for paleoceanographic reconstructions. An often‐made assumption in quantitative microplankton‐based paleoceanographic reconstructions is that sedimentary assemblages represent conditions of the directly overlying surface water. However, any immobile particle sinking down the water column is subjected to transport by three‐dimensional currents, which results in a lateral relocation along transport. We model dinoflagellate cyst (dinocyst) transport in a high‐resolution (0.1° horizontally) global model of the present‐day ocean, and compare ocean conditions in the simulated origin of sedimentary particles to that in the directly overlying water. We find that the assumption that sedimentary particles represent the overlying surface waters is in most regions not valid. The bias induced by dinocyst transport depends on ocean current strength and direction, aggregation of particles which could increase the sinking speed, and the sediment sample depth. By using realistic sinking speeds of dinocysts and aggregates, extreme biases up to approximately ± 16°C warmer or ±4PSU saltier are found, while other regions show lower bias from particle transport. Our model results provide a way to mechanistically and statistically explain the unexpected occurrences of some dinocyst species outside of their `normal' occurrence region, such as the northerly occurrence of the allegedly sea‐ice‐affiliated dinocyst Selenopemphix antarctica. Exclusion of such outlier occurrences will yield better constrained ecological affinites for dinocyst species, which has implications for microfossil‐based quantitative and qualitative proxies for paleoceanographic conditions. We recommend paleoceanographers to a priori evaluate the (paleo‐)water depth, oceanographic setting, current strength and particle aggregation probability for their sedimentary microplankton assemblages.

Drifting Fish Aggregating Devices (dFADs) are small drifting platforms with an attached solar powered buoy that report their position with daily frequency via GPS. We use data of 9,440 drifting objects provided by a buoys manufacturing company, to test the predictions of surface current velocity provided by two of the main models: the NEMO model used by Copernicus Marine Environment Monitoring Service (CMEMS) and the HYCOM model used by the Global Ocean Forecast System (GOFS).

The increased use of drifting Fish Aggregating Devices (dFADs) by tuna purse seine fleets in recent years has supported considerable catches of these species. A greater understanding of the spatiotemporal dynamics of these objects as they drift with ocean currents is critical for understanding historical changes in fishing power, spatial management, and examining the effect of ambient dFAD density on catch and effort. Here, dFAD dynamics were estimated for all floating object sets made by purse seiners in the Western and Central Pacific Ocean during 2016 and 2017. The drift trajectories of these floating objects prior to the observed fishing events were estimated by seeding virtual Lagrangian particles within a state-of-the-art hydrodynamics model, and simulating their movements backwards in time. Resulting trajectory distributions are similar to observed dFAD trajectories from the same period. The approach provides spatial density estimates in areas where observed dFAD data are incomplete, particularly in the exclusive economic zones (EEZ) of Howland and Baker Islands, and certain high seas zones. We provide estimates of inter-EEZ connectivity of dFADs, which highlight the fact that dFADs set upon in small EEZs such as Nauru and Howland and Baker Islands are likely to have drifted from neighbouring EEZs less than one month prior to fishing. dFADs typically transited multiple EEZs, with a median of 4 and a maximum of 14, when assuming a drift-time of six months. Moreover, 22% of dFAD sets made in the WCPO were estimated to have originated from the Eastern Pacific Ocean.
 We examine our results in the context of the improved management and assessment of dFAD fisheries, providing a methodology to estimated relative dFAD density over historical periods to support analyses of catch and effort. The sensitivity of these estimates to hydrodynamic models, including the proposed SKIM doppler radar altimetry method, is discussed.

Buoyant marine plastic debris has become a serious problem affecting the marine environment. To fully understand the impact of this problem, it is important to understand the dynamics of buoyant debris in the ocean. Buoyant debris accumulates in “garbage patches” in each of the subtropical ocean basins because of Ekman convergence and associated downwelling at subtropical latitudes. However, the precise dynamics of the garbage patches are not well understood. This is especially true in the southern Indian Ocean (SIO), where observations are inconclusive about the existence and numerical models predict inconsistent locations of the SIO garbage patch. In addition, the oceanic and atmospheric dynamics in the SIO are very different to those in the other oceans. The aim of this paper is to determine the dynamics of the SIO garbage patch at different depths and under different transport mechanisms such as ocean surface currents, Stokes drift and direct wind forcing. To achieve this, we use two types of ocean surface drifters as a proxy for buoyant debris. We derive transport matrices from observed drifter locations and simulate the global accumulation of buoyant debris. Our results indicate that the accumulation of buoyant debris in the SIO is much more sensitive to different transport mechanisms than in the other ocean basins. We relate this sensitivity to the unique oceanic and atmospheric dynamics of the SIO.

Although marine plastic pollution has been the focus of several studies, there are still many gaps in our understanding of the concentrations, characteristics and impacts of plastics in the oceans. This study aimed to quantify and characterize plastic debris in oceanic surface waters of the Antarctic Peninsula. Sampling was done through surface trawls, and mean debris concentration was estimated at 1,794 items.km−2 with an average weight of 27.8 g.km−2. No statistical difference was found between the amount of mesoplastics (46%) and microplastics (54%). We found hard and flexible fragments, spheres and lines, in nine colors, composed mostly of polyurethane, polyamide, and polyethylene. An oceanographic dispersal model showed that, for at least seven years, sampled plastics likely did not originate from latitudes lower than 58°S. Analysis of epiplastic community diversity revealed bacteria, microalgae, and invertebrate groups adhered to debris. Paint fragments were present at all sampling stations and were approximately 30 times more abundant than plastics. Although paint particles were not included in plastic concentration estimates, we highlight that they could have similar impacts as marine plastics. We call for urgent action to avoid and mitigate plastic and paint fragment inputs to the Southern Ocean.

Floating microplastic in the oceans is known to accumulate in the subtropical ocean gyres, but unclear is still what causes that accumulation. We investigate the role of various physical processes, such as surface Ekman and geostrophic currents, surface Stokes drift and mesoscale eddy activity, on the global surface distribution of floating microplastic with Lagrangian particle tracking using GlobCurrent and WaveWatch III reanalysis products. Globally, the locations of microplastic accumulation (accumulation zones) are largely determined by the Ekman currents. Simulations of the North Pacific and North Atlantic show that the locations of the modeled accumulation zones using GlobCurrent Total (Ekman+Geostrophic) currents generally agree with observed microplastic distributions in the North Pacific, and with the zonal distribution in the North Atlantic. Geostrophic currents and Stokes drift do not contribute to large scale microplastic accumulation in the subtropics, but Stokes drift leads to increased microplastic transport to Arctic regions. Since the WaveWatch III Stokes drift and GlobCurrent Ekman current datasets are not independent, combining Stokes drift with the other current components leads to an overestimation of Stokes drift effects and there is therefore a need for independent measurements of the different ocean circulation components. We investigate whether windage would be appropriate as a proxy for Stokes drift but find discrepancies in the modelled direction and magnitude. In the North Pacific, we find that microplastic tends to accumulate in regions of relatively low eddy kinetic energy, indicating low mesoscale eddy activity, but we do not see similar trends in the North Atlantic.

Experimentation at sea provides insight into which traits of ocean microbes are linked to performance in situ. Here we show distinct patterns in thermal tolerance of microbial phototrophs from adjacent water masses sampled in the south-west Pacific Ocean, determined using a fluorescent marker for reactive oxygen species (ROS). ROS content of pico-eukaryotes was assessed after 1, 5 and 25 h of incubation along a temperature gradient (15.6–32.1 °C). Pico-eukaryotes from the East Australian Current (EAC) had relatively constant ROS and showed greatest mortality after 25 h at 7 °C below ambient, whereas those from the Tasman Sea had elevated ROS in both warm and cool temperature extremes and greatest mortality at temperatures 6–10 °C above ambient, interpreted as the outcome of thermal stress. Tracking of water masses within an oceanographic circulation model showed populations had distinct thermal histories, with EAC pico-eukaryotes experiencing higher average temperatures for at least 1 week prior to sampling. While acclimatization and community assembly could both influence biological responses, this study clearly demonstrates that phenotypic divergence occurs along planktonic drift trajectories.

We sampled 17 nesting sites for loggerhead (Caretta caretta) and green turtles (Chelonia mydas) in Cyprus. Microplastics (<5 mm) were found at all locations and depths, with particularly high abundance in superficial sand. The top 2 cm of sand presented grand mean ± SD particle counts of 45,497 ± 11,456 particles m−3 (range 637–131,939 particles m−3). The most polluted beaches were among the worst thus far recorded, presenting levels approaching those previously recorded in Guangdong, South China. Microplastics decreased with increasing sand depth but were present down to turtle nest depths of 60 cm (mean 5,325 ± 3,663 particles m−3. Composition varied among beaches but hard fragments (46.5 ± 3.5%) and pre-production nurdles (47.8 ± 4.5%) comprised most categorised pieces. Particle drifter analysis hindcast for 365 days indicated that most plastic likely originated from the eastern Mediterranean basin. Worsening microplastic abundance could result in anthropogenically altered life history parameters such as hatching success and sex ratios in marine turtles.

This study examines the fine‐scale population genetic structure and phylogeography of the spiny lobster Panulirus homarus in the Western Indian Ocean. A seascape genetics approach was used to relate the observed genetic structure based on 21 microsatellite loci to ocean circulation patterns, and to determine the influence of latitude, sea surface temperature (SST), and ocean turbidity (KD490) on population‐level processes. At a geospatial level, the genetic clusters recovered corresponded to three putative subspecies, P. h. rubellus from the SW Indian Ocean, P. h. megasculptus from the NW Indian Ocean, and P. h. homarus from the tropical region in‐between. Virtual passive Lagrangian particles advected using satellite‐derived ocean surface currents were used to simulate larval dispersal. In the SW Indian Ocean, the dispersion of particles tracked over a 4‐month period provided insight into a steep genetic gradient observed at the Delagoa Bight, which separates P. h. rubellus and P. h. homarus. South of the contact zone, particles were advected southwestwards by prevailing boundary currents or were retained in nearshore eddies close to release locations. Some particles released in southeast Madagascar dispersed across the Mozambique Channel and reached the African shelf. Dispersal was characterized by high seasonal and inter‐annual variability, and a large proportion of particles were dispersed far offshore and presumably lost. In the NW Indian Ocean, particles were retained within the Arabian Sea. Larval retention and self‐recruitment in the Arabian Sea could explain the recent genetic divergence between P. h. megasculptus and P. h. homarus. Geographic distance and minimum SST were significantly associated with genetic differentiation in multivariate analysis, suggesting that larval tolerance to SST plays a role in shaping the population structure of P. homarus.

The distribution of marine species is often modeled using Eulerian approaches, in which changes to population density or abundance are calculated at fixed locations in space. Conversely, Lagrangian, or individual-based, models simulate the movement of individual particles moving in continuous space, with broader-scale patterns such as distribution being an emergent property of many, potentially adaptive, individuals. These models offer advantages in examining dynamics across spatiotemporal scales and making comparisons with observations from individual-scale data.
Here, we introduce and describe such a model, the Individual-based Kinesis, Advection and Movement of Ocean ANimAls model (Ikamoana), which we use to replicate the movement processes of an existing Eulerian model for marine predators (the Spatial Ecosystem and Population Dynamics Model, SEAPODYM). Ikamoana simulates the movement of either individual or groups of animals by physical ocean currents, habitat- dependent stochastic movements (kinesis), and taxis movements representing active searching behaviours.
Applying our model to Pacific skipjack tuna (Katsuwonus pelamis), we show that it accurately replicates the evolution of density distribution simulated by SEAPODYM with low time-mean error and a spatial correlation of density that exceeds 0.96 at all times. We demonstrate how the Lagrangian approach permits easy tracking of individuals’ trajectories for examining connectivity between different regions, and show how the model can provide independent estimates of transfer rates between commonly used assessment regions. In particular, we find that retention rates in most assessment regions are considerably smaller (up to a factor of 2) than those estimated by this populations primary assessment model. Moreover, these rates are sensitive to ocean state (e.g. El Nino vs La Nina) and so assuming fixed transfer rates between regions may lead to spurious stock estimates. A novel feature of the Lagrangian approach is that individual schools can be tracked through time, and we demonstrate that movement between two assessment regions at broad temporal scales includes extended transits through other regions.
Finally, we discuss the utility of this modeling framework for the management of marine reserves, designing effective monitoring programmes, and exploring hypotheses regarding the behaviour of hard-to-observe oceanic animals.

In this study, we assess the accuracy of a combined geostrophic and Ekman current product (GlobCurrent) that estimates ocean currents at 15 m depth, by coupling it to a synthetic particle tracking tool and comparing the virtual trajectories to those of surface drifting buoys drogued at 15 m in the Greater Agulhas Current Region. The velocities from a total of 1,041 drifters are compared and evaluated to the synthetic particle-derived velocities for the period 1993–2015. On average the GlobCurrent underestimates the velocity in the Greater Agulhas Current by approximately 27%. The underestimation ranges from 4–64% in different regions, with the smallest error found in the Agulhas retroflection region, and the highest in the Benguela Upwelling System. Furthermore, we compare the time taken for the separation between the virtual and real drifters to reach 35 km. The mean separation time was found to be 78 hours, with the shortest time (35 hours) found in the Agulhas Current and the longest time (116 hours) located in the Agulhas Return Current. Deploying 10,000 virtual drifters in a 1degree x 1degree box within the southern Agulhas Current shows a convergence of trajectories towards the core of the current, while higher divergence is evident in the Agulhas retroflection. To evaluate the utility of this synthetic particle tracking tool coupled with GlobCurrent in open ocean search and rescue operations, two test cases are examined: (1) a capsized catamaran spotted south of Cape Recife and recovered 5 days later south of Cape Agulhas; and (2) a drifter trajectory in the same region. The comparison suggests that the GlobCurrent forced synthetic particle tracking tool is not appropriate for predicting the trajectory of a capsized catamaran that does not have the same drift characteristics as a surface drifting buoy drogued to 15 m.

Global surface transport in the ocean can be represented by using the observed trajectories of drifters to calculate probability distribution functions. The oceanographic applications of the Markov Chain approach to modelling include tracking of floating debris and water masses, globally and on yearly-to-centennial timescales. Here, we analyse the error inherent with mapping trajectories onto a grid and the consequences for ocean transport modelling and detection of accumulation structures. A sensitivity analysis of Markov Chain parameters is performed in an idealised Stommel gyre and western boundary current as well as with observed ocean drifters, complementing previous studies on widespread floating debris accumulation. Focusing on two key areas of inter-ocean exchange - the Agulhas System and the North Atlantic intergyre transport barrier - we assess the capacity of the Markov Chain methodology to detect surface connectivity and dynamic transport barriers. Finally, we extend the methodology's functionality to separate the geostrophic and non-geostrophic contributions to inter-ocean exchange in these key regions.

Lagrangian analysis is a powerful way to analyse the output of ocean circulation models and other ocean velocity data such as from altimetry. In the Lagrangian approach, large sets of virtual particles are integrated within the three-dimensional, time-evolving velocity fields. Over several decades, a variety of tools and methods for this purpose have emerged. Here, we review the state of the art in the field of Lagrangian analysis of ocean velocity data, starting from a fundamental kinematic framework and with a focus on large-scale open ocean applications. Beyond the use of explicit velocity fields, we consider the influence of unresolved physics and dynamics on particle trajectories. We comprehensively list and discuss the tools currently available for tracking virtual particles. We then showcase some of the innovative applications of trajectory data, and conclude with some open questions and an outlook. The overall goal of this review paper is to reconcile some of the different techniques and methods in Lagrangian ocean analysis, while recognising the rich diversity of codes that have and continue to emerge, and the challenges of the coming age of petascale computing.

As ocean general circulation models (OGCMs) move into the petascale age, where the output of single simulations exceeds petabytes of storage space, tools to analyse the output of these models will need to scale up too. Lagrangian ocean analysis, where virtual particles are tracked through hydrodynamic fields, is an increasingly popular way to analyse OGCM output, by mapping pathways and connectivity of biotic and abiotic particulates. However, the current software stack of Lagrangian ocean analysis codes is not dynamic enough to cope with the increasing complexity, scale and need for customization of use-cases. Furthermore, most community codes are developed for stand-alone use, making it a nontrivial task to integrate virtual particles at runtime of the OGCM. Here, we introduce the new Parcels code, which was designed from the ground up to be sufficiently scalable to cope with petascale computing. We highlight its API design that combines flexibility and customization with the ability to optimize for HPC workflows, following the paradigm of domain-specific languages. Parcels is primarily written in Python, utilizing the wide range of tools available in the scientific Python ecosystem, while generating low-level C code and using just-in-time compilation for performance-critical computation. We show a worked-out example of its API, and validate the accuracy of the code against seven idealized test cases. This version 0.9 of Parcels is focused on laying out the API, with future work concentrating on support for curvilinear grids, optimization, efficiency and at-runtime coupling with OGCMs.

Projects using Parcels


Parcels funding and support

Parcels development has been supported by the following organisations: