betaFeedback

WorksPhysics and Astronomy

KELP v1.0: an agent-ready Lagrangian particle tracker for unstructured meshes and HEALPix grids

Abstract

Lagrangian particle tracking follows virtual particles in the velocity fields of an ocean model to study transport pathways, connectivity and dispersion. Setting up such a study takes many technical steps, and this work is increasingly done with coding agents, programs in which a language model writes code, runs it and checks the result. We present KELP v1.0, the Kinematic Engine for Lagrangian Particles, a tracker for unstructured ocean-model meshes and HEALPix grids that is built to be operated by such agents. KELP computes two- and three-dimensional trajectories with established methods on triangular, quadrilateral and mixed meshes, with global FESOM2 and coastal FESOM-C meshes as examples, and on HEALPix, the equal-area grid on which kilometre-scale digital twins distribute their output. Documentation and short task instructions, called skills, tell an agent how to prepare releases and configurations, run calculations and process the trajectories. An agent prepared and ran all experiments of this paper with these skills, and most of the preparation was completed within hours. In a controlled evaluation, the skills raised the completeness of study files prepared by five language models from 75-93% to 88-100%. KELP reproduced the particle distributions of two other trackers on the same fields. Trajectories on HEALPix fields converged to those on the model mesh as the pixels were refined. After one year, the median distance between the two was 1.6 km at a pixel spacing of 25.5 km. HEALPix output can therefore be used for Lagrangian studies of ensemble statistics when the original mesh is not available. In a 63-year calculation with 7.92 million particles released in the Beaufort Gyre, transport from the gyre to Fram Strait took years to decades, and the run took 3 h 36 min on one 128-core node. A test tracked 101010^{10} particles on a HEALPix mesh of 35.5 million wet surface nodes.

Introduction

Lagrangian particle tracking computes the paths of virtual particles carried by the velocity fields of an ocean model and answers questions about where water comes from, where released material travels and how regions are connected [55]. In physical oceanography, trajectories trace the exchange of water masses between ocean basins [12], show the pathways of warm and dense water in the Weddell Sea [34] and locate the source regions of particles caught in sediment traps [62]. In marine biogeochemistry and biology, they follow the upwelling of carbon [4], changes in dissolved inorganic carbon along water-mass pathways [40], and larval dispersal and population connectivity [8, 7, 48]. Near the coast, they follow drifting oil and objects [9], suspended matter in a glacial fjord [33] and changes in dispersion around offshore wind farms [2].

Ocean models increasingly compute on unstructured meshes, whose cells can be refined near coasts, in straits and in regions of interest. The FESOM family of sea ice–ocean models, for example, uses triangular meshes for global simulations and mixed triangular–quadrilateral meshes for coastal simulations [10, 1]. Kilometre-scale simulations of Destination Earth, nextGEMS and EERIE distribute their output on HEALPix grids [21, 39, 18] (Doblas-Reyes et al. 2026). HEALPix divides the sphere into four-sided pixels of equal area and was first developed for astronomical maps of the whole sky [19]. Its resolution is set by a zoom level, where each level divides every pixel into four and halves the pixel spacing, the square root of the pixel area. These projects use it as a common grid for the output of different models (Doblas-Reyes et al., 2026). Because interpolating the velocities from the model mesh to HEALPix changes the coastline and the flow seen by a particle, differences between trajectories on the two grids accumulate over time. Meshes also contain up to tens of millions of nodes, and multiyear integrations require reading terabytes of velocity output.

There are several existing trajectory frameworks built for structured and unstructured meshes. Ariane [3] and TRACMASS (Döös et al., 2013, 2017) compute trajectories from transports through the faces of structured grid cells. General offline frameworks include Parcels [27, 11] and OpenDrift [9], and Parcels also reads FESOM2 output [50]. OceanTracker and PyLag track particles on unstructured coastal meshes of models such as SCHISM and FVCOM [56, 57, 54, 6]. OceanTracker also reads structured grids and splits every quadrilateral cell into two triangles [57]. Ichthyop and the Connectivity Modeling System are built for biophysical studies of fish larvae and population connectivity [28, 37]. FESOM output has been analysed with a tracker written for its triangular mesh [62, 34], and coastal studies with FESOM-C have used a particle tracker built for that model [33, 2].

In this paper, we present KELP v1.0, the Kinematic Engine for Lagrangian Particles. KELP tracks particles on unstructured meshes of triangles, quadrilaterals or both, and on HEALPix grids. It does not regrid the velocity fields and does not split quadrilateral cells into triangles. It covers global and coastal applications in two and three dimensions, with output of FESOM2 and FESOM-C serving as examples in this paper. KELP builds on earlier particle tracking for FESOM-C [33, 2] and on established numerical methods, which it combines in one engine. It keeps only the needed velocity snapshots in memory and distributes large particle ensembles over many processors and computer nodes, and tracking on both a model mesh and its HEALPix version allows a controlled comparison of the two.

A tracking study on such grids involves many technical steps: reading the model output, planning particle releases, choosing numerical schemes, running calculations on a cluster and processing the trajectories. This work is now increasingly done with coding agents [35, 36], programs in which a large language model reads files, writes code, runs commands and checks the result of each step before taking the next [64]. Such agents develop software [63] and analyse Earth-science data, but on complex tasks they can also fail without notice [66, 31]. Their results therefore depend on the software they operate: it should give clear instructions, check the input and record what was done [63, 36]. KELP is designed for this way of working, while its documentation also serves users who work without an agent. Its skills, short Markdown files with instructions for one task each, tell the agent how to prepare a particle release, write a configuration, start runs on a computer cluster and process the trajectory output. KELP checks each configuration before a run starts, and the agent saves the configuration, release files, input-data references, code version and analysis scripts, so that a study can be repeated without the agent conversation. Extensions of the code, such as an input module for a further output format, use the same documented interfaces. All experiments in this paper were prepared and run by a coding agent with KELP, with the user setting each task, approving each launch and checking the results.

§ 2 describes the tracking method, and Sect. 3 the software and its operation by agents. § 4 verifies the implementation with analytical tests, refinement of the mesh and of the time step, forward–backward integrations and comparisons with two other trackers. § 5 compares trajectories on a FESOM2 mesh and on its HEALPix versions and follows six decades of releases in the Beaufort Gyre. It also measures throughput and scaling and evaluates agent-prepared studies. § 7 and § 8 discuss the results and present the conclusions.

Tracking method

KELP describes every supported mesh in a standardized way, and the tracking methods work on this common description. The velocity fields are used on the mesh or grid on which they are stored, without regridding. Here we introduce the tracking method, whereas numerical details are given in Appendix § 9.

Meshes, fields and coordinate frame

The common mesh description contains the node positions on the sphere and the cells, which are triangles or quadrilaterals. It also lists the nodes that form each cell and the depths of the layer interfaces (Figure 1). Velocity and scalar fields are used where the model stores them, at the nodes or at the cell centroids (Table 1). In the examples of this paper, global FESOM2 output uses triangular cells and fixed depth levels. Coastal FESOM-C output uses triangular or mixed triangular–quadrilateral meshes with sigma layers.

Mesh families and the cells used for interpolation: (a) Triangular mesh; (b) Mixed mesh; (c) HEALPix pixels and their dual mesh; (d) Vertical coordinate and vertical interpolation.

Figure 1. Mesh families and the cells used for interpolation. (a) Triangular mesh. (b) Mixed triangular–quadrilateral mesh. (c) HEALPix pixels (dashed) and the dual mesh on their centres (solid). In (a)–(c), the star is a particle and the open circle its nearest node. The dark cell is the cell that contains the particle, with the sub-areas that give the weights of its vertices. The light cells are the cells around the nearest node, with their centroids. (d) Fixed depth levels with a floor depth per node (left) and sigma layers (right). Open circles are the layer interfaces, crosses the layer mid-depths and the star a particle. The figure labels read: “(a) Triangular mesh”; “uu, vv at the cell centroids or at the nodes, TT, SS, WW, η\eta at the nodes”; “(b) Mixed mesh”; “triangles and quadrilaterals in one cell table, fields placed as in (a)”; “(c) HEALPix pixels and their dual mesh”; “3-vertex cell”; “all fields at the pixel centres = nodes, so interpolation from the vertices only. Dashed: pixels, solid: dual cells”; “Two horizontal schemes, chosen by where a field lives (⋆\star particle, ∘\circ its nearest node):”; “at the nodes: interpolation from the vertices of the containing cell (barycentric or Wachspress), dotted lines: weight sub-areas”; “at the cell centroids: plane fit over the centroids of the cells around the nearest node”; “(d) Vertical coordinate and vertical interpolation”; “α Δz\alpha\,\Delta z”; “(1−α)Δz(1-\alpha)\Delta z”; “fixed depth levels, floor depth per node”; “sigma layers on the column H=d+ηH=d+\eta, zk=(1−σk)Hz_k=(1-\sigma_k)H”; “∘\circ WW at the interfaces: linear in depth between zkz_k and zk+1z_{k+1} at each node, then a plane fit over the nodes around the nearest node.”; “×\times uu, vv, TT, SS at the layer mid-depths, from the layer that contains zz, chosen against the floor depth of the node.”; “⋆\star below the floor or above the surface: depth clamped, particle kept.”

Mesh familyCellsVertical coordinateu,vu,vWWScalars
Triangular (e.g. global FESOM2)trianglesfixed depth levels, floor depth per nodecell centroids or nodesnodesnodes
Triangular or mixed (e.g. coastal FESOM-C)triangles, quadrilaterals or bothsigma layerscell centroids or nodesnodesnodes
HEALPix, dual representationthree- and four-vertex cells around the pixel cornersfixed depth levelsnodes (pixel centres)nodesnodes
HEALPix, pixel representationquadrilaterals (the pixels), two dimensions only–cell centroids––

Table 1. Mesh families supported by KELP v1.0 and the positions of their fields on the mesh. For three-dimensional fields, the horizontal velocity and the scalars are stored at layer mid-depths and the vertical velocity WW at the layer interfaces.

For HEALPix output, wet pixel centres become the nodes of a dual mesh. Each corner surrounded entirely by wet pixels defines a cell joining their centres (Figure 1c). These cells have three or four vertices. An alternative two-dimensional representation retains the pixels as quadrilateral cells with centroid-located velocity. Structured grids map onto the same quadrilateral representation, but this paper does not cover them.

Positions use longitude λ\lambda and latitude ϕ\phi in degrees, and depth zz in metres. Velocities (U,V,W)(U,V,W) are in metres per second, and zz and WW are positive downward. Ocean models write WW positive upward, and KELP changes its sign when it reads the field.

An optional rotated coordinate frame places the poles on land, so that the meridians do not converge over the Arctic Ocean. FESOM2 and HEALPix fields can use the standard FESOM2 rotation or custom rotation angles (Appendix § 12.1). Release positions and output trajectories remain in geographic coordinates.

The time step: finding the cell and treating the boundaries

In every time step, each active particle passes through the same sequence (Figure 2). KELP first finds the cell that contains the particle. It interpolates the velocity to the particle position in space and then in time, advances the particle by one step and applies the boundary rules. Diffusion adds a random displacement when it is switched on. A particle enters this sequence at its release time. Its position, status and optionally the sampled fields are written at the chosen output interval.

Figure 2. One time step for an active particle: the six steps in order, the bracket over steps 1–3, the optional stochastic update (dashed box) and the return to the next step (dashed loop).

To find the containing cell, KELP first finds the nearest node. The nodes are sorted once into a regular longitude–latitude grid of boxes. Only the nodes in the box of the particle and in the eight surrounding boxes are then compared. Near the poles and the dateline, the search is widened using distances on the sphere. The cells around the nearest node and the cells around their vertices, two rings in all, are then tested for the particle. An alternative is the edge walk [30] (Devillers et al. 2002). It starts from the cell of the previous position and moves into the neighbouring cell across each edge that the particle crossed. It stops in the cell that contains the new position. Where the walk cannot decide, the two-ring search is used instead (Appendix § 9.1). The two-ring search needs no record of the previous cell and is the default, whereas the edge walk avoids particle losses caused by strongly stretched cells (Sect. 4.2).

When the new position of a particle lies in no cell, the step is undone. By default, KELP removes the particle whether it crossed an open boundary, reached a coast or was lost by the cell search. With the stranding option switched on, a particle that reaches shallow water or a coastal cell is instead kept at its position as stranded. It is released again when the water returns, either as soon as the depth allows or with a given probability per step (Appendix § 12). In the vertical, a particle is kept between the sea surface and the sea floor at its position.

Spatial interpolation

The horizontal interpolation depends on where the model stores the velocity. Velocities stored at nodes are interpolated from the vertices of the containing cell. On triangles this results in linear (barycentric) interpolation. On quadrilaterals it uses Wachspress coordinates, which extend bilinear interpolation to convex cells of any shape [61]. Velocities stored at the cell centroids are interpolated with a plane fitted by least squares to the centroid values of several cells. The cells are either those around the nearest node, the default, or the containing cell and its edge-sharing neighbours. A third option first averages the centroid values to the nodes and then interpolates from the vertices. The two plane fits kept second-order accuracy on distorted cells, whereas the averaging to the nodes lost accuracy there (Sect. 4.2). The averaged field is continuous across cell edges, and the plane fits are not. Appendix § 10 presents the cells each scheme uses and their treatment at the coast.

Vertical velocity is interpolated linearly between the layer interfaces at each node. The node values are then combined horizontally with a plane fit or one of three alternatives (Appendix § 11). In FESOM2 and FESOM-C, the vertical velocity written by the model is the flow across the layer interfaces, which move with the sea surface. KELP therefore uses this velocity directly to move the particle relative to the moving layers. For FESOM2 output, KELP tracks the reference depth, the depth that the particle would have at zero sea-surface height. It differs from the actual depth by at most the sea-surface height. On sigma meshes, the position relative to the layers is the fraction of the local water column. The particle then follows the moving sea surface and the sloping floor (Appendix § 11). Scalar fields such as temperature are sampled at the output positions.

Time integration and diffusion

The fixed-step integrators are forward Euler, midpoint Runge–Kutta (RK2) and classical fourth-order Runge–Kutta (RK4) [5]. Adaptive integration uses the Dormand–Prince 5(4) pair [15], restricted to two-dimensional tracking (Appendix § 11.1).

Temporal reconstruction is linear by default. RK2 and RK4 also accept monotone piecewise-cubic Hermite interpolation (PCHIP) [17, 16]. The integration step hh and snapshot interval ΔT\Delta T set distinct errors: reducing hh cannot remove the error from reconstructing stored fields. We therefore use RK2 with linear reconstruction as the standard setting and pair RK4 with PCHIP, because linear reconstruction would otherwise limit RK4 to the accuracy of RK2 (Sect. 4.3).

Horizontal diffusion uses a random walk with constant diffusivity, or Euler–Maruyama and Milstein schemes for spatially varying diffusivity [58, 41, 20]. The spatially varying schemes are twodimensional. Vertical diffusion includes the diffusivity-gradient drift of Visser [58] and reflects displacements at the surface and floor. The increments and their composition with advection are given in Appendix § 11.2.

Each random number is computed directly from the particle index, the time step and its use, such as horizontal or vertical diffusion [42]. A run therefore gives the same trajectories whatever the number of threads and however the particles are divided among processes. The same holds when a run is interrupted and restarted. Backward integration reverses the advection while keeping the diffusion.

Software and agent operation

KELP is a Python package built on NumPy, xarray Hoyer and Hamman, [22] and Numba, under the BSD 3-Clause licence. A run is described by one YAML configuration file. It names the input data, the particle releases, the numerical methods and the output, and KELP runs the tracking sequence of Sect. 2.2 from it. This section describes how the tracking is executed on a computer cluster and how a study is set up with a coding agent.

Execution and cost

The velocity archive of a multiyear simulation is far larger than the memory of a computer node. KELP therefore has an input module for each output format. For a further output format, a coding agent can write the input module with the same documented interface (Sect. 5.4). Each module keeps only the few snapshots in memory that the current step needs and replaces them as the run advances (Appendix § 13.1). Two options reduce the reading cost further. Several snapshots can be read in one operation, and the velocities can be kept in single precision, which halves their memory. For a regional study, the fields of the region can be extracted once from the global archive. Later runs then read only this extract (Appendix § 13.2). Trajectories are written during the run, and a run can stop and continue from a restart file. A long experiment is therefore run as a chain of jobs, each within the time limit of the computer cluster.

The work of one step is done by compiled code. For the most common settings, the search for the cell, the interpolation and the integration are compiled together into one routine, which avoids intermediate arrays. Other settings run these stages one after another (Appendix § 13.3). Within one process, the particles are divided among threads. A larger ensemble is divided among processes on one or several nodes, and their outputs are merged afterwards (Appendix § 13.2).

The time of one step is approximately

tstep≈tI/O+cN,(1)t_{\mathrm{step}} \approx t_{\mathrm{I/O}} + cN, \tag*{(1)}

where tI/Ot_{\mathrm{I/O}} is the time to read the fields and cc the mean computation time per active particle, for NN active particles. Writing the trajectories adds a separate cost. The reading time does not depend on the number of particles, so it dominates small runs on large meshes. Both terms and their scaling are measured in Sect. 5.3.

Setting up and reproducing a study

We developed KELP and ran its experiments with coding agents (Sect. 1). The agent prepares the files and runs the jobs, and the user sets the task, decides the setup and checks the results. This shortens the routine part of a study, for example when many similar configurations are needed for a parameter series or a scaling test. KELP includes documentation and skills written for this working routine (Figure 3).

Figure 3. Schematic of how a coding agent works with KELP. The agent (left) reads the documentation (top) and the seven skills. It writes the configuration, which is checked before the engine runs and writes the output (middle). The test suite (bottom) checks that the engine gives the same trajectories on every execution path. Solid arrows carry what one part gives the next, and dashed arrows return information to the agent.

Each skill tells the agent how to carry out one recurring task. For example, some skills describe how to set up a particle release and a configuration, and how to start a run. Others describe how to crop a large mesh to a region and chain long runs with restarts. Further skills cover counting section crossings, comparing release cohorts and drawing figures. Each skill lists the required inputs, the steps and checks, and the files that the task should produce. KELP provides seven skills (Table 2).

SkillTaskOutput
runPrepare a tracking run and check its inputRelease file, configuration, launch command, input checks
configWrite, edit or check a configurationConfiguration that passes the checks at loading
experimentOrganize large ensembles, regional extracts and resumable campaignsCampaign folder, code revision, jobs and result records
analysisAnalyse transport, release cohorts, crossings and run costAnalysis scripts and tables
visualizeFigures and animations from trajectory outputPlotting scripts, figures, captions
diagnoseDiagnose unexpected run behaviour or costDiagnosis and supporting checks
benchBenchmark on a given machineComparable performance measurements

Table 2. The skills of KELP v1.0: the task for which an agent reads each one and the files it produces.

A source map lists the functions that each document describes, and a check reports when that code has changed. The agent therefore does not work from an outdated description (Appendix § 13.5). Before a run starts, KELP checks the configuration and the input data and refuses settings it cannot handle (Appendix § 13.4). The user approves the prepared launch command.

The skills complement a small plotting and statistics module and utility scripts. They guide the agent in producing the configurations, release files, analysis scripts and figures of a particular study. Problems and slow steps found in one campaign are written into the skills for later studies. Section 5.4 reports what the agent did in the experiments of this paper and measures what the skills add to the preparation of new studies.

A study can be repeated from its saved configuration, release files, input-data references, code revision and analysis scripts. These records make it independent of the conversation with the agent. The test suite checks that a run gives the same trajectories whichever compiled path it takes and however it is divided among processes. The same holds for restarted runs and for runs with diffusion (Appendix § 13.5).

Verification

This section verifies that KELP computes trajectories accurately. We proceed from tests with a known answer to tests on real model output. In flows with an exact solution, we compare the computed trajectories with the analytical ones (Sect. 4.1). In a steady eddy on test meshes, we measure how the error depends on the mesh spacing and on the cell shape (Sect. 4.2). In a time-varying flow, we measure how it depends on the time step and on the interval between the stored velocity fields (Sect. 4.3). On ocean-model output, where no exact trajectory exists, we track particles forward and then backward and check how close they return to their starting positions (Sect. 4.4). Finally, we compare KELP with two other trackers by using the same velocity fields (Sect. 4.5).

Analytic flows and conservation

Before applying KELP to ocean-model output, we verified it in simple flows with known trajectories, as part of the automated test suite (Appendix § 13.5). The velocity of such a flow is evaluated at the nodes or cell centroids of a test mesh, the particles are tracked as in a real run, and their final positions are compared with the exact ones. A linear strain flow, a rotating flow with vertical drift and a flow with downwelling are tracked on triangular and quadrilateral meshes and across the interface of a mixed mesh. On the HEALPix dual mesh, uniform zonal and meridional flows and a uniform flow with downwelling give the exact displacements, also across the dateline, and tests near the pole and across the dateline check the conversion between metres and degrees (Eq. (7) in Appendix § 11.1). In all these flows, the computed paths agree with the exact ones within the error of the time step. In a steady overturning cell, each particle stays on its streamline under each method of vertical-velocity interpolation. On a sigma mesh with a tide over a sloping floor, Euler, RK2 and RK4 keep the fractional depth of a particle in the moving water column exactly.

Diffusion tests check the distribution of many particles rather than individual paths. With uniform horizontal diffusivity, the spread of the particles grows with time at the expected rate. With a prescribed gradient of the diffusivity, the particles drift as the theory predicts. In a closed water column whose diffusivity increases with depth, a uniform particle distribution stays uniform in forward and in backward runs. The stranding rules are checked in the same way. One test dries and rewets a flat domain with a tidal cycle, another carries a particle onto an island shore.

Mesh spacing and cell shape

Model meshes contain cells of different size and shape, in particular near coasts. The tests of Sect. 4.1 show that the schemes reproduce simple flows with exact solutions. They do not show how the trajectory error changes with the spacing and the shape of the cells. We measured this in a steady eddy in which every particle path is known. Its streamfunction is ψ=ψ0exp⁡(−r2/2R2)\psi= \psi_0 \exp(-r^2/2R^2) with R=20R = 20 km, so particles circle the eddy centre. The speed reaches 0.5 m s−1^{-1} at r=Rr = R. One revolution takes 1.8 days at r=5r = 5 km and 40 days at r=50r = 50 km. An error in the interpolated speed therefore moves a particle ahead of or behind its exact position, and this offset grows with time.

We built three pairs of test meshes: triangles, quadrilaterals, and triangles mixed with quadrilaterals (Figure 4a–Figure 4d). In each pair, one mesh is of good quality, with cells of nearly equal size and interior angles between 30 and 90°. The other is distorted, with cell sizes that differ by about an order of magnitude and interior angles from about 5° to 170°. All meshes were built with mean node spacings of 4, 2, 1 and 0.5 km. We released 720 particles on ten circles with radii of 5–50 km and tracked them for 30 days with RK4 and a 300-s step. Velocities were sampled from the exact field at the nodes or at the cell centroids. The error therefore comes only from the spatial interpolation and from the search for the cell that contains the particle. Halving the step changed the final positions by a median of less than 2 m.

Trajectory error in a steady eddy on test meshes

Figure 4. Trajectory error in a steady eddy on test meshes with a mean node spacing of 1 km, and cell shapes of test and model meshes. (a)–(d) Close-ups, 6 km wide and 4.5 km high, of four test meshes: good triangles (a), distorted triangles (b), distorted quadrilaterals (c) and the distorted mixed mesh (d). Triangles are light grey and quadrilaterals light sand, and the dashed line is the 20-km circle. (e) The eddy: speed (colour), the ten release circles (dotted) and exact paths over the first 12 h (black). The red box marks the window of (a)–(d), and the red circle the release circle of (f)–(h). (f)–(h) Positions after 30 days of four particles released on the 20-km circle, on the meshes of (a), (b) and (c): exact (open circles) and computed with each scheme (colour). Circles mark the schemes that follow the particle across cell edges (edge walk). Squares mark the plane fit over the cells around the nearest node (two-ring search). Crosses mark the last positions of lost particles, and insets enlarge one particle. (i) Median error of all 720 particles after 30 days against node spacing on the good (solid) and distorted (dashed) triangles. The dotted line has slope 2. (j) Percentage of cells whose edge ratio (longest edge divided by shortest) exceeds a given value, for the test meshes of (a)–(d) (grey) and four model meshes (purple): FESOM2 CORE2, FESOM2 NG5, FESOM-C southern North Sea and FESOM-C German Bight with wind farms. The step of (a) at 0.5 % comes from half-size cells along two edges of the test domain.

On the good-quality meshes, the error of all four schemes decreased with the square of the node spacing, as Figure 4i shows for triangles. The fitted slopes were 1.98–2.03 on triangles, quadrilaterals and the mixed mesh, where particles also cross from one cell type to the other. Distortion did not change this rate for the interpolation of node velocities from the vertices or for the two plane fits (slopes 1.76–2.15). At a spacing of 0.5 km, it increased their error by a factor of 1.4–2.2 compared with the good-quality mesh of the same cell type. The scheme that averages centroid velocities to the nodes lost accuracy on distorted cells. Its error decreased only about linearly with the spacing (slopes 1.1–1.5) and was 9–18 times larger than on the good-quality mesh. The average is exact at the area-weighted centre of the surrounding centroids, which on distorted cells lies away from the node (Appendix § 10).

Cell shape also affected the search for the containing cell. The default scheme, the plane fit over the cells around the nearest node, searches two rings of cells around that node (Sect. 2.2). It lost no particles on the good-quality meshes and on the distorted triangles. On the distorted quadrilateral and mixed meshes, it lost 24–61 % of the particles within 30 days (Figure 4h). On these cells, a node two rows away can be closer to the particle than the corners of its own cell. The three schemes that follow the particle across cell edges with the edge walk lost no particles.

Real model meshes are mostly close to the good-quality test meshes, and strongly distorted cells are rare (Figure 4j). We measured the cell shapes of four model meshes in the same way as those of the test meshes: the FESOM2 CORE2 and NG5 meshes, a FESOM-C mesh of the southern North Sea and the FESOM-C wind-farm mesh of the German Bight used in Sect. 4.5. On all four, 95 % of the cells have an edge ratio (longest edge to shortest) below 2.2, and at most 0.006 % exceed 4, whereas on the distorted test meshes the 95th percentile reaches 3.2–5.7 and up to 17 % of the cells exceed 4. Interior angles outside 30–120° occur in 0–4.1 % of the model cells, compared with 13–26 % on the distorted test meshes. The German Bight mesh has fewer stretched cells than the distorted triangles of Figure 4b, on which no scheme lost particles. The distorted test meshes therefore represent an unfavourable case, and where such cells occur, the schemes that use the edge walk are the safer choice.

Time step and snapshot interval

Offline tracking has two sources of temporal error. The integrator approximates the trajectory within each step hh, and the temporal reconstruction approximates the velocity between snapshots stored every ΔT\Delta T. Refining hh reduces only the first error. We separate the two by varying hh and ΔT\Delta T independently in a flow with a known trajectory. The flow is uniform in space, so spatial interpolation adds no error. It is an inertial oscillation superimposed on a constant eastward current: U=ug+(u0−ug)cos⁡(ft)U = u_g + (u_0 - u_g)\cos(ft) and V=−(u0−ug)sin⁡(ft)V = -(u_0 - u_g)\sin(ft). We set f=10−4 s−1f = 10^{-4}\ \mathrm{s}^{-1}, u0=0.3 m s−1u_0 = 0.3\ \mathrm{m\,s}^{-1} and ug=0.04 m s−1u_g = 0.04\ \mathrm{m\,s}^{-1}, and follow one particle from the origin for 8 h. The error is the distance of its final position from the analytic one.

With linear reconstruction, the reconstruction error limits the accuracy whatever the order of the integrator (Figure 5a). With hourly snapshots, RK2 and RK4 gave the same 55.8-m error over the whole range of steps. PCHIP lowered this limit to about 3.7 m. RK4 reached it with an hourly step, and RK2 approached it as the step was refined.

Figure 5. Position error after 8 h versus (a) the integration step hh at ΔT=1\Delta T = 1 h, with ΔT/h\Delta T/h on the upper axis, and (b) the snapshot interval ΔT\Delta T at h=56.25h = 56.25 s. Dashed lines show linear reconstruction and solid lines PCHIP. Open circles mark RK2 and filled squares RK4. Grey bands mark the runs with h=56.25h = 56.25 s and ΔT=1\Delta T = 1 h, shown in both panels. Dotted lines give the slopes h2h^2, ΔT2\Delta T^2 and ΔT4\Delta T^4.

More frequent snapshots lowered the reconstruction error (Figure 5b). At the finest step (h=56.25h = 56.25 s, 1/64 of an hour), the error decreased approximately as ΔT2\Delta T^2 with linear reconstruction and as ΔT4\Delta T^4 with PCHIP between 15 min and 1 h.

The run skill applies these results (Table 2): it uses RK2 with linear reconstruction by default and pairs RK4 with PCHIP, because RK4 gains nothing over RK2 when the reconstruction is linear.

Forward–backward closure

When the exact trajectory is unknown, a forward–backward test shows how much numerical error accumulates. A particle is tracked forward for some time and then backward for the same time in the same fields. In exact arithmetic it would return to its starting point. We call the distance between the start and the final position the closure. Diffusion is switched off, because a random walk does not retrace its path backward. In uniform flow, the closure is zero to rounding error.

On ocean-model output, we measured the closure in KELP and in Parcels on the same fields (Sect. 4.5). Three effects keep it above zero. The integration schemes are not exactly reversible, small differences grow where neighbouring trajectories diverge, and the boundary rules act in one direction only. A particle removed at a boundary cannot return, and a depth that was limited at the sea floor cannot be restored on the way back.

Comparison with other trackers

Where no exact trajectory is known, we compared KELP with two other trackers on the same velocity fields. Each comparison used matched release positions and matched time integration. In chaotic flow, small differences at each step separate individual particles over time. We therefore compare particle distributions first and the separation of the same particle second.

The first comparison repeated the particle experiment of Androsov et al. [2] with KELP and with their tracker. That study examined how offshore wind farms in the German Bight change the tidal flow of the southeastern North Sea and the spreading of passive particles. It used the depth-averaged version of FESOM-C, forced only by barotropic tides at the open boundary. Two simulations differed in the representation of 692 turbine foundations. In the reference run, mesh cells filled the foundation sites. In the wind-farm run, the foundations were cut out of the mesh. Both triangular meshes have about 1.19 million nodes, with spacing from 1.4 m around the turbines to about 1.4 km near the open boundary. Velocities were stored at cell centroids every 300 s.

The particle experiment compared the distributions of particles released in the two runs. Five clouds of 100 particles each were released at the same positions in both runs (Figure 6). Three clouds lie inside wind farms, one at Helgoland and one in open water. Each cloud was released 78 times at two-hour intervals, and each release was followed for eight weeks. Maps of particle probability summarise the result. They give the fraction of all sampled particle positions that falls into each map cell.

Figure 6. Particle probability maps for the wind-farm run of Androsov et al. [2], computed with (a) the tracker of Androsov et al. [2] and (b) KELP. Colours give the fraction of all sampled positions per cell of about 0.65×0.670.65 \times0.67 km, with the five clouds weighted equally. Positions were sampled over the eight weeks following each of the 78 releases. Black circles mark the release areas of the five clouds.

We configured KELP with the cell search and interpolation of their tracker. Both codes find the nearest mesh node and search the cells around it for the particle. Both fit a least-squares plane to the centroid velocities of these cells (Sect. 2.3). Both advance particles with forward Euler steps of 300 s, equal to the snapshot interval. The runs of both codes were performed on a single node of the AWI cluster Albedo.

The probability maps of the two codes overlapped by 95 % with wind farms (Figure 6) and by 97 % without them. The overlap is the sum over all map cells of the smaller of the two probabilities. For single clouds, the overlap ranged from 91 to 99 %. The areas that contain 50 and 90 % of the probability differed by at most 7 %.

After 56 days, the cloud centres of the two codes were 0.2–1.7 km apart, while the root-mean-square radius of the clouds had grown to 1–16 km. Individual particles separated by nearly the cloud radius in two clouds with wind farms and in one without. The two codes therefore agree in the particle distributions, which the experiment compares. In the runs with their tracker, 67 of the 78 releases started 0.5–1.5 h earlier than scheduled, which likely explains part of the difference. § 7 examines the sensitivity of transport diagnostics to finer integration steps.

The second comparison used Parcels v4 (version 4.0.1.dev7, The Parcels Team, 2026) on the FESOM2 CORE2 mesh north of 50∘50^\circ N with daily velocities of 1980. On 1 January 1980, we released 31 417 particles in the Beaufort Gyre between 0 and 500 m depth and tracked them for 363 days, together with a surface set at their 2 250 horizontal positions. Both codes used RK4 with a 3-h step, barycentric interpolation in the horizontal and linear interpolation in time. Our run script supplied the vertical velocity and the time interpolation to Parcels, whose code was not changed. These runs were performed on a single node of DKRZ Levante (Sect. 5.3).

After one year, the particle distributions on 50×5050 \times50 km cells overlapped by 99.2%, computed as for the wind-farm maps (Figure 7). Individual three-dimensional trajectories separated slowly between the two codes, from a median of 8 m after 30 days to 58 m after one year, with a 90th percentile of 313 m. A 1-m shift of all release positions in KELP grew to a median of only 1.8 m over the same year, so the separation indicates a small systematic difference at each step rather than amplified rounding. The largest separations occurred over shallow topography: particles released where the bottom is shallower than 500 m formed 8% of the release but 60% of those more than 10 km apart, and the 99th percentile reached 25.6 km. In the surface set, the median separation was 41 m and the maximum 5.7 km.

Particle distributions computed with KELP and Parcels v4

Figure 7. Particle distribution one year after release, computed with (a) KELP and (b) Parcels v4. Particles were released in the area outlined in black. Colours give the fraction of released particles per 50×5050 \times50 km cell of an equal-area projection.

We also measured forward–backward closure in both codes (Sect. 4.4, Table 3), each integrating backward for 363 days from its own final positions. Most particles returned close to their release positions. The median closure in 3-D was 0.1 mm in KELP and 1.6 m in Parcels, which likely reflects the single-precision positions of the Parcels runs. More particles failed to return in KELP than in Parcels, 1.2% against 0.6% ending more than 1 km from their release positions, and in both codes these particles lay over the shelf and slope. Most of the KELP particles that did not return (82 %) had come close to the bottom on the forward leg, so the difference likely comes from the treatment of the bottom: KELP limits the particle depth to the water column, a step that cannot be reversed, whereas the Parcels runs set velocities below the local bottom to zero. The same treatment likely contributes to the tail of the forward separations over the shelf and slope. In the surface set, where the bottom plays no role, all KELP particles returned, and 1.75 % of the Parcels particles did not.

SetCodeParticlesMedian90th pct.Not returned
3-DKELP31 3570.1 mm1.9 cm1.19 %
3-DParcels31 3621.6 m12 m0.64 %
SurfaceKELP2 2310.1 mm7 mm0 %
SurfaceParcels2 2312.0 m22 m1.75 %

Table 3. Forward–backward closure for KELP and Parcels v4: number of particles that completed both legs, median and 90th percentile of the closure, and fraction with closure above 1 km (not returned).

Demonstrations

The demonstrations test KELP across field representations, long archives and large particle ensembles. We first track matched releases on a FESOM2 mesh and on HEALPix versions of its fields to measure how the representation changes trajectories and dispersion statistics. The Beaufort Gyre experiment follows repeated releases over six decades, using regional extraction, restart files and output written during the run. We then measure the cost of complete runs and the scaling with particle count, mesh size and processor count. Finally, Sect. 5.4 describes how a coding agent prepared the experiments of this paper and measures what the skills add when an agent prepares a new study.

Effect of remapping FESOM fields to HEALPix

Remapping velocity fields changes the spatial interpolation and the representation of the coastline. These differences accumulate along a trajectory, even when the initial position and integration scheme are unchanged. We measured their combined effect by tracking the same release on the FESOM2 mesh and on three HEALPix versions of its fields. The trajectories on the FESOM2 mesh serve as the reference for this comparison.

We used daily-mean output for 2005 from a FESOM2 simulation ([10]) on the CORE2 mesh, with a nominal resolution of about 1∘1^\circ and 47 layers, forced with JRA55-do ([53]). The node spacing of this mesh is about 25 km north of 50∘50^\circN, about 55 km near the equator and up to about 110 km in the subtropics. We remapped these fields to HEALPix grids at zoom levels 6, 7 and 8, with pixel spacings (ℓpix\ell_{\mathrm{pix}}) of 102, 51 and 25.5 km. The HEALPix fields were built by linear interpolation on a triangulation of the model-mesh nodes, with land masked at each depth.

The surface release contained 133 549 particles on an equal-area layout. A further 26 708 particles, each 10 km east of a release position, formed pairs. A three-dimensional release contained 37 773 particles at 100, 500 and 1500 m. All four grids used the same releases and settings: interpolation from the vertices (Sect. 2.3), the rotated frame, a 6-h step and no random walk. Each grid was run twice, once with RK4 and PCHIP and once with RK2 and linear reconstruction, to compare the effect of the temporal scheme with that of remapping.

For each release position, we measured the distance along the sphere between the HEALPix trajectory and the trajectory on the model mesh. Both were computed with RK4 and PCHIP. The same measure, averaged over trajectories, is used in meteorology to quantify the error of trajectories computed from wind fields of reduced resolution [47, 46]. The median of this separation grew with time and decreased as the HEALPix grid was refined (Figure 8a, Table 4). After 30 days, it was 4.4, 1.4 and 0.4 km at zooms 6, 7 and 8. After one year it was 15, 5.0 and 1.6 km.

Figure 8. Separation between HEALPix and model-mesh trajectories for the surface release. (a) Median separation versus time for zooms 6–8, with the interquartile range shaded. Grey dashed: median change of the separation vector of model-mesh pairs released 10 km apart, ∣r(t)−r0∣\lvert r(t)-r_0\rvert. Red dotted: RK4 with PCHIP versus RK2 with linear reconstruction on the model mesh. (b) Median separation versus ℓpix\ell_{\mathrm{pix}} at four times after release. The grey dashed line has slope 2.

releasezoom (ℓpix\ell_{\mathrm{pix}}, km)30 d1 year
2-D6 (102)4.415
2-D7 (51)1.45.0
2-D8 (25.5)0.41.6
3-D6 (102)3.319
3-D7 (51)1.16.5
3-D8 (25.5)0.32.1

Table 4. Median separation (km) between HEALPix and model-mesh (CORE2) trajectories, using RK4 with PCHIP, for the surface (2-D) and three-dimensional (3-D) releases.

Each halving of ℓpix\ell_{\mathrm{pix}} reduced the median separation by a factor of about three at all four times shown in Figure 8b. The separation therefore decreases approximately as ℓpix1.7\ell_{\mathrm{pix}}^{1.7}, slightly slower than ℓpix2\ell_{\mathrm{pix}}^2. The three-dimensional release showed the same decrease, with medians of 19, 6.5 and 2.1 km after one year (Table 4).

Two quantities from the model mesh alone put these separations in scale (Figure 8a). For particles released 10 km apart, the vector between them changed by a median of 9.5 km after one year, about six times the zoom-8 separation. At all times, this change lay between the zoom-6 and zoom-7 separations. Changing the temporal scheme from RK4 with PCHIP to RK2 with linear reconstruction separated the trajectories by a median of 0.23 km after 30 days, and a smaller step did not reduce this difference (Sect. 4.3). The temporal scheme therefore mattered less than the grid, although at zoom 8 the two effects were comparable (0.23 and 0.39 km).

The separation depends on the region of release. After 30 days at zoom 7, the largest median separations followed the equatorial band, the western boundary currents, the Antarctic Circumpolar Current and marginal seas (Figure 9a). In the interiors of the subtropical gyres, the medians stayed below 1 km. The separation also depends on the flow speed along the trajectory. Grouped by deciles of mean speed along the model-mesh trajectory, the zoom-7 median was smallest, 0.8 km, at 0.08–0.09 m s−1^{-1} and reached 5.8 km in the fastest decile (Figure 9b). It also rose to 1.4 km in the slowest decile, which is dominated by near-coastal releases. Zooms 6 and 8 show the same dependence on speed.

Figure 9. Regional differences between HEALPix and model-mesh trajectories for the surface release after 30 days. (a) Median separation at zoom 7, grouped by the 2∘2^\circ cell of release. Cells with fewer than eight particles are blank. (b) Median separation for zooms 6–8, grouped by deciles of mean speed along the model-mesh trajectory.

The spreading of the release as a whole agreed much more closely than individual trajectories. For each particle of the surface release, we took the squared distance from its own release position and averaged it over all particles. This absolute dispersion measures how far the particles have spread on average, regardless of where each one went [49, 26]. After one year, it was about 2 % below the model-mesh value at zoom 7, and the difference decreased at finer pixel spacing. Individual trajectories at zoom 7 were then a median 5 km apart. In idealized turbulence, absolute dispersion was likewise insensitive to the spatial sampling of the velocity field [24]. Relative dispersion was sensitive to this sampling in one of their two flows.

Six decades of releases in the Beaufort Gyre

The Beaufort Gyre is the largest freshwater reservoir of the Arctic Ocean [38, 52]. It accumulates freshwater under persistent anticyclonic winds and releases it when the winds weaken, over years to a decade [52]. Released freshwater leaves the Arctic on both sides of Greenland, through the Canadian Arctic Archipelago and Davis Strait and through Fram Strait [65, 60]. In the subpolar North Atlantic, it freshens the upper ocean and can affect stratification and deep convection [65, 52]. In model experiments with a passive tracer, released freshwater took several years to reach these gateways [60]. A large part of it stayed in the Arctic for many years.

A tracer, however, does not keep the release time and depth of the water once it mixes. Lagrangian particles keep them and show the routes, depths and transit times of this water directly [29]. We tracked particles released in the gyre every three months over 63 years, from 1958 to 2020. Particles released in different decades were compared at the same age, ten years after release, and at their passage through Fram Strait.

We used daily velocity fields from the CORE2 simulation described in Sect. 5.1. The tracking domain is the mesh north of 50∘N50^\circ\mathrm{N}, with a resolution of about 25 km, 49 154 nodes and all 47 layers. It was extracted from the global output once, before tracking. Every three months, we released 31 417 particles in the Beaufort Gyre box, 130130–170∘W170^\circ\mathrm{W} and 7070–80∘N80^\circ\mathrm{N}. The releases covered four depth bands: 0–50, 50–100, 100–250 and 250–500 m. The 252 releases contained 7.92 million particles in total. The tracker wrote particle positions every five days.

Particles were advected by the model velocities alone, without a random walk or stranding. We used RK2 with linear temporal reconstruction and a one-day step, equal to the snapshot interval. Horizontal velocities at the nodes were interpolated barycentrically, and vertical velocity with a least-squares plane fit.

For each depth band, the 40 releases of one decade form a cohort of 0.29 to 0.34 million particles. We compared cohorts from the 1970s to the 2000s using each particle’s position ten years after release. All statistics of a cohort are fractions of the number of particles released in it.

How many particles stayed in the domain for ten years depended mainly on the release depth (Table 5). More than 96 % of the particles released below 100 m stayed in every decade, compared with 52–93 % of those released at 0–50 m. Particles were lost when they left the domain through its southern boundary or were removed at the coastline. The remaining fraction therefore reflects both transport and the treatment of boundaries.

decade of release0–50 m50–100 m100–250 m250–500 m
1970s65.488.897.799.7
1980s52.380.596.499.5
1990s81.091.298.299.8
2000s93.496.799.099.7

Table 5. Fraction (%) of each release cohort still active north of 50∘50^\circN ten years after release, by decade of release and release depth. Releases from 2010 onwards had mostly not reached ten years by the end of the calculation and are omitted.

Within the domain, the particle distribution after ten years differed between release decades (Figure 10). We binned the ten-year positions on a 2∘×1∘2^\circ\times1^\circ longitude–latitude grid and subtracted the 1970–2009 mean fraction in each bin for that release depth.

Particle distribution ten years after release for four decades and two release-depth ranges

Figure 10. Particle distribution ten years after release: difference between the cohort of one decade (columns) and the mean of the four decades, for releases at 50–100 m and 250–500 m (rows). Values are fractions of the cohort per 2∘×1∘2^\circ\times1^\circ bin. The 1980s column, for example, shows positions in 1990–1999. Orange bins hold more particles than the mean, blue bins fewer. The colour scale is logarithmic in both directions and linear between −10−5-10^{-5} and 10−510^{-5}. Bins empty in the decade and in the mean are not coloured. Below each panel: the fraction still active north of 50∘50^\circN and the fractions inside the dashed boxes (Fram: Fram Strait, CAA: Canadian Arctic Archipelago and Baffin Bay). The solid box marks the release region. Polar stereographic projection north of 66∘66^\circN.

For releases at 50–100 m, the later cohorts had fewer particles along the route through the Canadian Arctic Archipelago and Baffin Bay (Figure 10). After ten years, the box over this route contained about 11 % of the 1970s and 1980s cohorts, but less than 4 % of the 1990s and 2000s cohorts. The later cohorts instead had more particles than the four-decade mean in the western Canada Basin and towards the Chukchi Sea. Along northern Greenland towards Fram Strait, the 1980s and 2000s cohorts had more particles than the mean.

For releases at 250–500 m, the distributions also differed between decades, although almost all particles remained in the domain (Figure 10). The 1970s cohort stayed closest to the release region, whereas the 1980s cohort had the largest fraction in the Fram Strait box. The 1990s and 2000s cohorts spread further west and north of the release region.

Positions ten years after release show where the particles are, but not when they leave the Arctic. We therefore counted the first southward crossing of Fram Strait for each particle (Figure 11). The section follows 79∘79^\circN between northeast Greenland and Spitsbergen. A crossing was counted when a particle moved southward across it between two consecutive outputs. Of the 7.92 million particles, 2.0 % crossed the section.

Figure 11. Southward crossings of 79°N in Fram Strait (25°W–13°E), one per particle, without particles older than 30 years at the crossing (9 % of all crossings). (a) Crossings per calendar year by release depth, dashed: all release depths. Grey: years before 1988, when not all ages up to 30 years were present. (b) Crossings per 10-m layer and year, averaged over each decade of the crossing (1960–1969, …, 2010–2020), dashed: decades that begin before 1988. (c) Crossings per 10-m layer over the whole calculation, by release depth, triangles: the 16 release depths.

The particles reached the strait years after their release (Table 6). For the releases of 1958–1980, each followed for 40 years, the median age at the crossing was 14.4 years. Of the particles that crossed, 90 % did so within 29 years. The median age increased with release depth, from 7.9 years at 0–50 m to 16.5 years at 250–500 m.

release depthreleasedcrossed (%)median age (yr)90th percentile (yr)older than 30 yr (%)
0–50 m783 7480.557.913.35.1
50–100 m725 9720.908.933.412.8
100–250 m705 2723.3811.521.04.4
250–500 m675 3729.7816.529.89.8
all2 890 3643.4814.428.68.5

Table 6. Age at the southward crossing of 79∘N79^\circ\mathrm{N} in Fram Strait, by release depth, for the releases of 1958–1980, each followed for 40 years. Crossed: percentage of the released particles. The age columns refer to the particles that crossed. For the releases of 1958–1965, followed for 55 years, 2–8 % of the crossings occurred more than 40 years after release.

Because releases continued every three months throughout the calculation, particles older than 30 years made a growing share of the crossings, 13 % in the 1990s and 21 % in 2010–2020 (Table 7). To compare yearly crossings without this growing share, Figure 11 includes only particles up to 30 years old at the crossing. Once the calculation had run for 30 years, in 1988, each age up to 30 years was represented by the same number of released particles, so the yearly counts from 1988 onwards are directly comparable.

release decade1960s1970s1980s1990s2000s2010–2020
1958–1969100.099.661.019.911.97.3
1970s–0.438.529.514.68.2
1980s––0.549.027.210.5
1990s–––1.626.721.2
2000s––––19.546.8
2010–2020–––––6.0
crossings13 68535 80221 94346 77910 90130 761
older than 30 yr (%)0.00.00.513.215.121.4

Table 7. Release decade of the particles that crossed 79∘N79^\circ\mathrm{N} in Fram Strait southward, by decade of the crossing. Values are percentages of the crossings of each decade (columns sum to 100), all ages included. The last two rows give the number of crossings and the percentage made by particles older than 30 years.

From 1988 to 2020, crossings peaked in 1994–1997 and in 2013, and were fewest in 2002–2005 (Figure 11a). The number of particles of these ages no longer changed, so these variations most likely reflect the circulation. The crossings of the 1990s were deeper than those of 2010–2020: 44 and 4 % occurred below 200 m (Figure 11b). Particles released at 0–50 m crossed a median 37 m deeper than their release depth. Those released at 250–500 m crossed a median 120 m shallower (Figure 11c).

The crossings of one decade came from releases of several decades (Table 7). In the 1990s, particles released in the 1980s, the 1970s and 1958–1969 made 49, 29 and 20 % of the crossings. Transport from the gyre to Fram Strait therefore took years to decades. A change in the circulation of the gyre reaches the strait only gradually, mixed with water released earlier and at other depths. This agrees with [60]: their tracer took several years to reach Fram Strait, and a large part remained in the Arctic. Lagrangian tracking by Lique et al. [29] gave transit times of about a decade from the gyre to the North Atlantic. The particle records resolve these delays by release depth and decade.

Vertical motion along these routes differed between release depths (Figure 12). Among the 1980s releases at 250–500 m, most particles stayed in the Canada Basin. Those reaching the gateway boxes were typically shallower than at release. Particles released at 50–100 m spread over a wider area and more often moved deeper. Both depth groups included particles on the routes through the Canadian Arctic Archipelago and along northern Greenland towards Fram Strait (insets in Figure 12).

Ten-year trajectories of particles released in the 1980s at (a) 250–500 m and (b) 50–100 m depth

Figure 12. Ten-year trajectories of particles released in the 1980s at (a) 250–500 m and (b) 50–100 m depth. Every tenth particle of the 40 releases is drawn, from release to ten years later. Colour gives the depth relative to the release depth (blue: shallower, red: deeper, range ±200\pm200 m). Insets enlarge the region from the Canadian Arctic Archipelago to east Greenland. The red box marks the release region, and dashed boxes mark the Fram Strait gateway and the Canadian Arctic Archipelago and Baffin Bay gateway, which here extends south to 63∘63^\circN (66∘66^\circN in Figure 10). Polar stereographic projections.

Throughput and scaling

This section examines how the cost of a run depends on particle count, mesh size and the number of processes and nodes. Following Eq. (1), each time step reads velocity fields, advances the particles and writes trajectories. We first measured complete runs, which include all three parts. To isolate the computational cost of tracking, we then measured it without field reads or trajectory output. Throughput is reported in particle-steps per second. Rates for complete runs count only active particles, those still being tracked.

All tests ran on DKRZ Levante nodes with two AMD EPYC 7763 processors (128 cores) and 256 GB of memory, unless stated otherwise. The global tests used ocean output from the nextGEMS IFS-FESOM production simulation on the NG5 mesh, distributed on HEALPix grids [39, 43]. The archive provides zooms 7 and 9. At zoom 9, the pixel spacing is 12.7 km, with 2.2 million wet surface nodes and 69 layers. For the mesh-size tests, we resampled these fields to zooms 5–11, from 9418 to 35.5 million wet surface nodes. The resampling introduces no additional flow structures, so these tests measure computational performance only. Particles were released at every wet pixel centre at 100, 500 and 1500 m, which gave 6.0 million particles at zoom 9. Tracking used RK2, linear temporal reconstruction and a six-hour step, so each daily snapshot was used for four steps. Tracking times are medians over steps without snapshot reads, taken for the slowest process.

Tracking this zoom-9 release for one year took 2 h 12 min on one node, including input and output. The run completed 1460 steps and wrote particle positions once per day. Of the mean step time of 5.33 s, reading velocity fields took 2.93 s, writing trajectories 1.78 s and tracking 0.62 s. Input and output thus accounted for 88 % of the step time. With input and output included, the run advanced 0.84 million active particle-steps per second. Tracking alone advanced 7.4 million. At the end of the year, 70 % of the particles were still active. The trajectory output occupied 81 GB.

Because reading velocity fields dominates the cost, regional studies can reduce this cost by limiting the volume of input data. KELP extracts the fields of a region once, before tracking (Appendix § 13.2). In the Beaufort Gyre experiment (Sect. 5.2), the domain north of 50∘N50^\circ\mathrm{N} contained 49 154 of the 126 858 nodes of the global CORE2 mesh. The complete 63-year run with 252 releases took 3 h 36 min on one node, including input and output. It advanced 5.0 million active particle-steps per second, with a one-day step and 32 processes with four threads each. This rate is not directly comparable with the global run, because the mesh, release and time step differ.

The cost of tracking alone depended much more on particle count than on mesh size (Figure 13c, Figure 13d). As the mesh size increased 3765-fold from zoom 5 to zoom 11 for the same 6.0 million particles, the tracking time per step varied by at most a factor of 1.45, which corresponds to 6.6–9.6 million particle-steps per second on 128 threads. The variation between zooms was not monotonic and has no identified cause. At zoom 10, tracking time grew nearly in proportion to particle count from 0.25 to 24 million particles (log–log slope 0.88).

Figure 13. Scaling on ng5 HEALPix fields. Fields at zooms 7 and 9 came from the archive. The other zooms were resampled from them and contain no additional flow structures. (a) Process layouts for 6.0 million particles at zoom 9 on one 128-core node, threads per process equal 128 divided by the number of processes. Circles show the slowest process and squares the mean over processes. (b) Throughput for the same particles on 1–16 nodes with eight 16-thread processes per node, labels give the number of nodes, symbols follow panel (a), and the dotted line shows ideal scaling from one node. (c) Tracking time across zooms 5–11 (labels) for the same particles and one 128-thread process. (d) Tracking time versus particle count at zoom 10, one 128-thread process, and the guide has slope 1. (e) Zoom 11 with one 128-thread process per node: strong scaling of 24 million particles and weak scaling with 6.0 million particles per node (totals along the top). (f) Throughput at zoom 11 versus the number of particles tracked at once, on sixteen nodes and on one node with 1 TB of memory.

Distributing the release among processes increased throughput within and across nodes (Figure 13a, Figure 13b). On one node, sixteen eight-thread processes achieved 29 % higher throughput than one 128-thread process. With eight 16-thread processes per node, throughput rose from 12.3 million particle-steps per second on one node to 120 million on sixteen nodes. The parallel efficiency was 61 % for the slowest process and 76 % for the mean over processes. On sixteen nodes, each process followed only 47 000 particles, and the slowest particle group determined the completion time.

The zoom-11 grid, with a pixel spacing of 3.2 km and 35.5 million wet surface nodes, tested scaling on a large mesh (Figure 13e). One process required about 160 GB of memory for fields, mesh and read buffers, so only one process fitted on a node. With 6.0 million particles per node, sixteen nodes tracked sixteen times as many particles in 1.12 times the time of one node, a weak-scaling efficiency of 90 %. The resulting 96.2 million particles reached 113 million particle-steps per second. For 24 million particles, strong scaling gave a 12.5-fold speed-up on sixteen nodes. At this zoom, reading one daily snapshot took about 146 s per process. This is equivalent to about 190 tracking steps for 6.0 million particles.

Short tests showed how many particles a run can hold (Figure 13f). On sixteen nodes, 10910^9 and 101010^{10} particles reached 132 and 136 million particle-steps per second. The larger test used nodes with 512 GB of memory. One node with 1 TB of memory tracked 4×1094 \times10^9 particles at 8.9 million particle-steps per second. In addition to a fixed part of about 66 GB per process, memory use grew by about 180 bytes per particle. These tests ran three or four steps without trajectory output. They therefore measure tracking capacity, not the cost of a complete study.

Setting up studies with an agent

A coding agent prepared and ran all studies of this paper with the KELP skills (Table 2) and wrote the scripts that processed their output. The agent carries out each preparation step in a short turn and then pauses until the user answers open questions on the setup, checks intermediate output or approves a cluster launch. The times given below are therefore calendar times from the initial request to the completed setup or run, paced by these user checkpoints, data extraction and batch queues rather than by continuous agent work.

For the mesh test of Sect. 4.2, the agent built the nine test meshes, the exact flow and the run scripts, and the results were available about 2 h after the request and the figures and tables the same evening. For the comparison of model-mesh and

HEALPix fields (Sect. 5.1), the agent prepared 16 configurations and the release files in one morning. The year-long runs, their processing and the figures were complete the same day.

New data and a second tracker took similar time. For the wind-farm comparison (Sect. 4.5), the FESOM-C output had been stored in a non-standard format. The agent inspected 1.4 TB of it and wrote and tested an input module for it on the first day. The production runs and the first maps followed the next day. For the comparison with Parcels, it set up that code with matched configurations in about 3 h.

For the Beaufort Gyre (Sect. 5.2), preparing the releases and a restartable chain of jobs spanned two calendar days, including the extraction of 63 years of regional fields, restart checks and user approvals between steps. For the scaling tests (Sect. 5.3), the agent generated and checked 370 configurations in about 1 h, and the 14 jobs ran overnight. The agent wrote a report for each campaign with its inputs, configurations, runs and results.

The agent also found problems in the engine itself. On the wind-farm mesh, a run was 100 times slower than expected. In three-dimensional HEALPix tracking, one code path was slow, and in the scaling tests a defect limited the mesh size. In each case, the agent traced the problem to its cause in the code. The fixes entered the engine before the runs reported here. None of these problems produced an error message. They appeared as slow runs or unexpected limits, which are easy to overlook in routine work.

An agent can also prepare a tracking study from the code and its README alone. To measure what the skills add, we gave agents the same tasks with and without them and graded the files they produced. Seven tasks were set, each described in a short request as a user would write it. They included surface and backward tracking, coastal stranding and the extraction of a region with restarts. Two further tasks were the analysis of a trajectory archive and the diagnosis of a slow configuration. The most complex task asked for a multiyear campaign around Greenland, with quarterly releases at several depths and ten-year trajectories. The agents prepared the files, could examine the data and could check their configurations with KELP, but no tracking calculation was started.

Each task was given under two conditions, which differ in the files the agent could read. Under the README condition, the agent had the code with its README, examples, utility scripts and tests. Under the Full condition, it also had the topic documentation, the reference manual and the seven skills, with the short guide files that point an agent to them. For the Claude models, a third condition, Docs, added only the documentation and the manual to README. Every attempt started from a fresh copy of the same code revision, and the request and the expected files were the same under all conditions.

Two command-line coding agents were tested, Claude Code (Anthropic, version 2.1.295) and Codex (OpenAI, version 0.161.0). Claude Code ran with three Anthropic models, Haiku 5.5, Sonnet 5.5 and Opus 5.5. Codex ran with two OpenAI models, gpt-6-luna and gpt-6-sol. Each of these five models made two attempts at each task under each condition. This amounted to 140 attempts under README and Full together and 42 Claude attempts under Docs.

The files of each attempt were graded by a separate language model, Fable 5.1 (Anthropic), which was not among the five models under test. It received the files without names and without the record of the attempt, and it checked them against 98 criteria written for the seven tasks. Eleven of the criteria concern the working rules of the project. Two examples are checking the sign convention of the vertical velocity in the input data and keeping a record of each job. A criterion was classed as critical when failing it would prevent a run or give a wrong result. The preparation score of a task is the percentage of criteria met, averaged over the attempts of one model under one condition (Table 8). The overall score gives equal weight to each of the seven tasks.

Claude CodeCodex
Haiku 5.5Sonnet 5.5Opus 5.5gpt-6-lunagpt-6-sol
READMEFullREADMEFullREADMEFullREADMEFullREADMEFull
Score (%)
Surface tracking and presence map89100939610010089969393
3-D backward tracking931009310093100879093100
Coastal stranding891008993961008282100100
Regional extraction and restarts50977610085100419765100
Fram Strait crossings from archive9586911009110073100100100
Slow-configuration diagnosis1001009590100100958595100
Multiyear Greenland campaign71948510085100566571100
Overall849789979310075888899
Mean token use per attempt
Input (10610^{6} tokens)3.53.72.82.34.14.80.850.991.31.9
Output (10310^{3} tokens)6353362541409111214

Table 8. Preparation score by task, coding agent, language model and documentation condition, and mean token use per attempt. README: code, examples, utilities and tests. Full: adds topic documentation, the manual and the skills. The score is the mean percentage of grading criteria met across attempts for each task and condition. Overall is the equally weighted mean of the seven task scores. Input tokens include repeated cached context (more than 90 %). The Claude and OpenAI models count tokens with different tokenizers. All models ran at medium reasoning effort.

All models ran at medium reasoning effort, the Codex default. We chose this level after a small pilot study with the Claude models on two of the tasks. Under Full, medium and high effort gave nearly identical scores, but high effort cost up to 2.7 times as much. Low effort reduced the score of Haiku. Without Full, the scores varied more with effort.

Compared with README, Full raised the mean preparation scores of all five language models by 7 to 13 percentage points (Table 8). Each mean is based on seven tasks and 14 attempts. The improvement varied by task. It was largest for regional extraction with restarts and for the multiyear Greenland campaign. A few task scores decreased with Full. Each task score is a mean of two attempts, so a single unmet criterion can shift it by several percentage points.

Adding documentation alone, in the Docs condition tested with the Claude models, changed the mean scores by at most one percentage point compared with README. The improvement with Full therefore came mainly from the skills, and Table 8 compares README and Full directly. Each model read KELP skills in most Full attempts. The largest gain concerned the working rules of the project, which the agents often missed under README but followed almost completely under Full, and all five models also improved on the remaining criteria.

Full reduced critical errors but did not eliminate them. With README, 54 of the 70 attempts failed at least one critical criterion. With Full, this number decreased to 18. Agent-prepared studies need to be checked by the user, with or without skills. Overall, adding the skills improved the preparation of KELP studies by all five language models.

Discussion

One tracking engine served all experiments of this paper, from flow around a single wind-turbine foundation to multidecadal Arctic transport and global releases. No separate tracker was needed for FESOM output on its own mesh or for HEALPix fields. The wind-farm verification and the Beaufort application use triangular model meshes, while the HEALPix experiments use a dual mesh. The analytic and mesh-quality tests cover every supported mesh type, including the quadrilateral and mixed meshes not used in the ocean-model applications here (Sects. 4.1 and 4.2).

The choice between the model mesh and HEALPix fields depends on the transport quantity of interest. In the comparison on CORE2, absolute dispersion agreed with the model-mesh value more closely than individual trajectories did (Sect. 5.1). Agreement in a global statistic therefore does not establish local pathway accuracy, especially near coasts and strong currents. The same engine lets us compare both representations with releases and numerical settings held fixed. The measured differences then combine remapping, spatial interpolation and coastline representation.

Time-step refinement must likewise be assessed through the chosen transport diagnostic. The temporal tests show why smaller integration steps can leave errors from velocity reconstruction unchanged (Sect. 4.3). For atmospheric trajectories, temporal interpolation of the wind caused larger errors than spatial interpolation under typical conditions ([47]). In an eddy-resolving ocean model, offline particles spread less vertically than an online tracer, partly because subdaily vertical velocities were not resolved ([59]). Near structures resolved by the mesh, the time step also changes how particles pass through the local flow.

The wind-farm setup of Sect. 4.5 illustrates this local sensitivity. We released a north–south line of 301 particles 300 m west of one foundation and tracked it at steps from 300 to 4.69 s. In the eastward flood flow (about 0.4 m s−1^{-1}), a 300-s step spans about 120 m and can cross the foundation and its wake (Figure 14a). At finer steps, the paths curve around the foundation. The paths at 9.375 and 4.69 s nearly coincide (Figure 14c, Figure 14d).

Particle paths around a wind-turbine foundation

Figure 14. Particle paths around a wind-turbine foundation, computed with RK4 and PCHIP at integration steps hh of (a) 300, (b) 75, (c) 9.375 and (d) 4.69 s. The same 13 particles are shown during the first 2 h after release. Grey lines show mesh edges and the dark polygon the foundation. Dots mark integration steps in (a) and (b), and lines join successive positions. Axes give distances from the foundation centre in metres.

These local path differences also affected transport diagnostics over longer intervals. We repeated all releases of the wind-farm run with RK4 and PCHIP at six steps, halved from 300 to 9.375 s. Each release was followed for 29.5 days. The first diagnostic was the fraction of positions that moved less than 10 m over the next 2 h. The second was the area holding 90 % of the probability.

In the three clouds inside wind farms, both diagnostics changed non-monotonically with the integration step. Only the two finest steps, 18.75 and 9.375 s, agreed in all three clouds. Without wind farms, the areas of these clouds were the same at steps from 300 to 37.5 s.

For multidecadal releases, transport comparisons also depend on the age of the particles. Comparing Beaufort cohorts at the same age separates their release history from the duration of drift (Sect. 5.2). Likewise, yearly crossing counts are comparable only within a fixed range of particle ages, because older particles join the population throughout the calculation. Particle disappearance, however, is not by itself evidence of export: particles may leave the extracted domain or be lost by the cell search. Recorded crossings measure passage through a chosen section, while the trajectories retain the routes and vertical motion leading to it.

The cost of a complete study depends on data handling as well as tracking throughput. Short tracking tests reached billions of particles, but input and output dominated the full-year experiment (Sect. 5.3). A timing sample therefore needs the intended fields, release and output interval. The number of particles is not limited by the engine. An ensemble is divided among processes on one or several nodes. Each process needs a fixed amount of memory for the fields and about 180 bytes per particle (Sect. 5.3). The 101010^{10} particles of the largest test therefore demonstrate the capacity of sixteen nodes, not a limit of the code. The practical limit is the memory and the output volume that a study can afford.

Large ensembles are limited by the writing and storage of their trajectories. The present applications compute their diagnostics from saved trajectories. Presence counts, section crossings and connectivity estimates could instead be computed during the run, so that only selected trajectories need to be written. Connectivity estimates are used, for example, in studies of larval dispersal [7]. They depend on the number of released particles and on the size of the regions compared [23, 32]. Complete archives remain useful when several questions are addressed afterwards, as in the Beaufort analysis.

The skills direct agents to keep the records needed to repeat a study independently of the conversation that produced it. These records include releases, configurations, commands and analysis scripts, together with the input data and code revision used (Sect. 3.2). They also retain the setup and analysis decisions when one experiment grows into a series. The wind-farm time-step series and the scaling campaigns are examples.

With skills, the wind-farm time-step series required little of the user’s time. An agent prepared the configurations, batch scripts and comparison scripts. The user set the task, decided the setup questions and approved each launch (Sect. 3.2). A convergence test of this kind can therefore precede the physical interpretation of a transport diagnostic.

The controlled evaluation connects the skills with the completeness of prepared study files (Sect. 5.4). All five language models prepared more complete files with skills, most clearly for regional extraction and the multiyear Greenland campaign. Their improvements extended beyond the criteria for the working rules of the project. For the three Claude models, documentation alone changed the mean scores little. A likely reason is that the documentation describes how the engine works, whereas the skills state the steps and checks of a task. Some attempts with skills still contained errors that would stop a run or give a wrong result. The user’s checks therefore remain part of an agent-prepared study.

KELP’s scope complements existing approaches to particle tracking. Parcels v4 also provides access to FESOM2 output [50]. On such output, the two codes gave closely agreeing trajectories with matched settings (Sect. 4.5). KELP combines that access with quadrilateral and mixed coastal meshes, HEALPix grids, large-ensemble execution and agent skills. Other frameworks provide functions outside its present implementation: TRACMASS assigns transport to trajectories [12] (Döös et al. 2017). OpenDrift includes oil-weathering and pelagic-egg modules [9], and Parcels accepts particle behaviour as Python kernels [27]. OceanTracker computes heat maps and connectivity during the run, resuspends particles from the seabed and nests regional meshes [57].

On unstructured meshes, OceanTracker targets coastal models such as SCHISM, FVCOM and Delft3D-FM, splits quadrilateral cells into two triangles and interpolates velocities from the vertices [57]. KELP keeps quadrilateral cells whole and supports vertex velocities, with Wachspress interpolation on general quadrilaterals, and cell-centred velocities, as in FESOM2 and HEALPix output. It covers coastal domains and global domains that span the dateline and the poles (Sect. 4.1).

OceanTracker runs threads in the shared memory of a single machine [57]. KELP likewise runs multithreaded on one workstation or node, as in the coastal and regional runs of Sects. 4.5 and 5.2. It also distributes processes across cluster nodes when the ensemble size or the fields of a global grid exceed the memory of one machine (Sect. 5.3). On the finest global HEALPix grid of that section, only one process fitted into the 256 GB memory of a node. These frameworks are operated through configuration files or Python scripts, and KELP adds skills for coding agents and the records that make a study repeatable (Sect. 3).

Several limits of the present version should be kept in mind. KELP has no mechanism that steers particles around islands and coasts. A particle that the interpolated velocity carries onto land is removed or, with stranding enabled, kept on the shore. The boundary treatment of the plane fit over edge-sharing neighbours reduces the velocity towards the coast but does not deflect the particle (Appendix § 10). Stranding and drying are decided from the water depth at the nearest node and from the coastal cells (Appendix § 12). They are rules, not a model of the shore. Drying is taken as the model output gives it, and in regional extracts without sea-surface height it is not represented at all. The stranding rules were checked only in analytic tests, not in the experiments of this paper. The default cell search, two rings of cells around the nearest node, loses particles on strongly stretched and distorted quadrilateral and mixed cells (Sect. 4.2). Such cells are rare in the model meshes we measured, and the edge walk keeps the particles where they occur.

KELP computes every particle position in double precision and can keep the velocity fields in single precision to halve their memory. Single precision for the positions themselves would not suffice near coastal structures. At 54°N, one unit in the last place of a single-precision longitude is about 0.25 m. A particle in the wind-farm flow moves about 1.9 m in the finest step of Sect. 4.5. Rounding would then change each step by several per cent. In the comparison of Sect. 4.5, the Parcels runs kept single-precision positions, and their forward–backward closure was 1.6 m against 0.1 mm in KELP.

Comparison with observed drifters and validation of backward stochastic runs as source-location distributions (Thygesen, 2011) are outside the present verification. The limits of each input module for diffusion, adaptive integration and coordinate frames are given in Sect. 2, Table 1 and Appendix § 12.1.

Conclusions

We presented KELP v1.0, a Lagrangian particle tracker that combines tracking on triangular, quadrilateral and mixed ocean-model meshes and on HEALPix grids with parallel execution for large ensembles and operation by coding agents. Its numerical schemes are established. To them KELP adds configuration checks, saved records and seven task skills, so that a coding agent can prepare, run and process a study while the user sets the task, approves each launch and checks the results. All experiments in this paper were prepared and run in this way, with setups completed in hours to two calendar days including user reviews and test runs. In the controlled evaluation, the skills raised the mean preparation scores of five language models from 75–93 % to 88–100 % (Sect. 5.4). The errors that remained show that the user’s checks stay part of an agent-prepared study.

Verification against two other trackers on the same fields gave a 95 % overlap of the particle distributions with the tracker of Androsov et al. [2] on a coastal wind-farm mesh and a median separation of 58 m after one year from Parcels v4 on the cropped global CORE2 mesh (Sect. 4.5). The mesh tests showed that three of the four interpolation schemes keep second-order accuracy on distorted cells, whereas averaging centroid velocities to the nodes gives 9–18 times larger errors there, and that the edge walk loses no particles on stretched cells where the default cell search loses 24–61 % (Sect. 4.2). The time-step tests showed that cubic temporal reconstruction reduces the error between stored snapshots 15-fold, which a higher-order integrator alone cannot do (Sect. 4.3). Each halving of the HEALPix pixel spacing reduced the median separation from the model-mesh trajectories by a factor of about three, to 1.6 km after one year at 25.5 km, while absolute dispersion agreed within about 2 % already at 51 km. HEALPix output therefore serves studies of ensemble transport statistics, and the model mesh remains the reference for individual pathways (Sect. 5.1). In the Beaufort Gyre study, regional extraction and restart files let 7.92 million particles from 252 quarterly releases be tracked over 63 years in 3 h 36 min on one 128-core node (Sects. 5.2 and 5.3). The trajectories showed that transport from the gyre to Fram Strait takes years to decades: the median age at the crossing was 14.4 years and rose from 7.9 years for releases at 0–50 m to 16.5 years at 250–500 m, so that the export of one decade mixes water released over several earlier decades, and release cohorts must be compared at the same age. Scaling tests reached 101010^{10} particles on sixteen nodes, and in a full-year global run field input and trajectory output took 88 % of the step time (Sect. 5.3).

The limits of the present version are listed in Sect. 6. Computing transport diagnostics during the run is the main development priority, so that large ensembles need not write complete trajectory archives. Further work will extend spatially varying diffusion to three dimensions and broaden the scope of adaptive integration.

Numerical details

Locating particles

The lookup grid of Sect. 2.2 assigns the mesh nodes to square boxes in longitude and latitude. The initial box side is proportional to A/N\sqrt{A/N}, where AA is the area of the mesh bounding box in square degrees and NN the number of nodes. By default, KELP also tests finer boxes on a sample of cell centres and adopts a smaller box when that lowers the estimated search cost by a set factor, or it uses a box size given in the configuration.

For each particle position, the search first scans the box that contains it and the eight neighbouring boxes (Figure A1a). It compares chord distances on the unit sphere. The distance to the nearest candidate defines a spherical cap centred on the particle. If the searched window covers this cap, no unsearched node can be closer. Otherwise, the window expands within a search limit derived from the longest mesh-cell edge. The search accounts for the dateline and includes every longitude when the cap reaches a pole. By default, the combined routine and the stage-by-stage execution of Sect. 3.1 share this search and resolve ties in the same order.

Locating a particle on a triangular patch

Figure A1. Locating a particle on a triangular patch. (a) Nearest-node search: the particle, the box of the particle with its eight neighbours, the nodes compared and the nearest node. (b) Two-ring search: the first ring around the nearest node, the second ring around vertices of first-ring cells and the containing cell. (c) Edge walk from the previous position to the new one: the visited cells in order and the crossed edges.

The containing cell is sought in two rings around the nearest node (Figure A1b). The second ring contains cells attached to vertices of first-ring cells. For triangles, containment is checked from the signs of the barycentric coordinates. Quadrilaterals are split along a diagonal into two triangles that are tested in the same way, with tolerance −10−6-10^{-6} in normalized coordinates. If neither ring yields a containing cell, the position is classified as outside the mesh.

The edge walk starts from the previously occupied cell and crosses the edge with the most negative normalized signed area (Figure A1c). The walk stops once all signs indicate containment. The two-ring search takes over if the walk reaches a boundary edge or a degenerate cell. It also takes over if the walk crosses the same edge twice or exceeds 256 crossings. The two paths agree where the two-ring search is exhaustive. On strongly distorted meshes, the walk can reach a valid cell beyond the second ring.

Horizontal interpolation

Horizontal interpolation is performed in local planar coordinates. For longitude and latitude expressed in degrees, the coordinates are:

xk=Δλkπ180Rcos⁡ϕ0,yk=(ϕk−ϕ0)π180R,(2)x_k = \Delta\lambda_k \frac{\pi}{180} R \cos\phi_0,\qquad y_k = (\phi_k-\phi_0)\frac{\pi}{180}R, \tag*{(2)}

where RR is the Earth radius and Δλk\Delta\lambda_k is the longitude difference wrapped to [−180∘,180∘)[-180^\circ,180^\circ). Neither the weights nor the fitted value depends on RR. The frame is centred at (λ0,ϕ0)(\lambda_0,\phi_0): the cell centroid for the interpolation from the vertices, or the particle position for the plane fit.

On triangles, the interpolation from the vertices is

(U,V)=∑iwi(ui,vi),wi=area⁡(sub-triangle opposite vertex i)area⁡(triangle),(3)(U,V)=\sum_i w_i(u_i,v_i),\qquad w_i=\frac{\operatorname{area}(\text{sub-triangle opposite vertex }i)}{\operatorname{area}(\text{triangle})}, \tag*{(3)}

with nodal velocities (ui,vi)(u_i,v_i) and ∑iwi=1\sum_i w_i=1. Convex quadrilaterals use Wachspress weights [61]. Both methods reproduce fields that are stored at nodes and vary linearly in the local coordinates. When velocities are stored at cell centroids, vertex values are first calculated as area-weighted means over neighbouring cells. This averaging preserves constant fields. Linear fields are reproduced exactly only where the area-weighted centre of the surrounding centroids coincides with the node.

The plane fit is used for velocities stored at the cell centroids. It minimizes

min⁡a0,a1,a2∑j∈S(a0+a1xj+a2yj−fj)2,(4)\min_{a_0,a_1,a_2}\sum_{j\in S}(a_0+a_1x_j+a_2y_j-f_j)^2, \tag*{(4)}

for each velocity component ff, where fjf_j is the centroid value of cell jj at the local coordinates (xj,yj)(x_j,y_j). The fitted value at the particle is a0a_0. The set of cells mathcalSmathcal{S} is either the cells around the nearest node or the containing cell and its edge-sharing neighbours. The fit is singular when the centroids lie on one line. The particle is then returned to its position before the step and marked as removed.

At the coast, the neighbour across a coastal edge is missing. Its place is taken by a mirror image of the containing cell across the coastal edge. The velocity of the image is derived from that of the containing cell. With free slip, the component normal to the coast is reversed and the tangential component kept, so that a flow along the coast is reproduced. With no slip, both components are reversed.

Vertical interpolation and clamping

Vertical interpolation first samples the column at each node, then combines these values horizontally. Fixed-level tracking uses a common interface table and the floor depth at each node. For sigma layers, interface depths are

H=max⁡(d+η,Dmin⁡),zk=(1−σk)H,(5)H = \max(d + \eta, D_{\min}), \qquad z_k = (1 - \sigma_k)H, \tag*{(5)}

where σk\sigma_k gives the fractional coordinate of each interface, dd is the floor depth and η\eta is the sea-surface height, positive upward. The minimum column height Dmin⁡D_{\min} defaults to 0.5 m.

Vertical velocity is interpolated between interfaces as

W(z)=(1−α)Wk+αWk+1,α=z−zkzk+1−zk,(6)W(z) = (1 - \alpha)W_k + \alpha W_{k+1}, \qquad\alpha= \frac{z - z_k}{z_{k+1} - z_k}, \tag*{(6)}

with no extrapolation outside the local column. Horizontal interpolation of WW uses a plane fit, the nearest-node value, the interpolation from the vertices or inverse-distance weighting [44]. On sigma meshes, each neighbouring column is sampled at the particle’s fractional depth. The local column height HpH_p is calculated with the same horizontal interpolation as WW. The resulting sampling depth at node jj is zj=(z/Hp)Hjz_j = (z/H_p)H_j.

In global FESOM output, the layer interfaces move with the sea-surface height η\eta. The vertical velocity WW written by the model is the flow through these moving interfaces. It is not the rate of change of the depth below a fixed datum. KELP advances the particle in the reference depth, the depth the interfaces have when η=0\eta= 0, and uses WW directly as its rate of change. The exact rate differs from WW by the factor H/(H+η)H/(H + \eta), where HH is the water depth. The error in the vertical rate is therefore of relative order η/H\eta/H. The reference depth itself differs from the physical depth by at most ∣η∣|\eta|.

On sigma meshes, the same idea is applied to the fraction of the water column. KELP advances the fractional depth s=z/Hps = z/H_p through ds/dt=W/Hpds/dt = W/H_p, where WW is the flow through the sigma surfaces that the model writes. Each Runge–Kutta stage evaluates the column height at that stage’s position and time and then obtains the depth as z=sHpz = sH_p. When the flow through the sigma surfaces is zero, ss stays constant. The particle then rises and sinks with the sea surface and follows the sloping floor, as the water around it does. The vertical velocity relative to a fixed datum would have to contain these motions of the surface and the floor. KELP does not need it, because they are already contained in HpH_p.

Sea-surface height is read alongside the velocities and uses the same method of temporal reconstruction (Appendix § 11.1). On sigma meshes, recorded depths are measured from the instantaneous sea surface. If sea-surface height is unavailable, KELP reports a warning and sets η=0\eta= 0.

Deterministic depths are clamped to the surface and local floor, with a default 0.1 m bottom offset on sigma meshes. Scalar sampling applies the same horizontal methods at the depths where the field is stored, excluding non-finite neighbours. Backward tracking leaves the sign of sampled values unchanged.

Time integration and temporal reconstruction

With signed increment δt=sfbh\delta t=s_{\mathrm{fb}}h, sfb=±1s_{\mathrm{fb}}=\pm1, the coordinate increments are

Δλ=δtUMλ(ϕ),Δϕ=δtVMϕ,Δz=δtW.(7)\Delta\lambda=\frac{\delta t U}{M_{\lambda}(\phi)},\qquad\Delta\phi=\frac{\delta t V}{M_{\phi}},\qquad\Delta z=\delta t W. \tag*{(7)}

where Mϕ=111120 mM_{\phi}=111120\ \mathrm{m} per degree and Mλ=max⁡(Mϕcos⁡ϕ,1) mM_{\lambda}=\max(M_{\phi}\cos\phi,1)\ \mathrm{m} per degree. After each update, longitude is wrapped to [−180∘,180∘)[-180^\circ,180^\circ). RK4 evaluates the metric at the latitude of each stage. On sigma meshes, the fractional depth ss replaces zz, with Δs=δtW/Hp\Delta s=\delta t W/H_p (Appendix § 11).

The Dormand–Prince 5(4) scheme (Dormand and Prince [15]) advances each particle through adaptive sub-steps within hh, using the usual step-size control of embedded Runge–Kutta pairs and a position tolerance given in metres (1 m by default). This adaptive scheme is restricted to two dimensions. It uses velocities at cell centroids, the plane fit over the cells around the nearest node and either steady or linearly reconstructed fields. It can be combined with constant horizontal diffusion, but not with vertical diffusion or the edge walk.

Linear reconstruction between snapshots tat_a and tbt_b is

u(t)=(1−α)ua+αub,α=t−tatb−ta,(8)\mathbf{u}(t)=(1-\alpha)\mathbf{u}_a+\alpha\mathbf{u}_b,\qquad\alpha=\frac{t-t_a}{t_b-t_a}, \tag*{(8)}

with local interval ΔT=tb−ta\Delta T=t_b-t_a. For smooth velocity, the field reconstruction error is O(ΔT2)O(\Delta T^2). The same reconstruction is applied to vertical velocity and sea-surface height.

By default, each tracking step spans one snapshot interval, so h=ΔTh=\Delta T. Within a step, Runge–Kutta stages still interpolate between adjacent snapshots if the snapshot times are available. If a multi-stage step extends past the last available snapshot, the current field is held constant in time.

PCHIP reconstructs the velocity at a node from the four stored snapshots nearest in time, two before and two after. The time derivative of the velocity at each snapshot is estimated from the weighted harmonic mean of the two neighbouring secants (Fritsch and Butland [16]). It is set to zero where the two secants have opposite signs or either is zero, so that the reconstruction does not overshoot. Each velocity component is reconstructed separately. The reconstructed field is therefore not exactly divergence-free between snapshots, even if the stored fields are. Reconstruction reverts to linear at the ends of the record and where repeated forcing cycles meet. Slope limiting can reduce the local order near extrema.

Diffusion

For constant horizontal diffusivity KhK_h, each component receives

Δxs=ξ2Kh∣δt∣.(9)\Delta x_s=\xi\sqrt{2K_h\lvert\delta t\rvert}. \tag*{(9)}

where ξ\xi is a standard normal variate drawn independently for each component. The displacement is mapped from the local tangent plane along a great circle, using the radius Rm=180Mϕ/πR_{\mathrm{m}} = 180M_{\phi}/\pi consistent with the advection metric. Unequal components Kx,KyK_x,K_y add a northward metric drift (Kx−Ky)tan⁡ϕ∣δt∣/Rm(K_x - K_y)\tan\phi|\delta t|/R_{\mathrm{m}}. The latitude used to calculate this drift is limited to ±89.9∘\pm89.9^\circ.

For spatially varying diffusivity, Euler–Maruyama adds ∂xKx∣δt∣\partial_x K_x|\delta t| to the xx increment [58, 41]. Milstein also adds 12∂xKx∣δt∣(ξ2−1)\frac{1}{2}\partial_x K_x|\delta t|(\xi^2-1) [20]. The yy increment uses KyK_y and ∂yKy\partial_y K_y. The Milstein correction assumes that diffusivity is diagonal and separable. It does not generally provide higher-order accuracy for fields that vary in two dimensions.

Diffusivity is interpolated spatially by a plane fit and reconstructed linearly in time, even when PCHIP is used for velocity. Gradients are estimated by centred differences. The offsets follow the median mesh-edge length and are bounded to 100 m–50 km. If an offset sample lies outside the mesh, the centred estimate is replaced by one-sided differences or the plane-fit gradient.

All integrators apply constant horizontal diffusion after the advective step. With Euler, the spatially varying schemes combine advection and diffusion in a step evaluated at the initial position. With RK2 or RK4, optional splitting applies diffusion after advection, with the diffusion terms evaluated at the initial or final position. The spatially varying horizontal schemes are restricted to two dimensions.

Vertical diffusion uses

Δzs=∂Az∂z∣δt∣+ξ2Az∣δt∣,(10)\Delta z_{\mathrm{s}} = \frac{\partial A_z}{\partial z}|\delta t| + \xi\sqrt{2A_z|\delta t|}, \tag*{(10)}

where AzA_z and its gradient are evaluated on the same linear depth segment in the column at the nearest node [58]. Displacements that cross the surface or floor are reflected at that boundary. Variable AzA_z is available for global fixed-level output, while the other input modules use a constant value. Vertical diffusion can be combined with constant horizontal diffusion and with the fixed-step integrators.

Random numbers are generated by a SplitMix64 chain [45] with the counter-based principle of Salmon et al. [42]. Each draw is keyed by the seed, realization, particle index in the full release, global step and its use. Separate keys are used for horizontal diffusion, vertical kicks and stranding decisions. Statistical and reproducibility checks are summarized in Appendix § 13.5.

Stranding

Stranding combines criteria based on water depth, coastal cells and stochastic beaching in the near-shore zone. A cell is classified as coastal if one of its edges is not shared with another cell. After a failed step, a particle can be reclassified as beached if its position before the step lies in the near-shore zone. This zone includes water shallower than the specified zone depth, whose default is twice the stranding depth. Coastal cells are also included when that information is available. Particles whose steps fail outside the zone remain removed.

Resuspension can be disabled, triggered automatically by rewetting, decided stochastically, or both. Each active mode requires rewetting before the particle can move again. Hysteresis in the depth threshold reduces repeated switching between beached and moving states. Automatic release additionally requires a specified number of consecutive wet steps.

The rotated frame

The optional rotation uses either the FESOM frame or specified Euler angles. Node coordinates are rotated as points. Horizontal velocity components are transformed as

u′=cu−sv,v′=su+cv,(11)u' = cu - sv,\qquad v' = su + cv, \tag*{(11)}

where cc and ss are the cosine and sine of the local rotation angle. Vertical velocity, sea-surface height and scalars remain unchanged. Anisotropic horizontal diffusivity is applied along the tracking axes, with its components left unrotated. The FESOM-C input module does not offer frame rotation and refuses a configuration that requests it.

Software details

Input and memory

The input modules retrieve snapshots from NetCDF or Zarr as they are needed. The HEALPix module can also access GRIB archives through reference files that index their contents. Time-averaged records can be placed at the midpoint of each averaging window. Experiments can be specified using calendar dates, repeated forcing cycles and realizations shifted in time.

The snapshots required for linear or cubic reconstruction are kept in memory. Several consecutive snapshots can be retrieved together in a single disk read. Single-precision storage halves the memory used by velocity arrays. Large three-dimensional HEALPix fields are loaded in blocks of levels. Processes running on the same node can share snapshots through read-only memory maps.

Extraction, particle sets and output

Regional extraction selects the triangular cells of the model mesh or HEALPix pixels inside a specified region. A halo, a rim of neighbouring cells around the region, can be added. For HEALPix, a single halo layer reproduces the dual mesh that a whole-mesh build gives inside the region. Tests using a two-layer halo confirm bit-for-bit agreement of trajectories for particles remaining within the region.

Release files define particle positions, depths and optional time offsets. A release can be repeated at fixed time intervals. For parallel execution, a release file can be sorted by HEALPix pixel to keep nearby particles together in memory. The file can then be divided into contiguous subsets. When the release is not repeated, the resulting Zarr trajectories are merged to restore the particle order of the original release file. The merged values match an unsplit run, including stochastic runs, provided each subset keeps the same random seed and particle indices in the full release.

Output records particle positions and status, together with any sampled variables. Zarr output can be read during tracking. With buffered writing enabled, NetCDF can be read between flushes, when the file is closed. Restart files store particle state, time indices, stranding counters and the coordinate frame. A run script uses these records to resume the calculation through a chain of jobs.

Compiled step routines

As described in Sect. 3.1, KELP either compiles the cell search, interpolation and integration into one routine or runs them as separate stages. The combined routine covers two-dimensional tracking, three-dimensional Euler with the plane fit, and three-dimensional RK2 with node velocities interpolated from the vertices. Its availability also depends on the chosen search and interpolation methods. Three-dimensional sigma tracking, three-dimensional RK4, the edge walk and the plane fit over edge-sharing neighbours run as separate stages.

In the stage-by-stage execution, each stage distributes work over particles in parallel. For large contiguous fields, cubic and double-precision linear temporal reconstructions are computed in parallel over mesh points. Tests check that the combined and stage-by-stage paths give the same trajectories for configurations supported by both.

Configuration

The experiment is specified in a YAML configuration. When the file is loaded, scheme names and combinations of options are checked for compatibility. Checks involving input fields are performed at startup or when the fields are first used. Restart checks include verification of the coordinate frame. The reference manual describes the available options and the rules governing their combinations.

Documentation, skills and tests

A source map identifies the functions and classes described by each topic document. It also records the code revision against which the document was last checked. A checking tool reports functions or classes that can no longer be found, along with source files modified since the previous check. The skills were developed alongside the engine to address problems documented during the experiment campaigns. During development, the skills were refined using written test scenarios. Files prepared by an agent were checked against lists drawn from the campaign records. These development checks are separate from the controlled evaluation in Sect. 5.4.

The test suite comprises about 2500 automated tests, most of which use synthetic meshes and velocity fields. Those requiring external data run when the necessary data are available. The comparisons cover the combined and stage-by-stage routines, resumed and uninterrupted runs, HEALPix regional and whole-mesh input, and runs split across processes, including stochastic runs. Tests also verify that optional features do not affect the results when disabled.

Stochastic tests verify that changing any part of the random key changes the draws. They also check the expected Brownian displacement moments and agreement between restarted and uninterrupted runs. Invariance to thread count was confirmed in the runs comparing model-mesh and HEALPix fields (Sect. 5.1).

Code availability. KELP is licensed under the BSD 3-Clause licence and available on GitHub at https://github.com/CliDyn/kelp (last access: 13 November 2026). Version 1.0 described here is archived on Zenodo at https://doi.org/10.5281/zenodo.24200490 ([25]). The archive includes the reference manual, with its chapter on agent skills, and the test suite. It also includes scripts and configurations for running and analysing all simulations in Sects. 4–6.

Data availability. The nextGEMS production simulation used in Sect. 5.3 is described by Segura et al. [43]. Its output is stored at DKRZ and is accessible with a DKRZ account. The FESOM2 simulation on the CORE2 mesh used in Sects. 4.5, 5.1 and 5.2 follows Danilov et al. [10]. Its output is stored at DKRZ and is available to DKRZ users. The HEALPix versions of these fields (Sect. 5.1) are not archived, because the remapping scripts in the Zenodo archive rebuild them from the model output. The wind-farm simulations of Sect. 4.5 are described by Androsov et al. [2], and their velocity output is stored at the Alfred Wegener Institute. The configurations, release files, run and processing scripts and the data behind the figures and tables of this paper are in the same Zenodo archive as the code.

Author contributions. All authors contributed to the conception and to the writing and revision of the manuscript, and approved the final version.

Competing interests. The contact author has declared that none of the authors has any competing interests.

Acknowledgements. We acknowledge the continuous support by the Alfred Wegener Institute, Helmholtz Centre for Polar and Marine Research. We also thank the Helmholtz Association with its (data) infrastructure investments as well as all direct and indirect funders (DFG, BMFTR, EU). This work is also supported by project S1: Diagnosis and Metrics in Climate Models of the Collaborative Research Centre TRR 181 “Energy Transfer in Atmosphere and Ocean”, funded by the Deutsche Forschungsgemeinschaft (DFG, German Research Foundation, project no. 274762653). It is also supported by the EERIE project (Grant Agreement No 101081383), funded by the European Union, and by the TerraDT project (Digital Twin of Earth system for Cryosphere, Land surface and related interactions), which has received funding from the European Union’s Horizon Europe research and innovation programme under Grant Agreement no. 101187992. Views and opinions expressed are those of the authors only and do not necessarily reflect those of the European Union or the European Climate Infrastructure and Environment Executive Agency (CINEA). Neither the European Union nor the granting authority can be held responsible for them. A. Androsov acknowledges funding from the German Federal Ministry of Research, Technology and Space (BMFTR) through the projects CREATE (03F0910B) and CREATE II (03F0979A), within the sustainMare research mission of the German Marine Research Alliance (DAM).

We developed KELP and carried out its experiments using coding agents based on Anthropic and OpenAI models (Sect. 3.2). These tools also helped revise the authors’ manuscript drafts under their direction. The authors reviewed and edited the resulting text and take full responsibility for the content.

References

  1. [1]Androsov, A., Fofonova, V., Kuznetsov, I., Danilov, S., Rakowsky, N., Harig, S., Brix, H., and Wiltshire, K. H.: FESOM-C v2: coastal dynamics on hybrid unstructured meshes, Geoscientific Model Development, 12, 1009–1028, https://doi.org/10.5194/gmd-12-1009-2019, 2019.
  2. [2]Androsov, A., Sidorenko, V., Harig, S., Kuznetsov, I., and Horn, S.: Anthropogenic impacts of offshore wind farms on the hydrodynamics of the southeastern North Sea, Journal of Sea Research, 212, 102711, https://doi.org/10.1016/j.seares.2026.102711, 2026.
  3. [3]Blanke, B. and Raynaud, S.: Kinematics of the Pacific Equatorial Undercurrent: An Eulerian and Lagrangian Approach from GCM Results, Journal of Physical Oceanography, 27, 1038–1053, https://doi.org/10.1175/1520-0485(1997)027<1038:KOTPEU>2.0.CO;2, 1997.
  4. [4]Brady, R. X., Maltrud, M. E., Wolfram, P. J., Drake, H. F., and Lovenduski, N. S.: The Influence of Ocean Topography on the Upwelling of Carbon in the Southern Ocean, Geophysical Research Letters, 48, e2021GL095088, https://doi.org/10.1029/2021GL095088, 2021.
  5. [5]Butcher, J. C.: Numerical Methods for Ordinary Differential Equations, Wiley, 3 edn., https://doi.org/10.1002/9781119121534, 2016.
  6. [6]Clark, J. R.: PyLag 0.8.1 documentation: Overview, Website, Plymouth Marine Laboratory, https://pylag.readthedocs.io/en/latest/documentation/overview.html, last access: 15 September 2026, 2026.
  7. [7]Cowen, R. K. and Sponaugle, S.: Larval Dispersal and Marine Population Connectivity, Annual Review of Marine Science, 1, 443–466, https://doi.org/10.1146/annurev.marine.010908.163757, 2009.
  8. [8]Cowen, R. K., Paris, C. B., and Srinivasan, A.: Scaling of Connectivity in Marine Populations, Science, 311, 522–527, https://doi.org/10.1126/science.1122039, 2006.
  9. [9]Dagestad, K.-F., Röhrs, J., Breivik, Ø., and Ådlandsvik, B.: OpenDrift v1.0: a generic framework for trajectory modelling, Geoscientific Model Development, 11, 1405–1420, https://doi.org/10.5194/gmd-11-1405-2018, 2018.
  10. [10]Danilov, S., Sidorenko, D., Wang, Q., and Jung, T.: The Finite-volume Sea ice–Ocean Model (FESOM2), Geoscientific Model Development, 10, 765–789, https://doi.org/10.5194/gmd-10-765-2017, 2017.
  11. [11]Delandmeter, P. and van Sebille, E.: The Parcels v2.0 Lagrangian framework: new field interpolation schemes, Geoscientific Model Development, 12, 3571–3584, https://doi.org/10.5194/gmd-12-3571-2019, 2019. J., Wagner, I., Wedi, N., Wehner, J., Willner, S., Yepes-Arbós, X., Ziemen, F., and Zimmermann, J.: The Destination Earth digital twin for climate change adaptation, Geoscientific Model Development, 19, 2821–2848, https://doi.org/10.5194/gmd-19-2821-2026, 2026.
  12. [12]Döös, K.: Interocean exchange of water masses, Journal of Geophysical Research: Oceans, 100, 13 499–13 514, https://doi.org/10.1029/95JC00337, 1995.
  13. [15]Dormand, J. R. and Prince, P. J.: A family of embedded Runge–Kutta formulae, Journal of Computational and Applied Mathematics, 6, 19–26, https://doi.org/10.1016/0771-050X(80)90013-3, 1980.
  14. [16]Fritsch, F. N. and Butland, J.: A Method for Constructing Local Monotone Piecewise Cubic Interpolants, SIAM Journal on Scientific and Statistical Computing, 5, 300–304, https://doi.org/10.1137/0905021, 1984.
  15. [17]Fritsch, F. N. and Carlson, R. E.: Monotone Piecewise Cubic Interpolation, SIAM Journal on Numerical Analysis, 17, 238–246, https://doi.org/10.1137/0717021, 1980.
  16. [18]Ghosh, R., Cheedela, S. K., Beyer, S., Koldunov, N., Berzina, S., Delpech, A., Loza, S., Wikramage, C., Libera, S., Aengenheyster, M., John, A., Remedio, A., Scholz, P., Sidorenko, D., Streffing, J., Wachsmann, F., and Jung, T.: Century-long kilometre-scale ocean eddy-rich global climate simulation with the coupled IFS CY48R1–FESOM 2.5 model, EGUsphere [preprint], https://doi.org/10.5194/egusphere-2026-1289, 2026.
  17. [19]Górski, K. M., Hivon, E., Banday, A. J., Wandelt, B. D., Hansen, F. K., Reinecke, M., and Bartelmann, M.: HEALPix: a framework for high-resolution discretization and fast analysis of data distributed on the sphere, The Astrophysical Journal, 622, 759–771, https://doi.org/10.1086/427976, 2005.
  18. [20]Gräwe, U., Deleersnijder, E., Shah, S. H. A. M., and Heemink, A. W.: Why the Euler scheme in particle tracking is not enough: the shallow-sea pycnocline test case, Ocean Dynamics, 62, 501–514, https://doi.org/10.1007/s10236-012-0523-y, 2012.
  19. [21]Hoffmann, J., Bauer, P., Sandu, I., Wedi, N., Geenen, T., and Thiemert, D.: Destination Earth – A digital twin in support of climate services, Climate Services, 30, 100394, https://doi.org/10.1016/j.cliser.2023.100394, 2023.
  20. [22]Hoyer, S. and Hamman, J.: xarray: N-D labeled Arrays and Datasets in Python, Journal of Open Research Software, 5, 10, https://doi.org/10.5334/jors.148, 2017.
  21. [23]Jones, B. T., Solow, A., and Ji, R.: Resource Allocation for Lagrangian Tracking, Journal of Atmospheric and Oceanic Technology, 33, 1225–1235, https://doi.org/10.1175/JTECH-D-15-0115.1, 2016.
  22. [24]Keating, S. R., Smith, K. S., and Kramer, P. R.: Diagnosing Lateral Mixing in the Upper Ocean with Virtual Tracers: Spatial and Temporal Resolution Dependence, Journal of Physical Oceanography, 41, 1512–1534, https://doi.org/10.1175/2011JPO4580.1, 2011.
  23. [25]Kuznetsov, I., Androsov, A., Pantiukhin, D., Wekerle, C., Danilov, S., Jung, T., and Koldunov, N.: KELP v1.0: code, configurations, scripts and reduced data of the model description paper, Zenodo [code and data set], https://doi.org/10.5281/zenodo.24200490, 2026.
  24. [26]LaCasce, J. H.: Statistics from Lagrangian observations, Progress in Oceanography, 77, 1–29, https://doi.org/10.1016/j.pocean.2008.02.002, 2008.
  25. [27]Lange, M. and van Sebille, E.: Parcels v0.9: prototyping a Lagrangian ocean analysis framework for the petascale age, Geoscientific Model Development, 10, 4175–4186, https://doi.org/10.5194/gmd-10-4175-2017, 2017.
  26. [28]Lett, C., Verley, P., Mullon, C., Parada, C., Brochier, T., Penven, P., and Blanke, B.: A Lagrangian tool for modelling ichthyoplankton dynamics, Environmental Modelling & Software, 23, 1210–1214, https://doi.org/10.1016/j.envsoft.2008.02.005, 2008.
  27. [29]Lique, C., Tréguier, A. M., Blanke, B., and Grima, N.: On the origins of water masses exported along both sides of Greenland: A Lagrangian model analysis, Journal of Geophysical Research: Oceans, 115, C05019, https://doi.org/10.1029/2009JC005316, 2010.
  28. [30]Löhner, R. and Ambrosiano, J.: A vectorized particle tracer for unstructured grids, Journal of Computational Physics, 91, 22–31, https://doi.org/10.1016/0021-9991(90)90002-I, 1990.
  29. [31]Luo, Z., Kasirzadeh, A., and Shah, N. B.: The more you automate, the less you see: Hidden pitfalls of autonomous AI scientists, Proceedings of the National Academy of Sciences, 123, e2610214123, https://doi.org/10.1073/pnas.2610214123, 2026.
  30. [32]Monroy, P., Rossi, V., Ser-Giacomi, E., López, C., and Hernández-García, E.: Sensitivity and robustness of larval connectivity diagnostics obtained from Lagrangian Flow Networks, ICES Journal of Marine Science, 74, 1763–1779, https://doi.org/10.1093/icesjms/fsw235, 2017.
  31. [33]Neder, C., Fofonova, V., Androsov, A., Kuznetsov, I., Abele, D., Falk, U., Schloss, I. R., Sahade, R., and Jerosch, K.: Modelling suspended particulate matter dynamics at an Antarctic fjord impacted by glacier melt, Journal of Marine Systems, 231, 103734, https://doi.org/10.1016/j.jmarsys.2022.103734, 2022.
  32. [34]Nissen, C., Timmermann, R., van Caspel, M., and Wekerle, C.: Altered Weddell Sea warm- and dense-water pathways in response to 21st-century climate change, Ocean Science, 20, 85–101, https://doi.org/10.5194/os-20-85-2024, 2024.
  33. [35]Pantiukhin, D., Shapkin, B., Kuznetsov, I., Jost, A. A., and Koldunov, N.: Accelerating earth science discovery via multi-agent LLM systems, Frontiers in Artificial Intelligence, 8, 1674927, https://doi.org/10.3389/frai.2025.1674927, 2025.
  34. [36]Pantiukhin, D., Shapkin, B., Kuznetsov, I., Jung, T., and Koldunov, N.: CMIP-Forge: An Agentic System that Retrieves, Computes, and Self-Reviews Climate Science, arXiv:2606.17076 (preprint), https://doi.org/10.48550/arXiv.2606.17076, 2026.
  35. [37]Paris, C. B., Helgers, J., van Sebille, E., and Srinivasan, A.: Connectivity Modeling System: A probabilistic modeling tool for the multi-scale tracking of biotic and abiotic variability in the ocean, Environmental Modelling & Software, 42, 47–54, https://doi.org/10.1016/j.envsoft.2012.12.006, 2013.
  36. [38]Proshutinsky, A., Krishfield, R., Toole, J. M., Timmermans, M.-L., Williams, W., Zimmermann, S., Yamamoto-Kawai, M., Armitage, T. W. K., Dukhovskoy, D., Golubeva, E., Manucharyan, G. E., Platov, G., Watanabe, E., Kikuchi, T., Nishino, S., Itoh, M., Kang, S.-H., Cho, K.-H., Tateyama, K., and Zhao, J.: Analysis of the Beaufort Gyre Freshwater Content in 2003–2018, Journal of Geophysical Research: Oceans, 124, 9658–9689, https://doi.org/10.1029/2019JC015281, 2019.
  37. [39]Rackow, T., Pedruzo-Bagazgoitia, X., Becker, T., Milinski, S., Sandu, I., Aguridan, R., Bechtold, P., Beyer, S., Bidlot, J., Boussetta, S., Deconinck, W., Diamantakis, M., Dueben, P., Dutra, E., Forbes, R., Ghosh, R., Goessling, H. F., Hadade, I., Hegewald, J., Jung, T., Keeley, S., Kluft, L., Koldunov, N., Koldunov, A., Kölling, T., Kousal, J., Kühnlein, C., Maciel, P., Mogensen, K., Quintino, T., Polichtchouk, I., Reuter, B., Sármány, D., Scholz, P., Sidorenko, D., Streffing, J., Sützl, B., Takasuka, D., Tietsche, S., Valentini, M., Vannière, B., Wedi, N., Zampieri, L., and Ziemen, F.: Multi-year simulations at kilometre scale with the Integrated Forecasting System coupled to FESOM2.5 and NEMOv3.4, Geoscientific Model Development, 18, 33–69, https://doi.org/10.5194/gmd-18-33-2025, 2025.
  38. [40]Reijnders, D., Bakker, D. C. E., and van Sebille, E.: Disentangling Carbon Concentration Changes Along Pathways of North Atlantic Subtropical Mode Water, Journal of Geophysical Research: Oceans, 129, e2023JC020814, https://doi.org/10.1029/2023JC020814, 2024.
  39. [41]Ross, O. N. and Sharples, J.: Recipe for 1-D Lagrangian particle tracking models in space-varying diffusivity, Limnology and Oceanography: Methods, 2, 289–302, https://doi.org/10.4319/lom.2004.2.289, 2004.
  40. [42]Salmon, J. K., Moraes, M. A., Dror, R. O., and Shaw, D. E.: Parallel random numbers: as easy as 1, 2, 3, in: Proceedings of the International Conference for High Performance Computing, Networking, Storage and Analysis (SC’11), pp. 1–12, ACM, https://doi.org/10.1145/2063384.2063405, 2011.
  41. [43]Segura, H., Pedruzo-Bazagoitia, X., Weiss, P., Müller, S. K., Rackow, T., Lee, J., Dolores-Tesillos, E., Benedict, I., Aengenheyster, M., Aguridan, R., Arduini, G., Baker, A. J., Bao, J., Bastin, S., Baulenas, E., Becker, T., Beyer, S., Bockelmann, H., Brüggemann, N., Brunner, L., Cheedela, S. K., Das, S., Denissen, J., Dragaud, I., Dziekan, P., Ekblom, M., Engels, J. F., Esch, M., Forbes, R., Frauen, C., Freischem, L., García-Maroto, D., Geier, P., Gierz, P., González-Cervera, Á., Grayson, K., Griffith, M., Gutjahr, O., Haak, H., Hadade, I., Haslehner, K., ul Hasson, S., Hegewald, J., Kluft, L., Koldunov, A., Koldunov, N., Kölling, T., Koseki, S., Kosukhin, S., Kousal, J., Kuma, P., Kumar, A. U., Li, R., Maury, N., Meindl, M., Milinski, S., Mogensen, K., Niraula, B., Nowak, J., Praturi, D. S., Proske, U., Putrasahan, D., Redler, R., Santuy, D., Sármány, D., Schnur, R., Scholz, P., Sidorenko, D., Spät, D., Sützl, B., Takasuka, D., Tompkins, A., Uribe, A., Valentini, M., Veerman, M., Voigt, A., Warnau, S., Wachsmann, F., Waclawczyk, M., Wedi, N., Wieners, K.-H., Wille, J., Winkler, M., Wu, Y., Ziemen, F., Zimmermann, J., Bender, F. A.-M., Bojovic, D., Bony, S., Bordoni, S., Brehmer, P., Dengler, M., Dutra, E., Faye, S., Fischer, E., van Heerwaarden, C., Hohenegger, C., Järvinen, H., Jochum, M., Jung, T., Jungclaus, J. H., Keenlyside, N. S., Klocke, D., Konow, H., Klose, M., Malinowski, S., Martius, O., Mauritsen, T., Mellado, J. P., Mieslinger, T., Mohino, E., Pawłowska, H., Peters-von Gehlen, K., Sarré, A., Sobhani, P., Stier, P., Tuppi, L., Vidale, P. L., Sandu, I., and Stevens, B.: nextGEMS: entering the era of kilometer-scale Earth system modeling, Geoscientific Model Development, 18, 7735–7761, https://doi.org/10.5194/gmd-18-7735-2025, 2025.
  42. [44]Shepard, D.: A two-dimensional interpolation function for irregularly-spaced data, in: Proceedings of the 1968 23rd ACM National Conference, pp. 517–524, ACM Press, https://doi.org/10.1145/800186.810616, 1968.
  43. [45]Steele, Jr., G. L., Lea, D., and Flood, C. H.: Fast splittable pseudorandom number generators, in: Proceedings of the 2014 ACM International Conference on Object Oriented Programming Systems Languages & Applications (OOPSLA ’14), pp. 453–472, ACM, https://doi.org/10.1145/2660193.2660195, 2014.
  44. [46]Stohl, A.: Computation, accuracy and applications of trajectories – a review and bibliography, Atmospheric Environment, 32, 947–966, https://doi.org/10.1016/S1352-2310(97)00457-3, 1998.
  45. [47]Stohl, A., Wotawa, G., Seibert, P., and Kromp-Kolb, H.: Interpolation Errors in Wind Fields as a Function of Spatial and Temporal Resolution and Their Impact on Different Types of Kinematic Trajectories, Journal of Applied Meteorology, 34, 2149–2165, https://doi.org/10.1175/1520-0450(1995)034<2149:IEIWFA>2.0.CO;2, 1995.
  46. [48]Swearer, S. E., Treml, E. A., and Shima, J. S.: A Review of Biophysical Models of Marine Larval Dispersal, in: Oceanography and Marine Biology: An Annual Review, edited by Hawkins, S. J., Allcock, A. L., Bates, A. E., Firth, L. B., Smith, I. P., Swearer, S. E., and Todd, P. A., vol. 57, chap. 7, pp. 325–356, Taylor & Francis, https://doi.org/10.1201/9780429026379-7, 2019.
  47. [49]Taylor, G. I.: Diffusion by Continuous Movements, Proceedings of the London Mathematical Society, s2-20, 196–212, https://doi.org/10.1112/plms/s2-20.1.196, 1922.
  48. [50]The Parcels Team: Parcels v4 documentation: FESOM tutorial, Software documentation, https://docs.parcels-code.org/en/latest/user_guide/examples/tutorial_fesom.html, last access: 22 September 2026, 2026.
  49. [52]Timmermans, M.-L. and Toole, J. M.: The Arctic Ocean’s Beaufort Gyre, Annual Review of Marine Science, 15, 223–248, https://doi.org/10.1146/annurev-marine-032122-012034, 2023.
  50. [53]Tsujino, H., Urakawa, S., Nakano, H., Small, R. J., Kim, W. M., Yeager, S. G., Danabasoglu, G., Suzuki, T., Bamber, J. L., Bentsen, M., Böning, C. W., Bozec, A., Chassignet, E. P., Curchitser, E., Boeira Dias, F., Durack, P. J., Griffies, S. M., Harada, Y., Ilicak, M., Josey, S. A., Kobayashi, C., Kobayashi, S., Komuro, Y., Large, W. G., Le Sommer, J., Marsland, S. J., Masina, S., Scheinert, M., Tomita, H., Valdivieso, M., and Yamazaki, D.: JRA-55 based surface dataset for driving ocean–sea-ice models (JRA55-do), Ocean Modelling, 130, 79–139, https://doi.org/10.1016/j.ocemod.2018.07.002, 2018.
  51. [54]Uncles, R. J., Clark, J. R., Bedington, M., and Torres, R.: On sediment dispersal in the Whitsand Bay Marine Conservation Zone: Neighbour to a closed dredge-spoil disposal site, in: Marine Protected Areas: Science, Policy and Management, edited by Humphreys, J. and Clark, R. W. E., pp. 599–629, Elsevier, https://doi.org/10.1016/B978-0-08-102698-4.00031-9, 2020.
  52. [55]van Sebille, E., Griffies, S. M., Abernathey, R., Adams, T. P., Berloff, P., Biastoch, A., Blanke, B., Chassignet, E. P., Cheng, Y., Cotter, C. J., Deleersnijder, E., Döös, K., Drake, H. F., Drijfhout, S., Gary, S. F., Heemink, A. W., Kjellsson, J., Koszalka, I. M., Lange, M., Lique, C., MacGilchrist, G. A., Marsh, R., Mayorga Adame, C. G., McAdam, R., Nencioli, F., Paris, C. B., Piggott, M. D., Polton, J. A., Rühs, S., Shah, S. H. A. M., Thomas, M. D., Wang, J., Wolfram, P. J., Zanna, L., and Zika, J. D.: Lagrangian ocean analysis: Fundamentals and practices, Ocean Modelling, 121, 49–75, https://doi.org/10.1016/j.ocemod.2017.11.008, 2018.
  53. [56]Vennell, R., Scheel, M., Weppe, S., Knight, B., and Smeaton, M.: Fast Lagrangian particle tracking in unstructured ocean model grids, Ocean Dynamics, 71, 423–437, https://doi.org/10.1007/s10236-020-01436-7, 2021.
  54. [57]Vennell, R., Steidle, L., Smeaton, M., Chaput, R., and Knight, B.: OceanTracker 0.5: fast adaptable Lagrangian particle tracking in structured and unstructured grids, Geoscientific Model Development, 19, 10 223–10 241, https://doi.org/10.5194/gmd-19-10223-2026, 2026.
  55. [58]Visser, A. W.: Using random walk models to simulate the vertical distribution of particles in a turbulent water column, Marine Ecology Progress Series, 158, 275–281, https://doi.org/10.3354/meps158275, 1997.
  56. [59]Wagner, P., Rühs, S., Schwarzkopf, F. U., Koszalka, I. M., and Biastoch, A.: Can Lagrangian Tracking Simulate Tracer Spreading in a High-Resolution Ocean General Circulation Model?, Journal of Physical Oceanography, 49, 1141–1157, https://doi.org/10.1175/JPO-D-18-0152.1, 2019.
  57. [60]Wang, Q.: On the Release and Renewal of Freshwater in the Beaufort Gyre of the Arctic Ocean, Journal of Physical Oceanography, 54, 1213–1227, https://doi.org/10.1175/JPO-D-23-0184.1, 2024.
  58. [61]Warren, J.: Barycentric coordinates for convex polytopes, Advances in Computational Mathematics, 6, 97–108, https://doi.org/10.1007/BF02127699, 1996.
  59. [62]Wekerle, C., Krumpen, T., Dinter, T., von Appen, W.-J., Iversen, M. H., and Salter, I.: Properties of Sediment Trap Catchment Areas in Fram Strait: Results From Lagrangian Modeling and Remote Sensing, Frontiers in Marine Science, 5, 407, https://doi.org/10.3389/fmars.2018.00407, 2018.
  60. [63]Yang, J., Jimenez, C. E., Wettig, A., Lieret, K., Yao, S., Narasimhan, K., and Press, O.: SWE-agent: Agent-Computer Interfaces Enable Automated Software Engineering, arXiv:2405.15793 (preprint), Advances in Neural Information Processing Systems 37, https://doi.org/10.48550/arXiv.2405.15793, 2024.
  61. [64]Yao, S., Zhao, J., Yu, D., Du, N., Shafran, I., Narasimhan, K., and Cao, Y.: ReAct: Synergizing Reasoning and Acting in Language Models, arXiv:2210.03629 (preprint, 2022), International Conference on Learning Representations (ICLR) 2023, https://doi.org/10.48550/arXiv.2210.03629, 2023.
  62. [65]Zhang, J., Weijer, W., Steele, M., Cheng, W., Verma, T., and Veneziani, M.: Labrador Sea freshening linked to Beaufort Gyre freshwater release, Nature Communications, 12, 1229, https://doi.org/10.1038/s41467-021-21470-3, 2021.
  63. [66]Zhou, T., Qian, Y., and Leung, L. R.: Can We Trust LLMs for Complex Earth System Model Analysis? Silent Failure and Evidence from Module-Grounded Benchmarking, EGUsphere [preprint], egusphere-2026-2237, under review for Geosci. Model Dev., https://doi.org/10.5194/egusphere-2026-2237, 2026.

Paper details

vlnc:W_cm663vtm
Version
v1 · latest
Published
Fresh — added to the Hub within the last 30 days
Added
License
CC BY 4.0
Usage

views · 0

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

  • Physics and Astronomy

coding agents

View statement
Looking for related papers…
Contents