Preventive Methods for Coastal Protection pp 225-249 | Cite as

# TRACMASS—A Lagrangian Trajectory Model

- 18 Citations
- 1.5k Downloads

## Abstract

A detailed description of the Lagrangian trajectory model TRACMASS is presented. The theory behind the original scheme for steady state velocities is derived for rectangular and curvilinear grids with different vertical coordinates for the oceanic and atmospheric circulation models. Two different ways to integrate the trajectories in time in TRACMASS are presented. These different time schemes are compared by simulating inertial oscillations, which show that both schemes are sufficiently accurate not to deviate from the analytical solution.

The TRACMASS are exact solutions to differential equations and can hence be integrated both forward and backward with unique solutions. Two low-order trajectory subgrid parameterizations, which are available in TRACMASS, are explained. They both enable an increase of the Lagrangian dispersion, but are, however, too simple to simulate some of the Lagrangian properties that are desirable. The mass conservation properties of TRACMASS are shown to make it possible to follow the water or air masses both forward and backward in time, which also opens up for all sorts of calculations of water/air mass exchanges as well as Lagrangian stream functions.

## Keywords

General Circulation Model Volume Transport Inertial Oscillation Surface Drifter Curvilinear Grid## 7.1 Introduction

The specification of a flow field can be made in an Eulerian or a Lagrangian frame of reference. The Eulerian method is when the fluid flow is observed from a point fixed in space, while the Lagrangian method is instead working from the perspective of the flow. This can be illustrated by a cyclist, who passes an immobile traffic jam. In this case the static car driver sees the moving cyclist from an Eulerian perspective, while the moving cyclist observes the static traffic jam from a Lagrangian perspective. The zigzagging path of the cyclist between the cars constitutes a Lagrangian trajectory.

Most analytical and numerical models in fluid dynamics are made in the Eulerian framework, since it is then straightforward to describe the motion as a function of position and time. This is why in nearly all ocean general circulation models the equations of motion are discretized with finite differences on a fixed grid so that the motion of the water and its tracers such as salinity and temperature are described from the Eulerian perspective with different values in each grid box, even if the vertical discretization often has a time dependent component related to the motion of the fluid. Lagrangian trajectories are, however, still possible to calculate from the model simulated Eulerian velocity fields on the model grid.

The present chapter will present the TRACMASS Lagrangian trajectory model, which uses the Eulerian velocity fields, which have been simulated by ocean or atmosphere general circulation models (GCM). The trajectories are calculated off-line, i.e., after the GCM has been integrated and the velocity fields have been stored. This makes it possible to calculate many more trajectories than would be possible on-line, i.e., simultaneously with the GCM run. TRACMASS has been applied to many different general circulation models, both for the ocean and for the atmosphere.

The original feature of the method is that it solves the trajectory path through each grid cell with an analytical solution of a differential equation which depends on the velocities on the walls of the grid box. The scheme was originally developed in Döös (1995), Blanke and Raynaud (1997) for stationary velocity fields and hereafter further developed in de Vries and Döös (2001) for time-dependent fields by solving a linear interpolation of the velocity field both in time and in space over each grid box. This is in contrast to the time schemes such as simple Euler forward or more advanced fourth order Runge–Kutta methods (Butcher 2008; Fabbroni 2009) where the trajectories are integrated forward in time with as short time steps as possible.

A consequence of solving the trajectory paths analytically over a certain time is that the solutions are unique and can be integrated forward in time and then backward in time and arriving exactly at the same position, which is not possible with the other trajectory methods. This makes it possible to trace origins of water or air masses as long as the subgrid parameterization is not activated.

The TRACMASS code has been further developed over the years and used in many studies of the global ocean (Döös and Coward 1997; Drijfhout et al. 2003; Döös et al. 2008) and regional ones for the Mediterranean and Baltic Seas (Döös et al. 2004; Jönsson et al. 2004; Engqvist et al. 2006; Soomere et al. 2011) as well as the large scale atmospheric circulation (Kjellsson and Döös 2012).

The code was originally written in Fortran 77 for the FRAM ocean model at the Institute of Oceanographic Sciences, Deacon Laboratory (IOSDL) in Wormley, UK in the early 1990s. The name TRACMASS comes from the EU project with the same name, where it served together with the similar trajectory code Ariane by Blanke and Raynaud (1997). The present code is written in Fortran 95 and can be driven by velocity fields from most GCMs based on finite differences. The TRACMASS code is continuously upgraded and adapted. The code can be downloaded from http://tracmass.org/. The user must be familiar, in order to be able to use the TRACMASS code, with (1) the equations of motion for the ocean-atmosphere circulation (described in Chaps. 2, 4 and 6), (2) the finite differences of these equations (Chap. 3), (3) the TRACMASS theory (the introduction to which is presented in this chapter), (4) Unix and (5) Fortran.

The Lagrangian trajectory approach has many similarities with the Eulerian tracer approach but at the same time many differences. The two approaches are often confused due to their similarities. They are both advected passively by the velocity fields of the GCM, which makes it possible to trace water/air masses or substances such as pollutants as they are carried with the ocean currents or winds. The tracer equation generally needs to be integrated ‘on-line’ with the GCM while the Lagrangian trajectories can be both ‘on-line’ and ‘off-line’. The ‘off-line’ calculation of Lagrangian trajectories is by far the most rapid way since one only needs to read the already simulated velocity fields in order to calculate the trajectories.

The tracer equation includes explicitly a diffusion term, which represents a parameterization of the unresolved subgrid scales. There is also a numerical reason to include this since GCMs generally need some diffusion and viscosity to remain numerically stable in order to dissipate energy or to eliminate numerical noise due to the truncation errors in the numerical schemes. The passive tracers also have a numerical diffusion due to the finite difference approximation error, which by itself often would be enough as diffusion. The tracer approach is therefore often too diffusive but has been improved with better numerical advection schemes during the last decade. The Lagrangian trajectories are passively advected with the currents or winds and the subgrid parameterization is included in the sense that the GCM has been integrated with viscosity and diffusion. An extra diffusion can, however, if desired, be added to the trajectories. Another advantage of the trajectories is that it is possible to follow particles from their release points to the end both forward and backwards, which is impossible with passive tracers that cannot be integrated backward in time due to the numerical and parameterized diffusion.

The present chapter will describe the basic theory for the TRACMASS trajectory calculations and is organized as follows. In Sect. 7.2 we present the basic equations for a rectangular grid, which is then extended in Sect. 7.3 to the more general case with non-rectangular grids and for atmospheric GCMs in Sect. 7.4. The TRACMASS analytical time dependent scheme based on de Vries and Döös (2001) is presented in Sect. 7.5 followed by the presentation of two simple sub-grid parameterizations in Sect. 7.6 and how the mass conservation in TRACMASS enables analysis of the water/air mass transports in Sect. 7.7. In Sect. 7.8, we summarize and discuss the TRACMASS approach and its possible improvements in the future.

## 7.2 Trajectory Solution for Rectangular Grids

This section is here only for pedagogical reasons, since it is only valid for rectangular Cartesian grids. The TRACMASS code is written in a more general way in order to enable TRACMASS to work with curvilinear grids, which are used by most GCMs, and will be presented in the next section.

*i*,

*j*,

*k*denote the discretized longitude, latitude and model level, respectively. The zonal velocity

*u*

_{ i,j,k }and meridional velocity

*v*

_{ i,j,k }are located differently in these two grids, while the vertical velocity

*w*

_{ i,j,k }is located in the middle at the top of the box in both grids (Figs. 7.2, 7.3a). Both these types of grids can be used in TRACMASS. The velocities in TRACMASS are set on a C-grid, which makes it straightforward when using a C-grid model. Although B-grid velocities just need to be projected on the C-grid by making a meridional average \(u^{C}_{i,j,k}=0.5(u^{B}_{i,j,k}+u^{B}_{i,j-1,k})\) of two zonal velocities and a zonal average \(v^{C}_{i,j,k}=0.5(v^{B}_{i,j,k}+v^{B}_{i-1,j,k})\) of two meridional velocities for each grid box.

*x*-direction one obtains

*u*=

*dx*/

*dt*. The approximation in Eq. (7.1) can now be written in terms of the following differential equation:

*β*≡(

*u*

_{ i−1,j,k }−

*u*

_{ i,j,k })/Δ

*x*and

*δ*≡−

*u*

_{ i−1,j,k }−

*βx*

_{ i−1}. Using the initial condition

*x*(

*t*

_{0})=

*x*

_{0}, the zonal displacement of the trajectory inside the considered grid box can be solved analytically and is given by

*t*

_{1}when the trajectory reaches a zonal wall can be determined explicitly:

*x*

_{1}=

*x*(

*t*

_{1}) is given by either

*x*

_{ i−1}or

*x*

_{ i }. For a trajectory reaching the wall

*x*=

*x*

_{ i }, for instance, the velocity

*u*

_{ i }must necessarily be positive, so in order for Eq. (7.4) to have a solution, the velocity

*u*

_{ i−1}must then be positive also. If this is not the case, then the trajectory either reaches the other wall at

*x*

_{ i−1}or the signs of the transports are such that there is a zero zonal transport somewhere inside the grid box that is reached exponentially slow. For the meridional and vertical directions, similar calculations of

*t*

_{1}are performed determining the meridional and vertical displacements of the trajectory, respectively, inside the considered grid box. The smallest transit time

*t*

_{1}−

*t*

_{0}and the corresponding

*x*

_{1}denote at which wall of the grid box the trajectory will exit and move into the adjacent one. The exact displacements in the other two directions are then computed using the smallest

*t*

_{1}in the corresponding Eq. (7.3). The resulting trajectory through the grid box is illustrated by Figs. 7.2 and 7.3a.

Note that a consequence of solving the trajectories analytically with Eq. (7.3) is that the solution is unique. The trajectory can hence be integrated forward in time and then backward in time and arriving back exactly in the same point where it started.

## 7.3 Scheme for Volume or Mass Transports and Non-rectangular Grids

*x*

_{ i,j }) and the latitudinal (Δ

*y*

_{ i,j }) grid lengths will hence be a function of their horizontal positions

*i*,

*j*on a curvilinear grid. The depth level thickness Δ

*z*

_{ k }will similarly vary but with layer level

*k*.

*U*

_{ i,j,k }through the eastern wall of the

*i*,

*j*,

*k*grid box is given by

*r*=

*x*/Δ

*x*, and the linear interpolation of the velocity (Eq. (7.1)) is replaced by

*U*=

*dr*/

*ds*, where the scaled time variable is

*s*≡

*t*/(Δ

*x*

_{ i,j }Δ

*y*

_{ i,j }Δ

*z*

_{ k }), the denominator being the volume of the particular grid box. The differential equation (7.2) is replaced by

*β*≡

*U*

_{ i−1,j,k }−

*U*

_{ i,j,k }and

*δ*≡−

*U*

_{ i−1,j,k }−

*βr*

_{ i−1}. Using the initial condition

*r*(

*s*

_{0})=

*r*

_{0}, the zonal displacement of the trajectory is now given by

*s*

_{1}becomes

*r*

_{1}=

*r*(

*s*

_{1}) is given by either

*r*

_{ i−1}or

*r*

_{ i }. With the use of Eq. (7.5), the logarithmic factor can be expressed as log[

*U*(

*r*

_{1})/

*U*(

*r*

_{0})].

For a trajectory reaching the wall *r*=*r* _{ i }, for instance, the transport *U*(*r* _{1}) must necessarily be positive, so in order for Eq. (7.9) to have a solution, the transport *U*(*r* _{0}) must then be positive also. If this is not the case, then the trajectory either reaches the other wall at *r* _{ i−1} or the signs of the transports are such that there is a zero zonal transport somewhere inside the grid box that is reached exponentially slow. The calculations of *s* _{1} are performed determining the zonal, meridional and vertical displacements of the trajectory, respectively, inside the considered grid box. The smallest transit time *s* _{1}−*s* _{0} and the corresponding *r* _{1} denote at which wall of the grid box the trajectory will exit and move into the adjacent one. The exact displacements in the other two directions are then computed using the smallest *s* _{1} in the corresponding Eq. (7.8).

The scheme is mass conserving since it deals with the transport across the grid walls just as in the GCM and the transport is only linearly interpolated between two opposite walls in a grid box.

The trajectories will hence never cross a grid wall.

*W*

_{ i,j,0}=0. Since the trajectory solutions are exact and the continuity equation is respected the TRACMASS trajectories will therefore never hit any solid boundary such as the coast or the sea floor. This feature should be taken into account when the TRACMASS model is used for calculations of the transport of tracers or pollution to the coast. As described in Chap. 9, the virtual coastline should be set to a certain distance from the model coastline.

The depth level thickness Δ*z* in the above derivations depends only on the depth level *k*. TRACMASS can, however, be integrated, with other GCM vertical coordinates that may depend on something more than just the depth level. Options of vertical coordinates for TRACMASS hence exist for (1) depth level models, (2) sigma-coordinate models, where the thickness depends on the total depth, which varies in each horizontal grid point, (3) *z*-star coordinates, where the layer thickness depends on sea surface elevation, (4) isopycnal models, where Δ*z* is the density layer thickness, which was implemented in TRACMASS by Marsh and Megann (2002) and (5) hybrid vertical coordinates for atmospheric GCMs, which will be presented in the next section. See Chap. 3 for a discussion of some properties of such models.

## 7.4 Scheme for Atmospheric Hybrid Vertical Coordinates

The atmospheric version of TRACMASS uses conservation of mass instead of volume. Most atmospheric GCMs today use terrain-following vertical coordinates. Following Simmons and Burridge (1981) the atmosphere is divided into *N* _{ LEV } layers, which are defined by the pressures at the interfaces between them and these pressures are given by *p* _{ k+1/2}=*A* _{ k+1/2}+*B* _{ k+1/2} *p* _{ S } for *k*=0,1,…,*N* _{ LEV }, with *k*=0 at the top of the atmosphere and *k*=*N* _{ LEV } at the Earth’s surface. The *A* _{ k+1/2} and *B* _{ k+1/2} are constants, whose values effectively define the vertical coordinate and *p* _{ S } is the surface pressure. The dependent variables, which are the zonal wind *u*, the meridional wind *v*, the temperature *T* and the specific humidity *q* are defined in the middle of the layers, where the pressure is defined by \(p_{k} = \frac{1}{2} (p_{k-1/2} + p_{k+1/2})\), for *k*=1,2,…,*N* _{ LEV }. The vertical coordinate is *η*=*η*(*p*,*p* _{ S }) and has the boundary value *η*(0,*p* _{ S })=0 at the top of the atmosphere and *η*(*p* _{ S },*p* _{ S })=1 at the Earth’s surface.

*p*

_{ k }=Δ

*A*

_{ k }+Δ

*B*

_{ k }

*p*

_{ Si,j,k }, Δ

*A*

_{ k }=

*A*

_{ k+1/2}−

*A*

_{ k−1/2}and Δ

*B*

_{ k }=

*B*

_{ k+1/2}−

*B*

_{ k−1/2}. Note that with hybrid coordinates, the pressure at model layer interfaces

*p*

_{ i,j,k }varies in both space and time as surface pressure varies.

*W*as a vertical flux, can be calculated using the continuity equation from Simmons and Burridge (1981) as done in Kjellsson and Döös (2012):

*x*

_{ j }Δ

*y*:

*∂p*

_{ k }/

*∂t*=

*∂*(

*B*

_{ k }

*p*

_{ s })/

*∂t*.

The mass conservation of a grid box is illustrated in Fig. 7.3b. The integration over the model levels is done from the top down, with the assumption *W* _{ i,j,0}=0. This may lead to \(W_{i,j,N_{\mathit{LEV}}} \neq0\), if the fields are not perfectly mass-conserving, which is the case for reanalysis data (see Berrisford et al. 2011 for a study on ERA-Interim) as used by Kjellsson and Döös (2012). In such a case, the vertical flux at the surface must be explicitly set to zero.

*s*≡

*gt*/(Δ

*x*

_{ i,j }Δ

*y*

_{ i,j }Δ

*p*

_{ k }). The atmospheric TRACMASS code has been used to study the atmospheric Hadley and Ferrel cells as well as the inter-hemispheric air mass exchange (Kjellsson and Döös 2012). Figure 7.5 shows an example of atmospheric TRACMASS trajectories calculated with winds from the ERA-Interim reanalysis from the European Centre for Medium-Range Weather Forecasts (ECMWF).

## 7.5 Time Integration

The trajectory schemes in the previous sections with the differential Eqs. (7.2) and (7.7) are only valid for stationary velocity fields. We will now present two possible ways to incorporate the temporal variability of the velocity and surface elevation fields in the TRACMASS trajectory calculations. One (called time-stepping) method is based on previous sections and one is more advanced, where the differential equation is extended in time and solved analytically in both space and time.

Note that nearly all GCMs today have some sort of free surface, which will make the level thickness Δ*z* also dependent of time and will hence affect the mass transport across the grid walls. It is therefore necessary to have both the velocity and the surface elevation fields in order to compute the trajectories with TRACMASS.

### 7.5.1 Time-Stepping Method

The time-stepping method consists of assuming that the velocity and surface elevation fields are in steady state during a limited time interval. The fields are then updated successively as new fields are available. If this is made ‘on-line’, i.e., in the same time as the GCM is integrated, then this time interval will simply be the same as the time step the GCM is integrated with, which is typically of the order of minutes in a global GCM. If instead the trajectories are calculated ‘off-line’ it will be at least as often as the fields have been stored by the GCM.

*t*

_{ G }and the shorter time interval at which the fields are interpolated is Δ

*t*

_{ i }as illustrated by Fig. 7.6. The number of intermediate time steps is hence the ratio

*I*

_{ S }=Δ

*t*

_{ G }/Δ

*t*

_{ i }.

### 7.5.2 Analytical Time Integration

In the present section, we will present a time dependent scheme, which was introduced in TRACMASS by de Vries and Döös (2001) that is solved analytically in time over Δ*t* _{ G } between two GCM time steps.

**V**

_{ n }for each model point, where

*n*represents a discretized time, a bi-linear interpolation of transport in space as well as in time leads to

*i*signifies either a longitudinal, meridional, or vertical direction. The transport is

*F*=(

*U*,

*V*,

*W*) and as before

*r*=(

*x*/Δ

*x*,

*y*/Δ

*y*,

*z*/Δ

*z*),

*s*≡

*t*/(Δ

*x*Δ

*y*Δ

*z*), where the denominator is the volume of the particular grid box and Δ

*s*is the scaled time step between two data sets:

*t*

_{ G }is the time step between two data sets in true time dimension (seconds).

*F*=

*dr*/

*ds*, we get the differential equation

Differently shaped analytical solutions exist for the three cases: *α*>0, *α*<0 and *α*=0, which together cover all possible values of *α*. Note that inside the grid box, the acceleration *d* ^{2} *r*/*ds* ^{2}=−*αr*−*γ* consists of a constant and a linear *r*-dependent term proportional to *α*. For *α*>0, the latter term implies a varying deceleration across the grid box.

*α*>0, we define the time-like variable \(\xi= (\beta+ \alpha s)/\sqrt{2 \alpha}\) and get

*r*(

*s*

_{0})=

*r*

_{0}. If

*α*<0,

*ξ*becomes imaginary. By defining \(\zeta\equiv i \xi= (\beta+ \alpha s)/\sqrt{-2 \alpha}\), Eq. (7.25) can be re-expressed as

*α*=0 will occur occasionally in practice. The corresponding solution of Eq. (7.20) is

*s*

_{1}−

*s*

_{0}cannot in general be obtained explicitly. Using the solutions (7.25)–(7.28), the relevant root

*s*

_{1}of

*s*

_{1}and the corresponding exiting wall

*r*

_{1}can be determined. The displacement of the trajectory inside the considered grid box then proceeds as discussed previously for stationary velocity fields.

*s*

_{1}of Eq. (7.29) and the corresponding

*r*

_{1}needed to compute trajectories inside a grid box. In the following,

*s*

_{ n−1}⩽

*s*

_{0}<

*s*

_{ n }and the relevant roots

*s*

_{1}are to obey

*s*

_{0}<

*s*

_{1}⩽

*s*

_{ n }. We also focus on the cases

*α*>0 and

*α*<0, since the considerations below can easily be adapted for

*α*=0. For numerical purposes, we use

*r*

_{ i−1}or

*r*

_{ i }wall represents land, the transport

*F*

_{ i }or

*F*

_{ i−1}being zero for all

*n*, respectively. In these instances, the opposite wall fixes

*r*

_{1}, and the root

*s*

_{1}>

*s*

_{0}can then be computed analytically. If there is no solution, we take

*s*

_{1}=

*s*

_{ n }. When all three transit times equal

*s*

_{ n }, the trajectory will not move into an adjacent grid box but will remain inside the original one. Its new position is subsequently computed, and the next time interval is considered.

*βγ*−

*αδ*)/

*α*≠0, the computation of the roots of Eq. (7.29) can only be done numerically. This is also true for locating the extrema of the solutions (7.25) and (7.27). Alternatively, one can consider

*F*(

*r*,

*s*)=0 using Eq. (7.18) to analyse where possible extrema are located. It follows that in the (

*s*–

*r*)-plane, extrema lie on a hyperbola of the form

*r*=(

*as*+

*b*)/(

*c*+

*ds*). Of course, only the parts defined by

*s*

_{ n−1}≤

*s*≤

*s*

_{ n }and

*r*

_{ i−1}≤

*r*≤

*r*

_{ i }are relevant. Depending on which parts of the hyperbola, if any, lie in this ‘box’ and on the initial condition

*r*(

*s*

_{0})=

*r*

_{0}, the trajectory

*r*(

*s*) exhibits none, one, or at most two extrema. In the latter case, the trajectory will not cross either the wall at

*r*

_{ i−1}or the one at

*r*

_{ i }(see Fig. 7.7 for an example). Hence, those trajectories

*r*(

*s*) determining the transit time

*s*

_{1}−

*s*

_{0}will have at most one extremum, that is, there is at most one change of sign in the local transport

*F*.

*r*

_{ i }. For a trajectory to reach this wall, the local transport must be nonnegative, which depends on the signs of the transport

*F*

_{ i−1,n }and

*F*

_{ i,n }. Four distinct configurations may arise:

- 1.
*F*(*r*_{ i },*s*)>0 for*s*_{ n−1}<*s*<*s*_{ n }. - 2.
Sign of

*F*(*r*_{ i },*s*) changes from positive to negative at \(s = \tilde{s} < s_{n}\). - 3.
Sign of

*F*(*r*_{ i },*s*) changes from negative to positive at \(s = \hat{s} < s_{n}\). - 4.
*F*(*r*_{ i },*s*)<0 for*s*_{ n−1}<*s*<*s*_{ n }.

*r*(

*s*

_{ n }) using the appropriate analytical solution. If

*r*(

*s*

_{ n })≥

*r*

_{ i }, the trajectory has crossed the grid-box wall for

*s*

_{1}≤

*s*

_{ n }. If the initial transport

*F*(

*r*

_{0},

*s*

_{0})<0, the trajectory may have crossed the opposite wall at an earlier time. The latter is only possible if case 3 applies for the wall at

*r*

_{ i−1}and \(\hat{s} > 0\), in which case one checks whether \(r(\hat{s}) \leq r_{i-1}\). If this is not so, then there is a solution to

*r*(

*s*

_{1})−

*r*

_{1}=0 for

*r*

_{1}=

*r*

_{ i }and

*s*

_{0}<

*s*

_{1}≤

*s*

_{ n }. Subsequently, this root can be simply calculated numerically using a root-solving algorithm. But if

*r*(

*s*

_{ n })<

*r*

_{ i }or, if applicable, \(r(\hat{s} ) \leq r_{i-1}\), we continue with considering the other wall. The arguments for the wall at

*r*

_{ i−1}are similar to those relating to

*r*. If case 2 applies and \(s_{0} < \tilde{s}\), we follow the considerations given for case 1 using \(\tilde{s}\) instead of

*s*

_{ n }. If there is a root for

*r*

_{1}=

*r*

_{ i }, then \(s_{0} < s_{1} \leq\hat{s}\). For case 3, we follow the considerations given for case 1. If there is a root for

*r*

_{1}=

*r*

_{ i }, then \(\hat{s} < s_{1} \leq s_{n}\). For case 4, no solution of Eq. (7.29) is possible for

*r*

_{1}=

*r*

_{ i }. We must then turn attention to the other wall instead. All these considerations are applied to each direction.

### 7.5.3 Evaluation of the Two Time Integration Methods

The two possible time schemes by which TRACMASS can be integrated in time, which have been presented above, will here be evaluated by testing them on inertial oscillations. Exact analytical solutions of the trajectories for inertial oscillations can be found as well as the corresponding velocity fields. The experiment was originally set up by Fabbroni (2009) to test four different trajectory algorithms. One of these algorithms was Ariane (Blanke and Raynaud 1997), which is based on the same equations as the version of TRACMASS that uses the time-stepping method. The three other trajectory algorithms were based on Euler forward and Runge–Kutta schemes. The trajectories, simulated by Ariane, deviated clearly from the analytical solution and the other trajectory schemes. It was thus concluded that Ariane was not as accurate as the other schemes.

*u*

_{ g }and with a decreasing oscillation radius depending on the linear friction coefficient

*γ*. The solutions for the velocities are

*u*

_{0}=0.3 m/s,

*u*

_{ g }=0.04 m/s and a damping time of

*t*

_{ d }=1/

*γ*=2.89 days and

*t*

_{ g }=1/

*γ*

_{ g }=28.9 days. The latitude was set to be 45

^{∘}N. The velocities are read into TRACMASS every hour (Δ

*t*

_{ G }=1 hour) to mimic a GCM that stores the data once an hour. This in contrast to Fabbroni (2009) who read in the velocities as often as every 3 minutes, which is unrealistically high to be run off-line with.

We do not know why we obtain clearly different and better results using TRACMASS here compared to what (Fabbroni 2009) got with Ariane, since both codes, we believe, should be based on the same method. A model bug on some level in the Fabbroni (2009) experiment is one possible explanation unless Ariane is not as similar to TRACMASS as we have supposed.

## 7.6 Subgrid Turbulence Parameterizations

The trajectory solutions in the previous sections only include the implicit large scale diffusion due to along-trajectory changes of temperature and salinity/humidity, and by the GCM’s parameterization of turbulent mixing in the momentum equations. These trajectories do not, however, explicitly represent subgrid scale turbulence.

There are two ways to incorporate a representation of subgrid-scale turbulence in TRACMASS. One where an additional random velocity is added called the ‘turbulence parameterization’ and one that adds a random displacement to the trajectory position, which is named ‘diffusion’. These two subgrid turbulence parameterizations will be presented here.

### 7.6.1 Turbulence Parameterization

*u*′,

*v*′ to the GCM-simulated velocity fields

*U*,

*V*. These fluctuations are expected to somehow model the deviations of the trajectories from the exact ones owing to the impact of subgrid turbulence, which is illustrated by Fig. 7.9. These are the instantaneous GCM velocities

*U*,

*V*, which are updated with the GCM output time step and from which the trajectories are calculated when no subgrid parameterization is added.

The turbulent velocities *u*′,*v*′ are added to each horizontal grid-cell wall for each trajectory calculation and changed at every trajectory time step Δ*t*. The trajectories are hence calculated with the TRACMASS code as it is, but with a velocity field, *u*=*U*+*u*′, that is somewhat shaken, resulting in a stirring of the trajectory particles.

The amplitude of the random turbulent velocity is proportional to the velocity of the circulation model velocity *U* so that *u*′=*RU*. Here *R* is a random number uniformly distributed between −*a* and *a*, with standard deviation equal to \(\sqrt{3} a\). This amplitude was set to the constant *a*=1 in Döös and Engqvist (2007), but has here been tuned to obtain a relative dispersion similar to that of the surface drifters. The amplitude was furthermore adapted in Döös et al. (2011) so that the trajectory time step Δ*t* in the TRACMASS code did not affect the results. This was obtained by setting *a*=*κ*/(Δ*t*)^{1/3}. The best fit for an amplitude of the relative dispersion similar to that of the surface drifters was obtained for *κ*=160. Using this scheme in practice we add a random noise with a standard deviation on the order of \(\sqrt{3} a \sigma_{u}\), where *σ* _{ u } is the Lagrangian standard deviation of the unperturbed velocity field.

### 7.6.2 Diffusion

*A*

_{ H }is the horizontal eddy viscosity coefficient. Equation (7.37) is equivalent (see, e.g., Rupolo 2007) to the zeroth-order Markov process:

*w*is a Wiener process with a zero mean and a second order moment 〈

*dw*⋅

*dw*〉=2

*dt*. The corresponding Gaussian distribution is

*t*. The added random walk for the particles is given by

*A*

_{ H }and

*A*

_{ v }are the horizontal and vertical eddy viscosity coefficients and

*q*

_{ n }are random numbers between 0 and 1. The added displacement in the horizontal and vertical planes will hence be respectively

This implies that about 70 % of the particles will be within this distance from their original positions and that the new velocity field will be characterized by an extra standard horizontal deviation on the order of (*A* _{ H }/*dt*)^{1/2}, where *dt* is the Lagrangian integration time step.

It is important to distinguish between this subgrid parameterization of the horizontal and vertical mixing of the Lagrangian trajectories and that of the GCM itself. The velocity fields are generally simulated by the GCM with some sort of Laplacian diffusion. The mixing is hence included in a trajectory as it progresses and changes its tracer properties by contact with its surroundings (Koch-Larrouy et al. 2008). On the one hand one could therefore argue that adding a component to this velocity field would be redundant since the mixing has already been included in the GCM. These trajectories in themselves do not, however, explicitly represent subgrid-scale turbulent motion since they are passively advected by the model-simulated currents with no subgrid scales apart from the linear interpolations of the velocities between the grid points. On the other hand, Lagrangian trajectories are the equivalent of integrating Eq. (7.37) with no effects of velocity scales under the grid scale, which clearly must exist in the real ocean. Furthermore when Eq. (7.37) is discretized and integrated in an OGCM for the tracers it will also include the numerical diffusion, which is not the case for our trajectories since they are exact analytical solutions to the velocity fields in TRACMASS. It is however important to note that we can only evaluate or validate the OGCM itself when we do not add any subgrid parameterization to the model trajectories.

### 7.6.3 Subgrid Parameterization Questions

Döös et al. (2011) compared the relative dispersion of 5854 pairs of surface drifters with that of simulated TRACMASS trajectories. The coefficients were tuned in order to match the magnitude of the relative dispersion of the surface drifters after 32 days. The ‘diffusion’ parameterization, which adds a stochastic term to the trajectory in accordance with Eq. (7.38), attains realistic relative dispersion rates for *A* _{ H }=2500 m^{2}/s. By calibrating the amplitude of the extra horizontal turbulent velocities *u*′,*v*′ (cf. Appendix B of Döös et al. 2011), also the turbulence parameterization reaches realistic values. The absolute dispersion is not much affected when the diffusion parameterization is added, but gives far too high values for the ‘turbulence’ subgrid parameterization. The modelled trajectories with added diffusion/turbulence also manifest values of the residual velocities which are similar to real data, but with decidedly smaller values of the Lagrangian correlation time. In other words, realistic particle separation rates are obtained using a large diffusivity value, but at the cost of totally changing correlation properties and energy partitioning in the frequency domain.

A more realistic representation of the unresolved scales would require a higher order subgrid parameterization. Griffa (1996) showed that a random walk does not describe the turbulent dispersion behaviour of ocean tracers and that a better quantitative agreement can be reached using an Ornstein–Uhlenbeck process. This work has been refined by Pasquero et al. (2001) who observed that the Ornstein–Uhlenbeck model assumes Gaussian velocity distributions, while the ocean displays exponential-like tails associated with the mesoscale dynamics (Bracco et al. 2000a). Those tails are common to 2D turbulent flows (Bracco et al. 2000b) and to Lagrangian trajectories in an oceanic eddy-resolving model (Bracco et al. 2003). Based on these similarities Pasquero et al. (2001) built a family of two-process stochastic models that provided a better parameterization of turbulent dispersion in rotating barotropic flows.

Berloff and McWilliams (2002) and Berloff et al. (2002) also explored in detail the issue of (horizontal) stochastic parameterizations for oceanic flows, suggesting an alternative model to the one of Pasquero et al. (2001). It is therefore to be expected that the zeroth-order Markov process used in the present study will not provide a good representation of the surface drifters. The relative dispersion rates can hence only be tuned to match the total value at a particular moment. The shape of the power spectrum of the modelled velocity without parameterizations is therefore more realistic in its shape even if too weak.

## 7.7 Mass Transport and Lagrangian Stream Functions

*n*, is associated with a volume transport

*T*

_{ n }given by the velocity, initial area, and number of trajectories released (Fig. 7.12). During transit from the initial to the final section the volume transport remains unchanged; the transport/velocity field is thus non-divergent, permitting representation in terms of stream functions. The volume transport linked to each trajectory is inversely proportional to the number of trajectories released,

*viz*the Lagrangian resolution (which should be sufficiently high to ensure that the stream function does not change when the number of trajectories is further increased).

*i*), meridional (

*j*), and vertical (

*k*) directions, respectively.

The indices *i*,*j*,*k* do not have to be the horizontal or vertical discretization of the model grid. They can also be replaced by, e.g., temperature, salinity, density, specific humidity, geopotential height or pressure.

## 7.8 Conclusion and Discussion

In this chapter we have presented the theory behind the trajectory model TRACMASS by summarizing many articles, which have introduced new options and improved TRACMASS. There are, however, still things that would be desirable to improve or add. The TRACMASS subgrid parameterizations, which were introduced in Levine (2005), Döös and Engqvist (2007), Döös et al. (2011) will need to be ameliorated with a higher order Markov model (see, e.g., Rupolo 2007).

It would also be desirable to evaluate the precision of the different TRACMASS schemes in more detail and compare them with other trajectory schemes such as the Runge–Kutta scheme. Fabbroni (2009) compared Ariane (Blanke and Raynaud 1997), which is based on the same equations as the time step version of TRACMASS with other trajectory schemes. The trajectories, simulated by Ariane, deviated clearly from the analytical solution and the other trajectory schemes in her study and Ariane was concluded not to be as accurate as the other schemes. In the present study we repeated the Fabbroni (2009) test of inertial oscillations, with exact analytical solutions. We found in contrast to her test that the TRACMASS scheme gave nearly exactly the same results as the analytical solution. The TRACMASS time-stepping method, which is comparable to the Ariane method, requires, however, that one uses sufficiently intermediate velocity time steps between the GCM time steps. The TRACMASS time-stepping method, when using 1000 intermediate time steps, gave almost exactly the same precision as the TRACMASS the method of analytical time integration. From these tests, we would like to argue that the TRACMASS schemes give at least as accurate trajectories as any other scheme and it is hard to argue that it would be of any use to have even more accurate schemes for geophysical fluid applications given all the missing physics and scales in a GCM. A more detailed and quantitive study would, however, be necessary to measure this.

One of the major advantages of TRACMASS is that it is mass conserving and now can calculate all sorts of mass transports between different sections in the ocean or the atmosphere as well as Lagrangian stream functions for chosen water/air masses. This can be particularly useful when performing analysis of, e.g., the inter-ocean exchange of water masses or the large scale atmospheric circulation. TRACMASS has also turned out to be very useful in completely different applications such as studies of genetic connectivity, dispersion of radionuclides or identification of transport patterns in the surface layer as in the present book. The number of possible TRACMASS applications will certainly continue to grow in the future as long as GCMs are based on finite differences.

## Notes

### Acknowledgements

The authors wish to thank Tarmo Soomere and Ewald Quak for constructive comments. This work was originally motivated by the BONUS+ project *BalticWay* that was supported by the funding from the European Community’s Seventh Framework Programme (FP7 2007–2013) under grant agreement No. 217246 made with the joint Baltic Sea research and development programme BONUS+ and by the Swedish Research Council for Environment, Agricultural Sciences and Spatial Planning (Formas, Ref. No. 2008–1900).

## References

- Berloff P, McWilliams J (2002) Material transport in oceanic gyres. Part II: Hierarchy of stochastic models. J Phys Oceanogr 32:797–830 CrossRefGoogle Scholar
- Berloff P, McWilliams J, Bracco A (2002) Material transport in oceanic gyres. Part I: Phenomenology. J Phys Oceanogr 32:764–796 CrossRefGoogle Scholar
- Berrisford P, Kållberg P, Kobayashi S, Dee D, Uppala S, Simmons AJ, Poli P, Sato H (2011) Atmospheric conservation properties in ERA-Interim. Q J R Meteorol Soc 137:1381–1399 CrossRefGoogle Scholar
- Blanke B, Raynaud S (1997) Kinematics of the Pacific Equatorial Undercurrent: a Eulerian and Lagrangian approach from GCM results. J Phys Oceanogr 27:1038–1053 CrossRefGoogle Scholar
- Blanke B, Arhan M, Madec G, Roche S (1999) Warm water paths in the equatorial Atlantic as diagnosed with a general circulation model. J Phys Oceanogr 29:2753–2768 CrossRefGoogle Scholar
- Bracco A, LaCasce J, Provenzale A (2000a) Velocity probability density functions for oceanic floats. J Phys Oceanogr 30:461–474 CrossRefGoogle Scholar
- Bracco A, LaCasce J, Pasquero C, Provenzale A (2000b) The velocity distribution in barotropic turbulence. Phys Fluids 12:2478–2488 CrossRefGoogle Scholar
- Bracco A, Chassignet EP, Garraffo Z, Provenzale A (2003) Lagrangian velocity distributions in a high resolution numerical simulation of the North Atlantic. J Atmos Ocean Technol 8:1212–1220 CrossRefGoogle Scholar
- Butcher JC (2008) Numerical methods for ordinary differential equations, 2nd edn. Wiley, New York zbMATHCrossRefGoogle Scholar
- de Vries P, Döös K (2001) Calculating Lagrangian trajectories using time-dependent velocity fields. J Atmos Ocean Technol 18:1092–1101 CrossRefGoogle Scholar
- Döös K (1995) Inter-ocean exchange of water masses. J Geophys Res—Oceans 100:13,499–13,514 Google Scholar
- Döös K, Coward AC (1997) The Southern Ocean as the major upwelling zone of the North Atlantic Deep Water, pp 3–17. WOCE Newsletter, No 27, July 1997 Google Scholar
- Döös K, Engqvist A (2007) Assessment of water exchange between a discharge region and the open sea—a comparison of different methodological concepts. Estuar Coast Shelf Sci 74:585–597 CrossRefGoogle Scholar
- Döös K, Meier HEM, Döscher R (2004) The Baltic haline conveyor belt or the overturning circulation and mixing in the Baltic. Ambio 33:261–266 Google Scholar
- Döös K, Nycander J, Coward AC (2008) Lagrangian decomposition of the Deacon Cell. J Geophys Res—Oceans 113:C07028 CrossRefGoogle Scholar
- Döös K, Rupolo V, Brodeau L (2011) Dispersion of surface drifters and model-simulated trajectories. Ocean Model 39:301–310 CrossRefGoogle Scholar
- Drijfhout S, de Vries P, Döös K, Coward A (2003) Impact of eddy-induced transport of the Lagrangian structure of the upper branch of the thermohaline circulation. J Phys Oceanogr 33:2141–2155 CrossRefGoogle Scholar
- Engqvist A, Döös K, Andrejev O (2006) Modeling water exchange and contaminant transport through a Baltic coastal region. Ambio 35:435–447 CrossRefGoogle Scholar
- Fabbroni N (2009) Numerical simulations of passive tracers dispersion in the sea. Alma Mater Studiorum—Universita di Bologna, PhD Thesis, 164 pp Google Scholar
- Griffa A (1996) Applications of stochastic particle models to oceanographic problems. In: Adler RJ, Müller P, Rozovoskii BL (eds) Stochastic modelling in physical oceanography. Birkhäuser, Basel, pp 114–140 Google Scholar
- Jönsson B, Lundberg P, Döös K (2004) Baltic sub-basin turnover times examined using the Rossby Centre Ocean model. Ambio 33:2257–2260 Google Scholar
- Kjellsson J, Döös K (2012) Lagrangian decomposition of the Hadley and Ferrel Cells. Geophys Res Lett 39:L15807 CrossRefGoogle Scholar
- Koch-Larrouy A, Madec G, Blanke B, Molcard R (2008) Water mass transformation along the Indonesian throughflow in an OGCM. Ocean Dyn 58:289–309 CrossRefGoogle Scholar
- Levine RC (2005) Changes in shelf waters due to air-sea fluxes and their influence on the Arctic Ocean circulation as simulated in the OCCAM global ocean model. University of Southampton, Faculty of Engineering Science and Mathematics, School of Ocean and Earth Science, PhD Thesis, 225 pp Google Scholar
- Marsh R, Megann AP (2002) Tracing water masses with particle trajectories in an isopycnic-coordinate model of the global ocean. Ocean Model 4:27–53 CrossRefGoogle Scholar
- Mesinger F, Arakawa A (1976) Numerical methods used in atmospheric models. GARP publications series 17, vol I. WMO, Geneva, 64 pp Google Scholar
- Pasquero C, Provenzale A, Babiano A (2001) Parameterization of dispersion in two-dimensional turbulence. J Fluid Mech 439:279–303 zbMATHCrossRefGoogle Scholar
- Rupolo V (2007) Observing turbulence regimes and Lagrangian dispersal properties in the ocean. In: Griffa A, Kirwan AD, Mariano AJ, Özgökmen TM, Rossby T (eds) Lagrangian analysis and prediction of coastal and ocean dynamics (LAPCOD). Cambridge University Press, Cambridge, pp 423–479 Google Scholar
- Simmons AJ, Burridge DM (1981) An energy and angular-momentum conserving vertical finite-difference scheme and hybrid vertical coordinates. Mon Weather Rev 109:758–766 CrossRefGoogle Scholar
- Soomere T, Delpeche N, Viikmäe B, Quak E, Meier HEM, Döös K (2011) Patterns of current-induced transport in the surface layer of the Gulf of Finland. Boreal Environ Res 16(Suppl A):49–63 Google Scholar