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
u ( x , t ) = u ( X ( x 0 , t ) , t ) = ∂ X ( x 0 , t ) ∂ t , {\displaystyle \mathbf {u} (\mathbf {x} ,t)=\mathbf {u} (\mathbf {X} (\mathbf {x_{0}} ,t),t)={\frac {\partial \mathbf {X} (\mathbf {x_{0}} ,t)}{\partial t}},}
where X ( x 0 , t ) {\textstyle \mathbf {X} (\mathbf {x_{0}} ,t)} defines the trajectory of a particle (fluid parcel), labelled x 0 {\textstyle \mathbf {x_{0}} } , as a function of the time t {\textstyle t} , and the partial derivative is taken for a given fluid parcel x 0 {\textstyle \mathbf {x_{0}} } . In this context, x 0 {\textstyle \mathbf {x_{0}} } is used to identify a given virtual particle - physically it corresponds to the position through which that particle passed at time t 0 {\textstyle t_{0}} . In words, this equation expresses that the velocity of a fluid parcel at the position along its trajectory that it reaches at time t {\textstyle 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,
X ( t + Δ t ) = X ( t ) + ∫ t t + Δ t u ( X ( x 0 , t ′ ) , t ′ ) d t ′ , {\displaystyle \mathbf {X} (t+\Delta t)=\mathbf {X} (t)+\int _{t}^{t+\Delta t}\mathbf {u} (\mathbf {X} (\mathbf {x_{0}} ,t^{\prime }),t^{\prime })dt^{\prime },}
where t ′ {\textstyle t^{\prime }} is a dummy integration variable. In this equation, u {\textstyle \mathbf {u} } 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,
∇ ⋅ u = 0. {\displaystyle \nabla \cdot \mathbf {u} =0.}
… 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://upload.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)
