afinite-elementoceanmodel:principlesandevaluation …epic.awi.de/5778/1/ser2002a.pdf ·...

26
A finite-element ocean model: principles and evaluation Sergey Danilov * , Gennady Kivman, Jens Schroter Alfred Wegener Institute for Polar and Marine Research, Postfach 12-01-61, 27515 Bremerhaven, Germany Received 16 October 2002; received in revised form 13 December 2002; accepted 13 December 2002 Abstract We describe a three-dimensional (3D) finite-element ocean model designed for investigating the large- scale ocean circulation on time scales from years to decades. The model solves the primitive equations in the dynamical part and the advection–diffusion equations for temperature and salinity in the thermodynamical part. The time-stepping is implicit. The 3D mesh is composed of tetrahedra and has a variable resolution. It is based on an unstructured 2D surface mesh and is stratified in the vertical direction. The model uses linear functions for horizontal velocity and tracers on tetrahedra, and for surface elevation on surface triangles. The vertical velocity field is elementwise constant. An important ingredient of the model is the Galerkin least-squares stabilization used to minimize effects of unresolved boundary layers and make the matrices to be inverted in time-stepping better conditioned. The model performance was tested in a 16-year simulation of the North Atlantic using a mesh covering the area between 7° and 80° N and providing variable hori- zontal resolution from 0.3° to 1.5°. Ó 2003 Elsevier Science Ltd. All rights reserved. Keywords: Finite elements; Ocean modelling 1. Introduction The idea of using unstructured grids for modelling ocean dynamics sounds very attractive given high complexity of the ocean geometry. Fine topographic features like narrow straits, steep continental slopes, islands, etc. are of crucial importance and may control the circulation on large spatial scales while they can hardly be resolved with an affordable homogeneous spatial resolu- tion. The finite-element method (FEM) offers a traceable tool to tackle this problem. * Corresponding author. E-mail addresses: [email protected] (S. Danilov), [email protected] (G. Kivman), [email protected] (J. Schroter). 1463-5003/03/$ - see front matter Ó 2003 Elsevier Science Ltd. All rights reserved. doi:10.1016/S1463-5003(02)00063-X Ocean Modelling xxx (2003) xxx–xxx www.elsevier.com/locate/omodol ARTICLE IN PRESS

Upload: nguyenthuy

Post on 03-Apr-2018

215 views

Category:

Documents


0 download

TRANSCRIPT

A finite-element ocean model: principles and evaluation

Sergey Danilov *, Gennady Kivman, Jens Schr€ooter

Alfred Wegener Institute for Polar and Marine Research, Postfach 12-01-61, 27515 Bremerhaven, Germany

Received 16 October 2002; received in revised form 13 December 2002; accepted 13 December 2002

Abstract

We describe a three-dimensional (3D) finite-element ocean model designed for investigating the large-

scale ocean circulation on time scales from years to decades. The model solves the primitive equations in the

dynamical part and the advection–diffusion equations for temperature and salinity in the thermodynamical

part. The time-stepping is implicit. The 3D mesh is composed of tetrahedra and has a variable resolution. It

is based on an unstructured 2D surface mesh and is stratified in the vertical direction. The model uses linearfunctions for horizontal velocity and tracers on tetrahedra, and for surface elevation on surface triangles.

The vertical velocity field is elementwise constant. An important ingredient of the model is the Galerkin

least-squares stabilization used to minimize effects of unresolved boundary layers and make the matrices to

be inverted in time-stepping better conditioned. The model performance was tested in a 16-year simulation

of the North Atlantic using a mesh covering the area between 7� and 80� N and providing variable hori-

zontal resolution from 0.3� to 1.5�.� 2003 Elsevier Science Ltd. All rights reserved.

Keywords: Finite elements; Ocean modelling

1. Introduction

The idea of using unstructured grids for modelling ocean dynamics sounds very attractive givenhigh complexity of the ocean geometry. Fine topographic features like narrow straits, steepcontinental slopes, islands, etc. are of crucial importance and may control the circulation on largespatial scales while they can hardly be resolved with an affordable homogeneous spatial resolu-tion. The finite-element method (FEM) offers a traceable tool to tackle this problem.

*Corresponding author.

E-mail addresses: [email protected] (S. Danilov), [email protected] (G. Kivman),

[email protected] (J. Schr€ooter).

1463-5003/03/$ - see front matter � 2003 Elsevier Science Ltd. All rights reserved.

doi:10.1016/S1463-5003(02)00063-X

Ocean Modelling xxx (2003) xxx–xxx

www.elsevier.com/locate/omodol

ARTICLE IN PRESS

Most extensively, the FEM is used in modelling barotropic tides and wind-driven ocean cir-culation (Walters and Werner, 1989; Le Provost and Vincent, 1991; Wunsch et al., 1997; Myersand Weaver, 1995), and some tests proved that results obtained with the FEM were favorable incomparison to those obtained with more traditional finite-difference methods (FDMs) (see Dumaset al., 1982). Attractiveness of the FEM for modelling ocean dynamics was demonstrated more atthe dawn of the age of ocean circulation modelling by Fix (1975). Such nice properties of the FEMas conservation of energy that is common for all variational methods of solving differentialequations, natural treatment of boundary conditions, and flexibility of triangulation were com-plemented with availability of supercomputers. The high ratio of inter-element to intra-elementcalculations makes the FEM well suited to parallel computing. Having these in mind Le Provost(1986) suggested this approach as an interesting alternative to the FDM commonly used in oceanmodelling.

However, not much changed since that time. Few applications of the FEM to steady-stateocean inverse problems (Brasseur, 1991; Schlichtholz and Houssais, 1999; Dobrindt and Schr€ooter,2002a,b; Nechaev et al., 2003) appeared. Some existing two-dimensional (2D) FE shallow watertide models have been generalized by accounting for the dependence on the vertical coordinateswith the FDM (Westerink et al., 1992; Lynch and Naimie, 1993) and by including heat and saltadvection (Lynch et al., 1996). But they are exclusively used in modelling the coastal dynamics forrelatively short time periods (up to few months). A model developed by Iakovlev (1996) relies onthree-dimensional (3D) FEs but essentially uses a structured horizontal mesh that allows one toretain conservation properties of the FEM and to avoid algorithmic complexity encountered whileusing unstructured meshes. However, this approach does not employ the whole potential of theFEM such as capability to follow nicely complex boundaries and to provide finer resolution infrontal zones and regions of special interest.

Despite remarkable achievements gained with the FEM in simulating coastal and tidal dy-namics, ocean general circulation models (OGCMs) used in climatic studies still almost exclu-sively rely on the FDM. The only exception is the spectral element ocean model (SEOM)(Iskandarani et al., 1995). In a recent review of the OGCMs, Griffies et al. (2001) pointed out thatin addition to algorithmic complexity there are two general problems one would encounter inusing unstructured grids. First, it is difficult to represent the geostrophic balance on the un-structured grid. Second, any change in grid spacing gives rise to unphysical wave scattering that isnot dangerous for steady state engineering problems or for ocean circulation problems at rela-tively short integration time (as is the case for tide and coastal models) but might become ofcrucial importance for modelling large-scale ocean circulation.

With this regard, it is worth emphasizing the basic distinction between the FDM and FEM.Namely, using the former one redefines the differential model operator while the latter allows topreserve the operator by changing the space where the solution is searched for. With special carein choosing the functional spaces for unknown model variables it is possible to resolve the firstproblem (Le Roux et al., 1998). The second problem can be mainly addressed to OGCMs em-ploying curvilinear coordinates (POM, HOPE, etc.) rather than to the FEM. The FEM is con-servative and preserves almost all properties of the original differential operator to be inverted. Ofsure, with the spatial resolution varying very sharply or with elements having bad discretizationproperties (for example, triangles containing small angles) the set of algebraic equations to be

2 S. Danilov et al. / Ocean Modelling xxx (2003) xxx–xxx

ARTICLE IN PRESS

solved becomes extremely ill-conditioned. However it is not a problem of the FEM itself and itshould be solved at the step of the mesh generation.

Here, we present the first 3D FE primitive equations ocean circulation model based on anunstructured horizontal mesh. It is developed for studies of the large scale ocean circulation attime scales from months to decades. Unlike the SEOM where a relatively new approach ofspectral elements (Patera, 1984) is utilized we use a more traditional formulation of the FEM. Thebasic difference between them is as follows. With the FEM, one uses low order polynomials asbasis functions defined on a relatively high number of basic elements. It is opposed to the spectralelement method where the polynomials are of much higher order while the partitioning of thecomputational domain is much coarser.

The basic elements in our model are tetrahedra. The mesh is stratified in the vertical and isunstructured in the horizontal directions. This choice allows the coast lines and the bottom to-pography to be followed very precisely and notably simplifies the vertical integration for com-puting the hydrostatic pressure. Horizontal velocity, temperature and salinity are chosen tobelong to the space of linear functions defined on tetrahedra. The sea surface height belongs to thespace of linear functions on surface triangles, and vertical velocity is elementwise constant.

The model has grown from the diagnostic FE model by Nechaev et al. (2003) and borrows itschoice for functional spaces to represent the model fields. It differs, however, in many otherimportant respects. First, it is designed for time-stepping mode, although it allows for stationaryinversion as an option. Second, it uses Galerkin least-squares (GLS) stabilization (Hughes et al.,1989) modified for transient problems which ensures stable performance with time steps up to 12h. Finally, it pays special attention to the accuracy of volume conservation.

Unlike the FD method exclusively used in ocean modelling for more than three decades,the history of FE applications is much more shorter and numerical problems one encounterswhen using the FEM are much less studied. The FEM was initially designed and is mainlyapplied to steady-state elliptic boundary-value problems. The primitive equations commonlyused to describe the large-scale ocean circulation contain elliptic-type problems, but also re-quire to solve the first-order continuity and hydrostatic equations. Treating them with 3DFEs on large unstructured meshes is not straightforward and we discuss several feasible ap-proaches. Although some of them proved impractical, we believe that our experience might beuseful for future development in the FE ocean modelling. Another problem comes from thefact that given low order polynomials on elements one cannot use biharmonic viscosity anddiffusion to stabilize the momentum and tracer equations, as is becoming common with currenteddy-permitting or eddy-resolving FD models. A set of residual-free stabilization techniquesis known for FEM (see, e.g., Hughes et al., 1989; Hughes, 1995; Franca and Russo, 1996;Codina and Soto, 1997), which stabilize the equations without introducing excessive dissipation.The implementation of stabilization in primitive equations is also discussed in some detail be-low.

Sections 2 and 3 describe the model equations and discretization respectively, and Section 4introduces stabilization. We also address the volume conservation there. The results of 16-yearsimulation of circulation in the Northern Atlantic are presented in Section 5. Section 6 concludes,and Appendices A and B contain analysis of dispersion properties of stabilized FE advection–diffusion equation and details of barotropic–baroclinic splitting.

S. Danilov et al. / Ocean Modelling xxx (2003) xxx–xxx 3

ARTICLE IN PRESS

2. Model equations

The governing equations of the model describe the thermo-hydrodynamics of a thin stratifiedlayer of sea water on spherical rotating Earth under hydrostatic, Boussinesq and traditionalapproximation for the Coriolis terms. To avoid simultaneous treatment of non-linear dynamicsand thermodynamics of the ocean we split the system of governing equations into two sub-problems and solve them separately.

The dynamical part of the model solves the momentum evolution equation under the integralcontinuity constraint:

otuþ f ðk� uÞ þ grf �r � Alru� ozAv ozu ¼ � 1

q0

rp þ Fu; ð1Þ

otf þr �Z z¼f

z¼�Hudz ¼ 0; ð2Þ

ozp ¼ �gq; ð3Þ

where ðu;wÞ ðu; v;wÞ is the velocity vector in the spherical coordinate system ðk; h; zÞ, q0, q arethe mean sea water density and the deviations from that mean respectively, f is the sea surfaceelevation, p is the baroclinic pressure anomaly computed from the level z ¼ 0, f ¼ f ðhÞ is theCoriolis parameter, Al, Av are the lateral and vertical momentum diffusion coefficients, k is thevertical unit vector, and g is the gravitational acceleration. The term Fu ¼ ðurþ wozÞu representsnon-linear advection in the momentum equation. The term with time derivative in (2) is omitted inthe rigid-lid approximation which filters out fast gravity waves. In this approximation the verticalvelocity would satisfy zero boundary condition at z ¼ 0. Although the rigid-lid approximation isthe main option in the model, we will describe both the free-surface and rigid-lid versions. Theupper limit of integration in (2) is set to 0, which is good approximation everywhere except forcoastal regions.

The dynamical part of the model considers the density variation q to be known. Eqs. (1)–(3) aresolved in a region X limited by four physically different types of boundaries oX ¼

S4

i¼1 Ci, whereC1 : fz ¼ 0g stands for the ocean surface, C2 : fz ¼ �Hðk; hÞg is the bottom of the ocean, C3

represents the lateral vertical rigid walls of the domain and C4 denotes the lateral vertical openboundaries. The set of boundary conditions used with the dynamical part of the model includes thecondition of the momentum flux continuity on the ocean surface, the bottom-drag condition on thebottom, no-slip boundary conditions on the vertical walls and the open-boundary condition:

Av ozu ¼ s; p ¼ 0 on C1; ð4ÞAv ozuþ Alðr � HrÞu ¼ Cgujuj on C2; ð5Þu ¼ 0 on C3; u ¼ vOB; on C4; ð6Þ

where s is the vector of tangent wind stresses, the friction coefficient Cg ¼ 0:0025, and vOB is agiven velocity field at the open boundary.

In the thermodynamical part of the model we consequently solve the continuity equation for thevertical velocity w, tracer evolution equations for the potential temperature T and the salinity S ofsea water, and compute density via the equation of state:

4 S. Danilov et al. / Ocean Modelling xxx (2003) xxx–xxx

ARTICLE IN PRESS

ozw ¼ �r � u; ð7ÞotCm þr � ðuCmÞ þ ozðwCmÞ � r � Km

l rCm � ozKmv ozC

m ¼ 0; ð8Þq � .ðT ; S; pÞ ¼ 0: ð9Þ

Here C1 T , C2 S, Kml , K

mv are the lateral and vertical diffusion coefficients for the mth

tracer.The vertical velocity is integrated from the ocean surface with the kinematic boundary con-

dition:

w ¼ otf on C1

or

w ¼ 0 on C1 ð10Þ

in the rigid-lid mode. It also obeys the second boundary condition at the bottom:

w ¼ �rH � u on C2 ð11Þ

implicit in (2). Tracer evolution equations (8) satisfy the following boundary conditions on thesurface and solid boundaries:

Kmv ozCm ¼ �qm or Cm ¼ Cm

0 on C1; ð12ÞðrCm; ozCmÞ � n3 ¼ 0 on C2 [ C3; ð13Þ

where qm and Cm0 are the surface fluxes and surface values of the mth tracer, n3 is the 3D unit

vector normal to the respective surface.The boundary conditions at open boundaries are extensively discussed in the literature (see,

e.g., the recent paper by Marchesiello et al. (2001)). No choice of open boundary conditions ismathematically consistent, and one is usually guided by the principle that the numerical solutionbe stable and realistic with respect to observational data. For the purpose of testing the model weset vOB ¼ 0 in (6) and use

ðrCm; ozCmÞ � n3 ¼ 0 on C4 ð14Þ

for tracers, realizing that the solution may depart from the desired one in some vicinity of theopen boundaries. There are no principal difficulties in equipping the model with more ‘‘realistic’’treatment of open boundary conditions.

3. Space and time discretization

3.1. Spatial discretization

A necessary prerequisite of any FE model is the choice of spatial discretization and definition ofdiscrete functional spaces. We use tetrahedral elements obtained by constructing the surface tri-angular mesh, cutting the vertical prisms built on surface triangles by a set of horizontal (in upper

S. Danilov et al. / Ocean Modelling xxx (2003) xxx–xxx 5

ARTICLE IN PRESS

layers) and terrain-following (in deep layers) surfaces, and then cutting the elementary prisms intotetrahedra. This provides high flexibility for representation of irregular topography and localmesh refinement.

In choosing functional spaces we were guided by two principles. First, a major feature of theocean dynamics is the dominance of the geostrophic balance in the ocean interior. Not everychoice of velocity–pressure pairs of FE functional spaces is suitable for reproducing this balance.The problem was thoroughly examined by Le Roux et al. (1998) who concluded that the space ofpiecewise linear basis functions X for velocity and pressure is one of the most convenient from thispoint of view. Second, the piecewise linear basis functions require only nodal values of respectivefields and thus provide compact storage for the fields and, more importantly, the matrices as-sociated with equations. The latter factor becomes very restrictive as the size of the problemgrows. Given all that, we choose linear basis functions for the horizontal velocity, sea surfaceheight, hydrostatic pressure and tracers. The vertical velocity will be addressed separately.

However, these basis functions are not twice differentiable and we need to reformulate theproblem (1)–(6) and (7)–(14) in the weak sense. Multiplying (1) and (2) respectively by an arbi-trary vector field ~uu and a scalar function ~ff that does not depend on z, by making use of Green�sformula and boundary conditions (4)–(6) we arrive at the equalitiesZ

X½ðotuþ f ½k� u� þ grfÞ � ~uuþ Av ozu � oz~uuþ Alru � r~uu�dX

¼Z

C1

s � ~uudC1 �Z

C2

Cgjuju � ~uudC2 �Z

X½ðu � r þ wozÞu� � ~uudX �

ZX

1

q0

~uu � rpdX; ð15ÞZ

C1

otf ~ffdC1 �Z

Xu � r~ffdX ¼ �

ZC4

vOB � n3~ffdC4 ð16Þ

to be fulfilled by the solution to the original problem (1)–(6) if ~uu ¼ 0 on C3 [ C4 where Dirichletboundary conditions for the velocity field u are imposed. The last term in (16) is equal to zero ifthe open boundary is replaced by a rigid wall, and the first term should be omitted in the rigid lidapproximation. After partitioning of the model domain onto tetrahedrons, we express modelvariables u and f as linear combinations of 3D and 2D piecewise linear basis functions Xk and Skcorresponding to the partitioning,

u ¼XN3D

k¼1

ukXk; f ¼XN2D

k¼1

fkSk: ð17Þ

The kth basis function is equal to 1 at the kth node and linearly vanishes to 0 within tetrahedrons(triangles) containing this node. Replacing the test functions ~uu and ~ff in (15) and (16) with Xi andSi, we obtain the so-called Galerkin equations for uk and fk which represent nodal values of thevelocities and sea surface height. Here N3D and N2D are the total amounts of 3D and 2D (surface)mesh nodes, respectively.

Before proceeding to the tracer equations, we will discuss discretization of the hydrostaticequation (3) and the vertical velocity (continuity) equation (7). Both require solving the first-orderdifferential equation with respect to the vertical coordinate z. Unlike the FDM, this step is nottrivial in the FEM, as the FEM always couples a given node with its neighbours thus leading to amatrix problem involving all nodes. Since the FEM in the space of linear functions is analogous to

6 S. Danilov et al. / Ocean Modelling xxx (2003) xxx–xxx

ARTICLE IN PRESS

approximating the derivatives with central differences, it couples together either the odd or evenvertical levels while these two chains are linked only due to the boundary condition at the surface.As such, the corresponding stiffness matrix is generally ill-conditioned and leads to solutions withspurious level-to-level oscillations. To avoid them, the following strategy was adopted for thepressure p.

After computing T and S, we compute nodal values of q via the equation of state. Then werecover the nodal values of pressure from the hydrostatic equation considered in the FD sense.After obtaining nodal values pk, the pressure is treated analogously to (17) as

p ¼XN3D

k¼1

pkXk ð18Þ

to compute the last term on the RHS of (15) in the FEM sense. Another scheme was also tested.Namely, we interpolated q linearly between the nodes and solved the second-order equation for p:

o2zzp ¼ �gozq; ð19Þwith the FEM in the space of piecewise linear functions (solving includes rewriting (19) in theweak sense, integrating by parts and obtaining a linear system of equations on pk). In addition tothe boundary condition at the surface p ¼ 0 it needs the second boundary condition either at thesurface or at the bottom. It could be taken from the hydrostatic equation. Our experience withthis scheme of calculating p shows that due to finite accuracy of solution for pk the pressuregradient is too noisy to be used as forcing in the momentum equation. So, the current defaultoption consists in discretizing the hydrostatic equation by the FDM.

A procedure of this kind cannot be implemented for computing w for two reasons. First, ascheme of computing w must be consistent with (16) in order to fulfill boundary conditions (10)and (11). Second, the 2D divergence of the piecewise linear horizontal velocity u is not defined atnodes but at elements and thus we can treat the continuity equation (7) only in the weak sense. Togo around solving the first-order problem for w, we introduce the vertical velocity potential U sothat w ¼ ozU. If U 2 X , then (7) can be reformulated with use of (10) and (11) asZ

XozUoz ~UUdX ¼ �

ZXu � r~UUdX þ

ZC4

vOB � n3 ~UUdC4; ð20Þ

which should be held for any ~UU 2 X . After computing U we obtain w as an elementwise constantfunction. With this scheme of treating the continuity equation we cannot guarantee the volumeconservation within each tetrahedron. However, the volume is conserved locally within a clusterof elements surrounding each node (weighted with the test-function defined at this node), andglobally. To see the latter take ~UU ¼ const, which would imply volume integration of the originalcontinuity equation. Realizing that the surface integral is zero as there is no net volume fluxthrough the open boundaries, we conclude that all terms in (20) become zero, or that the totalvolume is conserved.

Since both boundary conditions in this scheme are of the Neumann type, the RHS of (20) mustsatisfy the solvability condition: it must be zero for test functions that do not depend on thevertical coordinate, ~UU ¼ ~UUðk; hÞ. The latter is guaranteed up to numerical errors as the horizontalvelocity field satisfies (16).

S. Danilov et al. / Ocean Modelling xxx (2003) xxx–xxx 7

ARTICLE IN PRESS

It is worth noting that another scheme for computing w is implemented in other FE models.It was found that integrating the continuity equation over z to calculate w resulted in accumu-lation of errors, for the reasons explained above. To prevent this undesired feature, Lynch andNaimie (1993) suggested to solve the second-order equation obtained by differentiating (7) withrespect to zZ

Xozwoz ~UUdX ¼ �

ZXðr � uÞoz ~UUdX; ð21Þ

with two Dirichlet boundary conditions (10) and (11). The fundamental difference between (20)and (21) is that the latter equation must be satisfied not for all test functions ~UU but only for thosevanishing at C1 and C2. Consequently, the global volume conservation is broken. Muccino et al.(1997) proposed to treat the continuity equation and boundary conditions (10) and (11) in theleast-square sense and concluded that this approach outperformed that of Lynch and Naimie(1993). Though the least-square scheme has shown to provide less deterioration in volume con-servation, the problem is still present. That was the reason why we did not proceed in either way.

The weak formulation for the tracer transport equations is grossly similar to that for themomentum equation. The advection of tracer fields (represented by linear combinations ofpiecewise linear basis functions) is computed using piecewise linear horizontal velocities andelementwise constant vertical velocities. We write down the weak formulation for the temperatureequation only:Z

XðotT eTT þ ðu � r þ wozÞT eTT þ KlrT � reTT þ Kv ozT ozeTT ÞdX ¼ �

ZC1

qeTT dC1; ð22Þ

where q is the diffusive flux of tracer at the surface (negative flux would imply heating). The weakformulation for salinity or any other tracer would look similar to that for the temperature.

In the ocean FD modelling community much attention is paid to the choice of the advectionscheme (see, e.g., Gerdes et al., 1991; Webb et al., 1998; Hecht et al., 2000). Many of currentimplementations use upwind-type corrections to the standard central differences which otherwiseare too dispersive on small scales and result in oscillations in tracer fields if the diffusion is notsufficiently strong. The higher-order advection schemes exhibit reduced dispersion and bihar-monic-type numerical diffusion. In this respect we would like to reiterate that the FE operator isexact, and it is the space of functions and partition onto elements which influence the solution. InAppendix A we present analysis of dispersion properties of FE disretized advection–diffusionequation and show them to be superior over central differences (FD) given one-dimensional (1D)problem and equidistant grid.

3.2. Time stepping

Several general remarks concerning time-stepping for FE discretized equations are worthnoting. Due to a non-diagonal shape of the mass matrix formed by L2 products of the basisfunctions, time stepping involves numerical matrix inversion. No solver can do it precisely, sodifferentiation of time-evolving FE fields is unsafe. The numerical noise due to finite accuracy ofthe solver may accumulate in time if differential operators are computed at the preceding timestep. Therefore, the (most dangerous) second-order operators in (15) and (22) (viscosity and

8 S. Danilov et al. / Ocean Modelling xxx (2003) xxx–xxx

ARTICLE IN PRESS

diffusion respectively) should be treated implicitly (or at least, semi-implicitly). They lead tosymmetrical contributions to the stiffness matrices and as such do not make the inversion moredifficult.

The treatment of other terms could vary depending on tasks and numerical efficiency. Since weare interested in long integration periods, we treat all terms in the LHS of (15) and (16) implicitly,as it permits using large time steps. Implicitness implies that the systems of equations (15) and(16) are solved simultaneously for the vector ðuk; fkÞ. We use the energy norm kðu; fÞk ¼Ru � udX þ g

Rf2 dC1 obtained by adding (16) multiplied with the acceleration due to gravity g, to

(15). This ensures that the potential energy due to the sea surface elevation would be properlyaccounted in the energy balance. To see that, take ~uu ¼ u and ~ff ¼ f.

The pressure gradient term on the RHS of (15) is computed explicitly, because otherwise wehave to solve the momentum, continuity and nonlinear tracer equations simultaneously, which istoo costly. There are two options for computing the momentum advection term. It can be explicitor linearized (with only u � r þ woz estimated at the preceding time step) and treated implicitly.The second option is safer and more accurate, but requires reassembling the stiffness matrix atevery time step. We use the first option, as the momentum advection term is much smaller thanrp which is considered explicitly. Although the RHS of (15) contains first-order derivatives, wehave not noticed any related instability. To summarize, we integrate Eqs. (15) and (16) with thebackward Euler scheme with explicit treatment of the momentum advection and hydrostaticpressure terms which are computed at the preceding time step.

The vector ðuk; fkÞ has dimension of 2N3D þ N2D, and inverting the stiffness matrix corre-sponding to the combined problem (15) and (16) creates the main numerical load. The stiff-ness matrix has strong antisymmetric part, so availability of efficient solvers could becomea critical issue. Traditionally, FDMs split the problem into the barotropic and baroclinic parts,and solve separately for barotropic transports and baroclinic velocities. In that case the mostdifficult elliptic-type problem of computing the transports becomes 2D and could be solved easier.Given tetrahedral FEs, however, the vertically integrated horizontal velocity (transport) doesnot belong to the functional space of linear functions on surface triangles, as u does. This ren-ders introducing transports not so straightforward as in the FDM. While this approach is inprinciple feasible with the FEM, its practical realization encounters problems, as explained inAppendix B.

The advection term is mainly balanced with the time derivative term in the tracer equations. Sowe treat it implicitly there to ensure stability in long runs, and integrate these equations in timewith the backward Euler scheme. Although implicit advection requires reassembling the stiffnessmatrix at each time step, it does not create much computational burden because the time step ofdynamical equations typically takes more CPU time (see the details of implementation in Section5). The same stiffness matrix is used for time stepping temperature and salinity, or any other tracerincluded in the model. Thus increasing the number of tracers would reduce the relative cost of theassembly procedure.

The discretization of the primitive equations described above allows for integration of themodel with reasonable values of the viscosity and time steps of up to few hours for the horizontalresolution of several tens km. However, due to accumulation of the small-scale numerical noise,the model trajectory degrades after a couple of years of integration (or the model should be madetoo dissipative from the very beginning).

S. Danilov et al. / Ocean Modelling xxx (2003) xxx–xxx 9

ARTICLE IN PRESS

The same behaviour of the SEOM is reported in Levin et al. (1997) unless a special filteringprocedure was applied. The problem of damping the numerical noise and still having a low vis-cosity to simulate turbulent ocean flows is a crucial issue for OGCMs. In addition to using im-proved advection schemes, the vast majority of the OGCMs employs the biharmonic horizontalfriction operator instead of the traditional Laplacian friction because of scale-selective propertiesof the former. However, implementation of the hyperviscosity in the FEM is problematic since itrequires using basis functions which would be not only continuous across the element borders butalso continuously differentiable. For a tetrahedral mesh, the minimal set of such basis functionsare polynomials of the fifth order which are far too expensive to be used for meshes having Oð106Þelements. We utilize here another approach described in Section 4.

4. Stabilization

The FEM using linear basis functions due to its central difference property is well suited onlyfor solving elliptic problems (dominated by the diffusion). In the ocean, the evolution of thetemperature and salinity is mainly governed by the advection that is dominating over the diffu-sion. This causes numerical problems.

Let us consider for simplicity a stationary advection–diffusion equation

u � rT � kDT ¼ F ; ðx; yÞ 2 X; ð23Þ

koTon

¼ q; ðx; yÞ 2 oX; ð24Þ

in a 2D domain X with the boundary oX. Here F is a source term and k is a diffusion coefficient, qis the temperature flux taken with opposite sign, and the derivative in (24) is taken in the directionof the outer normal. For a given velocity field u such that r � u ¼ 0 and u � n ¼ 0 at oX,Z

XT ðu � rT ÞdX ¼ 0; ð25Þ

and thus the stability of the Galerkin method applied to solving (23) relies entirely on kkðrT Þk2that can be small for very small k. The stiffness matrix that corresponds to the problem (23) and(24) is essentially non-symmetric and difficult to invert, while the solution to the problem couldexhibit spurious oscillations.

Problems of the same origin arising in modelling advection-dominated flows, i.e. when themesh-Peclet number Pe ¼ jujh=k, where h is the grid step, is large, are well known in the FDliterature. Pacanowski and Griffies (2000) mentioned that if Pe > 2, MOM will not necessarilyblow-up but the solution will slowly degrade with time stepping. A way around this problem is toadd some artificial diffusivity to ensure Pe < 2 (Bryan et al., 1975) that makes the solution toodissipative. Otherwise, it will exhibit spurious oscillations of the wavelength proportional to thegrid size (as in standard central differences). The other (already mentioned) way to tackle thisproblem is using more sophisticated advection schemes (Webb et al., 1998; Hecht et al., 2000) thatexploit higher-order spatial approximations.

The problem attracted much attention over the last two decades in the FE literature and severalrecipes how to make the problem better posed and avoid adding much diffusivity were put for-

10 S. Danilov et al. / Ocean Modelling xxx (2003) xxx–xxx

ARTICLE IN PRESS

ward. A substantial progress in this direction was achieved after recognition that the originalproblem may be transformed to a new one with much better properties in such a way that thesolution to the former will also be the solution to the latter. Seemingly, the most general amongthese so-called residual free methods is the GLS (Hughes et al., 1989) utilized in the model de-scribed here.

4.1. Stabilization for the thermodynamical part

The idea behind the GLS stabilization is simple: one modifies the original differential equationsin such a way that the solution would satisfy both the original and the modified equations whilethe discretization of the latter would produce a matrix whose inversion would require less iter-ations of an iterative solver. If we consider (23), the diffusion term for small k is important only inthe narrow boundary layer of the width of Oðk=jujÞ and is effectively dropped in the discretizedequations when h � k=juj. Eq. (23) almost corresponds to the first-order differential advectionoperator that does not need boundary conditions along the whole boundary oX. Hence, theproblem becomes nearly overdetermined. What is needed to restore the well-posedness of theproblem is to increase the order of the dominant differential operator.

For any sufficiently smooth eTT , the solution T to the problem (23) and (24) satisfies the fol-lowing integral equalityZ

X½eTT ðu � rT Þ þ kreTT � rT �dX ¼

ZX

eTT F dX þZoXqeTT djoXj; ð26Þ

that is a starting point in deriving Galerkin equations. We may modify (26) and write down anequivalent equalityZ

X½eTT ðu � rÞT þ kreTT � rT �dX þ

ZX1

etðu � r � kDÞeTT ðu � rT � kDT � F ÞdX

¼Z

X

eTT F dX þZoXqeTT djoXj: ð27Þ

Here X1 � X is an arbitrary subdomain where T and eTT are twice differentiable, and et is an ar-bitrary integrable function. The second integrand in the LHS of (27) is referred to as the stabi-lization term. The variational principles are completely equivalent. Therefore, instead of using(26) for deriving the set of discrete Galerkin equations, we can employ (27) that leads to the GLSstabilization.

If we consider the space of piecewise linear functions Xk for T and eTT , then X1 cannot be ex-tended to the whole domain X but only to the sum of elements interiors [El. Within elementinteriors, functions T and eTT are analytical functions and DT ¼ DeTT ¼ 0. Then, the stabilized weakformulation of the problem (23) and (24) can be written asZ

X½eTT ðu � rT Þ þ kreTT � rT �dX þ

Z[El

etðu � reTT Þðu � rT � F ÞdX

¼Z

X

eTT F dX þZoXqeTT djoXj: ð28Þ

S. Danilov et al. / Ocean Modelling xxx (2003) xxx–xxx 11

ARTICLE IN PRESS

The proper choice of the stabilization parameter et in the stationary case has been thoroughlydiscussed in the FE literature. The general recipe is to take et ¼ Oðh=jujÞ for Pe � 1 andet ¼ Oðh2=kÞ for small Peclet numbers (Hughes et al., 1989).

Extension of the GLS to the original problem of non-stationary tracer evolution is straight-forward:Z

X½eTT ðot þ u � r þ wozÞT þ AlreTT � rT þ Av ozeTT ozT �dX þ

Z[El

etðu � r þ wozÞeTT ðotTþ u � rT þ wozT � F ÞdX ¼

ZX

eTT F dX þZoXqeTT djoXj; ð29Þ

that should be satisfied for any piecewise linear function eTT . Here q stands for surface and openboundary diffusive fluxes of T . The tracer stabilization parameter et is computed for each elementwith horizontal and vertical dimensions h and Dz respectively, from

et ¼ ½1=Dt þ 4Al=h2 þ 2Av=Dz2 þ juj=hþ jwj=Dz��1: ð30Þ

Here Dt is the time step for the tracer problem. The expression (30) is interpolation between limitsof large and small Peclet numbers. The contribution from Dt in non-stationary case follows froman approach to stabilized equations proposed in Ilinka et al. (2000) (see also Appendix A forfurther discussion).

Several comments could be made with respect to the stabilization algorithm of the advection–diffusion problem. First, there is similarity with upwind scheme, yet it is superficial. The stabili-zation does not introduce the upwind diffusion, as the upwind term is approximately balancedwith other terms almost everywhere excluding regions of very high temperature gradient. Weanalyze the dispersion properties of the stabilized advection–diffusion equation in Appendix Aand show that the stabilization introduces negligible dissipation at large scales and strongly dampsthe smallest resolved scales, as expected. It also reduces dispersion if the stabilization parameter isappropriately chosen. Second, the same stabilization could be derived using bubble functions andminimizing the residual on elements (residual-free bubbles method, see Brezzi et al., 1996). Thisapproach was used in Nechaev et al. (2003). Third, to some extent, it can be viewed as param-eterization of unresolved (by basis functions) subgrid scales (for detail, see Hughes, 1995).

4.2. Stabilization for the dynamical part

Large-scale ocean dynamics is nearly in geostrophic balance. Consequently, one encounters thesame numerical problem as that described above for the advection–diffusion equation if thehorizontal resolution is too coarse to resolve the viscous boundary layer, i.e. if the local Ekmannumber Ek ¼ ð2Al=f Þ1=2=h is small. Indeed, if we multiply the steady-state version of (1) by u, takeinto account (2) and boundary conditions and consider a flat bottom case with s ¼ 0 and Cg ¼ 0for simplicity, then we arrive at

Avkozuk2 þ Alkruk2 ¼ �q�10

ZXrp � udX; ð31Þ

and again notice that the stability of the problem completely relies on the small values of viscositycoefficients Al, Av, as the RHS of (31) is not sign definite.

12 S. Danilov et al. / Ocean Modelling xxx (2003) xxx–xxx

ARTICLE IN PRESS

In addition, there is one more difficulty that is specific to the FE discretization of the Navier–Stokes and primitive equations. It is well known that FE spaces Vh and Qh for the velocity and thepressure, respectively, cannot be chosen arbitrary if the standard Galerkin method is applied tomodelling incompressible flows. They have to meet the so-called Babu�sska–Brezzi–Ladyzhenskayacondition (BBL) (Babu�sska, 1973; Brezzi, 1974; Ladyzhenskaya and Solonnikov, 1976). Piecewiselinear basis functions for the velocity and pressure do not meet this requirement. Violating theBBL condition results in spurious null-space surface-elevation solutions.

Both numerical problems can be resolved with the GLS (Codina and Soto, 1997). IntroducingL ¼ otuþ fk� uþ grf, L1 ¼ rAlruþ ozAv ozu and denoting by R the terms on the RHS of (1)we write the stabilized equations asZ

XðL � ~uuþ Alru � r~uuþ Av ozu � oz~uuÞdX þ

ZX1

edf ðLþ L1Þ � ðk� ~uuÞdX1

¼Z

XR � ~uudX þ

ZX1

edfR � ðk� ~uuÞdX þZ

C1

s � ~uudC1 �Z

C2

Cgjuju � ~uudC2;ZC1

otf ~ffdC1 �Z

Xr~ff � udX þ

ZX1

edr~ff � ðLþ L1 � RÞdX1 þZ

C4

~ffvOB � ndC4 ¼ 0:

Here ed is the stabilization parameter. The stabilization terms in both equations contain contri-butions from viscous terms L1 which are zeros on linear functions inside the elements. In thestandard approach (applied when the problem is posed with the Dirichlet boundary conditions),one extends integration only to the element interiors thus omitting L1 in the stabilization. In ourcase the problem is set with the two Neumann boundary conditions at C1 and C2 that correspondto essential forcing and (less essential) dissipation shaping the entire flow. To properly take theminto account we should make one step back and consider the two equations above as formulationof a weak problem with yet unspecified (but sufficiently smooth) fields, test functions and ed. Wethen integrate by part contributions from dissipative terms in stabilization and return to linearfunctions, extending X1 to the sum of element interiors and considering ed to be elementwiseconstant. (Note that the Neumann boundary conditions in tracer equations do not require specialattention in the rigid lid case because boundaries are impermeable.)

The stabilized equations expressing the momentum and mass conservation take the formZXðotuþ fk� uþ grfÞ � ð~uuþ edfk� ~uuÞdX þ

ZXðAv ozu � oz þ Alru � rÞð~uuþ edfk� ~uuÞdX

¼ �q�10

ZXrp � ð1þ edfk�Þ~uudX þ

ZC1

s � ð1þ edfk�Þ~uudC1 �Z

C2

Cgjuju � ð1þ edfk�Þ

� ~uudC2 �Z

Xð1þ edfk�Þ~uu � ðu � r þ wozÞudX; ð32ÞZ

C1

otf ~ffdC1 �Z

Xu � r~ffdX þ

ZX

edr~ff � ðotuþ f ½k� u� þ grf þ q�10 rp þ ðu � r þ wozÞuÞdX

�Z

C1

eds � r~ffdC1 þZ

C2

edCgjujr~ff � udC2 þZ

C4

vOB � ndC4 ¼ 0: ð33Þ

S. Danilov et al. / Ocean Modelling xxx (2003) xxx–xxx 13

ARTICLE IN PRESS

The stabilization parameter for the dynamical problem ed is computed from

ed ¼ ½jf j þ ðDtÞ�1 þ 10Al=h2��1; ð34Þ

where Dt is the time step of the dynamical problem. Expression (34) is interpolation between twolimiting cases of small and large Ekman numbers. In the first case, for the steady-state problemCodina and Soto (1997) recommend ed ¼ jf j�1

. Accounting for non-stationarity can be donefollowing the approach of Ilinka et al. (2000). The third term in (34) corresponds to the as-ymptotics of ed in the diffusive limit (Ek � 1) derived in Nechaev et al. (2003). Codina and Soto(1997) recommend the factor of 12 (instead of 10) in this term based on their numerical experi-ments.

For Dt and h used in the model and for typical values of horizontal diffusivity ed � jf j�1. Thus,

the difference between the original (15) and stabilized (32) momentum equations is that the latteris a linear combination of the former and its rotation and the stabilization of the momentumequations is an algebraic operation on the original Galerkin equations. If we consider a block ofthe stiffness matrix corresponding to the velocity–velocity part of the momentum equations, thestabilization can be illustrated schematically as that instead of inverting the matrix

Dþ T �ff Dþ T

� �;

where D, T and f denote blocks that correspond to discretization of the viscosity, time derivativeand Coriolis parts respectively, we provide the solver with the matrix

Dþ T þ f Dþ T � ff � D� T Dþ T þ f

� �that is much better from the computational point of view when dissipation is small and the timestep is large. Indeed, its symmetric and antisymmetric parts are of comparable magnitude, whichprovides faster convergence of iterative solvers.

This is in contrast with the stabilized continuity equation (33) that contains an additional term.This term would coincide with the divergence of the z-integral of the residual in the momentumequation if the viscous terms were included into stabilization in (33). Then it would be equal tozero. However, working in the space of piecewise linear basis functions we are unable to computethem and consequently have to admit an error of the order OðEkÞ in the continuity equation.Hence, the flow field resulting from solving (32) and (33) possesses a non-trivial 2D divergenceand thus is not volume conserving. This issue is addressed below. Noteworthy, the same stabi-lization of the continuity equation without introducing the stabilization term in the momentumequation is considered in Hanert et al. (2003).

4.3. Velocity correction for recovering the volume conservation

A common viewpoint (see, for example, Ilinka et al., 2000) on the problem of breaking thevolume conservation by stabilization of the dynamical equations in the FEM is as the following.Expressing the unknown model variables as a linear combination of a finite set of basis functionsone is able to compute only a part of the total fields. Stabilization parameterizes the contribu-tion from the unresolved (by the basis functions) part. It is the total field that must satisfy the

14 S. Danilov et al. / Ocean Modelling xxx (2003) xxx–xxx

ARTICLE IN PRESS

governing equations while the solution obtained by solving the stabilized equations representsonly a part of the total field and does not have to fit the continuity equation exactly.

In ocean circulation modelling, we are interested not only (and primarily not) in the velocityfield but in the transport of ocean tracers that cannot be computed from the 3D velocities ob-tained from (32) and (33). Indeed, if we tried to compute w from (7), it would be impossible tomeet both boundary conditions at the bottom and at the surface. In other words, the RHS of (7)would not meet the solvability condition. Hence, advecting the tracers we would produce un-controlled surface and/or bottom fluxes which could degrade the solution in a long term run.Thus, we need to trim the horizontal velocity field so that it would satisfy the continuity constraint(would have zero 2D divergence).

However, (33) does not suggest introducing a 3D field of correcting horizontal velocity, as itoperates with vertically integrated quantities. In fact, an attempt to compute it would lead toextremely noisy field that cannot be used.

A scheme similar to that proposed by Deleersnijder (2001) was adopted. After solving thestabilized equations, the 2D potential / is computed by solving

D/ ¼ r �Zudz; on/ ¼ 0: ð35Þ

This equation is treated in the weak sense in the space of piecewise linear basis functions / ¼PpkSk Once / has been computed, the bias r/ is extracted from the horizontal velocity field

u! u� H�1r/: ð36ÞHere H is the local depth.

As we have already mentioned the local residual in the original continuity equation (2) is of theorder OðEkÞ and thus this potential part of the flow should be small for the oceanic currents.Indeed, as computations revealed, the correction H�1r/ is a tiny fraction of the total velocities uand introduces a very small imbalance in the momentum conservation while allowing the massconservation to be recovered. The correction is especially small in the exterior of boundary tet-rahedra and typically is of the order 10�6 m/s. The corrected velocity field is further used forcomputing w and advecting the tracer fields and momentum.

4.4. Tracer conservation properties of the model

The way in which the 3D continuity equation (20) is solved for the vertical velocity w ensures,as we have already mentioned, that volume is conserved locally when summed over the cluster oftetrahedra spanned by a test function, and globally. It also plays the crucial role in providing theconservation properties of the tracer equations. Indeed, the total tracer contained in the volumeshould be conserved provided total flux of the tracer through the boundaries is zero and sourcesare absent. The stabilized FEM tracer equation (29) satisfies this constraint. Indeed, if we takeeTT ¼ const in (29), which is equivalent to the volume integration, the advection terms of the tracerequation reduce toZ

Xðu � r þ wozÞT dX ¼ 0:

S. Danilov et al. / Ocean Modelling xxx (2003) xxx–xxx 15

ARTICLE IN PRESS

The latter is ensured by (20) for any elementwise linear field T (the surface integral in (20) giveszero total transport because of volume conservation). Then it follows from (22) that

ot

ZXT dX ¼ 0:

We would like to emphasize that stabilization does not affect the global tracer conservationproperty, as the stabilization terms in (29) contain only derivatives of eTT and vanish for eTT ¼constant.

In FD modelling the advection equation is usually written in the flux form to ensure the globaltracer conservation. With the FEM, the global conservation is the consequence of the weak(Galerkin) formulation and the scheme of computing the vertical velocity.

For the same reason as the tracer advection term, the momentum advection term in the mo-mentum equation goes to zero after having being integrated over the volume. This is once again adesirable property, as this term should only redistribute the momentum and cannot create ordestroy it.

5. Finite-element model of North Atlantic (FENA)

The model performance was tested using the North Atlantic setup. The computational meshcovers the region from 7� to 80� N. It is based on a surface triangular mesh consisting of 6480surface nodes, and a combination of z and r-levels in the vertical direction. Each surface triangledefines a vertical prism which is subdivided by level surfaces into elementary prisms. The latter aresplit into tetrahedra. The surface mesh defines horizontal resolution, which varies from 0.3� to1.5�, with mean of approximately 0.8�. Using the combination of z and r levels (with total of 16levels) allows us to get rid of vertical walls in the volume of water and simultaneously reduce thetotal number of 3D nodes compared to purely r-level setup. The total number of 3D nodes is86 701, and they form 449 674 tetrahedra. Figs. 1 and 2 present views of 2D and 3D discretizations

Fig. 1. 2D mesh of FENA model.

16 S. Danilov et al. / Ocean Modelling xxx (2003) xxx–xxx

ARTICLE IN PRESS

used in the model. They clearly demonstrate the main advantage of FE––their ability to providelocal mesh refinement only in the locations where it is indeed necessary.

The model was forced at the surface by the monthly mean climatological wind stress (Trenberthet al., 1989). The surface temperature and salinity were restored to the Levitus monthly data withthe relaxation time of 15 days. The model was run for 16 years with time step of Dt ¼ 12 h for thedynamical part and a reduced time step Dt=n for the tracer part. Here n is the number of steps fortracers within one time step of dynamical part. The tracer stiffness matrix is reassembled each timeafter the dynamical part is stepped forward, and kept constant during n tracer steps. Typicallyn ¼ 4, but increasing it would not affect the CPU time significantly (see below).

Numerical implementation of solver uses parallel threshold-based ILU factorization (Karypisand Kumar, 1997) and GMRES or BICGSTAB algorithms. The memory required by the solverand pre-conditioner and the efficiency of the solver depend on how many fill-in elements areallowed for the factorization. Increasing the number of fill-in elements reduces the number ofiterations needed to provide the convergence of the solver, but requires additional storage andincreases the number of numerical operations during an iteration. The ‘‘optimal’’ fill-in number ismainly sensitive to the band width of the sparse matrix to be inverted. With increasing the band

Fig. 2. View on 3D FE mesh of FENA model.

S. Danilov et al. / Ocean Modelling xxx (2003) xxx–xxx 17

ARTICLE IN PRESS

width it also increases if the acceptable number of iterations is bounded. A helpful approach isrenumbering the nodes to reduce the bandwidth of the stiffness matrix, so that the ILU-factor-ization would need less fill-in elements and/or require less iterations to converge (Dobrindt andFrickenhaus, 2000). As we saw, too large difference between numbers of neighbouring nodescould locally degrade or even totally destroy the solution with time stepping. The reordering canbe made with the Metis package (Karypis and Kumar, 1998) which also provides a tool forpartitioning the mesh needed for implementation of parallel solvers. For the current version of themodel the fill-in numbers from 100 to 200 provide convergence of the dynamical part typicallywithin 10 iterations. Tracer advection–diffusion problem converges within 3–4 iterations with fill-in between 35 and 50.

Within a time step Dt, the solution of dynamic problem takes about 25%, and another 25% arerequired to assemble and factorize the stiffness matrix for the tracer problems. It is worth to noticethat assembling the stiffness matrix and the RHSs is a highly parallelizable procedure. Givenpartitioning of the mesh, each processor deals with its own part of the matrix and the RHS andthey communicate only at the factorization/solution step. Since the assembly of the stiffnessmatrix and its factorization are costly tasks, they are performed for the stiffness matrix of thetracer part once per the time step of the dynamical part. Assembling RHSs of the tracer (tem-perature and salinity) equations and solving them n ¼ 4 times requires less time than the assemblyand factorization of the stiffness matrix, so the parameter n is not highly critical.

The stiffness matrix of the dynamical problem is not varying with time if viscosity is kept fixed.In such a case it is assembled and factorized only once. The stiffness matrices for the verticalvelocity and correcting potential are also assembled and factorized only once.

The current version of FENA is supplied with a Smagorinsky-type viscosity in the momentumequation. The horizontal viscosity is prescribed the Smagorinsky-type value at those elementswhere the latter is in excess of Al ¼ 200 m2/s. The vertical viscosity is fixed at Av ¼ 0:002 m2/s,while diffusivities in tracer equations take values of Kl ¼ 200 m2/s and Kv ¼ 0:0002 m2/s. Nu-merical implementation of time-varying horizontal viscosity requires updating the stiffness matrixat each time step. To spare time, we skip the refactorization step, as the main part of the stiffnessmatrix (responsible for the geostrophic balance) remains intact. Although updating the stiffnessmatrix requires considerable time within a time step, it allows simulations with the horizontalviscosity coefficient as low as Al ¼ 200 m2/s almost everywhere except for close proximity ofcoastal zones and strong currents. It should be recalled that the stabilization of momentumequation cannot regularize the velocity field in the regions where the spatial resolution is notsufficient, as it is largely an algebraic operation (see Section 4). Thus augmented (Smagorinsky)explicit viscosity is needed there. The stabilization of tracer equations solves problems of thatkind, and does not require increased diffusivity in such regions.

In a current implementation, a model year requires 8 h of CPU time on four processors of SGIORIGIN-2000.

Fig. 3 shows a snapshot of temperature and velocity field in the region of the Gulf Stream at theend of the integration time. Noteworthy is the wavy structure of the current and its separation offthe coast at approximately 40�N. Although there is a tendency to eddying in the velocity field, it isonly marginally present, as the spatial resolution is still insufficient on the offshore side of the GulfStream. The same type of behaviour could be seen in the snapshot of the sea surface heightpresented in Fig. 4. Given mean spatial resolution of 0.8� this behaviour is indeed encouraging.

18 S. Danilov et al. / Ocean Modelling xxx (2003) xxx–xxx

ARTICLE IN PRESS

No relevant treatment was given to the open boundaries in the current version of the model, asonly its performance was tested. The open boundaries were treated as closed. This entails unre-alistic details in the circulation in regions neighboring the open boundaries. However, as we havealready mentioned, there is no mathematically consistent way to treat them, and perhaps the best

Fig. 3. Velocity and temperature (gray scale color) fields after 16 years of integration of FENA model at the location of

Gulf Stream (at the depth of 100 m). The maximum velocity amplitude is 0.7 m/s.

Fig. 4. The sea surface height at the end of the run (drawn via interpolation to a regular grid).

S. Danilov et al. / Ocean Modelling xxx (2003) xxx–xxx 19

ARTICLE IN PRESS

recipe is to have them as far as possible from the region of interest. No special care was given toreproducing particular details of bottom topography, which is responsible for some errors in thecirculation in the Caribbean basin. Despite all that, such global characteristics of the model as itsoverturning stream function (Fig. 5) and meridional heat transport (Fig. 6) compare well with theother estimates obtained with models of comparable resolution (see Chassignet et al., 2000;Haidvogel et al., 2000). The maximum of the overturning stream function is about 20 Sv, andtypical amplitudes of the meridional heat flux are of the order of 0.8 PW.

6. Conclusions

The FE model intended for simulating OGC is described. The model is further development ofthe diagnostic FE model by Nechaev et al. (2003), and differs from it in several important aspectssuch as time-stepping, GLS stabilization, divergence correction, time-dependent (Smagorinsky-type) viscosity, and others. The model performance is stable and the model skill was tested in the16-year run in the North Atlantic setup. The suite of tests of model performance and accuracy inelementary setups (such as, for example, the Munk problem, the elementary overflow problem inthe DOME experiment geometry) will be presented in a separate paper.

Using FE with 3D tetrahedral partitioning and linear functions for the sea surface height andhorizontal velocity suggests a different (compared to FD) way of thinking of OCM, and thestandard recipe such as splitting the velocity field into barotropic and baroclinic parts, could notbe used directly, because the fields of velocity and vertically integrated velocity (transport) belong

Fig. 5. The meridional overturning stream function produced by FENA model (obtained by interpolating the velocity

on a regular grid, computing velocity curl and solving the Poisson equation for the overturning stream function).

20 S. Danilov et al. / Ocean Modelling xxx (2003) xxx–xxx

ARTICLE IN PRESS

to different spaces (of linear and cubic functions respectively). One can still solve the verticallyintegrated equations for transports and the sea surface height f, and use this information asdescribed in Appendix B. While formally attractive, splitting is difficult to implement, as it re-quires explicit correction of dissipation terms in equations for vertically integrated fields, whichturns to be too noisy for unstructured meshes. Further work in this direction is needed.

There are other directions for future work as well, and the most promising one is adaptation ofthe model to the global ocean with refinement of the grid in regions of interest. Augmenting themodel with a set of tracer equations could be of interest for applications in biology. Their inte-gration would be efficient as it would use the stiffness matrix already assembled and factorized tointegrate the equations for temperature and salinity.

Acknowledgements

The FE model presented here is a development of the ‘‘Inverse Modeling Group’’ of the De-partment ‘‘Climate Systems’’ at Alfred Wegener Institute in Bremerhaven, Germany. At differentstages several people contributed to programming the code: Dmitri Nechaev, Uwe Dobrindt, SvenHarig and the authors. Support of Stephan Frickenhaus in parallelization of the code and efficientimplementation of solvers for large linear systems was extremely valuable. We are also grateful toAlexandre Kurapov (Oregon State University) for providing us with a mesh generation code.

Fig. 6. Meridional heat transport corresponding to the overturning circulation in the previous figure. Computed via

interpolation of velocity and temperature on the regular grid.

S. Danilov et al. / Ocean Modelling xxx (2003) xxx–xxx 21

ARTICLE IN PRESS

Appendix A. Dispersion properties of the stabilized advection–diffusion equation

It is instructive to analyze the dispersion relations of stabilized FE advection–diffusion equationand compare it with other schemes of FD origin. As is common with such type of analyses, weconsider the 1D advection–diffusion equation with a constant advecting velocity u. In the FEsetup, we first write it in a weak formulationZ

ðotT eTT þ uoxT eTT þ K oxT oxeTT þ etuotT ox eTT þ etu2 oxT oxeTT Þdx ¼ 0;

assuming that et is constant, and choose T and eTT belonging to the space of linear (on elements)functions. Given a uniform 1D grid with element size h ¼ 1 the FE discretized equation reduces tothe following equation on nodal values of the tracer field T :

otðTn�1 þ 4Tn þ Tnþ1Þ=6þ etuotðTn�1 � Tnþ1Þ=2þ uðTnþ1 � Tn�1Þ=2þ ðK þ etu2Þð2Tn � Tnþ1 � Tn�1Þ ¼ 0:

Seeking the solutions to this equation in the form of waves e�ixtþikx we obtain the dispersion re-lation

xh=u ¼ 6 sin kh4þ 2 cos kh� 6i�eet sin kh

� 6ið�eet þ Pe�1Þ 2� 2 cos kh4þ 2 cos kh� 6i�eet sin kh

;

where �eet ¼ etu=h is non-dimensional stabilization coefficient, and Pe ¼ uh=K is the element Pecletnumber.

The dispersion relation is compared to the dispersion relations of central differences and theQUICK schemes (see Webb et al., 1998) in Fig. 7. The labeled curves in Fig. 7 refer to the fol-

Fig. 7. Dispersion curves for several advection schemes: (a) central differences, (b) QUICK, (c) FE without stabili-

zation, (d, e) FE with �eet ¼ 0:3 and 0.5; Pe�1 ¼ 0 in (a)–(e). The straight line (f) in the left panel corresponds to the exact

dispersion relation x ¼ uk. The thin curve in the right panel presents dissipation for the FE case with Pe ¼ 10 and no

stabilization. The inset zooms into the region of small decrements.

22 S. Danilov et al. / Ocean Modelling xxx (2003) xxx–xxx

ARTICLE IN PRESS

lowing cases: central differences (a), QUICK (b), FE without stabilization (c), FE with �eet ¼ 0:3 (d)and 0.5 (e); Pe�1 is set to 0. The straight line (f) corresponds to the exact dispersion relationx ¼ uk. Unlabelled (thin) curve in the right panel of Fig. 7 presents dissipation for the FE casewithout stabilization, with Pe ¼ 10. The inset in the right panel visualizes the region of smalldecrements.

Even in the absence of stabilization, the FE advection scheme (c) exhibits notably less dis-persion than central differences (a) and QUICK (b). Adding ‘‘optimal’’ stabilization (d) furtherimproves the behaviour of ReðxÞ. Increasing the stabilization parameter to 0.5 (e) still results in ascheme with good dispersive properties. Further increase is not recommended as it reduces theinterval of wave numbers where real part of x is close to uk.

The right panel shows imaginary part of frequency. Cases (d) and (e) have smaller dissipationthan QUICK at kh < p=2, however they dissipate small scales (kh > 2p=3) more efficiently. Al-though standard diffusion with Pe ¼ 10 (the thin line in the right panel) introduces strongerdissipation at large scales than the stabilization in cases (d) and (e), achieving the dissipationcomparable with that of (d) and (e) at small scales would require Pe of several units and makescales around kh ¼ p=2 too dissipative. On the other hand, if the stabilization and physical dif-fusion are both included, and the Peclet number is sufficiently high, the physical diffusion wouldonly be seen at large scales, while small scales would mainly feel the numerical dissipation.

To conclude the analysis we note that the difference between the stabilization considered andthe upwind stabilization is in the imaginary term in the denominator of the equation for x. Atsmall kh, it leads to a positive contribution into ImðxÞ from the first term on the RHS of the x-equation which approximately compensates the upwind contribution coming from the secondterm on the RHS. The compensation does not occur at small scales, and they are damped with theupwind diffusion.

Returning to the choice of the stabilization parameter et suggested in Section 4 we couldmention that in most cases it is determined by the time step Dt, as accuracy consideration requireit to be smaller than h=juj. Thus we always have �eet < 0:5. However stabilization could only beefficient at small scales if �eet exceeds Pe�1, and some adjustment of et might be necessary if it turnsto be too small due to the time step used.

Appendix B. Barotropic–baroclinic splitting

Splitting of the problem (15) and (16) into barotropic and baroclinic parts requires specialapproach in the case of 3D FE discretization employed here. Since the vertically integratedmomentum equation should be consistent with (15), it could only be obtained by choosing aspecial subspace of the test functions ~uuðk; h; zÞ ¼ ~uuðk; hÞ. Consider, for example, the Coriolis termin the momentum equation (15). It becomesZ

Xfk� u~uuðk; hÞdX ¼

ZC1

fk�Zudz

� �~uuðk; hÞdC1 ¼

ZC1

fk�U~uuðk; hÞdC1;

with U ¼Rudz the horizontal transport. Here C1 stands for the ocean surface. Clearly U does not

belong to the space of linear functions on surface triangles if u is linear on tetrahedra. For that

S. Danilov et al. / Ocean Modelling xxx (2003) xxx–xxx 23

ARTICLE IN PRESS

reason, the ‘‘strong-sense’’ definition U ¼Rudz is not allowed and we have to adopt the ‘‘weak-

sense’’ definitionZC1

U~uuðk; hÞdC1 ¼Z

Xu~uuðk; hÞdX;

equivalent to 2N2D equations to determine nodal values of transport U by known 3D nodal valuesof u.

The time derivative could be treated in the same way, while viscous terms are written asRC1AlrUr~uudC1 on the LHS, with the difference between the actual vertically integrated dissi-

pation and the latter term D ¼R

C1ðAlð

Rrudz�rUÞr~uuÞdC1, accounted for in the RHS. With

such definitions and rearrangements, the 2D equations that follow could be solved for Uk, fk ateach time step. The transport obtained cannot be used directly, and we could either substitute fand solve for u at 3D nodes, or find baroclinic velocities ubc at 3D nodes and solve for a2D barotropic correction field ubtðk; hÞ the system of equations

RXðubc þ ubtÞ~uuðk; hÞdX ¼R

C1U~uuðk; hÞdC1. Whatever the approach used, the problem arises with the term D introduced

above. It turns to be too noisy, and degrades the quality of the solution. This is the main reasonexplaining why we currently solve the combined system of equations (15) and (16) for the fullhorizontal velocity u and sea surface height f. Further work is needed to implement splitting.

References

Babu�sska, I., 1973. The finite element method with Lagrangian multipliers. Numer. Math. 20, 179–192.

Brasseur, P.P., 1991. A variational inverse method for the reconstruction of general circulation fields in the Northern

Bering Sea. J. Geophys. Res. 96C, 4891–4907.

Brezzi, F., 1974. On the existence, uniqueness and approximation of saddlepoint problems arising from Lagrangian

multipliers. R.A.I.R.O. Anal. Numer. R2, 129–151.

Brezzi, F., Marini, D., Russo, A., 1996. Pseudo residual–free bubbles and stabilized methods. In: D�eesideri, J.A. et al.

(Eds.), Computational Methods in Applied Sciences. John Wiley and Sons Inc., pp. 3–8.

Bryan, K., Manabe, S., Pacanowski, R.C., 1975. A global ocean-atmosphere climate model. Part II: The oceanic

circulation. J. Phys. Oceanogr. 5, 30–46.

Codina, R., Soto, O., 1997. Finite element solution of the Stokes problem with dominating Coriolis force. Comput.

Meth. Appl. Mech. Engng. 142, 215–234.

Chassignet, E.P., Arango, H., Dietrich, D., Ezder, T., Ghil, M., Haidvogel, D.B., Ma, C.-C., Mehra, A., Paiva, A.M.,

Sirkes, Z., 2000. DAM�EEE-NAB: the base experiment. Dyn. Atmos. Oceans 32, 155–183.

Deleersnijder, E., 2001. Enforcing the continuity equation in numerical models of geophysical fluid flows. Appl. Math.

Lett. 14, 867–873.

Dobrindt, U., Frickenhaus, S., 2000. Partitioning, reordering and solving an advection–diffusion problem formulated in

finite elements. Alfred Wegener Institute for Polar and Marine Research, Berichte aus dem Fachbereich Physik,

Report 98.

Dobrindt, U., Schr€ooter, J., 2002a. An adjoint ocean model using finite elements: an application to the South Atlantic. J.

Atm. Oceanic Technol., in press.

Dobrindt, U., Schr€ooter, J., 2002b. A finite element inverse ocean model for an advection–diffusion problem. Comput.

Meth. Appl. Mech. Engng., in press.

Dumas, E., Provost, C., Poncet, A., 1982. Feasibility of finite element methods for oceanic general circulation

modelling. In: 4th International Conference on Finite Element in Water Resources. Springer-Verlag, New York, pp.

43–55.

Fix, G.J., 1975. Finite element model for ocean circulation problems. SIAM J. Appl. Math. 29, 371–387.

24 S. Danilov et al. / Ocean Modelling xxx (2003) xxx–xxx

ARTICLE IN PRESS

Franca, L.P., Russo, A., 1996. Approximation of the Stokes problem by residual-free macro bubbles. East-West J.

Appl. Math 4, 265–278.

Gerdes, R., K€ooberle, C., Willebrand, J., 1991. The influence of numerical advection schemes on the results of ocean

general circulation models. Climate Dyn. 5, 211–226.

Griffies, S.M., B€ooning, Bryan, F.O., Chassignet, E.P., Gerdes, R., Hasumi, H., Hirst, A., Treguier, A.-M., Webb, D.,

2001. Developments in ocean climate modelling. Ocean Modell. 2, 123–192.

Haidvogel, D.B., Arango, H.G., Hedstrom, K., Beckmann, A., Malanotte-Rizzoli, P., Shchepetkin, A.F., 2000. Model

evaluation experiments in the North Atlantic Basin: simulations in nonlinear terrain-following coordinates. Dyn.

Atmos. Oceans 32, 239–281.

Hanert, E., Legat, V., Deleersnijder, E., 2003. A comparison of three finite elements to solve the linear shallow water

equations. Ocean Modell. 5, 17–35.

Hecht, M.W., Wingate, B.A., Kassis, P., 2000. A better, more discriminating problem for ocean tracer transport. Ocean

Modell. 2, 1–5.

Hughes, T.J.R., Franca, L.P., Hubert, G.M., 1989. A new finite element formulation for computational fluid dynamics:

VIII. The Galerkin-least-squares method for advective–diffusive equations. Comput. Meth. Appl. Mech. Engng. 73,

173–189.

Hughes, T.J.R., 1995. Multiscale phenomena: Green�s functions, the Dirichlet-to-Neumann formulation, subgrid

scale models, bubbles and the origins of stabilized methods. Comput. Meth. Appl. Mech. Engng. 127, 387–401.

Iakovlev, N.G., 1996. A numerical model and preliminary results of calculations to reproduce the summer circulation in

the Kara Sea. Izvestiya Atmos. Oceanic Phys. 32, 660–668 (Translated from Izvestiya AN, Fizika Atmosfery i

Okeana).

Ilinka, F., H�eetu, J.-F., Pelletier, D., 2000. On stabilized finite element formulation for incompressible advective–

diffusive transport and fluid flow problems. Comput. Meth. Appl. Mech. Engng. 188, 235–255.

Iskandarani, M., Haidvogel, D.B., Boyd, J.P., 1995. A staggered spectral model with application to the oceanic shallow

water equations. Int. J. Numer. Meth. Fluids 20, 393–414.

Karypis, G., Kumar, V., 1997. Parallel Threshold-based ILU Factorization. Technical Report 96-061, University of

Minnesota, Department of Computer Science/Army HPC Research Center Minneapolis, MN 55455.

Karypis, G., Kumar, V., 1998. METIS-a software package for partinioning unstructured graphs, partitioning meshes

and computing fill––reducing ordering of sparse matrices, version 4.0. University of Minnesota, Department of

Computer Science/Army HPC research Center, Minneapolis.

Ladyzhenskaya, O.A., Solonnikov, V.A., 1976. On some problems in vector analysis and weak formulations of

boundary value problems for the Navier–Stokes equations. Zapiski nauchnykh seminarov LOMI, Leningrad 69, 81–

118 (in Russian).

Le Provost, C., 1986. On the use of finite element methods for ocean modelling. In: O�Brien, J.J. (Ed.), Advanced

Physical Oceanographic Numerical Modelling, D. Reidel Publishing, pp. 557–580.

Le Provost, C., Vincent, P., 1991. Finite element for modelling ocean tides. In: Parker, B. (Ed.), Tidal Hydrodynamics.

John Wiley, New York, pp. 41–60.

Le Roux, D.Y., Staniforth, A., Lin, C.A., 1998. Finite elelments for shallow water equation ocean model. Mon.

Weather Rev. 126, 1931–1951.

Levin, J.G., Iskandarani, M., Haidvogel, D.B., 1997. A spectral filtering procedure for eddy-resolving simulations with

a spectral element model. J. Comput. Phys. 137, 130–154.

Lynch, D.R., Naimie, C.E., 1993. The M2 tide and its residual on the outer banks of the Gulf of Maine. J. Phys.

Ocenogr. 23, 2222–2253.

Lynch, D.R., Ip, J.T.C., Naimie, C.E., Werner, F.E., 1996. Comprehensive coastal circulation model with application

to the Gulf of Maine. Cont. Shelf Res. 16, 875–906.

Muccino, J.C., Gray, W.G., Foreman, G.G., 1997. Calculation of vertical velocity in three-dimensional, shallow water

equation, finite element models. Int. J. Numer. Meth. Fluids 25, 779–802.

Myers, P.G., Weaver, A.J., 1995. A diagnostic barotropic finite-element ocean circulation model. J. Atm. Oceanic

Technol. 12, 511–526.

Marchesiello, P., McWilliams, J.C., Shchepetkin, A., 2001. Open ocean boundary conditions for long-term integration

of regional oceanic models. Ocean Modell. 3, 1–20.

S. Danilov et al. / Ocean Modelling xxx (2003) xxx–xxx 25

ARTICLE IN PRESS

Nechaev, D., Schr€ooter, J., Yaremchuk, M., 2003. A diagnostic stabilized finite-element ocean circulation model. Ocean

Modell. 5, 37–63.

Patera, A.T., 1984. A spectral element method for fluid dynamics: Laminar flow in a channel expansion. J. Comput.

Phys. 54, 468–488.

Pacanowski, R.C., Griffies, S.M., 2000. MOM 3.0 Manual. Available from http://www.gfdl.gov/~smg/MOM/web/

guide_parent/guide_parent.html.

Schlichtholz, P., Houssais, M.-N., 1999. An inverse modelling study in Fram Strait. Part I: dynamics and circulation.

Deep-Sea Res. II 46, 1083–1135.

Trenberth, K., Olson, J., Large, W., 1989. A global ocean wind stress climatology based on ECMWF analyses.

Technical Report NCAR/TN-338+STR, National Center for Atmospheric Research, Boulder, Colorado.

Walters, R.A., Werner, F.E., 1989. A comparison of two finite-element models of tidal hydrodynamics using a North

Sea data set. Adv. Water Resour. 12, 184–193.

Webb, D.J., de Cuevas, B.A., Richmond, C.S., 1998. Improved advection schemes for ocean models. J. Atmos. Ocean.

Tech. 15, 1171–1187.

Westerink, J.J., Luettich, R.A., Blain, C.A., Scheffner, N.W., 1992. ADCIRC: An Advanced Three-Dimensional

Circulation Model for Shelves, Coasts and Estuaries; Report 2: Users Manual for ADCIRC-2DDI. Contractors

Report to the US Army Corps of Engineers, Washington, DC, July 1992.

Wunsch, C., Haidvogel, D.B., Iskandarani, M., 1997. Dynamics of the long-period tides. Prog. Oceanogr. 40, 81–108.

26 S. Danilov et al. / Ocean Modelling xxx (2003) xxx–xxx

ARTICLE IN PRESS