# 1. The Aronnax Model¶

Aronnax is a highly idealised model for simulating large-scale (100-1000km) flows in the ocean. Aronnax is intended for theoretical and empirical oceanographers, as a (relatively) fast and easy-to-use simulation model, bridging the gap between pencil-and-paper on one hand, and more faithful (and complex) computational models on the other. The numerical core is written in Fortran to improve performance, and wrapped in Python to improve usability. The model domain can be closed at the edges, or may bhorizontally periodic in one or two dimensions, and may include arbitrary bathymetry. This flexibility makes Aronnax a useful tool for theoretical physical oceanographers.

## 1.1. The Physics¶

Aronnax can run in two different modes:

- n + 1/2 layer mode, in which the bottom layer is quiescent and infinitely deep
- n layer mode, in which the bottom topography is specified and all layers have finite thickness

### 1.1.1. n + 1/2 layer mode¶

The n + 1/2 layer mode is very cheap to run: Each time-step takes time linear in the number of grid points.

### 1.1.2. n layer mode¶

The n layer mode is more expensive, because the integration method is party implicit (to wit, solves a system of equations to ensure non-divergence of the barotropic flow). This tends to cost an extra factor of one grid side length in the run time, but admits a more realistic simulation, in that the effect of the ocean floor is included.

## 1.2. Governing Equations¶

The model solves the hydrostatic Boussinesq equations within a finite number of discrete isopycnal layers. At the layer interfaces there is a discrete jump in velocity and density, but not in pressure. The general forms of the equations are shown in Section 1.2.1 and Section 1.2.2, while a derivation of these equations for the 1.5 layer version of the model is shown in Section 1.2.3.

### 1.2.1. Continuity equation¶

in which \(h_{n}\) is the thickness of layer \(n\), and \(\mathbf{v_{n}}\) represents the vertically averaged horizontal velocity in layer \(n\).

### 1.2.2. Momentum equations¶

in which \(\mathbf{f}\) is the Coriolis parameter, and \(g'\) is the reduced gravity given by \({g(\rho_{n+1} - \rho_{n})}/{\rho_{0}}\), and \(\mathbf{F_{n}}/\rho_{0}\) represents the forcing and drag terms acting on layer \(n\), scaled by the (constant) background density \(\rho_{0}\). The reduced gravity is dynamically equivalent to gravity, but is scaled to take into account the density difference between the two layers. When Aronnax runs in \(n\)-layer mode there is an additional term on the left-hand side to account for the pressure gradient due to the surface given by \(g\mathbf{\nabla}\eta\), where \(g\) is gravity and \(\eta\) is the free surface elevation (or the surface pressure field if running with a rigid lid).

This can be rewritten in terms of the Bernoulli Potential to give,

where \(\boldsymbol{\zeta_{n}}\) is the relative vorticity in layer \(n\), \(\Pi_{n}\) is the Bernoulli potential in layer \(n\) defined as \(\left(\mathbf{v_{n}}\cdot\mathbf{v_{n}}\right)/2 + p/\rho_{0}\) in which \(p\) is the hydrostatic pressure, and \(\kappa\) is the viscosity. In this form the non-linearity from the material derivative has been moved into the Bernoulli Potential and the vorticity term.

The model can be used in either reduced gravity mode, with a quiescent abyss, or in n-layer mode with bathymetry. In the n-layer case the model can either be run with a rigid lid, or with a free surface. In n-layer simulations the following equation is also solved

where \(\eta\) is the free surface height, \(H\) is the depth from the free-surface to the bathymetry, and \(V\) is the vertically averaged flow, the barotropic flow. With a rigid lid \(\eta\) represents the pressure field required to keep the vertically integrated horizontal flow divergence free - the result is not carried from one timestep to the next.

### 1.2.3. Reduced gravity equations¶

The most idealised version of Aronnax is a 1.5 layer or ‘reduced gravity’ model. Reduced gravity models are often referred to as 1.5 layer models because of the limited dynamics in the lowest layer. The bottom layer is assumed to have no motion, which is mathematically equivalent to an infinite thickness. Since there is no motion in the lowest layer, the model is unable to support vertically homogeneous, or barotropic, motions. This means that the gravest mode supported by the model is the first baroclinic mode. This version of Aronnax also features a rigid lid to remove surface gravity waves from the model solutions. This allows for longer time steps in the numerical solver. Reduced gravity models are often used to model the dynamics of the upper ocean, with the interface between the layers taken as an approximation for the oceanic thermocline. A schematic of a 1.5 layer model is shown in Figure 1.1.

The equations for a model with one active layer above a quiescient abyss will be derived here. Extending the derivation to a model with \(n\) active layers requires substantially more algebra but gives little additional insight.

If we take the conservation of mass and recast it as conservation of mass in a layer of thickness \(h\) we get

in which \(\mathbf{V}\) represents the vertically averaged horizontal velocity in the layer, and \(\rho h\) is the areal density. By expanding the material derivative, combining terms and assuming that \(\rho\) is constant within an isopycnal layer, () can be rewritten as

With a rigid lid the surface is maintained at a constant height of zero, but the pressure is unconstrained. If we let the pressure at the rigid lid be given by \(P(x,y,t)\), then the pressure in the upper layer at depth \(z\) is

where \(\rho_{1}\) is the density of the upper layer, \(z\) is the vertical coordinate which becomes more negative with depth. A defining feature of reduced gravity models is the absence of motion in the lowest layer. This means that the horizontal pressure gradients in layer 2 are identically zero, which we can use to solve for the interface displacement. The pressure in layer 2 is given by

where \(h\) is the thickness of the upper layer. Since a central assumption of the reduced gravity framework is that the horizontal gradients of \(P_{2}\) are zero we can now solve for the horizontal pressure gradient in the upper layer. Taking the gradient of equation () and setting the left-hand side to zero gives

which can be rearranged to give

which relates the horizontal pressure gradients in the upper layer to displacements of the interface. The momentum equation for the upper layer is therefore

in which \(g'\) is the reduced gravity given by \({g(\rho_{2} - \rho_{1})}/{\rho_{1}}\). The reduced gravity is dynamically equivalent to gravity, but is scaled to take into account the density difference between the two layers.

## 1.4. Numerical algorithm¶

The model solves for two horizontal velocity components and layer thickness in an arbitrary number of layers. The model supports two sets of physics: either a reduced gravity configuration in which the horizontal pressure gradient is set to zero in a quiescent abyss below the lowest active layer; or an n-layer configuration in which bathymetry must be specified.

Aronnax is discretised on an Arakawa C-grid, with the velocity and thickness variables in different locations on the grid cell.

The choice of quiescent abyss or n-layer physics is made by a runtime parameter in the input file. The numerical algorithm for calculating the values at the next time level, \(n+1\), is as follows:

- The Bernoulli Potential is calculated using values from time-level \(n\)

- The function used depends on whether the model is running in reduced gravity mode or n-layer mode
- The relative vorticity is calculated using values from time-level \(n\)
- The layer thickness tendencies are calculated using the velocities and layer thicknesses from time-level \(n\)
- the velocity tendencies are calculated using values from time-level \(n\)
- the layer thicknesses and velocities are stepped forward in time to \(n+1\) using a third-order Adams-Bashforth algorithm and the stored time derivatives from the previous two timesteps. N.B. for the n-layer version these velocities are not strictly at time \(n+1\), let’s call it time level \(n+*\).
- For the n-layer version:

- The no-normal flow boundary condition is applied (perhaps unnecessary?)
- The barotropic velocity required to keep the vertically integrated flow non-divergent in the horizontal is calculated and added to the baroclinic velocities calculated previously. To do this:

- the barotropic velocities are calculated from the velocities at time-level \(n+*\).
- the divergence of these velocities is used to solve for the free surface elevation at time-level \(n+1\) that makes the barotropic flow non-divergent

- This is the step that requires the linear system solve, since we solve the equation implicitly to sidestep the issue of requiring a
veryshort \(\delta t\).- the barotropic correction is applied to the velocity fields
- consistency between the sum of the layer thicknesses and the depth of the ocean is forced by applying a uniform inflation/deflation to the layers. (the model currently prints a warning if the discrepancy is larger than a configurable threshold, which defaults to 1%)
- The no normal flow and tangential (no-slip or free-slip) boundary conditions are applied
- The layer thicnkesses are forced to be larger than a configurable minimum. This is for numerical stability and is probably only necessary for the layer receiving the wind forcing. This is discussed in ticket #26
- the arrays are shuffled to prepare for the next timestep.

N.B. To get the Adams-Bashforth method going, two time steps are initially performed using Runge-Kutta 4th order time stepping.