With the increasing number 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 is released and their dynamics are 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 discretized fields, from rectilinear to curvilinear grids in the horizontal direction, from

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 northwest European continental shelf and its sensitivity to various physical processes.

Numerical ocean modelling has evolved tremendously in the past decades, producing more accurate results, with finer spatial and temporal resolutions

While Lagrangian modelling can be used to simulate the flow dynamics itself

Lagrangian analysis simulates the pathways of virtual particles, which can represent water masses, tracers such as temperature, salinity, or nutrients, or particulates like seagrass

The method consists in advancing, for each particle, the coordinates and other state variables by first interpolating fields of interest, such as the velocity or any tracer, at the particle position and integrating in time the ordinary differential equations defining the particle dynamics.

A number of tools are available to track virtual particles, with diverse characteristics, strengths and limitations, including Ariane

Parcels (“Probably A Really Computationally Efficient Lagrangian Simulator”) is a framework for computing Lagrangian particle trajectories (

In this paper, we detail the interpolation schemes implemented into Parcels, with special care in the description of the new curvilinear C-grid interpolator. We describe the new meta-field objects available in Parcels for easier and faster simulations. We prove some fundamental properties of the interpolation schemes. We then validate the new developments through a study of the sensitivity of floating microplastic dispersion and 3-D passive particle distribution on the northwest European continental shelf and discuss the results.

To simulate particle transport in a large variety of applications, Parcels relies on two key features: (1) interpolation schemes to read external data sets provided on different formats and (2) customizable kernels to define the particle dynamics.

The interpolation schemes are necessary to obtain the field value at the particle location. They have been vastly improved in this latest version 2.0. Section

The kernels are already available since the earliest version of Parcels

External data sets are provided to Parcels as a set of fields. Each field is discretized on a structured grid that provides the node locations and instants at which the field values are given. It is noteworthy that the fields in a field set are not necessarily based on the same grid. In the horizontal plane, rectilinear (Fig.

Fields can be independent from each other (e.g. water velocity from one data set and wind stress from a different data set) and interpolated separately. Often, fields come from the same data set, for example when they result from a numerical model, and form a coherent structure that must be preserved in Parcels; an example is the zonal and meridional components of the velocity field. A coherent field structure is discretized on the same grid, but the variables are not necessarily distributed evenly, leading to a so-called staggered grid

Grid discretizations processed by Parcels. In the horizontal plane:

The A grid is the un-staggered Arakawa's grid: zonal velocity (

In a two-dimensional context, field

Note that in a rectilinear mesh, solving Eq. (

Arakawa's staggered grids

Positioning of the variables for an A grid (blue nodes) and C grid (orange nodes) cell with

To read three-dimensional fields, for both

In a C-grid discretization, the velocities are located on the cell edges and the tracers are at the middle of the cell (Fig.

The tracer is computed as a constant value all over the cell, in accordance with the mass conservation schemes of C grids. The formulations for the two-dimensional and three-dimensional velocities consist of four steps:

define a mapping between the physical cell and a unit cell (as for the A grid, Fig.

compute the fluxes on the unit cell interfaces, as a function of the velocities on the physical cell interfaces;

interpolate those fluxes to obtain the relative velocity;

transform the relative velocity to the physical velocity.

Step 1 consists in applying Eq. (

The velocities at the edges of cell (

The three-dimensional interpolation on C grids is different for

For

For

Fluxes used for 3-D interpolation on a C grid for

Step 2 is more complex than in the 2-D case. The fluxes interpolated in Eq. (

It is important to note another difference between the 2-D and the 3-D approaches here. While in 2-D, the fluxes were simply the product of the velocity and the edge length and were independent from

Finally, the velocities

Here we write the development for face

For compressible flows, fluxes

The B grid is a combination between the A and C grids. It is used by OGCMs such as MOM

For two-dimensional fields, the velocity nodes are located on the cell vertices as in an A grid and the tracer nodes are at the centre of the cells as in a C grid. The velocity field is thus interpolated exactly as for an A grid (Eq.

For a three-dimensional cell, the tracer node is still at the centre of the cell and the field is constant; the four horizontal velocity nodes are located at the middle of the four vertical edges; the two vertical velocity nodes are located at the centre of the two horizontal faces

Parcels relies on a set of objects, combined in a

The main variables of the grids are the time, depth, latitude and longitude coordinates. Longitude and latitude are defined as vectors for rectilinear grids and 2-D arrays for curvilinear ones. The depth variable is defined as a vector for

A Field has an

Parcels can load field data from various input formats. The most common approach consists in reading netCDF files using the

Loading a long time series of data often requires a significant memory allocation, which is not always available on the computer. The previous Parcels version circumvented the problem by loading the data step by step. Using the

In Parcels, a variety of other objects enable us to easily read a field. In this section, we describe the new objects recently added to the framework.

The first object is the

Another useful object is the

The fields do not necessarily have to cover the entire region of interest. If a field is interpolated outside its boundary, an

Available data are not always provided with the expected units. The most frequent example is the velocity given in metres per second while the particle position is in degrees. The same problem occurs with diffusivities in square metres per second.

The kernels define the particle dynamics

The kernels are implemented in Python but are executed in C for efficiency

In this section, we prove that the C-grid interpolation exactly preserves a uniform velocity in a quadrilateral. To do so, let us define a uniform velocity

As mentioned above, the horizontal and vertical directions in grids using

First, for

Microplastic (MP) is transported through all marine environments and has been observed in large quantities at both coastlines

Here we study how the modelled accumulation of floating MP in the Arctic depends on the incorporation of physical processes and model resolutions used for the southern part of the North Sea. Parcels is used to evaluate the sensitivity of the floating MP distribution under those constraints. To do so, virtual floating MP particles are released off the Rhine and Thames estuaries and tracked for 3 years. The floating MP distribution is then compared with the trajectories of passive 3-D particles, which are not restricted to stay at the sea surface. Note that this section is not meant as a comprehensive study of the MP transport off the North Sea, but rather an application of the new features implemented into Parcels, in both two and three dimensions.

We study the influence of the different physical processes impacting surface currents like density- and wind-driven currents, tidal residual currents, and Stokes drift, but also the impact of mesh resolution and diffusion. The data come from various data sets (Fig.

The main data we use are ORCA0083-N006 and ORCA025-N006, which are standard set-ups from NEMO

The data are available globally at resolutions of

The northwest shelf reanalysis

The data are freely available on the Copernicus Marine Environment Monitoring Service (CMEMS). They have a resolution of about 7 km (

The data, which will be referred to as NWS, do not cover the entire modelling region, such that a NestedField is used to interpolate it within the available region (green zone in Fig.

Stokes drift, i.e. the surface residual current due to waves, was obtained from WaveWatch III

Spatial coverage of the OGCM data used to study North Sea microplastic transport. NEMO data are available globally. NWS data are available for the North Sea region (green boundary) and WaveWatch III data are available south of 80

Six simulations are run in the following configurations: (a) NEMO hydrodynamics at a

Every day of the year 2000, 100 particles are released in the mouth of the Thames estuary and 100 more particles in the mouth of the Rhine, before being tracked for 3 years. For the two 2-D runs, (a) to (e), the particles are released at the sea surface and follow the horizontal surface currents. For the 3-D run (f), the particles are released at 0.1, 0.5 and 1 m depths and follow the 3-D NEMO flow field.

The diffusion, which parametrizes the unresolved processes, is modelled as a stochastic zero-order Markov model

The beaching of MP is non-negligible in the North Sea

For numerical reasons, due to the integration time step of 15 min and the Runge–Kutta 4 scheme, it is theoretically possible that particles beach even with NEMO or NWS data. This could happen for example in a region of coastal downwelling since the particles are forced to stay at the surface and could be constantly transported towards the coast.
The particle dynamics are thus implemented using separate kernels. At each time step, the particle position is first updated following NEMO or NWS advection. Then the particle is checked to still be located in a wet cell, otherwise it is pushed back to the sea using an artificial current. In a second step, the Stokes or diffusion kernels are run, where if the particle beaches, it stops moving. In a final step, the particle age is updated.
The kernel code as well as all the scripts running and post-processing the simulations are available at

To compare the simulations, the Parcels raw results, consisting of particle position, age and beaching status exported every 2 d, are post-processed into the following maps and budgets.

The particle density (Fig.

To analyse the particle path, the ocean is discretized into cells of

To study the temporal dynamics of the particles, the region is divided into six zones (Fig.

Finally, the integrated vertical distribution (Fig.

Animations showing the particle dynamics are available in the article Supplement.

Density of floating microplastic

Fraction of floating microplastic

Evolution of the distribution of floating microplastic

Particle integrated vertical distribution for the 3-D NEMO

The results show various minor and major differences between the scenarios.

While NEMO

The main differences of using NWS result from the dynamics during the first year, when the particles are located south of 65

Including Stokes drift has a major impact on MP dynamics in the northwest European continental shelf, due to prevailing westerly winds

The parametrization of sub-grid scales and diffusion is still an important field of research in the Lagrangian community, but it is generally agreed upon that it cannot be neglected. In this application, we observe how adding diffusion impacts the fate of MP. The amount of MP reaching the Arctic is reduced by 68 % compared to NEMO

Maintaining the MP at the surface is a strong assumption: biofouling, degradation and hydrodynamics affect the plastic depth, which impacts its lateral displacement. In the 3-D particle run (Fig.

This brief study of the sensitivity of North Sea floating MP distribution is an illustration of how Parcels is used to gather and compare flow fields from a multitude of data sets in both two and three dimensions, which was made possible by the development of the different field interpolation schemes and meta-field objects. To validate the MP dynamics observed, it is essential to couple such a numerical study with an extensive field study.

Parcels, a Lagrangian ocean analysis framework, was considerably improved since version 0.9, allowing us to read data from multiple fields discretized on different grids and grid types.
In particular, a new interpolation scheme for curvilinear C grids was developed and implemented into Parcels v2.0. This article described this new interpolation as well as the other schemes available in Parcels, including A, B, and C staggered grids, rectilinear and curvilinear horizontal meshes, and

Parcels v2.0 was used to simulate the dynamics of the northwest European continental shelf floating microplastic, virtually released during 1 year off the Thames and Rhine estuaries, before drifting towards the Arctic, and the sensitivity of this transport to various physical processes and numerical choices such as mesh resolution and diffusion parametrization. While those simulations do not provide a comprehensive study of microplastic dynamics in the area, they highlight key points to consider and illustrate the interest of using Parcels for such modelling.

The next step in Parcels development will involve increasing the model efficiency and developing a fully parallel version of the Lagrangian framework.

The code for Parcels is licensed under the MIT licence and is available through GitHub at

Independently of Parcels, a simple Python code also implements all the C-grid interpolation schemes developed in this paper. It is available at

All the scripts running and post-processing the North Sea MP simulations are available at

The NEMO N006 data are kindly provided by Andrew Coward at NOC Southampton, UK, and can be downloaded at

Northwest shelf reanalysis data are provided by the Copernicus Marine Environment Monitoring Service (CMEMS). They can be downloaded at

WaveWatch III data come from the Ifremer Institute, France. They can be downloaded at

The supplement related to this article is available online at:

PD and EvS developed the code and wrote the paper jointly.

The authors declare that they have no conflict of interest.

Philippe Delandmeter and Erik van Sebille are supported through funding from the European Research Council (ERC) under the European Union Horizon 2020 research and innovation programme (grant agreement no. 715386, TOPIOS). The North Sea microplastic simulations were carried out on the Dutch National e-Infrastructure with the support of SURF Cooperative (project no. 16371). This study has been conducted using EU Copernicus Marine Service Information.

We thank Henk Dijkstra for the fruitful discussions, Andrew Coward for providing the ORCA0083-N006 and ORCA025-N006 simulation data and the IMMERSE project from the European Union Horizon 2020 research and innovation programme (grant agreement no. 821926).

This research has been supported by the European Commission (TOPIOS (grant no. 715386)).

This paper was edited by Robert Marsh and reviewed by Joakim Kjellsson and Knut-Frode Dagestad.