## 1. Introduction

The purpose of this paper is to propose a new approach to the numerical modeling of oceanic flows, using three-dimensional finite elements. Finite-element methods offer great geometric flexibility and hence are often used to model flows in complex domains. This is due to the fact that, as opposed to the pointwise nature of finite-difference methods typically defined on topologically Cartesian grids, they generally represent solutions as piecewise polynomials. The piecewise polynomials are formed by allowing a polynomial representation of the numerical solution over so-called *elements.* These elements, which define a mesh, are nonempty convex polyhedra in nature and are used to give a proper partition (in that they form a nonoverlapping and total covering) of the physical domain, and such that the intersection of any two elements is either empty or contains common faces, edges, or vertices. The flexibility of finite-element methods now stems from the fact that they are equally well defined on both *structured* and *unstructured* meshes. A structured mesh is so-called since it possesses a uniform topological structure, for example, one that is topologically equivalent to a uniform Cartesian mesh, so that in two dimensions (2D) every internal grid point has four connected neighbors. In contrast an unstructured mesh has no such constraints, an internal mesh point, again in 2D, can have anything from three-upward connected neighbors. For simplicity, and as a first step to a more complete model, it has been decided to employ 3D static (i.e., nonadaptive) hexahedral meshes exclusively in this work, along with the assumption of a rigid lid. The use of adaptive tetrahedral meshes and free surface formulations shall be reserved for future publications.

The flexibility afforded by the use of unstructured meshes allows for an accurate representation of highly irregular coastlines and topography. Compare this, for example, with restrictions imposed by a curvilinear-structured mesh representation for coastlines, and a staircase representation of topography. Of equal and perhaps even more importance, an unstructured mesh may be adapted to the solution with far more ease and generality than a structured mesh, either dynamically or a priori. Large-scale oceanic circulation possesses many localized features such as western boundary currents and regions of confined eddy activity. The use of an adapting variable resolution mesh is the only practical means to faithfully represent the physical processes at work, both locally in isolation as well as in relation to their coupling with the larger scale. Most numerical ocean models use a discretization in which horizontal resolution is essentially uniform. At a relatively coarse resolution of, say, ½° × ½°, it is reasonable to suppose that substantial improvements can be obtained simply by refining resolution everywhere. However, for highly nonuniform and anisotropic flows such as those present in ocean circulation, solution adaptive procedures should be developed and investigated. Although these techniques require additional computations, and indeed the finite-element method requires more computations than comparable methods with structured meshes, there will inevitably come a point at which the additional “overhead” of further uniform mesh refinement where it is not required is greater than the overhead associated with the use of finite elements and mesh adaptivity.

Nonetheless, finite-element methods have been relatively underused in numerical ocean modeling. It is reasonable to ask questions regarding the accuracy, efficiency, and applicability of finite-element methods, particularly in comparison with models currently in widespread use. The aim of this paper is to make a start at addressing these issues; the long-term goal being the development of a finite-element ocean model in which solution adaptive techniques can be employed, and which yields high-quality results for problems at a range of scales.

The possibility of applying the finite-element technique to oceanic problems has been discussed for roughly three decades. Fix (1975) investigated the properties of finite elements when applied to a barotropic quasigeostrophic potential vorticity equation. Favorable results were given regarding stability, accuracy, aliasing errors, and conservative laws, along with the natural treatment of certain boundary conditions and geometric flexibility of the approach. Dumas et al. (1982) considered a similar system and noted the possibilities and advantages of increased resolution in western boundary currents for wind-driven gyre-type problems. An investigation of finite-difference, finite-element, and (pseudo) spectral models applied to open-ocean problems was conducted by Haidvogel et al. (1980). It was demonstrated that finite-element and spectral methods can be more than competitive with finite-difference methods for certain problems.

Until now the large proportion of serious and successful applications of the finite-element method in oceanic applications has been to tidal and coastal problems (Lynch and Gray 1979; Provost and Vincent 1986; Lynch and Werner 1987, 1991; Lynch et al. 1996). These have primarily been based on shallow-water models, often including reformulations in terms of Helmholtz operators or second-order wave equations.

More recently larger-scale and more complex diagnostic models have been developed and examined. For example, Myers and Weaver (1995) considered a discretization of a linearized steady-state barotropic potential vorticity equation in spherical coordinates; the advantages of irregular grids designed to conform to geographic features, and also the natural manner in which certain boundary conditions may be treated were highlighted. Greenberg et al. (1998) examined a similar linearized diagnostic model in spherical-polar coordinates. Finally, Nechaev et al. (2003) discussed a diagnostic model for a 3D hydrostatic problem on a mesh unstructured in the horizontal, making use of residual-free bubble stabilization techniques. This has recently been extended to a prognostic model by Danilov et al. (2004).

Research into the application of finite elements to 3D (hydrostatic) primitive equations is thriving. Early problems, cited by many as reasons to avoid finite elements have been, and are being, addressed. For example, Le Roux et al. (1998) investigated the ability of various element choices to describe states of geostrophic balance in a noise-free manner for the linear shallow-water equations. This work on spatial discretizations was extended by Le Roux et al. (2000) with a semi-Lagrangian treatment of the temporal discretization. Similarly, Hanert et al. (2002) performed a study to select a convenient (low order) mixed formulation for ocean modeling by considering the linear shallow-water equations. Low-order finite-element equivalents of the Arakawa A, B, and C grids were considered and seen to behave in a broadly analogous manner to their staggered counterparts. The generation of boundary-fitted Delaunay triangulations in 2D was considered by Legrand et al. (2000) with application to the global ocean.

In addition, work has been conducted on models that employ spectral representations of solution variables. Haidvogel et al. (1991) described a semispectral sigma coordinate primitive equation model that represents the solution in the vertical via a sum over a polynomial basis, whereas standard second-order finite differences are used in the horizontal. Iskandarani et al. (1995) considered a staggered spectral element discretization of a shallow-water model on a quadrilateral mesh, with pressure represented using Legendre polynomials of degree 2 less than those used for velocity. This was extended to the 3D hydrostatic primitive equations on unstructured meshes by Iskandarani et al. (2003). Three-dimensional finite elements were used by Lynch et al. (1996), but the discretization is not local to the elements, in the sense that the baroclinic pressure gradient is determined by a procedure of interpolation between the finite-element mesh used for integrating the equations of motion and a set of level surfaces on which the pressure gradient is determined, see also Naimie et al. (1994).

The work presented here seeks to further extend the investigation into the benefits and applicability of finite-element models for oceanic flows. As an extension to previous work, the desire here is to formulate a robust 3D model based on the Boussinesq equations on meshes unstructured in both the horizontal and vertical direction. In addition, since one aim of the approach is the accurate modeling of flow over topography, which may be steep in places and therefore not well represented by the hydrostatic approximation, the nonhydrostatic form of the equations are considered directly here. Also, since solution adaptive techniques will ultimately be employed, yielding the possibility of resolving small-scale (e.g., convective) processes, a nonhydrostatic approach seems judicious.

The primary focus of this paper, and its companion (Ford et al. 2004, hereafter Part II), in addition to the model formulation, is on the faithful representation of topography. A variety of methods exist to handle topography in ocean circulation models. It is now well-recognized that a discontinuous, or “staircase,” representation of topography employed since the earliest models (e.g., Bryan 1969) can lead to substantial errors when used to model flow over continuous topography. For example, any downslope flow is represented by a sequence of horizontal motion and vertical mixing, and as such is represented in a very diffusive way, regardless of the resolution employed. Sigma coordinates have been used, for example, by Haidvogel et al. (1991), but these can also lead to substantial errors in the calculation of the horizontal pressure gradient, especially where the topography is steep (Haney 1991; Mellor et al. 1998). Shaved and partial cell finite-volume methods have been used successfully by Adcroft et al. (1997) where height is the vertical coordinate.

The remainder of this paper is set out as follows. In section 2 a standard finite-element formulation for a Boussinesq fluid is presented. In section 3 it is demonstrated that a standard numerical approach is unsuitable for certain geophysical applications, including flows over varying topography. The reason for this is related to the classical sigma coordinate problem, in which horizontal pressure gradients must be represented as accurately as possible in order to prevent the production of large spurious velocities. This problem also occurs on irregular meshes, which are to be expected with an adaptive mesh model, it is thus doubly important to consider here. In section 4 it is shown that this problem can be solved, to a sufficient order of accuracy for the problems considered here, by splitting the pressure into “hydrostatic” and “nonhydrostatic” components. In section 5 a Petrov–Galerkin weighting is introduced, which gives more importance to the “upwind” direction in the discretization. It provides a means for avoiding additional instabilities often present in convectively dominated problems while preserving accuracy. Finally, in section 6 some concluding remarks are presented.

Part II of this work focuses on the validation of the model as presented here. Flow past a seamount is considered in detail, this is due to the fact that this problem has been the subject of exceptionally thorough numerical studies against which comparisons may be made. Also, the accurate representation of topography is crucial to the successful simulation of the flow.

## 2. The numerical basis of the model

### a. Underlying equations and model formulation

^{3}:

**represents the 3D velocity,**

*u**p*is the perturbation pressure,

*ρ*is the perturbation density, and

*T*is the temperature. The rotation vector is

**Ω**, and here the

*f*-plane assumption

**Ω**= (0, 0,

*f*/2)

^{T}is made, where

*f*is the (constant) Coriolis parameter.

**is used to represent the viscous terms in (1a). A simple model of subgrid-scale turbulence is employed, in which**

*τ***is related to the deformation rate tensor**

*τ**S*

_{ij}, given by

*τ*

_{ij}and

*S*

_{ij}are related by

*τ*

_{ij}

*μ*

_{ij}

*S*

_{ij}

*μ*

_{ij}are constants [there is no summation over repeated indices in (3)]. The horizontal viscosity (

*μ*

_{11}and

*μ*

_{22}) and vertical viscosity (

*μ*

_{33}) are allowed to take two different, uniform values, and the off-diagonal components of

*μ*

_{ij}satisfy

*μ*

_{ij}= (

*μ*

_{ii}

*μ*

_{jj})

^{1/2}. The diagonal components of the diffusivity tensor

**in (1c) are also independent, but in this model the off-diagonal components of**

*κ***vanish.**

*κ*The simplified equation of state (1d) has been used here, but there is no difficulty, in principle, in incorporating a nonlinear equation of state and including additional constituents, such as salinity.

**·**

*u***n**=

*g*on ∂Ω, with typically

*g*= 0 at all parts of the boundary other than inflow/outflow, where

*g*= ∓Const. Stress-free traction boundary conditions are then applied to all boundaries,

**·**

*τ***n**−

*p*

**n**= 0, where

**n**denotes the outward unit normal vector. The normal component of these traction conditions is overridden by the imposition of the normal component of velocity. A Poisson equation for pressure may be derived, if desired, by taking the divergence of the momentum equation (1a). The appropriate boundary condition for pressure (see Gresho and Sani 1987) is then obtained by taking the normal component of (1a), this yielding a Neumann boundary condition for pressure. This only serves to define the pressure field up to an arbitrary additive constant, the pressure is thus fixed by defining it to be zero at an arbitrary node. The initial condition on the velocity field is given by an imposed field

*u*_{0}(

**), which for well-posedness must satisfy both continuity (1b) and the boundary conditions imposed on the problem. Since the normal component of velocity is imposed on the entire boundary in this work the additional compatibility constraint of global mass conservation must be satisfied:**

*x*### b. Basis functions and mixed formulation for a standard Galerkin finite-element model

In a finite-element formulation, the infinitely many degrees of freedom of the continuous equations (1) are reduced to a finite number by representing each of the variables as a sum over a finite set of spatial basis functions. The basis functions are defined on elements, as defined in the introduction. In the present model, hexahedral finite elements have been employed. Examples of basis functions that can be used with this choice include piecewise-linear and piecewise-constant functions, both of which are defined in detail later.

*N*

_{i}}:

*M*

_{i}}:

**u**is a vector of length 3

*N*, while

**T**is a vector of length

*N,*and

**p**is a vector of length M. This form for

**,**

*u**T,*and

*p*is substituted into the momentum equation (1a). A

*Galerkin projection*of that equation is then taken by multiplying by each basis function

*N*

_{i}(

**x**) in turn and applying Green's theorem where appropriate to reduce the regularity required of basis functions. This leads to a discretization of the following form:

*N*× 3

*N*

*mass matrix*𝗠 is given by

**ũ**) given by

**p**is a discretization of the pressure gradient term in (1a), where

*i*≤

*N*; 1 ≤

*j*≤

*M*;

*q*= 1, 2, 3,

*M*

_{i}}. The continuity equation (1b) is also discretized using a Galerkin projection, but now the pressure basis functions

*M*

_{i}(

**x**) must be used to form the projection. The result is that the discrete continuity equation takes the form

**n**is the unit outward normal to the boundary. This may be written in the following matrix form, where 𝗖 is precisely as defined in (13):

^{T}

**u**

**0**

**p**for the pressure terms in (6) and 𝗖

^{T}

**u**for the continuity condition (16) will prove important later in deriving an equation for

**p**, and hence separating the velocity time step from the solution for pressure.

In principle, one could now attempt to integrate the system forward in time, and a natural choice might seem to be to represent all the fields using piecewise-linear basis functions. However, it is well-known that, if the velocities and pressure are all represented using equal-order interpolants then it is not possible, in general, to find a solution for **p** that ensures that the velocity at the end of the time step satisfies (16); correspondingly, if a discrete pressure equation is formulated, then that equation is in general singular. This is due to the intimate coupling of velocity and pressure through the incompressibility constraint (1b) and (16). Consequently, since the use of an inappropriate selection of basis functions may lead to numerical instabilities, this issue is termed *LBB stability* following (Ladyzhenskaya 1969; Babuška 1971; Brezzi 1974), and a compatibility condition between the pair of discrete spaces used to define velocity and pressure, which ensures LBB stability, is known as the the *inf-sup condition.* Therefore, to represent the variables in (1), the procedure of using the piecewise-linear basis {*N*_{i}} for velocity and temperature, and the piecewise-constant basis {*M*_{j}} for pressure is adopted. This discussion may be thought of as the analog of staggering [or choice of Arakawa grid (Arakawa 1966)] in a finite-difference procedure.

Now, although this choice (termed *Q*_{1}*P*_{0}) does not satisfy the inf-sup condition, and is therefore not strictly LBB stable, implying limitations from a theoretical point of view, it does work well in practice and is often used in engineering applications. See Griffiths and Silvester (1994) where it is commented that it “invariably works well in practice,” and also Gresho and Sani (1998) for a detailed discussion of this element where it is termed an “often-excellent and cost-effective” choice [see also Girault and Raviart (1986) and Brezzi and Fortin (1991)]. Care must be taken with its use due to the presence of spurious pressure modes. An example is the *hydrostatic* mode (the use of hydrostatic here is standard and should not be confused with its use later in this work) that occurs here due to the choice of velocity boundary conditions, that is, the arbitrary additive constant mentioned in section 2a, where an effective technique for removing this mode is also given. *Checkerboard* modes are not an issue here since the boundary conditions employed do not support them. Finally, *Pesky* modes that have nonzero *h*) or smaller LBB constants (as opposed to zero LBB constants for the previous two modes), where *h* is an indication of the mesh spacing, may affect both solution accuracy as well as the conditioning of the linear systems that must be solved, see (Griffiths and Silvester 1994; Griffiths 1996). For the applications considered here this was not found to be a serious issue. Additionally, due to the desire for mesh adaptivity the model will ultimately make use of tetrahedral elements. The choice of element pair will then be based both upon stability issues as well as the pair's ability to represent well the solution characteristics present in oceanographic applications. Hence, in this work comparisons with LBB stable element pairs, or stabilized versions of the *Q*_{1}*P*_{0} choice have not been pursued.

The spatial basis functions mentioned previously, along with a discontinuous piecewise-linear basis {*Q*_{k}} of use later, are defined as follows, where (*ξ*_{1}, *ξ*_{2}, *ξ*_{3}) represent local coordinates on a hexahedral element, in which each of the *ξ*_{i} runs from −1 to 1 along the edges of an element.

Continuous piecewise-linear basis functions, {

*N*_{i}}. These functions are equal to unity at vertex*i,*are equal to zero at all neighboring vertices, and take a trilinear form throughout each element; for example, if the vertex number*i*corresponds to the vertex (*ξ*_{1},*ξ*_{2},*ξ*_{3}) = (−1, −1, −1) in a given element, then*N*_{i}takes the trilinear form (1 −*ξ*_{1})(1 −*ξ*_{2})(1 −*ξ*_{3})/8 throughout the element. The basis functions {*N*_{i}} vanish outside of the elements that have vertex*i*as one of their vertices. Let*N*denote the total number of these basis functions defined on the mesh.Discontinuous piecewise-linear basis functions, {

*Q*_{k}}. These functions take the same trilinear spatial form as the functions {*N*_{i}} within the elements. However, whereas the functions {*N*_{i}} are continuous, and nonzero in all elements that have vertex*i*as one of their vertices, the discontinuous basis functions*Q*_{k}are defined such that they are nonzero in only one element. Therefore, with the exception of elements at the boundary of the domain, there are eight discontinuous basis functions*Q*_{k}for every continuous basis function*N*_{i}. Let*Q*denote the total number of these defined on the mesh.Piecewise-constant basis functions, {

*M*_{j}}. These functions are equal to unity throughout element*j,*and equal to zero in all other elements. Let*M*denote the total number of these defined on the mesh.

### c. Solution method for velocity and pressure

In principle, the momentum and continuity equations can now be assembled into a large coupled nonlinear system for **u**^{n+1}, **p**^{n+1/2}, and **T**^{n+1} as a function of **u**^{n}, **p**^{n−1/2}, and **T**^{n} [where superscripts represent discrete time levels following a temporal discretization of (6), here the velocities and temperatures **u**^{n}, **T**^{n}, and **u**^{n+1}, **T**^{n+1} are held at times *t* = *t*_{n} and *t* = *t*_{n+1}, while the pressure **p**^{n+1/2} is held at the midpoint of the time step, *t* = *t*_{n+1/2} := ½(*t*_{n} + *t*_{n+1})]. This approach, however, results in an extremely large system of equations to solve, for which an efficient solution strategy is difficult to devise. Therefore, a technique is used in which pressure and velocity are solved for independently, thus reducing the total dimension of the systems that must be solved.

In order to avoid computational drift, it is important that the velocity at the end of each time step be divergence free or incompressible in a discrete sense, that is, it must satisfy (16). First, a time stepping scheme is constructed that is accurate to first order in time, this scheme may then be adapted to one that is accurate to second order in time. The computed velocity field is then projected onto a divergence-free subspace of the discrete space in which it is constructed. The overall approach taken here of solving separately for velocity and pressure is an example of what is known variously as a projection method, fractional-step method, pressure correction method, or Chorin's method (Chorin 1968).

*n*is the time level and Δ

*t*is the time step size. Also take

*K*

**u**are treated analogously. The nonlinear advection terms are also treated implicitly, but only to first-order accuracy:

**ũ**= (

**u**

^{n}+

**û**

^{n+1})/2 is used in the nonlinear matrix 𝗡(

**ũ**), where

**û**

^{n+1}is an approximation to the new velocity following the previous iterate (more precisely the divergence-free projection of

**u**

^{n+1}

_{∗}

**ũ**) = 𝗡(

**ũ**) + 𝗟 − 𝗞 does not depend on 𝘂

^{n+1}. The vector

**f**contains the buoyancy forcing 𝗚𝗧′, constructed from

**T**

^{n+1}which, like pressure, and due to time staggering being employed is taken to represent temperature at time

*t*=

*t*

_{n+1/2}, [a discretization of the temperature equation (1c) is given in section 2e].

**p**

^{n+1/2}, the pressure

**p**

^{n−1/2}from the previous time step is used. This is a valid approximation to obtain first-order accuracy in time. A first approximation to

**u**

^{n+1}is then obtained by solving

**u**

^{n+1}

_{∗}

**u**

^{n+1}

_{∗}

**u**

^{n+1}that is accurate to first order in time.

A *projection method* is now used to modify the velocity and pressure. The modified velocity will satisfy (16), and an updated estimate of the pressure can be obtained. The correction to the velocity is irrotational, and is obtained by supposing that a modified pressure acts over the interval *t*_{n} < *t* < *t*_{n+1}.

**u**

^{n+1}

_{∗}

*u*^{n+1}

*u*^{n+1}

_{∗}

*φ*

**u**

^{n+1}

**u**

^{n+1}

_{∗}

*φ*Moreover, it is evident that, if two velocities differ at the end of a time step only by an irrotational component then, all other forcing terms being equal, this difference can be obtained by a difference in pressure acting throughout the time step between the two.

**, (23) is used, requiring that**

*φ***u**

^{n+1}satisfies (16). Multiplying (23) by 𝗖

^{T}𝗠

^{−1}, and applying (16), yields the following discretized elliptic problem for

**:**

*φ*^{T}

^{−1}

*φ*^{T}

**u**

^{n+1}

_{∗}

**from (24),**

*φ***u**

^{n+1}may be obtained from (23).

*p*to the pressure consider the continuous system, for which the following must hold

*u*Δ

*t*/

*h*) of order

### d. Mass lumping of the continuity equation

The procedure described above must be modified in order to provide a computationally efficient scheme. The problem lies in Eq. (24), which must be solved by an iterative procedure. Here, 𝗖 and 𝗠 are sparse matrices, but 𝗠^{−1} is not. Now, given a linear system of the form 𝗣**z** = **q**, where 𝗣 is a sparse matrix, it is not necessary to form the matrix 𝗣, but it must be possible to multiply a given vector by it. In the case of (24), this requires multiplication by 𝗠^{−1}; each single iteration in the solution of (24) would then require an iterative solution of a linear system with matrix 𝗠. While this may be possible without substantially increasing the storage required, it will lead to a method that requires a large amount of computational time for even a single time step.

*lumped*mass matrix 𝗠

_{l}could be used in place of 𝗠 in Eq. (24). The lumped mass matrix is defined by

_{l}is a diagonal matrix, with each diagonal entry being equal to the sum of the entries in the corresponding row of 𝗠. Following through the details of section 2c, it can be seen that this is possible provided that the discrete continuity equation (16) is replaced by

^{T}

^{−1}

_{l}

**u**

*x*

^{4}) locally, and that global mass conservation is preserved.

^{T}

^{−1}

_{l}

**u**

^{n+1}satisfies (29). The result is that

**must satisfy**

*φ*^{T}

^{−1}

_{l}

*φ*^{T}

^{−1}

_{l}

**u**

^{n+1}

_{∗}

**, the remaining equations (23) for**

*φ***u**

^{n+1}and (27) for

**p**

^{n+1/2}remain unchanged. In particular, 𝗠 is not replaced by 𝗠

_{l}in (23)—indeed it would be inconsistent with (29) to do so, since these two equations are used to derive (30). Since (23) is solved only once per time step (or twice in the case of a second-order scheme), the computational resources required are kept within more reasonable bounds. Importantly, the consistent mass matrix being retained in the momentum equations leads to the preservation of accuracy properties, in particular the dispersion errors are far lower than would be the case if the lumped mass was used throughout (Gresho and Chan 1990).

^{T}

^{−1}

_{l}

**p**

^{n+1/2}and

**u**

^{n+1}. Given

**u**

^{n}, a successive set of estimates

**u**

^{n+1}

_{∗}

**u**

^{n+1}and

**p**

^{n+1/2}

_{∗}

**p**

^{n+1/2}are obtained as follows.

**u**

^{n+1}

_{∗}

**u**

^{n}. Second, use (29), with

**u**=

**u**

^{n+1}

_{∗}

**p**

^{n+1/2}

_{∗}

**u**

^{n+1}

_{∗}

The second and third steps can then be repeated to obtain a succession of approximations: **p**^{n+1/2}_{∗}**u**^{n+1}_{∗}**p**^{n+1/2} and **u**^{n+1}.

In the model as presented here, this approach is used to take only the first time step (i.e., at *n* = 0). Both (32) and (33) are solved by iterative methods. The velocity **u**^{n+1}_{∗}**u**^{n+1} satisfies (29).

### e. Discretization of the temperature equation

**n**· (

**∇**

*κ**T*) = 0 (i.e., no heat flux), the Crank–Nicolson time stepping scheme then takes the form

**u**

^{n}is used in this calculation it is appropriate to consider 𝗧

^{n+1}to be staggered with respect to velocities and thus to represent temperature at a time

*t*=

*t*

_{n+1/2}. It follows then that second-order temporal accuracy of the overall method is not compromised.

### f. Rotations and boundaries

For boundaries that are not aligned with the coordinate system and at which no normal flow and slip/partial slip boundary conditions are to be applied, it is necessary to rotate the velocities to a system aligned with the boundary. For each node on the boundary an associated 3 × 3 rotation matrix can be defined. These are collected together to form a 3** N** × 3

**rotation matrix 𝗥 for the whole system of equations. The matrix 𝗥 has the orthogonality property that 𝗥𝗥**

*N*^{T}= 𝗜. This must be done with care where the sea floor meets the sea surface (at coastal boundaries) because two components of the rotated velocity

**ũ**

^{n}:=

**Ru**

^{n}must be set to zero.

^{T}

^{−1}

_{l}

^{T}

^{T}

**u**

^{n+1}

**ũ**

^{n}:= 𝗥

**u**

^{n}and writing 𝗠 ≡ 𝗥𝗠𝗥

^{T}, 𝗔 ≡ 𝗥𝗔𝗥

^{T}, 𝗖 ≡ 𝗥𝗖, 𝗠

_{l}≡ 𝗥𝗠

_{l}𝗥

^{T},

**f̃**

^{n+1/2}≡ 𝗥

**f**

^{n+1/2}, Eqs. (36) and (37) take the form (20) and (29), respectively. The solution methods described previously are then applied to this transformed system. In order to satisfy global mass conservation exactly, the normal to the boundary at mesh nodes must be calculated correctly. Following Engelman et al. (1982) this is achieved for an arbitrary mesh at node

*j*by defining

^{k}are defined via Eq. (13) with the boundary integral removed, and

*n** is a scalar that simply normalizes

**n**

_{j}.

### g. Solution of linear systems

The symmetric-positive-definite matrix equations (30) and (32) are solved using conjugate gradients (Golub and van Loan 1989) with nine-step parameterized forward–backward Gauss–Seidel preconditioning (Adams 1983) within each subdomain in a parallel computation (three steps are used for serial computations). A large number of steps is used so that each processor does a considerable quantity of work before communicating the results (communication can be relatively real-time intensive). Since the quantity of time spent on each of these sweeps is predictable it is relatively easy to balance the load on each processor by, for example, assigning approximately equal numbers of pressure nodes to each processor. The block nonsymmetric matrix equations (21) and (33) are solved using restarted Generalized Minimal Residual (GMRES; Saad and Schultz 1986), typically here using 20 orthonormal vectors and a block symmetric successive over-relaxation (SSOR) preconditioner within each subdomain. The temperature equation (35) is solved in an analogous manner.

## 3. Pressure gradient errors

*z,*and to impose no inflow or outflow at boundaries. The model is then integrated for a few time steps, and any velocity induced by the discretization must be considered to be model error. It is well-known, for example, that sigma-coordinate models in the presence of topography may produce large spurious pressure gradients (Haney 1991; Mellor et al. 1998). In this section, the behavior of the “standard” model is investigated when it is initialized with a linear density profile, a Burger number of 1.5 is employed here. The Burger number is a measure of the strength of stratification and is defined as

*H*is the depth of the ocean,

*L*is a measure of the horizontal scale, and the Brunt–Väisälä frequency

*N*(not to be confused with the notation for the number of basis functions introduced in section 2b) is defined here via

_{z}

*ρ*is the density difference in the vertical between the sea surface and sea floor, and

*ρ*

_{0}is a reference value for density (see, e.g., Turner 1973; Pedlosky 1987). The problem geometry is that of a channel 560 km long, 514 km wide, and 4.5 km deep. The topography is given by an isolated Gaussian seamount of maximum height 90% that of the channel, and a full-width at half maximum value of 41.63 km. A sigma-coordinate hexahedral mesh is used with 12 equally spaced levels in the vertical, and a mesh spacing of 3.125 km in the horizontal.

In Fig. 1, the three components of velocity are presented in a vertical section along the channel passing through the center of the seamount. The time step is Δ*t* = 432 s, and in Fig. 1 the fields are shown after 10 time steps.

*N*

_{i}}, and so hydrostatic balance,

*lower*order than that used for velocity and temperature. Recall that here the piecewise-constant basis {

*M*

_{j}} is used. Therefore, the model cannot satisfy the discrete version of (39) exactly, and hence the pressure required to balance the buoyancy forces in a nearly hydrostatic regime is not well approximated.

The “mixed” approach does work very well in many applications, but here it has been found that it is unsuitable for fluids in which the dynamics are close to hydrostatic balance. The result is that extremely large spurious velocities are generated on unstructured or distorted meshes, such as those required to accurately conform to coastlines or topography.

For example, in the model integration presented above horizontal pressure gradients are established that would not be present in the continuous system. These pressure gradients cause the fluid to come into motion, as shown in Fig. 1. The relatively large magnitude of the velocities induced indicates that this discretization is unsuitable for numerical ocean modeling. Of course, the discretization is consistent in the limit of small mesh intervals, but the aim must be to obtain “reasonable” results at “moderate” resolution. Although these are qualitative statements about what is practical with contemporary computational resources, it is certainly desirable to eliminate any discretization that can produce such large pressure gradient errors, even if the resolution is relatively modest.

To fully benefit from the use of finite elements and unstructured adaptive grids, the hydrostatic approximation should not be made *per force* in the model, however it should still be possible to simulate flows in regimes in which the fluid is near to hydrostatic balance over much of the computational domain, incorporating both coastlines and topography. A special treatment of the hydrostatic pressure is therefore required, which is presented in the following section.

## 4. A hydrostatic pressure solver

### a. Formulation

Possible methods to deal with the pressure gradient errors in sigma-coordinate-type models include interpolation to *z* levels and spline-based reconstruction schemes (for a comparison see Ezer et al. 2002). In the present context, and based upon the discussion of the previous section, one approach to eliminating, or at least reducing, pressure gradient errors might be to use basis functions in which the hydrostatic relation (39) can hold exactly at the discrete level. While this is an interesting possibility, the implied hierarchy of basis functions for temperature and velocity is rather complex, and here an alternative simpler approach is proposed.

*p*

_{h}and a “nonhydrostatic pressure”

*p*

_{nh}so that the total pressure

*p*is given at any point by

*p*=

*p*

_{nh}+

*p*

_{h}. A similar device was employed by Adcroft et al. (1997), but whereas their splitting was designed for computational efficiency, here the splitting results in pressures that are of a fundamentally different kind. The hydrostatic pressure

*p*

_{h}is required to balance the buoyancy force in the vertical momentum equation:

**F**≡ (

*F*

_{1},

*F*

_{2},

*F*

_{3})

^{T}. The horizontal momentum equations are now

This means that, given *ρ,* it must be possible to evaluate *p*_{h}, or more specifically ∂*p*_{h}/∂*x* and ∂*p*_{h}/∂*y* for use in (42). In fact, ∂*p*_{h}/∂*x* and ∂*p*_{h}/∂*y* are solved for directly here. This is both more numerically robust than solving for *p*_{h} and then taking the horizontal derivatives, as well as resulting in an algorithm in which the balance (39) is consistent with regards to polynomial order. In Song (1998) and Iskandarani et al. (2003) the procedure of interchanging the order of integration and differentiation in the computation of baroclinic pressure gradients is shown to result in more accurate results for sigma coordinate hydrostatic models.

*p*

_{h}/∂

*x*and ∂

*p*

_{h}/∂

*y*are

*p*

_{h}/∂

*x*and ∂

*p*

_{h}/∂

*y*are calculated by integrating (43) down from the top of the ocean at

*z*= 0. Surface boundary conditions ∂

*p*

_{h}/∂

*x*= 0 and ∂

*p*

_{h}/∂

*y*= 0 at

*z*= 0 are employed. Consequently, the hydrostatic pressure

*p*

_{h}is not the same as the pressure that would exist in a hydrostatic ocean model with a rigid lid. Rather,

*p*

_{h}is the simplest pressure field consistent with (40). Even if the flow is nearly hydrostatic, the nonhydrostatic pressure

*p*

_{nh}is required to accommodate the surface pressure required by the condition of no normal flow at

*z*= 0. In the case of nearly hydrostatic flow,

*p*

_{nh}is nearly independent of depth.

*p*

_{h}/∂

*x*and ∂

*p*

_{h}/∂

*y.*The discontinuous Galerkin method is used extensively in the finite-element literature for transport equations of the form

**U**

*φ*

*S,*

**U**is the transport velocity,

*φ*is the quantity being transported, and

*S*is a source. Here, the equations in (43) take the form (44) if

**U**= (0, 0, −1)

^{T},

*φ*= (∂

*p*

_{h}/∂

*x,*∂

*p*

_{h}/∂

*y*)

^{T}, and

*S*=

*g*(∂

*ρ*/∂

*x,*∂

*ρ*/∂

*y*)

^{T}.

*Q*

_{k}}. To obtain discretized equations, (44) is multiplied by

*Q*

_{k}and integrated over the element

*E*in which

*Q*

_{k}is nonzero:

_{E}represents the boundary of element

*E.*Now, if

**U**·

**n**> 0, then this corresponds to information flowing out of the element, and no further action is taken. However, if

**U**·

**n**< 0, then the value of

*φ*on the boundary from neighboring elements is imposed. This value is denoted by

*φ*

_{in}. This procedure is equivalent to one in which Green's theorem is not invoked, but boundary conditions are imposed weakly on inflow boundaries. Thus, the discontinuous Galerkin representation of (44) is, for 1 ≤

*k*≤

*Q,*

_{E}:

**U**·

**n**< 0} represents the restriction of the boundary to that part on which

**U**·

**n**< 0.

Here the direction of integration is down from the ocean surface, so **U** · **n** < 0 wherever the normal to the element has a positive vertical component. In the interior of the fluid, information is transferred between neighboring elements according to (46). The faces at the surface of the ocean, *z* = 0, also satisfy this property, and here the boundary condition *φ*_{in} = 0 is imposed. System (46) is solved element by element in a Gauss–Seidel iterative manner. Due to the “flow of information” from sea surface to bottom here on simple meshes, an ordering of the elements may be trivially found such that only one iteration is required. Thus, this hydrostatic pressure solver is very efficient and does not introduce a large computational overhead. Algorithms for obtaining efficient reorderings of the elements in the case of unstructured meshes shall be discussed in future work.

Once the horizontal gradients of *p*_{h} have been obtained in this way, the discrete versions of the momentum equations are formed. The same procedure is used as in section 2b, except that buoyancy forces are now absent from the vertical momentum equation: 𝗚 = 0. Instead, additional terms on the right-hand side of the horizontal momentum equations are introduced to represent the effects of the hydrostatic pressure gradients, and ensure consistency of the discretization.

**p**now represents just the nonhydrostatic pressure

*p*

_{nh}, and the term 𝗙

**ph**represents the hydrostatic pressure gradients, in which

*Q*

_{k}} for every element of the set {

*N*

_{i}} (with the exception of elements that adjoin the boundary of the domain), the discontinuous Galerkin method results in approximations for both ∂

*p*

_{h}/∂

*x*and ∂

*p*

_{h}/∂

*y*that have many more nodal values than the number of elements. It has been found by experimentation that, due to the large number of degrees of freedom for the hydrostatic pressure gradients, direct Galerkin projection as above can lead to computational instabilities. Therefore, for use in the discretized form of the horizontal momentum equations, the hydrostatic pressure gradients ∂

*p*

_{h}/∂

*x*and ∂

*p*

_{h}/∂

*y*obtained using the discontinuous Galerkin method as described, are projected onto the piecewise-constant basis {

*M*

_{j}}. The Galerkin projection is then taken to form the discrete momentum equations. The projection (

**phx**

^{p},

**phy**

^{p}) of the hydrostatic pressure gradients onto the piecewise-constant basis is obtained by solving

**phx**

^{p}

**phx**

**phy**

^{p}

**phy**

^{−1}

Hence, (6) in the standard numerical model is replaced with (48), with 𝗙 defined by (50), but in which 𝗙′ is defined by (52). To distinguish this from the standard model, it shall be referred to as the “ocean model.”

### b. Numerical experimentation

It can be seen immediately from the foregoing that if the temperature depends linearly on the vertical coordinate *z* and is independent of the horizontal coordinates *x* and *y,* then the model produces no pressure gradient errors whatsoever. This is because the piecewise-linear basis functions used for the temperature can represent such a field exactly on a skewed mesh. Consequently, the horizontal gradients of density used in the discrete form of (43) are identically zero, and so the horizontal pressure gradients are zero. The nonhydrostatic pressure *p*_{nh} is then also zero and so, if the fluid is at initially rest, it will remain at rest.

In Part II forced flows in which the initial stratification is linear shall be considered. However, as the integration proceeds and flow develops, this stratification is disturbed. It is therefore of interest to determine whether the ocean model is likely to be more accurate than the standard one for more general stratification.

To investigate this the test simulation from section 3 is repeated and both models are initialized with a quadratic temperature profile, with the same range of temperature as the linear profile, but with ∂*T*/∂*z* = 0 at the sea floor away from the seamount. Both models were then integrated for 100 time steps of size Δ*t* = 432 s and the maximum velocity in each was monitored over this time. There is flow in both models (confirming that the ocean model preserves a state of rest exactly only for a linear temperature profile) but the maximum velocity in the ocean model is approximately 2% of that in the standard model.

Further tabulated results are given in Tables 1, 2, and 3, where the simulation was stopped after 10 time steps of size Δ*t* = 432 s. The horizontal components of any spurious velocity observed were very similar, and so only the maximum of these is given, along with the vertical component of the spurious velocity. As can be seen the magnitude of these errors increases both with distortion of the mesh (in relation to the fractional seamount height *δ*) and intensity of the stratification, as measured by the Burger number. It can be seen that at moderate resolutions it is typical to expect between one and two orders of magnitude improvement in the velocity errors when the hydrostatic pressure solver is used, these results are identified by calling them ocean model results.

In Beckmann and Haidvogel (1993) similar pressure gradient error tests are carried out, it is noted that for the semispectral model (SPEM), increased resolution in both the horizontal and vertical decreases this spurious behavior, however increased resolution in the vertical alone does not. Analogous behavior for a finite-difference method is found in Haney (1991). Similar behavior is witnessed here, where increased resolution in both the horizontal and vertical does indeed decrease the magnitude of the observed spurious velocities. Also, at lower-horizontal resolutions it is found that increasing vertical resolution alone does not necessarily decrease the error. Hence it appears that a phenomenon very similar to the sigma-coordinate error is being witnessed. However, at higher-horizontal resolutions the opposite is found, where further increasing the resolution in the horizontal alone actually increases the errors, whereas extra vertical resolution again decreases the error. Thus an additional component of error seems present.

Now, in the finite-difference sigma-coordinate approach, where horizontal derivatives are computed as the gradient along sigma coordinates plus a correction term, discrepancies in computing these two terms leads to pressure gradient errors. However, the finite-element approach represents all fields in a global polynomial rather than pointwise form and horizontal derivatives can be computed naturally whatever the mesh. So although mesh distortion can have an impact on the computation of pressure gradients and is an important factor to consider (e.g., the apparent sigma coordinate type error at low-horizontal resolutions), it appears that the ability of the method to represent accurately the vertical structure of the density field also plays a crucial role in this error. An example of this being the ability of the (piecewise linear) model to represent exactly a density field linear in *z.* Further investigation of this procedure for dealing with pressure gradient errors in the model is ongoing.

It has been further observed that errors in the standard model increase with time more rapidly than in the ocean model, leading ultimately to instability that affects all solution fields. The ocean model on the other hand is far better behaved, demonstrating its ability to compute accurate solutions in a wide range of oceanic applications, some of which will be presented in Part II. This leads to the conviction that the ocean model should be capable of simulating flow at a small Rossby number and an order-unity Burger number.

## 5. A Petrov–Galerkin discretization

In situations where advection dominated flow [as indicated by a grid Reynolds number, *uh*/2*μ,* greater than unity (Donea and Huerta 2003)] past a seamount is simulated (see Part II), one further modification to the standard model is required. It is well known that a standard (centered) second-order spatial and temporal discretization of advection may lead to spurious oscillations in the vicinity of sharp gradients in the solution. These may well globally pollute the numerical solution, as well as under/over shoots possibly yielding physically unrealistic, indeed unstable, solutions. A finite-element approach to dealing with this, known as a Petrov–Galerkin formulation, is to alter the discretization by weighting the test functions in, for example, streamline and cross-streamline directions. This may be regarded as a finite-element analog of upwind differencing in a gridpoint scheme and results in inclusion of some solution dependent artificial dissipation in appropriate directions. Since this is done within the projection to finite dimensions, consistency and accuracy of the discretization can be preserved.

*N*

_{i}} and {

*M*

_{j}} to the space–time domain. That is, introduce spatiotemporal basis functions

*t*is time and the

*t*

_{n}are the discrete time levels. A discretization of the momentum equations (1a) is now obtained by requiring

*t*

_{n}<

*t*<

*t*

_{n+1}, the velocity

**is, for example, the velocity at**

*u**t*=

*t*

_{n}. Equation (57) thus represents a stable linearization of the momentum equation (1a) over a time step.

^{n}

_{i}

^{n}

_{i}

^{n}

_{i}

^{n}

_{i}

^{n}

_{i}

*J*is the Jacobian of the transformation from the finite-element coordinates (

*ξ*

_{1},

*ξ*

_{2},

*ξ*

_{3}) to the physical coordinates (

*x*

_{1},

*x*

_{2},

*x*

_{3}).

^{n}

_{i}

^{n}

_{i}

*h*

_{e}is the element length and

*u*is the 1D velocity.

Note that, although viscous stress terms have been included in *L*(** u**), when integrated in (56) terms of the form (∇ ·

**)(**

*τ***· ∇**

*ũ**N*

_{i}), which appear when the weight functions

^{k}

_{i}

## 6. Concluding remarks

A finite-element approach to the numerical modeling of three-dimensional nonhydrostatic stratified oceanic flows has been presented. The guiding principle for the work here has been the need to examine the application of alternative and new numerical techniques to challenging geophysical fluid dynamics problems. The motivation being the desire to employ the full power and flexibility of unstructured grids, both in terms of faithful geometry representation and the ability to use variable model resolution and ultimately to use dynamic mesh adaptivity. The model as presented is temporally and spatially second-order accurate. It is based on a standard Galerkin approach, but with the option for Petrov–Galerkin upwind-type corrections. It employs a factorization of the incompressibility constraint resulting in an accurate and efficient method. The result is an efficient and robust model, suitable for simulating flows in a wide range of parameter regimes, and fit for the inclusion of additional numerical and ocean modeling options. The result should be an immensely powerful tool for the modeling community.

In the course of this model development problems related to the importance of the buoyancy force and hydrostatic balance in oceanic regimes have been highlighted and addressed. These issues are similar in nature to sigma-coordinate pressure gradient errors present over steep topography. A technique for solving this problem has been presented that allows meaningful simulations to be made. This involves splitting pressure into hydrostatic and nonhydrostatic parts, and then accurately solving for additional source terms in the momentum equations that ensure consistency of the approximation, as well as allowing the model to represent states of hydrostatic balance.

In Part II of this work continued validation of the model shall be presented. This is based on further simulation of flow past a tall isolated seamount, consideration of convergence of the model, and through comparisons with other numerical approaches.

Further work is under way on the use of the model with tetrahedral elements and unstructured meshes on complex domains. The model is also being used with optimization-based anisotropic mesh adaptivity. Analysis of the hydrostatic pressure gradient errors and the solver developed here are being carried out on unstructured tetrahedral meshes. Some interesting outstanding questions involve the apparent combined nature of this error in terms of a classical sigma-coordinate-type error, and a term emanating from the representation of the density field, particularly in the vertical; also the effect the high-order accuracy of the hydrostatic pressure gradient has on the temporal and spatial second-order accuracy of the model.

## Acknowledgments

We acknowledge the contributions of the lead author, Rupert Ford, who died on 30 March 2001 when he and his research were flourishing. His enthusiasm and excitement at each achievement made in this project is greatly missed. This paper was completed in his absence, though not without his vision. We hope that it does justice to one aspect of his work.

We would like to thank both Dr. Marco Luchini and Mr. Nick James for initiatives that gave us access to a distributed parallel machine, which greatly assisted the development of the model. This research was carried out under funding from the National Environmental Research Council of the United Kingdom under Grants NER/A/S/2000/00375 and GR9/02518 for which we are grateful. We are very grateful to three anonymous referees whose comments helped improve the quality of this paper.

## REFERENCES

Adams, L. M., 1983: An m-step preconditioned conjugate gradient method for parallel computations.

*IEEE Parallel Computation Proc.,*Bellaire, MI, IEEE, 36–43.Adcroft, A., C. Hill, and J. Marshall, 1997: Representation of topography by shaved cells in a height coordinate ocean model.

,*Mon. Wea. Rev***125****,**2293–2315.Arakawa, A., 1966: Computational design for long-term numerical integration of the equations of fluid motion: Two-dimensional incompressible flow.

,*J. Comput. Phys***1****,**119–143.Babuška, I., 1971: Error-bounds for finite element method.

,*Numer. Math***16****,**322–333.Beckmann, A., and D. B. Haidvogel, 1993: Numerical simulation of flow around a tall isolated seamount. Part I: Problem formulation and model accuracy.

,*J. Phys. Oceanogr***23****,**1736–1753.Brezzi, F., 1974: On the existence, uniqueness and approximation of saddle-point problems arising from Lagrange multipliers.

,*RAIRO Ser. Rouge Anal. Numer***8**(R-2) 129–151.Brezzi, F., and M. Fortin, 1991:

*Mixed and Hybrid Finite Element Methods*. Springer-Verlag, 350 pp.Brown, D. L., R. Cortez, and M. L. Minion, 2001: Accurate projection methods for the incompressible Navier–Stokes equations.

,*J. Comput. Phys***168****,**464–499.Bryan, K., 1969: A numerical method for the study of the circulation of the world ocean.

,*J. Comput. Phys***4****,**347–376.Chorin, A. J., 1968: Numerical solution of the Navier–Stokes equations.

,*Math. Comput***22****,**745–762.Cockburn, B., G. E. Karniadakis, and C. W. Shu, Eds.,. 2000:

*Discontinuous Galerkin Methods: Theory, Computation and Applications*. Springer-Verlag, 470 pp.Danilov, S., G. Kivman, and J. Schröter, 2004: A finite element ocean model: Principles and evaluation:.

,*Ocean Modell***6****,**125–150.Donea, J., and A. Huerta, 2003:

*Finite Element Methods for Flow Problems*. John Wiley & Sons, 350 pp.Dumas, E., C. L. Provost, and A. Poncet, 1982: Feasability of finite element methods for oceanic general circulation modelling.

*Proc. Fourth Int. Conf. on Finite Elements in Water Resources,*Hanover, Germany, Deutsche Forschungsgmeinschaft/ISCME/ IAHR, 5.43–5.55.E,W., and J. G. Liu, 1996: Projection method II: Godunov–Ryabenki analysis.

,*SIAM J. Numer. Anal***33****,**1597–1621.Engelman, M. S., R. L. Sani, and P. M. Gresho, 1982: The implementation of normal and/or tangential boundary conditions in finite element codes for incompressible fluid flow.

,*Int. J. Numer. Methods Fluids***2****,**225–238.Ezer, T., H. Arango, and A. F. Shchepetkin, 2002: Developments in terrain-following ocean models: Intercomparion of numerical aspects.

,*Ocean Modell***4****,**249–267.Fix, G. J., 1975: Finite element models for ocean circulation problems.

,*SIAM J. Appl. Math***29****,**371–387.Ford, R., C. C. Pain, M. D. Piggott, A. J. H. Goddard, C. R. E. de Oliveira, and A. P. Umbleby, 2004: A nonhydrostatic finite-element model for three-dimensional stratified oceanic flows. Part II: Model validation.

*Mon. Wea. Rev.,***132,**2832–2844.Girault, V., and P. A. Raviart, 1986:

*Finite Element Methods for Navier–Stokes Equations: Theory and Algorithms*. Springer-Verlag, 374 pp.Golub, G. H., and C. F. van Loan, 1989:

*Matrix Computations.*2d ed. Johns Hopkins University Press, 642 pp.Greenberg, D. A., F. E. Werner, and D. R. Lynch, 1998: A diagnostic finite-element ocean circulation model in spherical-polar coordinates.

,*J. Atmos. Oceanic Technol***15****,**942–958.Gresho, P. M., 1990: On the theory of semi-implicit projection methods for viscous incompressible flow and its implementation via a finite element method that also introduces a nearly consistent mass matrix. Part 1: Theory.

,*Int. J. Numer. Methods Fluids***11****,**587–620.Gresho, P. M., and R. Sani, 1987: On pressure boundary conditions for the incompressible Navier–Stokes equations.

,*Int. J. Numer. Methods Fluids***7****,**1111–1145.Gresho, P. M., and S. T. Chan, 1990: On the theory of semi-implicit projection methods for viscous incompressible flow and its implementation via a finite element method that also introduces a nearly consistent mass matrix. Part 2: Implementation.

,*Int. J. Numer. Methods Fluids***11****,**621–659.Gresho, P. M., and R. L. Sani, 1998:

*Incompressible Flow and the Finite Element Method: Advection-Diffusion and Isothermal Laminar Flow*. John Wiley and Sons, 1021 pp.Griffiths, D. F., 1996: Discretised eigenvalue problems, LBB constants and stabilization.

*Pitman Research Notes in Mathematics,*D. F. Griffiths and G. A. Watson, Eds., Vol. 334, Addison Wesley Longman, 105 pp.Griffiths, D. F., and D. Silvester, 1994: Unstable modes of the

*Q*1 −*P*0 element. Technical Rep., Numerical Analysis Rep. 257, Department of Mathematics, University of Manchester, 17 pp.Haidvogel, D. B., A. R. Robinson, and E. E. Schulman, 1980: The accuracy, efficiency, and stability of three numerical models with application to open ocean problems.

,*J. Comput. Phys***34****,**1–53.Haidvogel, D. B., J. L. Wilkin, and R. Young, 1991: A semi-spectral primitive equation ocean circulation model using vertical sigma coordinates and orthogonal curvilinear horizontal coordinates.

,*J. Comput. Phys***94****,**151–185.Hanert, E., V. Legat, and E. Deleersnijder, 2002: A comparison of three finite elements to solve the linear shallow water equations.

,*Ocean Modell***5****,**17–35.Haney, R. L., 1991: On the pressure gradient force over steep topography in sigma coordinate models.

,*J. Phys. Oceanogr***21****,**610–619.Heywood, J. G., and R. Rannacher, 1982: Finite element approximation of the nonstationary Navier–Stokes problem. I. Regularity of solutions and second-order error estimates for spatial discretization.

,*SIAM J. Numer. Anal***19****,**275–311.Heywood, J. G., and R. Rannacher, 1990: Finite element approximation of the nonstationary Navier–Stokes problem. IV. Error analysis for second-order time discetization.

,*SIAM J. Numer. Anal***27****,**353–384.Hughes, T. J. R., and M. Mallet, 1986: A new finite element formulation for computational fluid dynamics: IV. A discontinuity-capturing operator for multidimensional advective-diffusion systems.

,*Comput. Methods Appl. Mech. Eng***58****,**329–336.Iskandarani, M., D. B. Haidvogel, and J. P. Boyd, 1995: A staggered spectral element model with application to the oceanic shallow water equation.

,*Int. J. Numer. Method Fluids***20****,**393–414.Iskandarani, M., D. B. Haidvogel, and J. C. Levin, 2003: A three-dimensional spectral element method for the solution of the hydrostatic primitive equations.

,*J. Comput. Phys***186****,**397–425.Johnson, C., 1987:

*Numerical Solution of Partial Differential Equations by the Finite Element Method*. Cambridge University Press, 278 pp.Ladyzhenskaya, O., 1969:

*Mathematical Theory of Viscous Incompressible Flow*. Gordon and Breach Science Publishers, 256 pp.Legrand, S., V. Legat, and E. Deleersnijder, 2000: Delaunay mesh generation for an unstructured-grid ocean general circulation model.

,*Ocean Modell***2****,**17–28.Le Roux, D. Y., A. Staniforth, and C. A. Lin, 1998: Finite elements for shallow-water equation ocean models.

,*Mon. Wea. Rev***126****,**1931–1951.Le Roux, D. Y., C. A. Lin, and A. Staniforth, 2000: A semi-implicit semi-Lagrangian finite-element shallow-water ocean model.

,*Mon. Wea. Rev***128****,**1384–1401.Lynch, D. R., and W. R. Gray, 1979: A wave equation model for finite element tidal computations.

,*Comput. Fluids***7****,**207–228.Lynch, D. R., and F. E. Werner, 1987: Three-dimensional hydrodynamics on finite elements. Part I: Linearized harmonic model.

,*Int. J. Numer. Methods Fluids***7****,**871–909.Lynch, D. R., and F. E. Werner, 1991: Three-dimensional hydrodynamics on finite elements. Part II: Non-linear time-stepping model.

,*Int. J. Numer. Methods Fluids***12****,**507–533.Lynch, D. R., J. T. C. Ip, C. E. Naimie, and F. E. Werner, 1996: Comprehensive coastal circulation model with application to the Gulf of Maine.

,*Cont. Shelf Res***16****,**875–906.Mellor, G. L., L-Y. Oey, and T. Ezer, 1998: Sigma coordinate pressure gradient errors and the seamount problem.

,*J. Atmos. Oceanic Technol***15****,**1122–1131.Myers, P. G., and A. J. Weaver, 1995: A diagnostic barotropic finite-element ocean circulation model.

,*J. Atmos. Oceanic Technol***12****,**511–526.Naimie, C. E., J. W. Loder, and D. R. Lynch, 1994: Seasonal variation of the three-dimensional residual circulation on Georges Bank.

,*J. Geophys. Res***99**(C8) 15967–15989.Nechaev, D., J. Schröter, and M. Yaremchuk, 2003: A diagnostic stabilized finite-element ocean circulation model.

,*Ocean Modell***5****,**37–63.Pedlosky, J., 1987:

*Geophysical Fluid Dynamics.*2d ed. Springer-Verlag, 710 pp.Provost, C. L., and P. Vincent, 1986: Some tests of precision for a finite element model of ocean tides.

,*J. Comput. Phys***110****,**273–291.Saad, Y., and M. H. Schultz, 1986: GMRES, a generalised minimum residual algorithm for solving nonsymmetric linear systems.

,*SIAM J. Sci. Stat. Comput***7****,**856–869.Shen, J., 1996: On error estimates of the projection methods for the Navier–Stokes equations: Second-order schemes.

,*Math. Comput***65****,**1039–1065.Smith, A., and D. Silvester, 1997: Implicit algorithms and their linearization for the transient incompressible Navier–Stokes equations.

,*SIAM J. Numer. Anal***17****,**527–545.Song, Y. T., 1998: A general pressure gradient formulation for ocean models. Part I: Scheme design and diagnostic analysis.

,*Mon. Wea. Rev***126****,**3213–3230.Tennekes, H., and J. L. Lumley, 1972:

*A First Course in Turbulence*. MIT Press, 300 pp.Turner, J. S., 1973:

*Buoyancy Effects in Fluids*. Cambridge University Press, 368 pp.

Linear stratification with a Burger number B = 1.5. Spurious velocities observed in the pressure gradient error test for the standard and ocean models. The first column gives the height of the seamount in relation to the total depth of the domain, denoted δ. The second column gives the horizontal mesh spacing *Δx, Δy* and the number of levels used in the vertical *V.* The magnitudes of the maximum horizontal and vertical spurious velocities are given in columns three and four. The figures in parentheses represent exponents, i.e. 1.234(5) = 1.234 × 10^{5}