A Finite-Volume Discretization of the Shallow

A Finite-Volume Discretization
of the Shallow-Water Equations
in Spherical Geometry
Lars Pesch∗
Meteorologisches Institut der Universität Bonn
Auf dem Hügel 20, 53121 Bonn
February 12, 2003
Abstract
A numerical method for the solution of the shallow water equations in spherical geometry has
been developed. Special emphasis is laid on respecting conservation properties in the discrete
solution. Therefore the spatial discretization
uses a finite-volume method, which is applied
on a spherical geodesic grid generated by recursive refinement of an icosahedron. The potential vorticity – streamfunction formulation of the
equations is used and several methods for the
iterative solution of the resulting Poisson equations are examined. Based on a set of standardized test cases the resulting model’s performance
is investigated. The conservation properties are
among the strengths of the method, which are
discussed together with its weaknesses and possible improvements.
teresting features – for example its icosahedral
grid – which have made it a candidate for being the base of a climate model yet to be developed, a successor of ECHAM 5. In the context of climate modeling however, violation of
conservation laws is even less acceptable than
in short- or medium-term weather forecasting.
With these guidelines the idea was to test the applicability of methods that are able to maintain
conservation properties in the discrete solution.
For equations in conservation form finite-volume
techniques, whose basic ideas are summarized in
Section 3, are the method of choice.
The common approach is to test new methods
on a simplified set of equations before developing
them further until they can possibly be used in a
weather or climate model. A suitable set for this
purpose are the shallow-water equations (SWE),
which will be presented in Section 2. The desire
to conserve integral invariants also lead to the
use of a formulation of the SWE that does not di1 Introduction
rectly predict the primitive variables; the equations can be rewritten using potential vorticity
The idea for this project was born from a close and divergence as prognostic variables, which is
examination of results of the German Weather an attractive alternative as will be shown in SecService’s (DWD) operational global forecasting tion 2.
model (GME). In model integrations of GME integral invariants of the atmospheric system like Some of the problems that emerge during the
mass or energy are not preserved. The reason is numerical treatment of the prognostic equations
the use of nonconservative finite-difference oper- are founded in the choice of grid (i.e. the distriators for discretizing the equations of fluid mo- bution of grid points in which the variables are
tion. On the other hand GME offers some in- defined) and/or coordinate system. These are
overcome in GME by the help of a gridding pro∗
Currently at: Department for Applied Mathematics
and Theoretical Physics, Wilberforce Road, Cambridge cedure that starts from an icosahedron – a threedimensional object composed from 20 equilatCB3 0WA, UK; [email protected]
2
3
eral triangles – and increases the number of grid
points by recursive refinement of the triangles.
This results in a relatively even distribution of
the grid points over the globe – in contrast to the
geographic grid with its typical concentration of
grid points near the pole. Section 4 contains information about this grid.
The time stepping scheme that has been used is
explained in Section 5. The discretization of the
prognostic and diagnostic equations is described
in Sections 6 and 7, respectively. Numerical results are presented and discussed in Section 8.
A short summary and an outlook on possible
developments conclude the article.
2
The Shallow-Water
tions
Equa-
FINITE-VOLUME METHODS
offers a second conservative variable: PV. Consequently, the prognostic equations for the first
two variables, which can be written in flux form,
display a mathematical structure which is ideal
to use with finite-volume methods.
∂h
+ ∇ · (hv)
= 0 (3)
∂t
∂(hq)
+ ∇ · (hqv)
= 0 (4)
∂t
∂δ
+ ∇ · hqer × v
∂t
v · v
+ ∇ g(h + hs ) +
= 0 . (5)
2
Another aspect that counts for this set is the
fact that the model variables are all scalars and
not vector components. Using the equations
(3), (4) and (5) to forecast the behavior of the
fluid dynamical system a problem arises due to
the under-determined system of equations: the
fluxes that occur in the equations contain the
velocities v, and these are no longer described
by prognostic equations. Instead, they have to
be retrieved from the derived quantities that are
now modeled prognostically. A common way to
determine the velocity is to solve two Poisson
equations for the streamfunction ψ and velocity
potential χ:
The SWE result when simplifying the NavierStokes equations using the following assumptions for large scale atmospheric motion: inviscid and hydrostatic flow of an incompressible homogeneous fluid whose vertical extent is small
compared to the horizontal size of the domain; in
fact the equations are integrated over the height
of the fluid layer and therefore the resulting flow
description is two-dimensional. While exhibiting
an easier mathematical structure than the com∇2 ψ = ζ = hq − f
(6)
plete system of equations, the SWE still capture
2
∇ χ = δ.
(7)
most of the horizontal dynamics of the atmosphere. Thus they provide a suitable first test This method will also be used here. The velocity
which a new scheme has to master before being field is subsequently determined by differentiaapplied to the baroclinic equations.
tion:
The conservative or flux form of the SWE is
vrot = er × ∇ψ
(8)
given by the following system:
vdiv = ∇χ
(9)
∂h
+ ∇ · (hv) = 0 .
(1)
v = vrot + vdiv .
(10)
∂t
∂hv
+ ∇ · (vhv) = −gh∇(hs + h) − f er × hv
∂t
(2) 3 Finite-Volume Methods
where h is the thickness of the fluid layer, hs the
height of the surface topography, v the horizontal velocity, er the outward unit normal vector
on the sphere, g the acceleration of gravity and f
the Coriolis parameter. The formulation of the
SWE using h together with potential vorticity
(PV) q and divergence δ as prognostic variables
Finite-volume (FV) methods start by partitioning the domain of the flow into a set of cells
C. These cells are the smallest unit on which
information about the functions or variables is
available. The consistency requirement for the
cells is that they do not overlap but cover the
whole domain. The evaluation of the balance
3
equation is then carried out on a set of controlvolumes V. Volumes may overlap partly, in fact
in some cases one is forced to use overlapping
volumes, for instance when there are more nodes
than cells1 .
techniques start from the platonic solids and use
these – in a certain sense very regular objects –
to yield a refined grid with relatively smooth
grid properties. The method used here (based on
the refinement of the triangular grid of an icosaConservation is easily maintained as FV meth- hedron) was developed by Baumgardner (1983)
ods are used together with the integral form of and Baumgardner and Frederickson (1985).
the governing equations. For a quantity ψ the An icosahedron has twenty equilateral triangular
flux form is integrated over a control-volume
faces, five of which join in each of the twelve corZ
I
Z
ners that are connected by thirty edges. When
d
ψ dV + n · Fψ dS = Qψ dV , (11) embedded into a sphere the edges can be prodt
V
V
∂V
jected onto the sphere so that it will be partiwith the reference volume V, the flux density tioned into a spherical icosahedron. The spheriFψ and a source density Qψ . The balance of the cal icosahedron serves as a macrotriangulation of
modeled quantities on these volumes is evalu- the sphere which allows the application of comated by integrating the fluxes entering and leav- mon refinement techniques to obtain a denser
ing each volume to find the net flux. By per- grid. In order to keep the grid distortion at a
forming only a single evaluation of each flux over minimum, the refinement method chosen here is
a volume face and using it for the update on the following: in every step each midpoint of a
both sides of the boundary, the integral of the triangle edge is connected with the midpoints
quantity over the two neighboring volumes will of the two neighboring sides of the triangles on
be unchanged after the update, as long as the both sides of it. Like this the grid remains triintegral of the source term vanishes, too. In angular and every grid point has six neighbors –
our case equations (3) and (4) are free of source with the exception of the corners of the original
terms – unlike the equations for the momentum icosahedron which have only five. The first three
components. The divergence equation includes grids are shown in Figure 1; a few of their characa source term within the divergence term; its teristics can be found in Table 1. The number ni
states into how many parts an edge of the origitreatment will be shown later.
nal spherical icosahedron has been divided and it
FV methods are used in many CFD simulations is the measure for the grid resolution that will be
and have been developed to reach e.g. higher or- used in the following. In order to apply a finiteder accuracy and other properties. Details about volume method we will not primarily use this
these aspects can be found in many CFD books. triangular grid. The reason is that the method
models the change of integrated quantities on
test volumes. On the triangular grid however
4 The Icosahedral Grid
we have about twice as many triangles (equations) than nodes (degrees of freedom), so that
Mostly the geographic grid is considered to be the discrete system would be overdetermined. A
the ‘natural’ grid on the sphere – probably for different aspect is that on triangular grids neighreasons of its common use (also in geographic boring cells are not necessarily connected by an
maps) and its manageability when discretiz- edge. Thus information cannot flow from one
ing differential equations on the sphere. The cell to all its neighbors within one time step.
problems arising from this approach have been
known for a long time. Alternative methods The method to overcome this difficulty is to dehave been discovered focusing on the uneven fine a so-called dual or Voronoi grid. Here, the
distribution of the grid points over the sphere dual grid is constructed as shown in Figure 2: In
and the use of a single coordinate system. Some each spherical triangular cell we find the center
of mass Qi (in fact we project the center of mass
1
Note for example that the triangular grid that originates from refinement of the icosahedron has about twice of the flat triangle with the same corners onto
the unit sphere) and connect these points with
as many cells (triangles) as nodes.
4
4
ni
N
T
∆max (km)
∆min (km)
32
10,242
20,480
263.386
220.431
T42
48
23,042
46,080
173.642
146.956
T63
64
40,962
81,920
131.715
110.217
T106
96
92,162
184,320
82.826
73.478
THE ICOSAHEDRAL GRID
128
163,842
327,680
65.859
55.109
192
368,642
737,280
43.413
36.739
256
655,362
1,310,720
32.930
27.554
Table 1: Number of grid points (N = 10 ni2 + 2) and triangles (T = 20 ni2 ), maximal and minimal distance
(∆) between two grid points at different resolutions of the refined icosahedral grid. The last line shows
approximately corresponding spectral truncations.
P5 r
rP4
Q
b 4
Q5 b
P6 r
b Q3
r
Q6
b
P0
rP
b
3
Q2
b
r
Q1
r
P1
P2
Figure 2: Definition of the dual grid.
Figure 1: The first refinements of the icosahedral
grid: ni = 1 (original icosahedron), 2 and 4.
geodesic arcs. The resulting hexagon/pentagon
around each node of the triangular grid is its associated dual cell. Its area can be calculated by
dividing it into the appropriate number of spherical triangles including two centers of mass Qi ,
Qi+1 and the central node P0 .
The icosahedral grid has provided a smooth distribution of the grid points over the sphere and
thus solves one of the two problems which have
been mentioned before. Another problem is encountered when using a single geographic coordinate system which is singular at the poles. In order to avoid the pole singularities and to be able
to represent the tangential velocity in each grid
point P by only two components, local spherical coordinate systems are defined in every grid
point. This idea goes back to Baumgardner and
Frederickson (1985), who derived the differential
operators in these coordinate systems and thus
avoided the pole problem at the cost of coordinate transformations. The basis vectors of the
local systems are denoted by eλ pointing to the
local east, and eϕ aligned with the north direction. They define the coordinate lines of η and
χ, the coordinates of the local spherical system.
In its own local system, the grid point P is situated at the position η = χ = 0. With this ansatz
the local system is almost Cartesian in the cell:
the poles of the local coordinate system are far
away compared to its neighboring grid points.
As the components of all vector quantities located in P are stored as coefficients of these basis
vectors, they – as well as the coefficients of vectors located in neighboring grid points – have to
be transformed into a common system whenever
using them in a vector computation. Details
about the local coordinate system, the determi-
5
nation of the local basis vectors and transforma- has the K-step LMM discretization
tion weights can be found in Majewski (1996).
U n+1 = U n + ∆t F n
Besides these advantages the icosahedral grid facilitates the implementation of numerical methods as it can be decomposed into a manageable data structure by grouping the icosahedron’s triangles into ten rhombic structures
(these are called diamonds) which possess a twodimensional, rectangular data structure. Extra
care has to be taken where the diamonds abut
(especially at their corners) because there the
addressing of neighbouring grid points differs
from the normal (and constant) relationships on
the rest of the diamond.
Icosahedral discretizations are not free of problems. E.g. it can be detected in long term runs
that the fivefold symmetry of the icosahedron
carries on into the error patterns of solutions for
the discretized differential equations. Research
is under way to reduce these effects, for example
by breaking the symmetry pattern of the underlying regular object by a modification allowing
the grid points to float around their original position so as to minimize a suitable measure for
the truncation error of the discretized operators
(Tomita et al. 2001).
5
Time Integration:
The
Adams-Bashforth Schemes
Apart from the spatial dimensions the equations
have to be discretized with respect to time, too.
This was accomplished by one of the AdamsBashforth schemes, which belong to the family
of linear multistep methods (LMMs), i.e. they
employ data from more than one previous time
level to compute the change during a time step.
The nonlinear ordinary differential equation (i.e.
in our case the partial differential equation after
spatial discretization) of the form
du
= F (u, t)
dt
U
n+1
U
n+1
U n+1
=U
n−1
(13)
n
+ 2 ∆t F
(14)
n
n−1
∆t
= U + 2 3F − F
(15)
n
n
n−1
n−2
∆t
= U + 12 23 F − 16 F
+ 5F
(16)
n
which are the Euler (13), Leapfrog (14) and
Adams-Bashforth second (15) and third order
(16) methods, respectively. The higher order
of accuracy in the third order scheme (AB3) is
achieved by using the data from two previous
time levels (except the current level n). The
additional computation time is moderate as the
tendencies can be stored for each cell and just
need to be combined according to (16). The
main effect is the increased memory requirement, but memory size is usually not a limiting
factor in today’s computer systems. These are
the reasons why the AB3 scheme was used in
this model. One might criticize that third order
accuracy is not appropriate in the scheme developed here as the spatial discretization is only of
first order. Of course also a lower order method
could have been chosen, but the software implementation allowed the third order variant, which
has also comparable stability restrictions so preference was given to the higher order scheme. In
comparison to the time discretization, unfortunately it is quite difficult to obtain higher order
in the FV spatial discretization.
Obviously the third-order Adams-Bashforth
method (AB3) is not self-starting, the first two
steps have to be taken using lower order schemes,
e.g. one Euler and one second order AdamsBashforth (AB2) step. The AB3 scheme is discussed in detail by Durran (1991) and has been
applied in the shallow water context by Heikes
and Randall (1995a).
It may be mentioned that the first implementation of the model used the MacCormack scheme,
a method whose development took place together with finite volume methods and which
can be found in many textbooks on CFD. As
a two-step Lax-Wendroff method however, the
MacCormack scheme has approximately doubled runtime requirements in comparison with
(12) one-step methods. This is especially disadvan-
6
7
DIAGNOSTIC SYSTEM
tageous as the potential vorticity-divergence for- 6.2 Treatment of the Divergence
mulation of the SWE requires the costly solution
Equation
of two Poisson equations in every step.
The divergence equation differs from the other
two model equations insofar as it cannot be written in flux form. The difficulty is that – in con6 Discrete Prognostic Equa- trast to the flux equations – there is still a differential operator in the equation after the intetions
gration:
Z
I
The grid for the discretization has been de- ∂
δ
dA
=
−
hq(er × v) · drN
scribed until now but a few technical aspects ∂t
C
∂C
need to be added to complete the description.
I
v · v
These will be mentioned in this section before
− ∇ g(h + hs ) +
·drN
2 }
we have a look at results.
|
{z
∂C
=:τ
(17)
6.1
I
Equations in Flux Form
=−
I
hq(er × v) · drN −
∂C
We use the dual icosahedral grid from Section 4
together with a cell-centered FV scheme; in this
case, the control volumes V are identical with the
cells C. The prognostic equations are integrated
over the cells and the volume integrals of flux
divergence terms are expressed as line integrals
of the flux densities multiplied scalarly with the
outward normal vector drN to the integration
path in the local tangential space of the sphere.
The numerical
value of the volume integrals, i.e.
R
basically C h dA is the value at the sole grid
point within the volume multiplied with the size
of the volume. The line integrals use a numerical flux function F∗ which consists of a ‘physical’ flux density F and an artificial diffusion flux
D: F∗ = F − D. The ‘physical’ flux is computed in the grid points and the values from the
two points P across a dual edge Qi Qj are averaged (cf Fig. 2). The artificial diffusion flux
is defined directly on the dual edge using differences of the dependent variables across the cell
face. The use of artificial viscosity is suggested
by Williamson et al. (1992) for the test cases in
which the energy cascade towards smaller scales
plays an important role and it can dampen the
spurious modes in the discrete treatment of the
equations. The artificial viscosity terms as they
are used here were first applied by Jameson et al.
(1981); they take the form of a second and a
fourth order term which are present in regions
of strong gradients.
∂τ
ds .
∂n
∂C
(18)
In (18) we have replaced the product n · ∇ with
its simplified meaning: the derivative in the normal direction of the integration path. In the
numerical integration this term will be approximated by a finite difference of the two nodal
values on both sides of the dual integration arc.
7
Diagnostic System
The method to retrieve the velocity components
from the model variables potential vorticity and
divergence described in Section 2 is not yet applicable with the above techniques as we have
no discretization of the gradient operator available through the finite-volume treatment. The
Laplace operator has indirectly been discretized
for the divergence equation.
On the other hand it has to be pointed out
that the whole procedure of determining the new
velocities is not connected with the conservation properties of the scheme. The conservation of mass and potential vorticity (or any passive tracer) is accomplished by the use of finitevolume techniques in the prognostic equations.
The main point is that basically any method
for solving elliptic equations can be employed
for the first part of the velocity computation.
As the vorticity-divergence formulation has been
7.1
Discretization
7
used by other authors, it is worth considering
their approaches. There is a tendency to exploit
the natural hierarchy of refinements of the icosahedral grid by applying multigrid (MG) methods. Heikes and Randall (1995) use a geometric
multigrid solver and so does Thuburn (1996). In
these articles there are, however, no comparisons
of the solver performance with other methods.
The main advantage of MG methods is scalability: the rate of convergence and the number
of iterations is more or less independent of the
problem size for important classes of problems.
The above geometric multigrid methods are,
however, not used to solve the elliptic problems
in the model presented here. Instead, the Poisson equations are discretized at the model resolution and the solution of the linear system of
equations can then be carried out by a suitable
solver. Like this, flexibility is retained for both
these steps and the influence of different components can be investigated. The components of
the solution procedure for the Poisson equations
are described in the following subsections.
7.1
Discretization
The discretization of the Laplace (and gradient)
operator has been taken from the original GME,
where all operators are discretized with a finitedifference ansatz. The components of the gradient as well as the Laplacian of a scalar field
φ in a primary grid point P0 are formed as linear combinations of the values of φ in P0 and
its direct neighbors P1 , . . . , P5 /P6 surrounding
P0 . The values of φ contribute to the desired
derivative in P0 with certain weighting factors
Gηi , Gχi :
X
∂φ =
Gηi (φi − φ0 ) and
(19)
∂η P0
i
X
∂φ Gχi (φi − φ0 )
(20)
=
∂χ The factors Gηi , Gχi and Li depend on the positions of the neighbors in the local coordinate
system of P0 and their derivation can be found
in Majewski (1996).
In the shallow water integration scheme the
problem is not to compute the Laplacian but
rather we know the right hand side of the equation ∆φ = f (or L φ = f in matrix-vector notation) and need to determine the vector of unknown values at the grid points on the left hand
side φ. As the evaluation of the Laplacian at a
grid point P uses the values of φ at the surrounding grid points, now we have to solve a coupled
linear system. Unfortunately the system matrix L has one eigenvector with the eigenvalue
0, namely the constant vector whose entries are
all the same. Consequently L is singular and no
unique solution can be found to the linear system. This is not problematic for the further solution scheme as the resulting field φ will be differentiated subsequently so that the component
into the direction of the singular eigenvector is
immaterial. However, the singularity does matter for the solution process of the linear system
as many solvers rely on regularity or definiteness. L is not symmetric either, which is another
problem when using iterative solvers. These issues will be dealt with in the next section.
A few alternatives for the components of this
procedure shall be mentioned here. If we retained the finite difference ansatz it would be desirable to achieve higher order in the discretization of the Laplace operator. Indeed a second
order discretization has been developed by Cassirer et al. (2001) using a larger stencil on the
triangular grid.
Alternatively a finite-element ansatz could be
chosen. Heinze (1998) uses finite elements to
solve a Helmholtz equation on triangular eleP0
ments on the sphere2 . In general however, the
i
problem with the singular matrix at the discrete
for the components of the gradient operator in level remains.
the two (local) coordinate directions η and χ;
the Laplacian as the sum of the two second order
derivatives is expressed as
2
The positive constant c in the Helmholtz equation
X
2
−∇
φ+c φ = rhs causes definiteness of the corresponding
∆φ =
Li (φi − φ0 ) .
(21)
i
matrix – in contrast to the problem posed here.
8
7.2
8
Choice of a Solver for the Linear
System
Now that the discrete problem has been formulated a suitable method has to be found to
solve the system of equations. As mentioned
previously, the singularity of the matrix causes
problems. The solver that manages to produce
a solution reliably and robustly is the method
of generalized minimal residual (GMRES). Like
all iterative methods, GMRES should be used
together with a preconditioner. Any iterative scheme – like Jacobi or Gauss-Seidel relaxation, Successive Overrelaxation (SOR), Incomplete Lower-Upper Factorization (ILU) or
multigrid methods – can be used as preconditioner. An algebraic multigrid (AMG) method
has been tested as a solver component for the
Poisson equations as well as ILU and ILUT factorization.
8
Numerical Results
To evaluate the scheme developed here it has
been applied to the test suite compiled by
Williamson et al. (1992); it consists of seven
problem settings which increase in complexity
and demands on the scheme.
Results for some of these test cases will be presented here however first the different solvers for
the Poisson equations will be compared.
8.1
NUMERICAL RESULTS
Comparison of Solver Configurations
The solution of the diagnostic system (6) and
(7) is crucial to the performance and quality of
the integration scheme. Different methods for
the solution procedure have been suggested and
some configurations will be compared here. No
‘ideal’ solution could be found; while the problem can generally be handled successfully, a compromise has to be made regarding runtime requirements on the one hand and quality of the
results on the other.
Figure 3: Averaged residual reduction for different
preconditioners, a) ILU, b) ILUT, c) ILU+AMG; the
black line is for the system ∇2 χ = δ, the grey one
for ∇2 ψ = hq − f (test case 5, model resolution:
ni = 32).
f in such cases is the norm of the residual
r = f − L φ during or after the solver iteration.
We will now compare the effectiveness of three
GMRES-based solver configurations. For all
configurations the dimension of the Krylovsubspace was 20. A smaller dimension might be
appropriate, too, but has not been tested. The
first two variants are preconditioned by two ILU
and ILUT cycles, respectively. The third uses
ILU for pre- and postsmoothing and does one
AMG cycle in between. In general one can say
that the ILU-preconditioned solver needs more
iterations than the ILUT or AMG variant but it
gives the best results, see Figure 3. The figure
shows the residual reduction that is reached after
n cycles. The plotted values are averages of 100
time steps at the beginning of the model integration (however the first few steps have not been
used). The coarse grid correction with AMG results in a very effective first iteration: the residual is reduced as much as in two to four steps
of the one-level methods. Unfortunately after
the first iteration the residual reduction practically ceases. It should be clear that the results
in Figure 3 are average values and the behavior in a certain time step of the model integration can differ widely. The performance also depends strongly on the flow: Figure 4, for example, shows the results for the same variables
taken from a simulation of test case 6. Due to
the different dynamical situation the residual of
the Poisson-equation for the streamfunction can
now be reduced much better, so that the onelevel methods accomplish an improved solution –
at the cost of more iterations.
The only available measure to evaluate the quality of the solution for the linear system L φ = With the above findings it was also possible to
8.2
Test Case 1: Advection of a Cosine Bell
9
initial height field is denoted by h0 3 . For all fur-
Figure 4: Averaged residual reduction for different
preconditioners, a) ILU, b) ILUT, c) ILU+AMG; the
black line is for the system ∇2 χ = δ, the grey one
for ∇2 ψ = hq − f (test case 6, model resolution:
ni = 32).
compare the runtime requirements necessary for
the different components of the model and the
various solvers. The by far most expensive component is the solver part for the two systems of
equations, which uses 90% to 98% of the total
computation time at the resolutions ni = 32 and
64. This effect increases with the resolution as
more iterations are needed for the linear solvers.
AMG is an exception to the rule, it stagnates
after the same amount of iterations in both resolutions. ILU takes about 30% more time than
ILUT. In comparison to AMG preconditioning
they are slower by a factor of 3 to 9.
Figure 5: Numerical solution (left column) and error
8.2
(right column) for test case 1, subcase 1. The grid
Test Case 1: Advection of a Co- spacing for the numerical solution is 100 m and the
sine Bell
analytical solution is plotted with thin dashed lines.
This test case does not use the full set of the
shallow water equations but only the advection
equation with a constant velocity field which describes a solid body rotation, so that the height
field is transported without any change of shape.
The direction of advection can be changed so
that the initial data, a compact cosine bell, takes
different paths over the computational grid. The
errors allow to evaluate the advective properties
of the scheme. A first impression can be gained
by plotting the result of the simulation vs. the
analytical solution or alternatively the difference
between the two. Errors can also be measured
in different norms which are defined in the usual
way (cf Williamson et al. (1992)). Additionally,
the normalized mass is evaluated. If the mean of
a quantity h on the sphere is denoted by h the
0
normalized mass is defined as M = h−h
. The
h
0
Positive errors are shown by solid lines, negative ones
are dashed; the spacing of the error is 50 m. a) + b):
ni = 32, c) + d): ni = 64, e) + f): ni = 128.
ther results of test case 1 the same small amount
of second order artifical viscosity has been added
(κ(2) = 0.005). The fourth order diffusion had
only a very small effect on the results so that
it has been excluded from all tests. The next
results that will be presented here concern the
improvements of the results when increasing the
grid resolution. Subcase 1 (advection along the
equator) has been chosen with a fixed time step
length and the twelve days were simulated at
three resolutions. The results for three resolu3
The definition of M is slightly different in Williamson
T
et al. (1992); however the definition M = h−h
would
h0
lead to inappropriate results as the volume of the discrete cosine bell varies depending on the position on the
diamonds.
10
8
NUMERICAL RESULTS
tions can be seen in Figure 5. The model is run
with the time step length that the CFL-criterion
yields: 200s at ni = 32, 100s at ni = 64 and 50s
at ni = 128. Most of the error occurs due to
the computed solution lagging behind the analytic solution. For ni = 32 the reduction in
height of the cosine bell is significant but this
improves when higher resolutions are used. The
number of oscillations that are generated at the
edge of the cosine bell increases with the number
of time steps. Of course the conservation property was of central importance when designing
the scheme. The results of the normalized mass
M for subcase 1 at the resolution ni = 32 are
shown in Figure 6. The error is due to the roundoff occurring in the computation; it has no systematic trend. A comparison of the error norms
Figure 7: Comparison of the l1 , l2 and l∞ norms of
the height error for test case 1, subcase 1; a) ni = 32,
b) ni = 64, c) ni = 128.
8.3
Test Case 2:
Steady
Geostrophic Flow
State
Figure 6: Normalized mass for test case 1, subcase 1 The idea of the second test case is to reprosampled in every time step at the resolution ni = 32, duce a steady state solution of the shallow wa∆t = 200s. Note that the scale for M is 10−14 .
ter equations: zonal flow with the corresponding
geostrophically balanced height field.
It should be mentioned that the following results
have been obtained after initialization with the
wind components u and v as given above and not
by prescribing as starting values the analytical
vorticity and divergence fields. No modifications
to satisfy a discrete geostrophic relationship (as
mentioned by Williamson et al. (1992)) have
The results of test case 1 were within the ex- been made either.
pectations one could have for a relatively sim- The geostrophic balance is reproduced with
ple scheme as it is used here. The reduction of some errors. Small deviations from the local
the maximum of the initial data and the intro- geostrophic balance lead to the formation of a
duction of oscillations is a weak point. More Rossby wave with wavenumber five, a manifestaelaborate techniques can help to improve this, tion of the fivefold symmetry of the icosahedral
e.g. shape preserving advection schemes as de- grid. This problem is known as the wavenumberveloped by Thuburn (1996) with results pub- five phenomenon and occurs in many models
lished in (Thuburn 1997).
that use an icosahedral discretization. There
is given in Figure 7, representing the same setting, resolutions and time step lengths as used
previously. The error rises almost linearly but
the growth rate approximately halves when the
resolution is doubled.
8.5
Test Case 6: Rossby-Haurwitz Wave
11
Figure 8: Difference of computed and analytic solution after 5 days for the resolution ni = 32; the
contour lines are drawn at intervals of 10m.
are attempts to remove the distinct excitation
by distributing the grid points more evenly over
sphere, cf. (Tomita et al. 2001).
8.4
Test Case 5: Zonal Flow over an
Isolated Mountain
This case tests the ability of the scheme to conserve total energy when conversion between kinetic and potential energy takes place. It displays the full instationary shallow water dynamics and the initial data – the geostrophic flow
setting as in test case 2 – rapidly generates a
multitude of waves due to the presence of a single conic mountain in lower boundary. No analytical solution is known for this test case and
the errors are computed with respect to a reference solution provided by Jakob et al. (1993).
Two integral invariants of shallow water flow are
monitored for this test case: total energy
based on the global integral I[·] to be graphed.
Also the normalized integrals of the global invariants total energy and potential enstrophy
have been computed and are visualized in Figure 9. The conservation properties with respect
to these quantities are very good. Total energy
and potential enstrophy both decrease, but at
very slow rates. Several other models display the
same or larger changes (Heinze 1998; Stuhne and
Peltier 1999). Only a few seem to conserve energy better, (Thuburn 1997; Heikes and Randall
1995). Potential enstrophy also decreases but
on scales smaller or comparable to other models, e.g. (Thuburn 1997). It is a natural effect
that potential enstrophy will decrease in this test
case as it is transferred to smaller scales, which
are not resolved by the model. The development
of the error norms during the model period is
shown in Figure 10. Especially in the h-field the
errors are mainly produced during the first day,
afterwards they increase very slowly. The higher
resolution improves the velocity field rather than
the height field. The spatial distribution of the
error in the height field is plotted in Figure 11.
8.5
Test Case 6:
Wave
Rossby-Haurwitz
The sixth test case deals with a RossbyHaurwitz wave, which is not a solution of the
shallow water equations. In spite of this it has
been used for a long time for meteorological tests
e = 12 hv · v + 12 g((h + hs )2 − (hs )2 ) ,
(22)
and is included in the test set by Williamson
et al. (1992). The reference solution again has
and potential enstrophy
been obtained with a high resolution spectral
1 (ζ + f )2
ξ=
.
(23) model.
2
h
Compared with the reference solution the differNeither one is a ‘tracer variable’, i.e. they are ences in the height field in Figure 12 are about
not described by an equation in flux form. That one order of magnitude larger than in test case 5.
makes it particularly interesting to see how the This has also been found by other authors with
model can handle such conservation properties. grid point models and the results are of similar
For better detection of conservation violations quality.
Williamson et al. (1992) suggest the normalized
integrals
I[e(t)] − I[e(0)]
ite =
I[e(0)]
I[ξ(t)] − I[ξ(0)]
ipe =
I[ξ(0)]
and
9
Summary
(24)
An icosahedral grid-based FV discretization for
(25) the shallow-water equations has been developed.
The icosahedral grid is an interesting approach
12
9
SUMMARY
Figure 9: Normalized values for two integral invariants are shown for test case
5. Left: integrated total
energy (ite, definition (22)),
right: potential enstrophy
(ipe, definition (23)), ILUGMRES.
Figure 10: Example of
the l-norms of the differences between computed
solution and reference solution for test case 5 (ILUGMRES).
for a smooth distribution of the grid points on with one or two AMG-preconditioned steps after
the sphere and implies a data structure suitable which a more stable method can be used – if confor computationally efficient treatment.
sidered necessary based on the previous residual
reduction. Especially at high resolutions where
The prognostic equations were used in potential
the standard methods converge more slowly this
vorticity–divergence form to describe the kinestrategy might lead to a considerable reduction
matic situation. The evolution of potential vorof the number of iterations that has to be perticity is described by a flux equation; conseformed. The elliptic solver is the component
quently this is a second conservation property
which possibly deserves most attention, and furthat can be respected by the treatment with a
ther effort in this field and a systematic comparfinite-volume scheme. This is achieved, howison with the geometric multigrid methods used
ever, at the cost of the inversion of the relaby other authors are certainly desirable for the
tionships that determine potential vorticity and
future.
divergence from the velocity components.
It has been shown that the solution of the discrete Poisson equations is crucial for the algorithm. The most reliable method for solving
the discrete system was a GMRES solver, whose
performance varies depending on the preconditioner. The attempt to use an algebraic multigrid method was only partly successful; apparently the AMG preconditioner is too sensible in
case of singular matrices and incompatible right
hand sides. However AMG is always very effective and safe in the first one or two iterations
and it might be possible to receive an increased
performance by starting the solution procedure
The results that were presented are encouraging and justify further investigations. Conservation properties are of vital importance for
atmospheric modeling and reliable compliance
with these properties is achieved by the finitevolume discretization. The tests with the full
shallow water dynamics showed good accordance
with the reference solutions in comparison with
other grid point methods. The small time
steps that have to be taken because of the explicit scheme are a weak point: as the AdamsBashforth scheme was implemented as an explicit method, the time step is limited by a
REFERENCES
13
Figure 11: Results for test case 5, ILU-GMRES, resolution ni = 32. The numerical solution for day 15 is
on the left (grid spacing 100 m) and the difference to the reference solution on the right (grid spacing 5 m,
solid lines: positive error, dashed lines: negative error).
Figure 12: Results for test case 6. The height field is shown after the fourteenth day in the left column. The
right column shows the difference between the computed solution and the reference solution. The spacing
is 100 m for both figures. Positive errors are marked with solid lines, negative ones with dashed lines.
CFL criterion containing the gravity wave speed
of the system. Semi-implicit or implicit methods in connection with Lagrange methods can
help to surmount this problem and allow much
longer time steps. Although an implementation
of these techniques would have been highly desirable it was not possible in the given time.
A comparison of a linear implicit third-order
Runge-Kutta-Rosenbrock method with an explicit Runge-Kutta method in the shallow water context is given in Lanser et al. (2000) such
issues could be another field for further investigations with this model.
References
Baumgardner, J. R. (1983, November). A threedimensional finite element model for mantle
convection. Ph. D. thesis, University of California, Los Angeles.
Baumgardner, J. R. and P. O. Frederickson (1985,
December). Icosahedral discretization of the
two-sphere. SIAM J. Numer. Anal. 22 (6),
1107–1115.
Cassirer, K., W. Joppich, S. Pott, and
R. Redler (2001). Ein Vorschlag für eine finite Differenzendiskretisierung von Laplaceund Diffusionsoperator auf dem Ikosaedergitter. Technical report, Institut für Algorithmen und wissenschaftliches Rechnen (SCAI),
GMD – Forschungszentrum Informationstechnik GmbH, Sankt Augustin.
Durran, D. R. (1991). The third-order AdamsBashforth method: An attractive alternative
to leapfrog time differencing. Monthly Weather
Review 119, 943–957.
Heikes, R. and D. A. Randall (1995). Numerical
integration of the shallow-water equations on
a twisted icosahedral grid. Part I: Basic design and results of tests. Monthly Weather Review 123, 1862–1880.
Heinze, T. (1998, December). Ein numerisches
Verfahren zur Lösung der Flachwassergleichungen auf einer rotierenden Kugel mittels der Lagrange-Galerkin-Methode. Diplomarbeit, Institut für Angewandte Mathematik der Rheinischen Friedrich-WilhelmsUniversität Bonn.
14
REFERENCES
Jakob, R., J. J. Hack, and D. L. Williamson
(1993). Solutions to the shallow water test set
using the spectral transform method. NCAR
Technical Note NCAR/TN-388+STR, NCAR.
Jameson, A., W. Schmidt, and E. Turkel (1981).
Numerical simulation of the Euler equations
by finite volume methods using Runge-Kutta
time stepping schemes. In AIAA 5th Computational Fluid Dynamics Conference. AIAA Paper 81-1259.
Lanser, D., J. G. Blom, and J. G. Verwer (2000,
July). Time integration of the shallow water
equations in spherical geometry. Report MASR0021, CWI, Centrum voor Wiskunde en Informatica.
Majewski, D. (1996). Documentation of the new
global model (GME) of the DWD. Technical
report, DWD.
Pesch, L. (2002, December). A Finite-Volume Discretization of the Shallow-Water Equations
in Sperical Geometry. Diplomarbeit, Meteorologisches Institut der Rheinischen FriedrichWilhelms-Universität Bonn.
Stuhne, G. R. and W. R. Peltier (1999). New icosahedral grid-point discretizations of the shallow water equations on the sphere. J. Comp.
Phys. 148, 23–58.
Thuburn, J. (1996). Multidimensional flux-limited
advection schemes. J. Comput. Phys. 123, 74–
83.
Thuburn, J. (1997, August). TVD schemes, positive schemes, and the universal limiter. Mon.
Wea. Rev. 125, 1990–1993.
Tomita, H., M. Tsugawa, M. Satoh, and K. Goto
(2001). Shallow water model on a modified
icosahedral grid by using spring dynamics. J.
Comput. Phys. 174, 579–613.
Williamson, D. L., J. B. Drake, J. J. Hack,
R. Jakob, and P. N. Swarztrauber (1992). A
standard test set for numerical approximations
to the shallow water equations in spherical geometry. J. Comp. Phys. 102, 211–224.