Lagrangian ocean analysis is a way of analysing ocean dynamics by computing the trajectories of virtual fluid particles, following the Lagrangian perspective of fluid flow, from a specified velocity field. Often, the Eulerian velocity field used as an input for Lagrangian ocean analysis has been computed using an ocean general circulation model (OGCM). Lagrangian techniques can be employed on a range of scales, from modelling the dispersal of biological matter within the Great Barrier Reef to global scales. Lagrangian ocean analysis has numerous applications, from modelling the diffusion of tracers, through the dispersal of aircraft debris and plastics, to determining the biological connectivity of ocean regions.
Techniques Lagrangian ocean analysis makes use of the relation between the Lagrangian and Eulerian specifications of the flow field, namely 𝐮(𝐱,t)=𝐮(𝐗(𝐱𝟎,t),t)=∂𝐗(𝐱𝟎,t)∂t, where 𝐗(𝐱𝟎,t) defines the trajectory of a particle (fluid parcel), labelled 𝐱𝟎, as a function of the time t, and the partial derivative is taken for a given fluid parcel 𝐱𝟎. In this context, 𝐱𝟎 is used to identify a given virtual particle - physically it corresponds to the position through which that particle passed at time t0. In words, this equation expresses that the velocity of a fluid parcel at the position along its trajectory that it reaches at time t can also be interpreted as the velocity at that point in the Eulerian coordinate system. Using this relation, the Eulerian velocity field can be integrated in time to trace a trajectory, 𝐗(t+Δt)=𝐗(t)+∫tt+Δt𝐮(𝐗(𝐱𝟎,t′),t′)dt′, where t′ is a dummy integration variable. In this equation, 𝐮 is continuous in space – for the integration of trajectories in a Lagrangian ocean model, the velocity field must be evaluable at any point in space. Spatial interpolation is used so that the velocity field can be evaluated at points inside the grid cells outputted by OGCMs.
Time Integration In some cases, the time integration is performed using explicit time-stepping methods. Lagrangian ocean analysis codes may make use of, for instance, an Euler method, or a higher order method, such as Runge-Kutta 4 or Runge-Kutta 4–5. If the timestep of the integration method is shorter than the time resolution of the Eulerian velocity field used as an input, then the velocity field must be interpolated in the temporal domain, so that there is a velocity value to be integrated for each time. To ensure volume conservation in integrating the trajectories, symplectic methods, can be used. These methods are generally implicit in nature, requiring extra computation when compared to explicit methods. Alternatively, if each component of the flow velocity within a spatial grid is assumed to vary linearly along its axis, trajectories can be analytically calculated. If the velocity field is steady-state, then trajectories can be treated as streamlines, and considered together in bundles known as stream tubes, which bound fluid flow in different parts of the spatial domain. If the velocity field provided as the starting point of the Lagrangian analysis is a divergence-free flow, the volume of fluid moving through a stream tube is conserved throughout the stream tube. To show this mathematically, the starting point is the condition that the divergence of the velocity field is zero, ∇⋅𝐮=0. Integrating this over the volume of a stream tube, the divergence theorem can be used to show that
∭V(𝜵⋅𝐮)dV= S (𝐮⋅𝐧̂)dS=0, where 𝐧̂ is the normal to the surface of the stream tube, V denotes the entire volume of the stream tube and S its surface. If the streamlines and pathlines (trajectories) are equivalent, as is the case for steady-state (non time-evolving) flows, then the walls of the stream tube do not contribute to the integral, as the flow cannot cross them. Thus, only the ends, S1 and S2 will contribute to the integral, so ∬S1(𝐮⋅𝐧̂)dS+∬S2(𝐮⋅𝐧̂)dS=0. Physically, this equation expresses that the fluid flux passing through the two ends of the streamtube are equal, demonstrating the volume conservation. The equation also shows that the area of each end of the stream tube is inversely proportional to the speed of the normal flow through it. These features of the analytical method of calculating trajectories lend themselves to Lagrangian analyses primarily concerned with the advective (as opposed to diffusive) component of the flow. There exists a caveat to this approach: given that the velocity fields considered can be time-evolving, the equivalence between stream tubes and material pathways may not hold. Lagrangian ocean models can address this formalism by considering the flow field to be a piecewise function in the temporal domain, where each sub-function is a steady-state velocity field. A Boussinesq model, in which flow is incompressible and thus non-divergent, can be used to generate the velocity field used as an input for the Lagrangian analysis code to ensure volume is conserved when using this method.
Incorporating Diffusion For a Lagrangian ocean analysis code to include the effects of molecular diffusion, or other small-scale mixing which may be modelled as a diffusive process, stochastic terms must be added to the trajectory computations. Stochastic terms may be added in accordance with a stochastic differential equation (SDE) derived from the tracer diffusion equation in the form of the Fokker-Planck equation. This method requires that a diffusion tensor be provided. Rather than using an SDE derived with a diffusion tensor, Lagrangian ocean models may instead find an SDE based on how well the resulting diffusivity statistics fit either observations or models built with a finer resolution. This method involves the use of a Markov chain; the order of the Markov chain used is another point where different Lagrangian analysis codes differ.
… excerpt ends here. Continue reading the full article.

![Lagrangian ocean analysis: Venn diagram illustrating differences between Lagrangian ocean analysis community codes. Codes in the red circle are offline, those in the blue-violet circle include a stochastic term to model diffusive effects and those in the green circle compute trajectories analytically. All code shown that are outside of the green circle (so do not use analytic methods to compute trajectories) use explicit integration methods. The information shown in this diagram was taken from.[1]](https://thumb.wikimedia.org/wikipedia/commons/thumb/3/34/Venn_LOA.png/500px-Venn_LOA.png?utm_source=en.wikipedia.org&utm_campaign=parser&utm_content=thumbnail)