<<

A Conservative Scheme for the Multi-layer Shallow-water System based on Nambu Representation and the ICON Grid

Philipp Griewank

November 24, 2009

Diplomarbeit

Gutachter: PD Dr. Peter N´evir Prof. Dr. Ulrich Cubasch

Institut f¨urMeteorologie To Mom & Dad Abstract In this thesis a conservative multi-layer shallow-water spacial dis- cretization scheme is constructed for the ICON grid. The term “con- servative scheme” implies that the spatial discretization preserves en- ergy and potential enstrophy numerically exact. This scheme is based on the equations in Nambu form, applying the method presented in Salmon (2005), which enables deriving conservative schemes by dis- cretizing Nambu brackets so they maintain their antisymmetry. The multi-layer scheme introduced and tested in this thesis is an extension of the single-layer scheme developed by Sommer and N´evir(2009) for the ICON grid. An additional scheme based on the shallow-water equa- tions in form is developed to serve as a reference and both schemes are tested to ensure proper implementation. It is shown that the Nambu based scheme is superior in respect to energy and potential enstrophy preservation as well as stability, but has a higher computa- tional cost.

Zusammenfassung In dieser Arbeit wird ein konservatives numerisches Schema des mehr-schichtigen Flachwasser-Modells auf dem ICON Gitter entwickelt, welches auf den Flachwassergleichungen in Nambu-Darstellung basiert. Der Begriff “konservatives Schema” setzt eine numerisch exakte Er- haltung der Energie und potentiellen Enstrophie durch die r¨aumliche Diskretisierung voraus. Diese Erhaltung wird erreicht, indem die Nambu- Klammern der Gleichungen in Nambu-Darstellung so diskretisiert wer- den, dass ihre Antisymmetrie erhalten bleibt. Diese Methode wurde in Salmon (2005) vorgeschlagen und erl¨autert. Das mehr-schichtige Schema dieser Arbeit ist eine Erweiterung des ein schichtigen, konserva- tiven Schemas welches in Sommer and N´evir(2009) vorgestellt worde. Aus den Flachwassergleichungen in der Impulsdarstellung wird ein weit- eres numerisches Schema konstruiert, welches als Vergleichsmass dient. Die korrekte Implementierung beider Schemata wurde sichergestellt. Nachgewiesen wurde, dass Energie und potentielle Enstrophie von dem deutlich stabileren, aber rechen intensiveren, konservativen Schema wesentlich genauer erhalten werden.

3 Contents

1 Introduction 8 1.1 Motivation ...... 8 1.2 Thesis Structure ...... 10 1.3 Summary: Current State of the Art ...... 10 1.3.1 Energy-Vorticity Theory ...... 10 1.3.2 Numerical Applications ...... 11 1.3.3 ICON Project ...... 11 1.3.4 Current Trends in Model Development ...... 12 1.3.5 Model Evaluation ...... 12

2 Energy-Vorticity Theory 12 2.1 Introduction ...... 13 2.2 Hamilton Mechanics ...... 13 2.3 Nambu Mechanics ...... 14 2.4 Energy-Vorticity Theory as Nambu Field Theory ...... 17

3 Shallow-water System 19 3.1 Introduction ...... 19 3.2 Single-layer Shallow-water Equation ...... 20 3.3 Multi-layer Shallow-water Equations ...... 20 3.4 Conserved Quantities ...... 21

4 Shallow-water Equations in Nambu Form 22 4.1 Single-layer Shallow-water Equations ...... 22 4.2 Multi-layer Shallow-water Equations ...... 23

5 Model 25 5.1 Basic Description ...... 25 5.2 Temporal Discretization ...... 26 5.3 ICON Grid ...... 26 5.4 Discretization Schemes ...... 30 5.4.1 Momentum Discretization - ICON-Scheme ...... 30 5.4.2 Conservative Scheme Based on Nambu Representation - Nambu-scheme ...... 32

6 Numerical Results 35 6.1 Model Tests ...... 36 6.1.1 Stationarity ...... 36 6.1.2 ...... 37 6.1.3 Potential Enstrophy Conservation ...... 39 6.2 Time Resolution Dependencies ...... 41 6.2.1 Initial Conditions - Rossby-Haurwitz ...... 42 6.2.2 Results ...... 44

4 6.3 Spatial Resolution Dependencies ...... 46 6.3.1 Initial Conditions ...... 47 6.3.2 Results ...... 47 6.4 Vertical Resolution Dependencies ...... 49 6.4.1 Initial Conditions ...... 50 6.4.2 Conservation ...... 50 6.4.3 Stability ...... 52 6.5 Baroclinic Instability ...... 55

7 Summary & Conclusion 59 7.1 Summary ...... 59 7.2 Conclusion ...... 61

Appendices 62

A Notation 62

B Additional Figures 64 B.1 Stationarity Test ...... 64 B.2 Test ...... 65 B.3 Rossby-Haurwitz Wave ...... 66

C Functionals and Their Derivatives 71

5 List of Figures

1 ICON grid level 2 ...... 27 2 ICON grid level 3 and level 4 ...... 28 3 Local stencil: mass points i, vorticity points ν and wind edges l 28 4 Initial height fields of stationarity test: n = 0, ∆t = 75 s, level 6 grid resolution, α = 0.01, no diffusion, 4 layers: ρ1 = 1.0, ρ2 = 0.9, ρ3 = 0.5, ρ4 = 0.2 ...... 37 5 Initial height fields of gravity wave test: n = 0, ∆t = 100 s, level 5 grid resolution, α = 0.01, no diffusion, 2 layers: ρ1 = 1.0, ρ2 = 0.9 ...... 38 6 Total height of gravity wave test, internal and external gravity wave labelled “int” and “ext”: n = 0, 500, 1000, 1900, ∆t = 100 s, level 5 grid resolution, α = 0.01, no diffusion, 2 layers: ρ1 = 1.0, ρ2 = 0.9 ...... 40 7 Relative potential enstrophy error of potential enstrophy con- servation test: n = 1 ... 10000, ∆t = 50 s, level 5 grid resolu- tion, α = 0.01, no diffusion, 2 layers: ρ1 = 1.0, ρ2 = 0.9 . . . 41 8 Initial height fields of Rossby-Haurwitz wave: n = 0, level 4 grid resolution, α = 0.01, no diffusion, 2 layers: ρ1 = 1.0, ρ2 = 0.5...... 43 9 Relative energy and potential enstrophy error H and E over M M time, sample Rossby-Haurwitz wave run, Nambu-scheme and ICON-scheme: n = 1 ... 1666, ∆t = 90 s, level 4 grid resolu- tion, α = 0.01, no diffusion, 2 layers: ρ1 = 1.0, ρ2 = 0.5 . . . 45 10 Time-averaged absolute relative energy and potential enstro- phy error of multiple runs after 1.7 days arranged by Courant number: n = 1000,..., 75000, ∆t = 2,..., 150 s, level 4 grid resolution, α = 0.01, no diffusion, 2 layers: ρ1 = 1.0, ρ2 = 0.5 46 11 Time-averaged absolute relative energy error and potential en- strophy error of multiple runs after 0.5 days arranged by aver- age edge length: n = 2000, ∆t = 20 s, level 2-7 grid resolution, α = 0.01, no diffusion, 2 layers: ρ1 = 1.0, ρ2 = 0.9 ...... 48 12 Relative conservation error of single-layer, four-layer and ten- layer run over days: ∆t = 50 s, level 6 grid resolution, α = 0.1, no diffusion ...... 51 13 Days passed until potential enstrophy is twice the initial value for 1 to 10 layers, initial conditions detailed in Subsection 6.4.1: Subfigure (a): ∆t = 100 s, level 5 grid resolution, α = 0.1, no diffusion. Subfigure (b): ∆t = 50, level 6 grid resolution, α = 0.1, no diffusion ...... 53 14 Second layer height field of four-layer model: ∆t = 100 s, level 5 grid resolution, α = 0.1, no diffusion, 4 layers: ρ1 = 1.00, ρ2 = 0.75, ρ3 = 0.50, ρ4 = 0.25 ...... 54

6 15 Zonal wind distribution of baroclinic initial condition . . . . . 55 16 Height fields of baroclinic instability test: ∆t = 50, level 6 grid resolution, α = 0.01, no diffusion, 2 layers: ρ1 = 1.0, ρ2 = 0.9 57 17 Vorticity field of lower and upper layer, northern hemisphere: ∆t = 50, level 6 grid resolution, α = 0.01, no diffusion, 2 layers: ρ1 = 1.0, ρ2 = 0.9 ...... 58 18 Total height fields of ICON and Nambu-scheme after ≈ 4.5 days: n = 5000, ∆t = 75 s, level 6 grid resolution, α = 0.01, no diffusion, 4 layers: ρ1 = 1.0, ρ2 = 0.9, ρ3 = 0.5, ρ4 = 0.2 64 19 Height fields at end of gravity wave test: n = 1900, ∆t = 100 s, level 5 grid resolution, α = 0.01, no diffusion, 2 layers: ρ1 = 1.0, ρ2 = 0.9 ...... 65 20 Height fields of Rossby-Haurwitz wave: n = 1666, ∆t = 90 s, level 4 grid resolution, α = 0.01, no diffusion, 2 layers: ρ1 = 1.0, ρ2 = 0.5 ...... 66 21 Initial layer height of single-layer (upper plot) and ten-layer (lower plot) Rossby-Haurwitz test. ∆t = 100 s, level 5 grid res- olution, α = 0.1, no diffusion, 1-10 layers: ρ = 1.0, 0.9, 0.8, ..., 0.1 67 22 Bottom layer height field of two-layer Rossby-Haurwitz wave: ∆t = 100 s, level 5 grid resolution, α = 0.1, no diffusion, 2 layers: ρ1 = 1.0, ρ2 = 0.5 ...... 68 23 Top layer height field of two-layer Rossby-Haurwitz wave: ∆t = 100 s, level 5 grid resolution, α = 0.1, no diffusion, 2 layers: ρ1 = 1.0, ρ2 = 0.5 ...... 69 24 Total height field of two-layer Rossby-Haurwitz wave: ∆t = 100 s, level 5 grid resolution, α = 0.1, no diffusion, 2 layers: ρ1 = 1.0, ρ2 = 0.5 ...... 70

List of Tables

1 Overview of Hamilton and Nambu mechanics...... 16 2 Overview of Hamiltonian fluid dynamics and energy-vorticity theory...... 17 3 Grid characteristics of the ICON grid for resolution levels 1 to 7 29 4 Notation used for the ICON grid ...... 29 5 Definition of field variables on the ICON grid ...... 30 6 Flowchart of ICON-scheme ...... 31 7 Flowchart of Nambu-scheme ...... 34

7 1 Introduction

The key idea behind this work is to create an energy and potential enstrophy conserving numerical multi-layer shallow-water model using the equations written in Nambu form. Although a multitude of shallow-water models exist this newly constructed multi-layer model is unique because it is based on the equations in Nambu form and the ICON grid, a geodesic icosahedral grid with C-Type staggering. The crucial step is to devise a spatial discretization that substitutes the par- tial differential equations of continuous fields with approximating ordinary differential equations of finite differences while preserving the conservation properties. Sommer and N´evir(2009) successfully applied this approach to the single-layer shallow-water system greatly improving conservation and sta- bility. The new multi-layer model is an extension of the single-layer model used by Sommer and N´evir(2009) and referred to in this thesis as the icosa- hedral multi-layer model, or simply the multi-layer model. The final step is to examine conservation and stability of this multi-layer model.

1.1 Motivation The aim of this thesis is to study how the Nambu representation can be employed to ensure preservation of conserved quantities, not to develop a perfect multi-layer shallow-water model. It is hoped that studies such as this one will facilitate the construction of better dynamic cores for numerical weather and climate models. Dynamic core is the term used to describe the part of an atmospheric general circulation model that numerically solves the governing equations of the adi- abatic dynamics of the atmosphere. Although the multi-layer shallow-water equations are a strongly simplified version of the real atmosphere they have many properties that make them ideal for testing new methods and grids. Most importantly, the shallow-water equations are fully ageostrophic and contain slow Rossby waves as well as fast gravity waves. Besides Sommer and N´evir(2009) recent new approaches for weather prediction and climate modelling have been tested using the shallow-water equations by Li et al. (2008), Swinbank and Purser (2006), Lee and Macdonald (2009) and L¨auter et al. (2008) amongst others. It has been shown in Sommer and N´evir(2009) that both energy and po- tential enstrophy of the single-layer shallow-water model are well preserved through Nambu representation. The research focused more on enstrophy in view of its role in causing instability. As potential enstrophy is not trans- ferred between layers in the multi-layer shallow-water equations (cf. Section 3) its conservation should not be affected by implementing multiple layers. In contrast to the single-layer system, the energy of each layer of the multi- layer system is affected by all others, leading to many more error possibilities.

8 However, it is unclear whether all these possible error sources will cancel each other out, reinforce each other or won’t interact at all.

There are several reasons why so much effort is invested into the preserva- tion of conservation properties in numerical models. One of the few exact analytical properties we know of the solutions of nonlinear equations, such as those that govern our atmosphere, is conservation. Therefor it is desirable to implement conservation into our models. It has long been known (Arakawa (1966)) that violation of energy and poten- tial enstrophy conservation laws leads to an incorrect inverse energy cascade, which accumulates at the smallest resolved scales. Nonlin- ear interactions at these scales lead to aliasing and an amplification of total energy. This destabilization can be fatal for simulations. It is possible to eliminate this instability by adding numerical damping, which is the usual remedy in more sophisticated models. For more realistic atmospheric flows this can represent a physical kinetic energy dissipation which occurs at sub grid scales unresolvable by models. Another justification to preserve conserved quantities is that for other nu- merical models the accuracy of certain aspects can be closely tied to correct preservation of conservation properties. As an example, in the simple case of the Burger’s equation1 conservation of momentum is crucial to accurately compute the speed of shocks. This and other examples encourage the at- tempt to retain local and global conservation properties in hopes of a more realistic simulation. Moreover each enforced conservation property reduces the dimension of the solution by one. Given that the degrees of freedom for a numerical weather model are in the of 107, reducing the dimension of the solution by one appears to provide little to no advantage. However, if the conserved quan- tity serves as an important physical constraint the benefit is likely to be greater. A somewhat more accessible example of a different nature with the same characteristics is being looked into by the modelling group at the GeoForschungsZentrum in Potsdam. Here the conserved quantity is the to- tal angular momentum of the Earth as measured by satellites. Although this technically only reduces the dimension of the solution by one, it repre- sents a physical constraint on the large global flows (mainly jets and trade winds). Moreover a somewhat more technical advantage is that checking con- servation of a conserving numerical scheme can be a valuable debugging aid. Atmospheric models consist of a dynamic core that solves scalable flows and parametrizations that are used to represent all processes below the grid res- olution. If the dynamic core preserves the conservation properties it enables pinpointing sinks and sources in the parametrizations. All arguments listed

1Burger’s equation is a partial differential equation, which when inviscid coincides with ∂u ∂u ∂u2 the one-dimensional of the fluid speed u in direction x. ∂t + u ∂x = ν ∂x2

9 and more are elaborated in much greater detail in Thuburn (2008).

1.2 Thesis Structure This thesis consists mainly of two parts. The first focuses on the theoret- ical background and the construction of the spatial discretization, followed by the second part that presents the numerical results generated, using the newly-constructed icosahedral multi-layer model. Although modifying the source code of the original model to incorporate up to 99 layers accounted for the bulk portion of the modelling effort, this issue will not be investi- gated. Instead the emphasis is to present a clear picture of the two fun- damentally different approaches used. These different approaches yield two different schemes (cf. Subsection 5.4), which are both implemented into the icosahedral multi-layer model. The first part begins with a short introduction of the energy-vorticity the- ory in Section 2 followed by the shallow-water system detailed in Section 3. Section 4 details the application of the energy-vorticity theory to the shallow- water system. In Section 5 the icosahedral multi-layer model, the center of this thesis, is introduced. Some of the more technical specifications of the program will be looked into briefly (e.g. the numerical timestep method and its side effects, how the variables are assigned to the grid and how initial con- ditions are defined). However, the focus is on the two discretization schemes and how they were developed as outlined in Subsection 5.4. Although these both calculate the tendencies of the variables that are to be predicted, the differences between them are pronounced. Section 6 discusses the numerical results of the multi-layer model. The differ- ences in conservation and how they affect the model output and its stability are highlighted.

1.3 Summary: Current State of the Art 1.3.1 Energy-Vorticity Theory The energy-vorticity theory is the concept of writing hydro- thermodynamical systems in Nambu representation, which was first proposed by N´evirand Blender (1993). The single-layer shallow-water equations used by Sommer and N´evir(2009) were first published in Salmon (2005). Of great importance for this thesis are the multi-layer equations presented in N´evirand Sommer (2009) . At the moment the energy-vorticity theory is still an active research topic. The three year project “Nambu Calculus in Dynamical Meteorology” at the University of Vienna (which is expected to end in 2011) aims to show that the energy-vorticity theory has the potential to unify the principles of dynamic meteorology, and looks for possible applications.

10 1.3.2 Numerical Applications Numerical applications based on the energy-vorticity theory or Nambu rep- resentation have only recently been published. Salmon (2005) suggested a general approach to construct conservative schemes using the Nambu rep- resentation. In Salmon (2005) it was shown that the key is to discretize the Nambu brackets so that their antisymmetry is preserved. Two years later Salmon (2007) developed a conservative scheme for the shallow-water equations on a regular square grid and an additional scheme for an unstruc- tured triangular mesh. Sommer and N´evir(2009) constructed a conservative scheme for a single-layer shallow-water system based on a staggered geodesic grid as described in Subsection 5.3 using Salmon’s ideas. Besides being con- servative, it was shown that the newly developed scheme proved very stable and reproduced a spectral distribution of kinetic energy consistent with the- oretical expectations. These improvements, however, came with an increase in computational cost. While the research presented in Sommer and N´evir (2009) and Salmon (2007) was more theoretical in nature, dealing with in- compressible two-dimensional fluids, Gassmann and Herzog (2008) designed a set of equations specifically developed to be implemented in climate and numerical weather models. These compressible, non-hydrostatic equations comprise dry air and water in three phases of a -averaged model atmosphere. To formulate the continuous model equation set which is consis- tent in respect to energy, mass, and Ertel’s conservation Gassmann and Herzog (2008) use elements of the energy-vorticity theory as well as the Hamiltonian description of fluids described by Morrison (1998).

1.3.3 ICON Project Both Sommer and N´evir(2009) and Gassmann and Herzog (2008) are associ- ated with the development of the ICON dynamical core. The ICON project with the objective of developing a non-hydrostatic, general circulation model on an icosahedral grid (ICON grid) with local refinement was initiated by the Max Planck Institute for Meteorology and the Deutscher Wetterdienst. The ICOsahedral Shallow-Water model Prototype (ICOSWP) documented in Bonaventura et al. (2005) was the first step in the development of the ICOsa- hedral Shallow Water Model (ICOSWM). Sommer and N´evir(2009) later added a conservative scheme based on Nambu representation to the ICOSWP which has been extended to a multi-layer model in this thesis. The ICOsa- hedral Hydrostatic atmospheric Dynamical Core (ICOHDC) documented in Wan (2009) is the last step before the final non-hydrostatic core is completed. The equations formulated in Gassmann and Herzog (2008) were designed to be implemented into the final core which is still under development.

11 1.3.4 Current Trends in Model Development The ICON project is part of a larger movement to create the next generation of global circulation models which use finite difference methods on noncon- ventional grids. Nonconventional grids other than the ICON grid and papers covering them include the cubed sphere (Nair and Loft (2005)), the Fibonacci grid (Swinbank and Purser (2006)) and the Ying-yang grid (Li et al. (2008)). Models employing the finite difference method (such as the one presented in this thesis) are based on approximating the solutions of differential equations with finite difference equations for a discretized atmosphere. In contrast, spectral models represent the horizontal structure of the atmospheric state variables as truncated series of spherical harmonics. The adiabatic dynam- ics of a spectral model can be described as a set of multi-dimensional wave propagation problems. Spectral models have many advantages which made them very popular with weather forecast centers in the 1980s and 1990s. They usually produce much smaller phase errors than finite difference models, especially at medium and lower resolutions. Longer timesteps are possible in spectral models thanks to conveniently applicable, semi-implicit time stepping schemes and the problem of finite difference models to cope with the convergence of longitude-latitude grids at the poles. The focus has shifted to the development of finite differ- ence models due to limitations in the spectral approach, which has become troublesome with the growth of computing power. A serious weakness of the spectral method is the reproduction of tracer transports and the .

1.3.5 Model Evaluation An important question is how the performance of the icosahedral multi-layer model is assessed. Although Williamson et al. (1991) published a standard set of tests to compare numerical approximations of shallow water equa- tions in spherical geometry, there seems to be no equivalent accepted set for multi-layer shallow-water models. Due to this, options are somewhat lim- ited. However, since the effects of using Nambu representation are of interest, comparing the icosahedral multi-layer model with other models using other grids, timesteps and initializations would be problematic or even counter pro- ductive. Since this is the case, no external data will be used in this thesis. Instead two separate dynamical cores are implemented into the multi-layer model and compared.

2 Energy-Vorticity Theory

The term energy-vorticity theory is the name given to the concept of writ- ing hydro-thermodynamical systems using Nambu representation. A short

12 overview of the theory and its origins follows. For a complete description see the chapter dedicated to the subject in Lange (2002) or N´evir(1998).

2.1 Introduction The aim of the energy-vorticity theory is to fully describe hydrothermody- namical systems using two conserved quantities. One of these is always the total energy of the system and the other is a global vorticity quantity. Similar to Hamilton mechanics from which the energy-vorticity theory was derived there are differences. While Hamilton mechanics are based solely on a single Hamiltonian (which represents the energy of the system) the energy-vorticity theory relies on an additional second conserved quantity. A generalization of Hamilton mechanics, using n − 1 Hamiltonians for systems with a dimen- sion of n, was proposed in Nambu (1973). This generalization of Hamilton mechanics is commonly refered to as Nambu mechanics. Table 2.3 compares the most important characteristics of Hamilton and Nambu mechanics which both preserve the phase space volume according to Liouville’s theorem. To illustrate the differences the Euler equations of the free rigid rotator are com- pared in Hamilton and Nambu form in Subsection 2.3 . Though classically applied to finite systems of ordinary differential equations Hamilton mechanics can be used to describe fluid dynamics (cf. Salmon (1998) and Morrison (1998)). This is true for Nambu mechanics as well. N´evirand Blender (1993) successfully managed to formulate incompressible hydrodynamics in Nambu form by employing trilinear antisymmetric brackets of energy and enstrophy for two-dimensional flows. The three-dimensional incompressible equations were formulated similarly with trilinear brackets of energy and helicity. These brackets are called Nambu brackets and are of great importance to this thesis, as explained in Subsection 5.4. It has been shown that many meteorologically relevant systems can be written in Nambu form. Salmon (2005) converted the shallow-water system into Nambu form as did N´evirand Sommer (2009) for the quasigeostrophic system, the multi-layer shallow-water system, the hydrostatic system and the full set of ideal hydrodynamic equations. Bihlo (2008) showed that the Rayleigh- B´enardconvection can be written as a superposition of a Nambu bracket and an additional dissipative bracket. The two-dimensional incompressible vorticity equation in Nambu and Hamilton form is described in Subsection 2.4.

2.2 Hamilton Mechanics Hamilton mechanics is a reformulation of classical dynamics. A closed system with n degrees of freedom is defined in a 2n-dimensional phase space. Using Hamilton mechanics the equations of the tendenciesq ˙i, p˙i of the canonical coordinates generalized momentum pi and generalized coordinate qi are the

13 Hamilton equations with the scalar Hamiltonian

H = H(q1, q2, . . . , qi, . . . , qn, p1, p2, . . . , pi, . . . , pn) which is equal to the energy. The canonical Hamilton equations are ∂H ∂H q˙i = ;p ˙i = − . ∂pi ∂qi The tendency of a function F (p, q) can be written with the help of an anti- symmetric Poisson bracket of a(q, p) and b(q, p) (meaning {a, b} = −{b, a})

2n X  ∂a ∂b ∂a ∂b  {a, b} = − (1) ∂q ∂p ∂p ∂q i=1 i i i i as dF ∂F ∂F ∂F ∂H ∂F ∂H = q˙ + p˙ = − = {F,H} . dt ∂q ∂p ∂q ∂p ∂p ∂q

dF If F is time invariant {F,H} = dt = 0. Since {F,H} = −{H,F } it follows that {H,F } also equals 0. If a general coordinate transformation is introduced that transforms

q1, . . . , qn, p1, . . . , pn to z = {z1, . . . , zm} the Poisson bracket assumes the form m m X X ∂F ∂H {F,H} = J ij ∂z ∂z j=1 i=1 i j containing the Poisson tensor J. Poisson brackets are always antisymmetric and fulfill the Jacobi identity. If m = 2n and the new coordinates are canon- ical the Poisson brackets are nonsingular as well. However, noncanonical coordinates with m ≤ 2n can lead to the Poisson bracket becoming singular. This typically arises when a transformation from canonical coordinates to a reduced set of fewer coordinates takes place. Singular brackets indicate the existence of time independent functions named Casimirs that permit the re- duction of the 2n canonical equations to a fewer number of nonetheless closed equations, as illustrated by the example of the rigid rotator at the end of the next subsection.

2.3 Nambu Mechanics Nambu mechanics are a generalization of Hamilton mechanics first proposed in Nambu (1973). The tendency of a function F is described by n − 1 time invariant quantities and a Nambu bracket, dF = {F,H ,...,H } . dt 1 n−1

14 The Hamiltonians H1,...,Hn−1 are functions of n dynamic variables which span a n-dimensional phase space, as opposed to the canonical q and p which span an even-numbered dimensional phase space. The trajectory of a solu- tion in phase space lies in the intersection of the n − 1 constraints of the n − 1 Hamiltonians. Nambu brackets must always be antisymmetric and nonsingular, in contrast to noncanonical Hamilton mechanics where hidden constraints in the form of Casimirs are possible. . Due to the antisymmetry dF of the Nambu bracket if F equals H1,...,Hn−1, it follows that dt = 0. If F = Hi, switching Hi implies that

{Hi,H1,...,Hi,...,Hn−1} = −{Hi,H1,...,Hi,...,Hn−1} which is only correct for

{Hi,H1,...,Hi,...,Hn−1} = 0 .

Example The Euler equation for a free rigid rotator was the first physical appli- cation mentioned in Nambu (1973). It was also the only physical example published in roughly two decades. Assume a free rotating rigid body with three components of angular momentum L1,L2,L3 around the principal axes and their corresponding moments of inertia I1,I2,I3. The Euler equations of the tendencies of the momenta are

I2 − I3 L˙ 1 = L2L3 I2I3

I3 − I1 L˙ 2 = L1L3 I1I3

I1 − I2 L˙ 3 = L1L2. I1I2 Known conserved quantities of the rigid rotator are the total kinetic energy H and the squared momentum G

3 2 3 1 X Li 1 X H(L ) = ; G(L ) = L 2 . i 2 I i 2 i i=1 i i=1 By using the total kinetic energy and the squared momentum it is possible to write the tendency of a function F (L1,L2,L3) in Nambu form with a Nambu bracket {a, b, c} defined as ∇a· (∇b×∇c). By inserting G and H into ∇G × ∇H it is clear that ∇G × ∇H equals the Euler equations listed above. This leads to the conclusion that

3 dF X ∂F = L˙ = ∇F · (∇G × ∇H) = {F, G, H} dt ∂L i i=1 i

15 Discrete Conservative Dynamics Canonical Noncanonical Nambu Hamilton Hamilton Mechanics Mechanics Mechanics Dimension even n, n ∈ N n, n ∈ N n, n ∈ N Hamiltonians Energy H Energy H H1,...,Hn−1 Evolution equations dF dF dF = = {F,H} = {F,H} dt dt dt {F,H1, ..., Hn−1}

Bracket Antisymmetry Antisymmetry Antisymmetry properties Jacobi property Jacobi property Non-degenerate Non-degenerate If n odd, degener- ate If n even, possibly degenerate

Table 1: Overview of Hamilton and Nambu mechanics.

dF = {F, G, H} . dt An advantage of the equations in Nambu form is that they are easier to visualize. ∇G × ∇H shows that the vector L = (L1,L2,L3) moves along the intersection of H and G in phase space, illustrating well how the movement is defined by multiple invariants. In contrast the Poisson bracket for the rigid rotator in noncanonical Hamilton form is ∂F ∂H {F,H} = −ijkLk ∂Li ∂Lj written with the aid of the Levi-Cevita symbol ijk which is 1 for even per- mutations of i, j, k, −1 for odd permutations and 0 if any index is repeated. This singular bracket indicates the existence of a Casimir, which we know to be the squared momentum G. By writting the Nambu bracket with the Levi-Cevita symbol ∂G ∂F ∂H {F, G, H} = −ijk ∂Lk ∂Li ∂Lj the key difference between the Hamilton and Nambu form is clearly visible. The squared momentum G is conserved in both, but is treated as a conser- vation quantity equal to the energy in Nambu form and a hidden constraint in Hamilton form.

16 Conservative Canonical Noncanonical Energy-Vorticity Hamilton Hamilton Theory Dynamics Dynamics Hamiltonians Energy H Energy H Energy H, E Application on Lagrangian par- Eulerian fields Eulerian Fields fluid dynamics ticles Evolution equa- tion dF ∂F ∂F = {F, H} = {F, H} = {F, H, E} dt ∂t ∂t

Bracket Antisymmetry Antisymmetry Antisymmetry properties Jacobi property Jacobi property Non-degenerate Non-degenerate Degenerate

Table 2: Overview of Hamiltonian fluid dynamics and energy-vorticity theory.

2.4 Energy-Vorticity Theory as Nambu Field Theory The energy-vorticity is the application of Nambu field theory to meteorolog- ical fluid dynamics. Field equations are partial differential equations com- pared to the ordinary differential equations of discrete systems. Now as fields with infinite degrees of freedom are being described, globally conserved quan- taties are defined using functionals. Functional derivatives assume the vital role that regular derivatives fulfill in Nambu and Hamilton mechanics, con- necting global conservation properties to local tendencies. To clearly separate the two, functionals will be written using square brackets and their derivatives δE[ζ] with δ: e.g. E[ζ(v)], δζ . In this example the enstrophy E is a functional of the vorticity ζ, which is a function of the horizontal wind vector v. The basics of functionals and their derivatives can be found in the Appendix. In Nambu form the tendency of F is expressed using one or more Nambu brackets of energy and a conserved vorticity quantity M,

∂F = {F, H, M} . ∂t (Note: when fluids are discussed, tendency always implies the local change ∂ over time ∂t ) The most important aspects of Hamilton and Nambu field dynamics are presented in Table 2.4.

Nambu bracket form of the vorticity equation As a demonstration of how the energy-vorticity theory is applied, the two- dimensional vorticity equation is presented in Nambu form (cf. N´evirand

17 Blender (1993)). The notation in this subsection is slightly altered to imitate the standard notation of the original paper. E, which otherwise stands for the potential enstrophy of the shallow-water system, is now the enstrophy and the streamfunction χ is substituted by Ψ. The two-dimensional incompressible vorticity equation is commonly written as ∂ζ = −v· ∇ζ . ∂t Given that the flow is incompressible, the divergence of the horizontal wind v is zero. Thus we express v by the stream function Ψ as v = k × ∇Ψ(k being the vertical unit vector). Using this the vorticity equation assumes the following form, which can also be written using the Jacobi-operator of two ∂a ∂b ∂a ∂b functions a(x, y) and b(x, y), J (a, b) = ∂x ∂y − ∂y ∂x ∂ζ = −(k × ∇Ψ)· ∇ζ = −k· (∇Ψ × ∇ζ) = −J (Ψ, ζ) . ∂t Assuming a functional F[ζ] its tendency would be

∂F ZZ δF ∂ζ ZZ δF = dA = − J (Ψ, ζ)dA. ∂t δζ ∂t δζ In the absence of potential energy the total energy of the system H is only kinetic. The enstrophy E will be the second conservation property needed to bring the equation into Nambu form. 1 ZZ 1 ZZ 1 ZZ H = v2dA = − ΨζdA , E = ζ2dA 2 2 2 Now both conserved quantities are functionals of ζ and their derivatives are δH δE = −Ψ , = ζ . δζ δζ

By defining the Nambu bracket of three arbitrary functionals, A[ζ], B[ζ] and C[ζ], as ZZ δA δB δC  {A, B, C} = − J , dA δζ δζ δζ the time-evolution of an arbitrary functional F[ζ] is

∂F[ζ] = {F, E, H} ∂t and the two-dimensional noncompressible vorticity equation in Nambu form is ∂ζ = {ζ, E, H} . ∂t

18 In comparison, the Poisson bracket in noncanonical Hamiltonian form

ZZ δF δH {F, H} = ζJ , dA δζ δζ

δE preserves the potential enstrophy indirectly. By substituting ζ with δζ the Nambu form is reached. Although the difference between the two brackets appears minor, the Nambu form is key to constructing the potential enstrophy conserving spatial discretization (cf. 5.4, page 30).

3 Shallow-water System

3.1 Introduction The shallow-water equations on a rotating sphere are widely used as a pri- mary test for numerical methods designed to model global atmospheric flows. Since they include many of the major difficulties in modelling the horizontal aspects of a three-dimensional global atmosphere they provide a first test and stepping stone to develop new numerical schemes. The shallow-water system is incompressible. Its vertical thickness and fluctuations much smaller than the horizontal scales. The system has become such a standard approach for developing atmospheric models that Williamson et al. (1991) collected a set of standardized tests to compare different schemes. Its nonlinearity, its ageostrophic flow and that it reproduces fast gravity waves as well as slow Rossby waves make it a good test candidate. If a numerical scheme is able to well represent wave propagation and preserve relevant flow invariants of the shallow-water equations, the next step is to develop a more complete scheme to represent the real atmosphere. The shallow-water system is not restricted to numerical experiments. Al- though the shallow-water equations are a very limited model of the atmo- sphere, they are well-suited to analytically studying gravity waves and large scale dynamics such as Rossby waves. However, devoid of thermodynam- ics and small-scale vertical deviations they are completely useless for under- standing many atmospheric phenomena such as convection, precipitation or the boundary layer.

The single-layer system is void of stratification and all its effects. It is barotrope and as such unable to represent the baroclinic properties of the atmosphere. It is also unable to reproduce internal gravity waves that occur due to density differences between layers. Using more and more layers the multi-layer system converges to an incompressible hydrostatic model. In this chapter the equations are listed in momentum, vorticity-divergence and Nambu form. The more common forms will be introduced first followed, by the Nambu form in a separate section. There exist a multitude of forms

19 besides the ones mentioned, many of which can be found in Williamson et al. (1991)

3.2 Single-layer Shallow-water Equation All symbols other than the height h, the horizontal wind v, the parameter f, the vertical unit vector k and the density ρ will be defined when introduced. A complete list of the notation used can be found in the Appendix.

Momentum form The horizontal momentum equation consisting of a Coriolis, pressure and term dv 1 + fk × v = − ∇p dt ρ can be reduced to dv + fk × v = −g∇h dt since pressure is only a function of height in the shallow-water system. The equation of mass conservation is dh + h∇ · v = 0 . dt The momentum equation can also be formulated using the absolute vorticity ζa = ζ + f by applying the Weber transformation, resulting in

∂v  v2  = −ζ k × v − ∇ gh + . (2) ∂t a 2

Vorticity-divergence form If the horizontal momentum equation is specified in terms of relative vortic- ity ζ = ∇×v and horizontal divergence µ = ∇·v the shallow-water equations are given in vorticity-divergence form. So instead of a horizontal momentum vector equation ∂ζ ∂µ 1 = −∇ · (ζ v) and = k · ∇ × (ζ v) − 4( v2 + gh) ∂t a ∂t a 2 determine the tendencies of ζ and µ, which can be reconstructed to obtain the wind field v.

3.3 Multi-layer Shallow-water Equations

Variables are indexed from bottom to top, so for hj, h1 is the thickness of the bottom layer and hN is the thickness of the top layer.

20 Momentum form The Coriolis and acceleration terms are identical in the single-layer and multi-layer system. As the pressure of each layer is a function of the thickness of all layers, the pressure gradient of the horizontal momentum equation of each layer j is the term that couples all layers, resulting in

 j n  dvj X X ρk + fk × vj = −g∇  hk + hk  . dt ρj k=1 k=j+1

In contrast the mass conservation equation of each layer j dh j + h ∇ · v = 0 (3) dt j j is unaffected. The momentum equation can again be formulated using the absolute vorticity ζa = ζ + f and the Weber transformation as     j n 2 ∂vj X X ρk vj = −ζajk × vj − ∇ g  hk + hk  +  . (4) ∂t ρj 2 k=1 k=j+1

Vorticity-divergence form The Bernoulli function Ψj

 j n  1 2 X X ρk Ψj = vj + g  hk + hk  2 ρj k=1 k=j+1 consisting of the specific kinetic energy and the pressure is employed to simplify writing the horizontal momentum equation of layer j in vorticity- divergence form. The divergence equation ∂µ j = k · ∇ × (ζ v ) − 4Ψ ∂t aj j j reaches across all layers, but the vorticity tendency of layer j ∂ζ j = −∇ · (ζ v ) ∂t aj j is solely a function of the wind field of layer j.

3.4 Conserved Quantities Of all the conserved quantities of the shallow-water system the focus of this thesis is on energy and the potential enstrophy.

21 Energy H Due to the inviscid nature of the shallow-water system energy is a con- served property. The total energy of the system is the sum of the kinetic and potential energy of the layers.

n n X X H = Hpotj + Hkinj (5) j=1 j=1

j−1 ! g Z X 1 Z H = ρ h 2 + 2h h dA H = ρ h v2dA potj 2 j j j k kinj 2 j j j k=1

Potential enstrophy E As mentioned in the motivation, potential enstrophy is of great importance to the flux of energy through the scales. This justifies the decision to focus on the potential enstrophy instead of one of the other vorticity-based conserved quantities (such as the integrated vorticity). It is also the second conservation property, besides the energy, used to formulate the shallow-water systems in Nambu form. In addition to E the potential enstrophy of each layer Ej is also preserved individually.

N N Z 2 X X ρj ζaj E = E = dA (6) j 2 h j=1 j=1 j

4 Shallow-water Equations in Nambu Form

Salmon (2005) presents the single-layer shallow-water equations written us- ing Nambu representation. The multi-layer equations which are quite similar were published somewhat later in N´evirand Sommer (2009). Here a brief overview is given, for a more detailed approach cf. Salmon (2005). The stream function χ and velocity potential γ of the layer momentum defined by the Helmholtz decomposition hv = k × ∇χ + ∇γ will be needed. Addi- ζa tionally J (a, b) = k · (∇ × (a∇b)) denotes the Jacobi-operator, q = h is the absolute potential vorticity and cyc( ) stands for the sum of cyclic permuta- tions of the arguments. Furthermore x and y represent horizontal rectangular coordinates.

4.1 Single-layer Shallow-water Equations Using the potential enstrophy and energy defined in the previous chapter as 1 2 well as the Bernoulli function for the single-layer Ψ = 2 v + gh the following

22 functional derivatives can be obtain δH δE = − χ = q δζ δζ δH δE = − γ = 0 δµ δµ δH δE 1 =Ψ = − q2 . δh δh 2 Building on this the time-evolution of an arbitrary functional F of the prog- nostic variables µ, ζ and h can be written as:

∂ F[ζ, µ, h] = {F, H, E} = {F, H, E} + {F, H, E} + {F, H, E} ∂t ζζζ µµζ ζµh These brackets are labelled according to the functional derivatives they in- clude. The full bracket definitions are listed below. Z δF δH δE {F, H, E} = J , dA ζζζ δζ δζ δζ Z δF δH δE {F, H, E} = J , dA + cyc(F, H, E) µµζ δµ δµ δζ Z  ∂q −1  ∂ δF ∂ δH ∂ δF ∂ δH ∂ δE {F, H, E} = − dA ζµh ∂x ∂x δζ ∂x δµ ∂x δµ ∂x δζ ∂x δh + cyc(x, y) + cyc(F, H, E)

By setting F to ζ, µ or h and eliminating all brackets that equal zero it is possible to attain the vorticity-divergence form of the equations.

4.2 Multi-layer Shallow-water Equations The multi-layer equations are constructed on the same basis. The functional derivatives keep their structure but are weighted by the layer density ρj and the Bernoulli function is defined as

 j n  1 2 X X ρk Ψj = vj + g∇  hk + hk  . 2 ρj k=1 k=j+1

δH δE = −ρjχj = ρjqj (7) δζj δζj δH δE = −ρjγj = 0 (8) δµj δµj

δH δE ρj 2 = ρjΨj = − qj (9) δhj δhj 2

23 The arbitrary functional F is now a functional of up to 3N functions, namely ζ1, ..., ζN , µ1, ..., µN ,h1, ..., hN as are the energy and potential enstrophy. Now the equations in Nambu form are ∂ F[ζ , ..., ζ , µ , ..., µ , h , ..., h ] = ∂t 1 N 1 N 1 N

{F, H, E} = {F, H, E}ζζζ + {F, H, E}µµζ + {F, H, E}ζµh , which employ the brackets of the single layer system summed over each layer.

N X Z δF δH δE {F, H, E} = J , dA (10) ζζζ δζ δζ δζ j=1 j j j N X Z  δF δH  δE {F, H, E} = J , dA + cyc(F, H, E) (11) µµζ δµ δµ δζ j=1 j j j N Z  −1   X ∂qj ∂ δF ∂ δH ∂ δF ∂ δH ∂ δE {F, H, E} = − dA ζµh ∂x ∂x δζ ∂x δµ ∂x δµ ∂x δζ ∂x δh j=1 j j j j j (12) + cyc(x, y) + cyc(F, H, E)

24 5 Model

The core task of the numerical model is to approximate partial differen- tial equations (PDE) by ordinary differential equations (ODE) on a grid, which are in turn transformed into a nondifferential system of (algebraic) equations by the temporal discretization. The objective throughout is to obtain a solution which differs as little as possible from the continuous so- lution. The following flowchart illustrates the role that the temporal and spatial discretization play. The error of the numerically-approximated solu- tion is comprised of the spatial error ex, due to the spatial discretization, and the time error et due to the temporal discretization. The errors con- verge to zero when the timestep ∆t and spatial distance ∆x converge to zero. lim∆t→0 et(∆t) = 0 , lim∆x→0 ex(∆x) = 0. If otherwise the scheme is not consistent,

PDE error: 0 .

spatial discretization

ODE error: ex(∆x)

temporal discretization

algebraic equations error: ex(∆x), et(∆t)

5.1 Basic Description The model in use is called the icosahedral multi-layer model and is based on the single-layer ICOSWP (ICOsahedral Shallow Water Prototype). Bonaven- tura et al. (2005) described and tested the ICOSWP, which was further en- hanced by Sommer and N´evir(2009), to enable an additional scheme based on Nambu representation. The new multi-layer model is able to adjust the number of layers N between 1 and 99. The density of the bottom layer is set at 1.00 and density must decrease with each higher layer. Diffusion can be set to first, second, fourth or sixth order. Second order diffusion is calculated using the Laplacian of the wind and a coefficient. Fourth and sixth order are calculated by the Laplacian squared or respectively to the power of three. In contrast, first order diffusion is calculated using only the Laplacian of the divergent part of the flow. The initial conditions are obtained by defin- ing analytical height and wind fields for each layer that are then averaged into discrete approximations to fit the chosen grid resolution. A balanced initial state can be derived by calculating the resulting height for given wind

25 fields by solving the balance equation

 j N  2 X X ρi 2J (uj, vj) − ∇ × (vjf) = g∇  hj + hj  . (13) ρj k=1 i=j+1

Many features implemented in the shallow-water prototype are not present in the multi-layer model. Due to time constraints, all that was not neces- sary to compare the two discretization schemes, was omitted. This includes orography, semi-implicit time stepping as well as tracer advection.

5.2 Temporal Discretization The Leapfrog second order method is used. Although a rather simple method it is widely employed in climate and weather models. Since the objective of this thesis is to investigate and improve the spatial discretization, and not the temporal discretization, the Leapfrog method is sufficient for our purposes. Given the value of a variable a at t = n − 1 and n, the variable at timestep n + 1 is computed using the time derivative of a at timestep n. ∂a a = a + 2∆t · n n+1 n−1 ∂t The method has a computational mode with the period of 2 δt. This mode can be dampened by applying an Asselin filter. The Asselin filter is used to smoothen the solution of the Leapfrog method at each time step by damping high frequencies. Given the value of a variable a at t = n − 1, n and n + 1 and the filter parameter α, the filtering is applied in the form:

an = an + α(an−1 − 2an + an+1)

When applied in this thesis α is usually ≈ 0.01. A side effect of the Asselin filter is a damping which has an effect similar to friction on the system. This damping violates energy conservation, but on a scale that does not hinder the investigation of the energy conserving properties of the schemes. The effects of the computational mode are illustrated in Figure 9 on page 45.

5.3 ICON Grid The ICON grid is named after the ICON project, which aims to construct non-hydrostatic climate and weather models on an icosahedral C-type stag- gered geodesic Delaunay-Voronoi grid, as suggested and described by Bonaven- tura and Ringler (2005). The icosahedron and its dual solid, the dodecahe- dron, are mutually refined until the desired resolution is reached. This re- sults in triangular, hexagonal and pentagonal tiles. Though the number of hexagons and triangles vary with the level of resolution, there are always only 12 pentagons. The ICON grid for resolution levels 2, 3 and 4 are depicted in

26 Figure 1: ICON grid level 2

Figure 1 and 2. The main advantage of the grid is its quasi-uniform coverage of the sphere. As can be seen in Table 3, all tiles have roughly the same area and the edge lengths among the cells vary less than 30%. This solves the pole problem and avoids the very high Courant numbers at the poles which occur in classical longitude-latitude grids. These high Courant numbers limit the size of the possible time step and drive up computational cost. Another advantage is that the grid is well-suited to introducing local grid refinements. This is of no concern to this thesis, but is of great value to the ICON project’s goal to improve regional climate and weather prediction. A disadvantage of the ICON grid compared to lon-lat grids is that it is ill-suited to reproduce completely zonally-symmetric conditions. That the icosahedral multi-layer model is not ideal but capable of handling such conditions is shown repeat- edly in Section 6. Since completely zonally-symmetric situations never occur in the actual atmosphere, this is of no great concern to the ICON project. For a stencil of the local staggering see Figure 3. Mass points i are located at the center of triangle faces, vorticity points ν at triangle vertices and the wind edges l connect the vorticity points. The marking of certain points with circles and squares is to illustrate the difference between the averagesa ˜l and a¯l as noted below in the average definitions.

Notation The notation for the grid is summarized in Table 5.3 and the definitions of the field variables on the grid are listed in Table 5.4. A note concerning indexes: When two low indices are used the first index refers to the grid location and the second indicates the layer. For example, hij refers to the

27 Figure 2: ICON grid level 3 and level 4

Figure 3: Local stencil: mass points i, vorticity points ν and wind edges l height at the mass point i on the layer j.

Definition of averages 1 X a¯ := a triangle vertices to faces i 3 ν νN(i) 1 X Ai a¯ν := ai triangle faces to vertices Aν 3 iN(ν)

1 X Al aˆi := al edges to triangle faces Aν 2 lE(i) a◦1 + a◦2 a¯ := l l triangle vertices or faces to edges l 2 a1 + a2 a˜ := l l alternative triangle vertices to edges l 2

The discrete definition of ∇ × v and ∇ × hv at the vorticity points ν is attained by applying the Stokes theorem. Dividing the sum of normal wind

28 grid level num. triangular cells ≈ δ in km Amax λmax l Amin λmin 1 20 4650 1.00 1.00 2 80 2250 0.83 0.88 3 320 1100 0.89 0.80 4 1280 550 0.92 0.78 5 5120 280 0.93 0.78 6 20480 140 0.94 0.78 7 81920 70 0.94 0.78

Table 3: Grid characteristics of the ICON grid for resolution levels 1 to 7. Number of triangular tiles, distance between the triangle centers, maximal difference between tile surface and wind edge length

i mass point ν vorticity point l wind edge N(.) set of neighboring points of relative dual grid E(.) set of edges of a cell Ai area of mass cell (triangle) Aν area of vorticity cell (hexagon/pentagon) 1 Al = 2 δlλl area of edge cell λl length of edge l δl length of normal of edge l ∂l difference quotient along edge l ⊥ ∂l difference quotient normal to edge l

Table 4: Notation used for the ICON grid

⊥ edges vl times edge length λl of the hexagon or pentagon by the cell area Aν leads to

⊥ 1 X ⊥ rotν(vl ) = vl δl . Ai lE(ν) The corresponding discrete definition of ∇ × hv is

¯ ⊥ 1 X ¯ ⊥ rotν(hlvl ) = hlvl δl . Ai lE(ν)

The divergence at the mass points i is attained similarly by discretizing the Gauss theorem, resulting in

29 ⊥ 1 X ⊥ divi(vl ) = vl λl . Ai lE(i)

5.4 Discretization Schemes Here the two discretisations are detailed. First the traditional momentum dis- cretization is described, which is a multi-layer adaptation of the discretization used in the ICOSWP based on equation (4) listed on page 21. The conser- vative scheme based on Nambu representation follows, which is a multi-layer adaptation of the scheme presented in Sommer and N´evir(2009). Before that the definitions of the field variables on the ICON grid are listed in Table 5.4. The layer index j is only used when needed. When not included all variables are of the same layer.

Field variable Grid variable Height h hi ⊥ Velocity v vl Streamfunction χ χν Velocity potential γ γi ⊥ Vorticity ζ ζν := rotν(vl ) ⊥ Divergence µ µi := divi(vl ) Potential vorticity q qν/h¯ν

Table 5: Definition of field variables on the ICON grid

5.4.1 Momentum Discretization - ICON-Scheme The scheme which uses the spatial discretization derived from the more tradi- tional momentum form is named the “ICON-scheme”. It is based on the spa- tial discretization employed in the single-layer model ICOSWP investigated by Bonaventura and Ringler (2005) as well as Sommer and N´evir(2009). The ⊥ ICON-scheme calculates vl and hi directly. The mass specific kinetic energy, v2 K = 2 is calculated differently depending on which scheme is employed. The momentum discretization uses the reconstructed wind components ui and vi to determine K at the mass points i

v2 1 K = i = (u2 + v2) . (14) i 2 2 i i

The tangential wind component at the edges vl is also calculated using the reconstructed wind components. Both Ki and vl are needed to calculate the wind tendency

30     j n 2 ∂vj X X ρk vj = −ζajk × vj − ∇ g  hk + hk  +  ∂t ρj 2 k=1 k=j+1 ⇓ ⇓     v ⊥ j n lj ¯ ⊥ X X ρk = (ζlj + fl)vlj − ∂l g  hik + hik  + Kij . (15) ∂t ρj k=1 k=j+1

The equation of mass conservation is used to obtain the tendency of hi for each layer.

∂h ∂hi ¯ ⊥ 1 X ¯ ⊥ = −∇ · hv =⇒ = −divi(hlvl ) = − hlvl λl ∂t ∂t Ai lE(i)

∂hi 1 X ¯ ⊥ = − hlvl λl (16) ∂t Ai lE(i) Depicted in the chart 5.4.1 are the steps the ICON-scheme takes to advance from timestep n to timestep n+1. Given the normal wind at the edges and the height at the mass points the first step is to reconstruct the two-dimensional ⊥ wind field vi from vl . Then vi is used to calculate the specific energy Ki and the wind vector tangential to the edges vl. Later the tendencies for hi and ⊥ vl are derived by the equations (15) and (16). If diffusion is activated the tendencies are modified according to the given diffusion type and strength. ⊥ Finally, using the tendencies the Leapfrog method calculates hi and vl for the new timestep n + 1.

⊥ ______Timestep n hi, vl / vi = (ui, vi) / Ki, vl ______PPP nnn PPP nn PPP nnn PPP nnn eq. (15) (16) P • nn

diffusion ______  ⊥ Tendencies ∂thi , ∂tvl ______

Leapfrog

  ⊥ Timestep n + 1 hi, vl

Table 6: Flowchart of ICON-scheme

31 5.4.2 Conservative Scheme Based on Nambu Representation - Nambu-scheme Salmon (2005) and Salmon (2007) put forward the idea of deriving conserva- tive schemes by using the Nambu representation of a given dynamical system. The key is to discretize the Nambu brackets {F, H, E} so that they maintain their antisymmetry property. Instead of directly defining a spatial discretiza- tion of the operators as was done in the ICON-scheme, Salmon’s approach proposes defining discrete versions of the conserved quantities as well as for the bracket expressions. The discrete brackets are then evaluated with the prognostic quantities inserted. Salmon (2007) applied this approach to the single-layer shallow-water model on a regular square grid as well as on an un- structured triangular mesh and derived explicit finite-difference approxima- tions conserving mass, energy, circulation and potential enstrophy. Sommer and N´evir(2009) repeated this feat using the ICON grid, even proving ana- lytically that the derived scheme preserved potential enstrophy numerically exact. Since the multi-layer and single-layer systems have a nearly identical approach, only a brief outline of the method is presented. For a detailed description see Sommer and N´evir(2009).

Step 1 The first step of Salmon’s approach is to define the conserved quanti- ties, see equations (5) and (6). Once again the layer index j is not used if all variables are of the same layer.

Kinetic energy of the layer j is defined as the sum of the kinetic energy of the edge cells. X ¯ ⊥ 2 Hkinj = Alhl(vl ) (17) l Potential energy of layer j is the summed potential energy of each mass point, involving hi of all N layers. j−1 ! g X X H = A ρ h 2 + 2h h (18) potj 2 i j ij ij ik i k=1 Total energy of a system with N layers is the sum of kinetic and potential energy across all layers.

N X   H = Hpotj + Hkinj j=1 Potential enstrophy of layer j, which is a conserved quantity, is set at the vorticity points ρ X E = A h¯ q2 . (19) j 2 ν ν ν ν

32 The discrete functional derivatives (7), (8) and (9) will also be needed

δH 1 δH δE 1 δE → = −ρjχνj → = ρjqνj δζj Aν δζjν δζj Aν δζνj δH 1 δH δE 1 δE → = −ρjγij → = 0 δµj Ai δµji δµj Ai δµij

δH 1 δH δE 1 δE ρj 2 → = Ψij → = − q ij δhj Ai δhji δhj Ai δhij 2 as will the Bernoulli function Ψi in layer j

 j  n ρ ⊥\⊥  X X k Ψij := vl j · vl j i + g  hik + hik  . ρj k=1 k=j+1

Besides the streamfunction χν and the velocity potential γi their correspond- χ⊥ γ⊥ ing velocity components vl and vl are needed and reconstructed from ζν, µi and hi.

Step 2 Now the brackets (10),(11) and (12) are written in discrete terms using the discrete derivatives. The result is a discrete term for each permutation of the ζµh and ζζζ brackets as well as an additional one from the µµh bracket for each layer. Since the construction of these discrete brackets is almost identical to the single-layer approach presented in Sommer and N´evir(2009) it will not be discussed in detail. The differences between the single-layer and multi-layer brackets are the addition of densities to the functional derivatives and that Ψij is a function of (hi1, ..., hiN , ρ1, ..., ρN ).

Step 3 The final step also closely follows the lead of Sommer and N´evir(2009). The task is to insert the prognostic variables µi, ζν and hi into the brackets to obtain the discrete definitions of the tendencies for each layer. For µi, ζν and hi of the layer j these are (once again omitting the layer index for all variables since they are all on the same layer):

∂ζν ¯ χ⊥ γ⊥ = − divi hl q¯lvl +q ˜lvl (20) ∂t ν ∂µ i = − rot γ¯ ∂ q  + div q˜ ∂⊥χ¯  − div (∂⊥Ψ ) (21) ∂t i l l ν i l l i i l i ∂h i = − div (∂⊥γ ) (22) ∂t i l i The resulting scheme is presented in the following flow chart. Given µ, ζ and h for all levels at their gird positions at a timestep n, the first step is to

33 reconstruct the velocity potential γi and stream function χν. This requires elliptic problems to be solved which demand more computational power than the vector reconstruction required in the ICON-scheme. CPU time rises by a factor of eight. The wind at the edges and its components are derived from the potentials. Afterwards the tendencies are calculated using (20), (21) and (22). If diffusion is activated, the tendencies will be adjusted depending on what type of diffusion is selected and how high the entered diffusion coefficient is. The Leapfrog method is then applied to calculate µi, ζν and hi at the new timestep n + 1.

______⊥ χ⊥ γ⊥ Timestep n µi ζν hi / γi χν / v v v ___ l l l QQQ ______l QQQ lll QQ lll QQQ lll QQQ lll eq.(20)(21)(22) Q • ll

diffusion  ______ Tendencies ∂tµi ∂tζν ∂thi ______

Leapfrog

  Timestep n + 1 µi ζν hi

Table 7: Flowchart of Nambu-scheme

Note: The Nambu-scheme defines the mass specific kinetic energy Ki at the ⊥ mass points i by averaging over the squared edge winds vl surrounding the mass point. \⊥ ⊥ Ki = (vl · vl )i . (23)

34 6 Numerical Results

First a few notes on the operation of the model, its limits and how the experiments are evaluated.

• The model runs on a standard desktop computer up to level 7 grid re- finement. However, to save computing time most tests were performed using level 6 or less. For information on the grid levels see Table 3 on page 29.

• Although the model is capable of using up to 99 layers most experi- ments will involve only two and the rest use no more than 10 layers. The main reason for this is to simplify visualization. Also, slight density differences between layers and particularly thin layers reduce stability demanding smaller timesteps. The instability due to slight density dif- ferences is attributed to strong deformations of the plain separating the layers which become too steep for the grid to well represent them. Normally deformations between the layers raise the potential energy of the system which results in pressure gradients that stabilize the defor- mations. However, if the density difference is too small the stabilizing pressure gradients are not strong enough to smoothen out small numer- ical faults. These deformations grow until the grid resolution is unable to resolve the height and wind fields. The reason thin layers increase instability is discussed in Subsection 6.4.

• When analyzing energy and potential enstrophy over time the relative errors H and E are used. The relative energy error at timestep n M M is given by the sum of available potential energy and kinetic energy at the starting time divided by the sum of available potential energy and kinetic energy at timestep n which is then subtracted by 1.0 . The available potential energy HApot for the multi-layer shallow-water system is the difference between the potential energy and the minimal potential energy Hmin. The potential energy is minimized when all layers have a uniform depth with all hij of the layer j are equal

N j−1 ! gA X X H = H − H = H − ρ h 2 + 2h h . Apot pot min pot 2 j j j k j=1 k=1

The kinetic energy is calculated by Ki (weighted with the density of the layer), the height and the area of the triangle. Ki is defined dif- ferently depending which scheme is being used, see equation (14) for the ICON-scheme and (23) for the Nambu-scheme. Hkin now has a total of 3 discrete definitions on the grid, the following equation for two

35 alternative Ki and definition (17) on page 32. To avoid unnecessary confusion they all share the same notation.

N X ρj X H = h K kin 2 ij ij j=1 i

So using the above definition of Hkin and the definitions of Hpot and E stated in (18) and (19)

Et=n Et=n = − 1 (24) M Et=0 t=n t=n {Hkin + Hpot} − Hmin H = t=0 − 1 . (25) M {Hkin + Hpot} − Hmin

• The absolute relative error refers to the absolute value of the relative error, e.g. | H | and | E |. M M • To retain readability when multiple large plots or figures are necessary some of these are only shown in the Appendix.

6.1 Model Tests These tests are to ensure that the model has been correctly implemented. They are not designed to study the limits of the model nor to investigate the conservation properties of the schemes.

6.1.1 Stationarity Aim of test The aim of this test is to confirm the following two objectives. 1. The model correctly reproduces a stationary state in which height and wind do not vary over time. 2. The initial balancing correctly produced a stationary state. To achieve balanced initial conditions for given wind fields, height fields are generated by solving the balance equation (13) on page 26. A perfectly- balanced initial condition generates no gravity waves. Due to the discrete nature of the model there will always be gravity waves, but they should be very small. It is important for this test that the system has an approximately neutral stability. A stable state could suppress numerical errors and insta- bility could amplify small numerical fluctuations. Both ICON and Nambu- scheme have the same initial conditions.

Initial condition The test employs four layers with varied densities and thickness but with the same wind field. Densities and thickness were selected at random and

36 Initial Conditions - Stationarity Test

(a) Total height field (b) Height of gridpoints vs. Latitude

Figure 4: Initial height fields of stationarity test: n = 0, ∆t = 75 s, level 6 grid resolution, α = 0.01, no diffusion, 4 layers: ρ1 = 1.0, ρ2 = 0.9, ρ3 = 0.5, ρ4 = 0.2 should not affect the stationarity of the solution. The wind fields are a west wind ring around the Northern Hemisphere with no meridional component while the Southern Hemisphere and the North Pole are completely windstill. The wind fields of each layer are set to be equal to avoid vertical wind shear and possible baroclinic instability and the west winds are relatively small with m a maximum of 8 s to avoid barotropic instabilities. This balancing leads to a bottom layer with a depression in the north and uniform upper layers with no height deformations. If correctly balanced the and the pressure force should cancel each other out leading to a stationary geostrophic flow. The total height of all layers is shown in Subfigure(a) of Figure 4. Subfigure (b) shows the summed height of all mass points for each level against their latitude. The lowest red line being h1, the second being h1 + h2 and so on. The zonally-symmetric nature of the conditions is clearly visible.

Results The height fields after about 4.5 days are shown in Figure 18 page 64. The differences between the two schemes and the initial condition are very slight. As mentioned in 5.3 the ICON grid is not well-suited to reproduce zonally-symmetric states due to the structure of its grid. These results show that the balanced initial conditions were correctly implemented and that the model is capable of handling stationary, zonally-symmetric flows.

6.1.2 Gravity Waves Aim of test This test checks if the model reproduces gravity waves correctly. Wave

37 Initial Conditions - Gravity Wave Test

(a) Total height field (b) Height of gridpoints vs. Latitude

Figure 5: Initial height fields of gravity wave test: n = 0, ∆t = 100 s, level 5 grid resolution, α = 0.01, no diffusion, 2 layers: ρ1 = 1.0, ρ2 = 0.9 propagation is one of the key tasks of an atmospheric model. Approximate phase speeds of the modeled gravity waves will be compared to analytical solutions of the two-layer linearized equations. The linearization assumes that the density difference between the two layers is small and yields two gravity wave modes for small sinus-shaped disturbances. The external mode with the phase velocity ce is only a function of the total height of the system and the internal mode with phase velocity ci is a function of the density difference as well as the thickness of both layers p ce = g(h1 + h2) (26) p ci = h(1 − ρ2/ρ1)(h1h2)(h1 + h2) . (27)

Initial conditions A two-layer system with an internal perturbation at the North Pole but with a uniform total height is employed. The wind components are zero for both layers at all grid points. This test is performed on a non-rotating grid eliminating the Coriolis force to let the gravity waves propagate freely southwards. The layers are almost equally thick with the bottom layer about 500 m thick and the upper layer about 600 m thick. The upper layer’s density is set at 0.9 to keep close to the approximations of the linearization and to produce a low internal phase velocity. For this test level 5 grid resolution is employed, a smaller resolution than in the previous test. Figure 5 shows the flat surface of the total system and the height of the gridpoints of each layer against the latitude. Again, the zonally-symmetric nature of this test ill suits

38 the ICON grid. Using the given values of ρ1, ρ2, h1 and h2 we expect the ce m m to be ≈ 105 s and ci to be ≈ 16.5 s .

Results Figure 6, page 40, shows the total height of both layers against latitude using the Nambu-scheme. In Subfigure (a) the flat in ital conditions are displayed. In Subfigure (b) the disturbance caused by the heavier bottom layer sinking at the North Pole is clearly visible. Two visibly separate waves, labelled int and ext, propagate southward with constant velocities as seen in Subfigures (b), (c) and (d). The amplitudes of the waves decrease as they approach the equator and increase again after that. This was expected as the waves travelled along a sphere. After approximately 2.2 days the fast wave reached the South Pole and the slow wave travelled roughly 30 degrees m latitude, so the external wave speed is about 105 s . The internal phase speed m is a sixth of that, i.e. 17.5 s . As the wave velocities were approximated these results fit quite well. This suggests a correct implementation of the Nambu- scheme. In Figure 19, page 65, the final states of the Nambu-scheme and the ICON-scheme are presented. The deformation, once located at the North Pole has travelled southward with the velocity of the . The differences between the two schemes are minimal. Both appear capable of reproducing zonally-symmetric gravity waves.

6.1.3 Potential Enstrophy Conservation Aim of test The area-integrated potential enstrophy of each layer is a conserved quan- tity. This quick and simple test checks if the potential enstrophy of each layer is roughly preserved in the model. An in-depth examination of the conservative behavior will follow later.

Initial conditions The initial conditions are the same as for the gravity wave test (cf. Figure 5 on page 38) but set on a rotating Earth. The initial conditions can be chosen at random as the shallow-water system always conserves the poten- tial enstrophy of each layer. The non-stationary state was chosen to avoid numerical instabilities. It is a rather calm test.

Results Figure 7, page 41, depicts the relative potential enstrophy error E of the M bottom and top layer for both schemes. After almost 6 days the potential enstrophy of both layers remained almost unchanged ( << 10−2). Both schemes fulfill the test objective.

39 Gravity Wave Propagation

Total Height of Gridpoints vs. Latitude, Nambu-scheme

(a) t = 0.0 days

(b) t ≈ 0.6 days

(c) t ≈ 1.2 days

(d) t ≈ 2.2 days

Figure 6: Total height of gravity wave test, internal and external gravity wave labelled “int” and “ext”: n = 0, 500, 1000, 1900, ∆t = 100 s, level 5 grid resolution, α = 0.01, no diffusion, 2 layers: ρ1 = 1.0, ρ2 = 0.9 40 Potential Enstrophy Conservation

Relative Potential Enstrophy Error E over Time in Days M

(a) Top layer (b) Bottom layer

Figure 7: Relative potential enstrophy error of potential enstrophy conser- vation test: n = 1 ... 10000, ∆t = 50 s, level 5 grid resolution, α = 0.01, no diffusion, 2 layers: ρ1 = 1.0, ρ2 = 0.9

6.2 Time Resolution Dependencies A series of experiments are performed to evaluate the two schemes.The first task is to compare the conservation properties of the schemes and then to pinpoint the error source. The first experiment is designed to pinpoint the spatial error ex by reducing ∆t → 0 to eliminate the time error et. Both schemes are run using the same initial conditions with varying timestep size ∆t. After a set amount of time the absolute value relative errors of energy and potential enstrophy H and E (cf. equation (24)) are averaged over M M time. These results are then compared for different ∆t.

Expectations As mentioned in Subsection 5.2 the Leapfrog method is of second order accuracy. However, by reducing ∆t the number of timesteps must be raised to ensure that the same total time is reached, i.e. if ∆t is halved the number of timesteps must be doubled. The number of timesteps is inverse proportional to the size of the timesteps n ∼ 1/∆t. The error of each timestep reduces 2 Pn quadratically et = O(∆t ) but the summed error of all timesteps 1 et ≈ n ∗ et is expected to converge with first order accuracy. Instead of ∆t the Courant number C will be used when presenting the results. The Courant number is the dimensionless ratio of the maximum distance travelled per timestep over the shortest distance of the grid. The external gravity waves have the highest velocities ce (cf. (26)). Therefore the Courant number is approximately ce times ∆t, divided by the shortest edge length of the ICON grid. c ∆t C = e ∆x The Courant number was chosen instead of ∆t for its more universal na-

41 ture for all finite difference models. The Courant-Friedrichs-Lewy condition requires the Courant number to be smaller than 1.0 for explicit time stepping.

6.2.1 Initial Conditions - Rossby-Haurwitz Wave The initial condition chosen for the time resolution dependencies experiment is based on the Rossby-Haurwitz wave test case of Williamson et al. (1991). The defined wind field of the test case is assigned to two layers whose cor- responding height fields are obtained by balancing (cf. Figure 8). Due to identical wind fields in both layers the upper layer has a uniform thickness. Compared to the conditions used in Subsection 6.1, the Rossby-Haurwitz wave has strong winds and height gradients. It was chosen to expose the lim- its and weaknesses of the schemes. The bottom layer’s average height is set at 5 km and the upper layer’s at 10 km with a density of 0.5 . These values were chosen as a crude imitation of the Earth’s atmosphere with a corresponding 500 hPa plane at 5 km height. The use of level 4 grid resolution reduced the computational cost (cf. Table 3).

Sample run Before the main test is conducted, by comparing multiple runs with the same initial condition but different ∆t, a single run will be highlighted. This sample run has a ∆t of 90 s. This corresponds to a Courant number of slightly over 0.1 which is roughly in the middle of the spectrum of all performed runs. The focus is on the time variability of energy and potential enstrophy and not on the correct reproduction of the wave, a task to which the conditions are ill-suited due to the rather low resolution and the instability of the wave. The height fields of the Nambu-scheme and ICON-scheme after ≈ 1.7 days are shown in Figure 20, page 66, showing similar patterns but some significant differences. The upper layer is deformed more strongly by the ICON-scheme and the bottom layer less. Here the effects of the different discretizations of the equations are clearly visible. The time of 1.7 days was selected because it is long enough to highlight the differences without including the long term numerical instabilities. These would require higher Asselin filtering or dis- sipation to keep stable. This issue will be addressed further in Subsection 6.4.

Conservation properties of sample run In Figure 9 the upper graphs show how H and E evolve over time. The M M results differ very strongly between the two schemes. E is almost 3 orders of M magnitude smaller when the Nambu-scheme is used compared to the results produced by the ICON-scheme and the discrepancy for H by about 2 orders M of magnitude. In comparison to the Nambu-scheme the energy and potential enstrophy of the ICON-scheme not only fluctuate but also decrease over time. The Nambu-scheme also gradually loses both energy and potential enstrophy

42 Initial Conditions - Rossby-Haurwitz Wave

(a) Bottom layer height field

(b) Upper layer height field

Figure 8: Initial height fields of Rossby-Haurwitz wave: n = 0, level 4 grid resolution, α = 0.01, no diffusion, 2 layers: ρ1 = 1.0, ρ2 = 0.5

43 but in a range that can be explained by the damping effects of the Asselin filtering. If one looks more closely at the plot lines in the mentioned plots are thick at the beginning before thinning out. This is more visible in the E M plot. The bottom chart which shows E for the first 60 timesteps show that E M M oscillates with each timestep. This is an artifact of the computational mode of the Leapfrog method. The Asselin filter damps these very high frequencies out over time. It is important to mention that the conservation properties of the ICON-scheme vary strongly depending on which initial conditions are chosen. None the less, this is the first indicator that the Nambu-scheme could be conservative, regardless of grid resolution.

6.2.2 Results Now the effects of timestep size variation on the energy error H and poten- M tial enstrophy error E are looked into. For this purpose eleven runs with M ∆t between 150 and 2 seconds and between 1000 and 75000 timesteps were generated. The dependence of the time-averaged absolute relative error on the timestep size ∆t is shown in Figure 10. The circled value highlights the sample run. All values are positive being time-averages of the absolute rela- tive errors. The energy error of the ICON-scheme is almost independent of time resolu- tion. Since the time error et of the Leapfrog method converges with order one accuracy to zero the energy error of the ICON-scheme is heavily dominated by the spatial error ex. In stark contrast the energy error of the Nambu-scheme converges to zero with order 1 accuracy, giving evidence that the energy error is dominated by the time error et of the Leapfrog method. The difference in energy error of order 3 magnitude is a direct result of the different spatial discretizations. The results of the potential enstrophy error are very similar to the results for the energy and lead to the same conclusions. The error of the Nambu-scheme is dominated by the time error et whereas the much larger error of the ICON-scheme is dominated by the spatial error ex. The efforts to create the conservative Nambu-scheme have succeeded in greatly reducing the violation of energy and potential enstrophy conservation at level 4 grid resolution.

44 Conservation Properties of Sample Run

(a) Relative energy error HM over time in days

(b) Relative potential enstrophy error EM over time in days

(c) Relative potential enstrophy error EM of first 60 timesteps

Figure 9: Relative energy and potential enstrophy error H and E over M M time, sample Rossby-Haurwitz wave run, Nambu-scheme and ICON-scheme: n = 1 ... 1666, ∆t = 90 s, level 4 grid resolution, α = 0.01, no diffusion, 2 layers: ρ1 = 1.0, ρ2 = 0.5

45 Time Resolution Dependencies

Figure 10: Time-averaged absolute relative energy and potential enstro- phy error of multiple runs after 1.7 days arranged by Courant number: n = 1000,..., 75000, ∆t = 2,..., 150 s, level 4 grid resolution, α = 0.01, no diffusion, 2 layers: ρ1 = 1.0, ρ2 = 0.5

6.3 Spatial Resolution Dependencies In the last subsection the conservation properties of the schemes were tested to examine how they are linked to time resolution. This subsection will focus on how these properties are affected by spatial resolution. This task is somewhat more difficult than the last one due to the following problems. • Strongly-limited possible spatial resolutions: Temporal resolution is continuously adjustable but the only possible grid variations are the predefined grid resolution levels. For the test, grid resolution levels 2 through 7 were used. Level 1 resolution is unusable for the Nambu- scheme and going beyond level 7 would require more computational power than available. This leaves 6 runs with the average edge length ranging from 2000 km down to 70 km. For comparison, current global climate models have a resolution of ≈ 1.5 degrees or ≈ 150 km and regional weather forecasting goes down to 2 to 10 km. • Each grid resolution has different initial conditions. Since these are first defined analytically, before being adapted to the grid, the higher the resolution the closer the approximation. Low resolution grids cannot reproduce small-scale features.

• The timestep ∆t should not be varied to ensure a constant time error et. This leads to very different Courant numbers for the various resolutions

46 with the high resolutions running in danger of developing numerical instabilities. A timestep of 20 s was chosen to reduce the chance of instability at level 7 resolution.

• Due to the high computational cost of level 7 resolution only 2000 timesteps were calculated. In comparison the run used to investigate the effect of time resolution on conservation with a timestep of 15 s completed 10000 timesteps. The total time window covered by the sim- ulations will thus be ≈ 0.5 days. This shorter simulation period results in a shorter time interval over which to average. This puts greater weight on errors caused by the computational mode of the Leapfrog method, which are only present at the beginning of each simulation.

Expectations As the Nambu-scheme was designed to conserve energy and potential en- strophy, regardless of spatial resolution, H and E should be constant. How- M M ever, due to the uncertainties mentioned above some variation is to be ex- pected. In contrast the ICON-scheme should preserve energy and potential enstrophy better the higher the resolution. So the results should contrast with the ones in the previous test.

6.3.1 Initial Conditions All runs simulate the shallow-water system for ≈ 0.5 days with a timestep of 20 s using grid resolution levels 2 to 7. The motivation of these choices has been given in the previous paragraph. Due to the limited amount of available grid resolutions as well as the other problems listed above two different initial conditions have been selected. These provide a simple means to doublecheck the results. The first initial condition is the same as the one used to create the gravity waves displayed in Figure 5 on page 38, but on a rotating Earth. The second is identical to the stationary initial conditions displayed in Figure 4 on page 37. Both were chosen for their relatively smooth height and wind fields to avoid instability issues of the ICON-scheme which will be discussed in Subsection 6.4 .

6.3.2 Results Again the runs are compared in terms of the time-averaged absolute relative errors of potential enstrophy and energy as defined at the beginning of this section. The results of the gravity wave initial conditions are presented first in the Subfigure (a) of Figure 11, page 48. The relative potential enstrophy errors are so small because the potential enstrophy is dominated by the static Coriolis parameter. All plots show some surprising results for the lower grid resolutions of level 2 and 3. Here the ICON-scheme errors have no clear trend

47 Spatial Resolution Dependencies

(a) Gravity wave initial conditions

(b) Stationary initial conditions

Figure 11: Time-averaged absolute relative energy error and potential enstro- phy error of multiple runs after 0.5 days arranged by average edge length: n = 2000, ∆t = 20 s, level 2-7 grid resolution, α = 0.01, no diffusion, 2 layers: ρ1 = 1.0, ρ2 = 0.9

48 and the Nambu-scheme shows an increase in potential enstrophy of order 4 magnitude. For the 4 higher grid levels expectations are met as the ICON- scheme produces smaller errors at higher resolution and the errors of the Nambu-scheme show only small variations. The values of the low resolutions can be explained by the inability of the coarse grids to approximate the internal disturbance of the analytical initial condition at the North Pole. The results of the stationary runs, shown in Subfigure (b) of Figure 11, are closer to the expectations. Energy and potential enstrophy errors of the ICON- scheme decline for higher resolution whereas the Nambu-scheme shows little to no improvement. At level 7 grid refinement, H and E still differ by at M M least one order of magnitude. In conclusion the expectations seem to be fulfilled but a thorough test would require higher resolutions. An effect not visible in the figures is that the computational cost of the Nambu-scheme rises faster than that of the ICON- scheme. The Laplace solvers used in the Nambu-scheme to reconstruct χ and γ from µ and ζ converge slowly at higher resolutions.

6.4 Vertical Resolution Dependencies It has been established by the last two experiments, that for up to level 7 grid resolution, the Nambu-scheme produces smaller energy and potential enstrophy errors than the ICON-scheme. The lower the resolution is the greater the separation between the schemes. The following experiment is designed to examine if and how conservation properties and stability are affected by the numbers of layers the model em- ploys. The measure of instability is the point in time where the potential enstrophy of the model is twice that of the initial condition. If the simu- lation has not been terminated after a set amount of time due to potential enstrophy doubling, it is aborted. Ten runs per scheme with between one to ten layers are evaluated using level 5 and level 6 grid resolution. Higher grid resolutions were not employed to avoid excessive computational cost.

Expectations One of the motivations to conserve energy and potential enstrophy was to prevent or at least minimize numerical instabilities, especially the transfer of energy to small unresolvable scales. Because the Nambu-scheme has shown itself superior in conserving these quantities it is expected to be stabler than the ICON-scheme. How stability is affected by the number of layers is not clear. The higher number of operations required by more layers could possibly result in higher conservation errors. If and how grid resolution affects stability is another open question.

49 6.4.1 Initial Conditions Once again the Rossby-Haurwitz wave of Williamson et al. (1991) (Figure 8, page 43) is used in the experiment to study the effect of varying the number of layers. The total average height is set at 20 km for all runs, regardless of the number of layers employed, to ensure identical Courant numbers. All layers are assigned the same thickness, as well as the same density differences, i.e. in the four-layer runs each layer is ≈ 5 km thick with the following densities: ρ1 = 1.00, ρ2 = 0.75, ρ3 = 0.50, ρ4 = 0.25. Balancing again leads to all layers, except the the bottom one, having a uniform thickness. Figure 21, page 67, depicts the height of the single-layer and each layer of the ten-layer initial conditions plotted against latitude. A higher Asselin filter is applied with α = 0.1 to eliminate undesirable effects of the Leapfrog‘s computational mode, which leads to a significant diffusion in the model. In comparison, all other experiments were conducted with α = 0.01. The single- layer models have been presented, compared and discussed in Sommer and N´evir(2009). Both level 5 and level 6 grid resolution are used to see whether results strongly react to grid refinement. To keep results as comparable as possible the timestep ∆t is chosen to maintain the same Courant number. The maximum amount of time is set at 23 days for level 5 resolution and 11.5 days for level 6 resolution.

Sample run As in the experiment dedicated to the connection between time resolution and conservation properties, a single run is presented. The two-layer ICON- scheme at level 5 grid resolution was chosen to illustrate the non-physical instabilities which occur in the model. The height fields of both layers and the total height field are shown in Figures 22, 23 and 24 on pages 68 through 70. Each figure shows a height field at t ≈ 1.3, 1.7 and 2.3 days. After 1.3 days of simulation all fields seem smooth and depart only slightly from the initial conditions (cf. Figure 8, page 43). Half a day later distur- bances appear. The upper layer shows height differences greater than 1000 meters with horizontal distance slightly greater than the 280 km average edge length of the grid. Although the bottom layer and the total height are still dominated by the structure, disturbances can be seen. Another half day later the small-scale fluctuations have spread and surpass the orig- inal wave in amplitude. These non-physical small-scale disturbances are far too extreme to be well-represented on the grid. Shortly after the final plots the run is terminated due to numerical nonlinear instability.

6.4.2 Conservation In Figure 12, page 51 the relative errors of the single-layer, four-layer and ten-layer runs at level 6 grid resolution are shown. Results are expected to

50 Conservation Errors of Vertical Resolution

Relative Energy Error H over Time in Days M

(a) ICON-scheme

(b) Nambu-scheme

Relative Potential Enstrophy Error E over Time in Days M

(c) ICON-scheme

(d) Nambu-scheme

Figure 12: Relative conservation error of single-layer, four-layer and ten-layer run over days: ∆t = 50 s, level 6 grid resolution, α = 0.1, no diffusion

51 vary slightly due to the physical differences of the systems, such as internal gravity waves. Only three runs are shown since adding additional runs does not offer greater insight. Again relative errors are calculated as explained in the introduction to the numerical experiment section. The time interval dis- played was chosen according to the termination time of the ten-layer runs. As differences between the energy preservation of the ICON-scheme and Nambu- scheme have already been investigated, the focus here is to study how the number of layers affects the results. The ICON-scheme energy errors displayed in Subfigure (a) share similar traits. Amplitudes and frequencies are almost identical. The ten-layer run shows the first signs of instability at the end as it approaches its termina- tion. Subfigure (b) shows the Nambu-scheme runs drop off after the initial Leapfrog oscillation because of the damping effect of the Asselin filter. This effect seems stronger for a larger number of layers. All in all the amount of layers appears to have little effect on the energy conservation of the schemes. The relative potential enstophy errors, shown in Subfigure (c) and (d) of Figure 12, also differ only slightly. Here the ICON-scheme results vary a little but the Nambu-scheme runs are indistinguishable save for the Leapfrog oscillation amplitudes.

6.4.3 Stability The time at which the model shuts down due to potential enstrophy doubling is shown in Figure 13 for level 5 and 6 resolution. For example, the two- layer ICON-scheme run is terminated after approximately 3 days. Stability decreases as more layers are added and seems to approach zero. The Nambu- scheme is clearly more stable by our definition. All runs last longer using the Nambu-scheme for both level 6 and level 5 grid resolution with the exception of the single-layer level 5 test, in which both schemes reached the maximum time. That level 6 grid provides lower stability than level 5 shows that the instabilities are not a direct product of coarse resolution. Remarkable are the large jumps in stability between single-layer and multi- layer model for the ICON-scheme, and between four and five-layer runs for the Nambu-scheme. That the multi-layer ICON-scheme performs so poorly compared to the single-layer ICON-scheme is probably a result of momentum nonconservation. Hollingsworth et al. (1983) described a symmetric compu- tational instability of finite difference forms that is purely internal. This instability is often referred to as the “Hollingsworth instability” and only occurs in multi-layer models due to a violation of momentum conservation. According to Hollingsworth et al. (1983) the instability grows stronger for thinner layers and higher resolutions, which fits well with the results shown in Figure 13. The Nambu-scheme also seems to be affected, but not as strongly as the ICON-scheme. That the Hollingsworth instability is not the single rea- son why the Nambu-scheme surpasses the ICON-scheme is visible in Figure

52 Instability of one to ten-layer Rossby-Haurwitz Waves

Days until potential Enstrophy is twice the initial Value

(a) Level 5 grid resolution

(b) Level 6 grid resolution

Figure 13: Days passed until potential enstrophy is twice the initial value for 1 to 10 layers, initial conditions detailed in Subsection 6.4.1: Subfigure (a): ∆t = 100 s, level 5 grid resolution, α = 0.1, no diffusion. Subfigure (b): ∆t = 50, level 6 grid resolution, α = 0.1, no diffusion

13. At level 6 grid resolution the multi-layer Nambu-scheme outperforms the Hollingsworth instability free single-layer ICON-scheme for 2, 3 and 4 layers. Figure 14 shows the second of four layers for both the ICON and Nambu- scheme shortly before the runs are terminated due to potential enstrophy doubling. Both plots exhibit a similar structure with two containing very high fluctuations on opposite sides of the sphere. The height of the layers reaches below zero, leaving no doubt that the model no longer approximates the theoretical shallow-water system. Seemingly, both schemes share a flaw, likely the Hollingsworth instability mentioned above, to which the ICON- scheme succumbs much faster than the Nambu-scheme. These two plots also offer an additional possible explanation why the runs with more layers destabilize sooner, i.e. when the layers are thinner negative heights occur sooner.

53 Negative Layer Height

Height Field, Second Layer of four-layer Run

(a) ICON-scheme, t ≈ 1.9 days, n = 1640

(b) Nambu-scheme, t ≈ 16.5 days, n = 14250

Figure 14: Second layer height field of four-layer model: ∆t = 100 s, level 5 grid resolution, α = 0.1, no diffusion, 4 layers: ρ1 = 1.00, ρ2 = 0.75, ρ3 = 0.50, ρ4 = 0.25

54 6.5 Baroclinic Instability This last experiment is to test whether the multi-layer model is capable of re- producing baroclinic instability, a process triggered by specific stratification which plays a central role in the weather of the temperate zone. This com- paratively long test (50 days) gives insight into the long-term performance of the model. Given the ICON-scheme’s inability to stay stable over longer simulation times without major damping this test is only performed using the Nambu-scheme.

Initial condition Two layers with a small density difference and a strong vertical wind shear are chosen to maximize instability. The zonal wind u of the initial condition is solely a function of latitude y and is shown in Figure 15. Using the scale factor k = (a − b)/2 k2 u(y) = umax |e (y−a)(y−b) | with a = 0.1 and b = 1.5. On the Northern Hemisphere the maximum wind m umax of the bottom layer is 16 s . The upper layer wind field is identical to the bottom layer’s but multiplied by two. The Southern Hemisphere serves as a control to ensure resulting instabilities are in fact due to baroclinicity. m There both layers have identical wind fields with maximum winds of 32 s with no vertical shear and thus no baroclinicity. If the Southern Hemisphere is not stationary, barotropic instabilities and/or numeric faults have to be considered. The Asselin parameter is equal 0.01 and sufficiently small to avoid significant energy loss. The height fields depicted in Subfigure (a) of Figure 16 are again derived by balancing the given wind fields. The verti- cal wind shear is visible in the strong deformation of the upper layer of the Northern Hemisphere. Both hemispheres are analytically stationary, but the irregularities of the ICON grid are sufficient to initialize the baroclinic insta- bility without adding an initial disturbance. As mentioned in Subsection 5.3, the ICON grid is unable to represent perfect zonally-symmetric conditions.

(a) Bottom layer (b) Upper layer

Figure 15: Zonal wind distribution of baroclinic initial condition

55 Results Figure 17 displays the evolution of the Northern Hemisphere vorticity fields over fifty days. The initial condition changes little over the first twenty days. Gradually the first disturbances can be seen. After thirty days it is possible to identify a wave number of five, which is caused by the icosahedron structure of the ICON grid. Over the next ten days the wave amplitude grows until after thirty-five days independent cyclones emerge. These intensify somewhat over the next ten days and reach their peak at approximately forty days after which the structure decays. Subfigure (c) shows many of the features commonly associated with baroclinic instability, such as westward sloping fronts and a slight phase shift between upper and lower layer. Careful examination reveals that the upper layer lags behind by ten to fifteen degrees longitude. After approximately 40 days the wave structure begins to decay. The final height fields after 50 days are displayed in Subfigure (b) of Figure 16. In contrast to the Northern Hemisphere where the disturbances are visible, the height fields of the barotrope Southern Hemisphere are identical to the initial conditions. This supports the assumption that baroclinic instability is the cause of non-stationarity. That the undamped Nambu-scheme is able to operate over such a period of time without any signs of numeric instability is in itself a noteworthy result.

56 Baroclinicity

Height of gridpoints vs. Latitude

(a) Initial balanced conditions

(b) t = 50 days, n = 86400

Figure 16: Height fields of baroclinic instability test: ∆t = 50, level 6 grid resolution, α = 0.01, no diffusion, 2 layers: ρ1 = 1.0, ρ2 = 0.9

57 Baroclinic Instability Vorticity Fields of Northern Hemisphere

Lower Layer Upper Layer

(a) Initial conditions

(b) t = 30 days, n = 51840

(c) t = 40 days, n = 69120

(d) t = 50 days, n = 86400

Figure 17: Vorticity field of lower and upper layer, northern hemisphere: ∆t = 50, level 6 grid resolution, α = 0.01, no diffusion, 2 layers: ρ1 = 1.0, ρ2 = 0.9

58 7 Summary & Conclusion

7.1 Summary A conservative scheme based on the multi-layer shallow-water equations in Nambu form for the ICON grid was developed by augmenting the single- layer scheme of Sommer and N´evir(2009). In Nambu form the tendencies of vorticity, divergence and height are defined by the conserved quantities, energy and potential enstrophy, and by a number of Nambu brackets which employ functional derivatives. The conservative scheme termed ”Nambu- scheme“ was constructed, following the general method described in Salmon (2005), by discretizing the Nambu brackets to retain their antisymmetry and then inserting the discretized conservation properties into the brackets. An additional scheme named ”ICON-scheme“ based on the shallow-water equa- tions in traditional momentum form, was also developed to function as a measure of reference. Both schemes were then implemented into a newly extended model of the ICON Shallow Water Prototype (ICOSWP) named the icosahedral multi-layer model capable of handling up to 99 layers. Many non-essential features, such as orography, were not transferred to the multi- layer model whose sole purpose is to test these two schemes. To ensure correct implementation the model underwent a number of tests. The first test demonstrated that the model was able to generate balanced, zonally- symmetric and stationary initial conditions. Both schemes reproduced these correctly. The second test showed that both schemes produced gravity wave phase speeds identical to the theoretically predicted values. It was presumed that the model functions correctly after the final test had been successfully completed conserving the potential enstrophy of each layer.

Once the implementation had been verified two experiments were con- ducted to study how the two schemes reproduce energy and potential enstro- phy. The main objective was to ascertain that the Nambu-scheme is truly conservative, meaning that the spatial discretization preserves both conserved quantities. To compare energy and potential enstrophy variations the relative errors were examined. Preliminary results indicated that the Nambu-scheme performs much better at preserving energy and potential enstrophy than the ICON-scheme. The first experiment consisted of multiple runs with identical initial conditions and grid resolution, but with different timesteps that var- ied between 2 and 150 seconds. According to the timestep size the number of timesteps was adjusted so all runs simulate the same amount of time. In contrast, the second experiment maintained a constant timestep while chang- ing the grid resolution. Due to computational constraints only six separate spatial refinements were possible and two sets of initial conditions were used. These experiments had two tasks. The first task was to examine how the difference in conservation between Nambu-scheme and ICON-scheme is af-

59 fected by timestep size and grid resolution. The second was to break down the errors into the portions caused by spatial discretization and temporal discretization. It was confirmed by the output of both experiments for all tested resolutions that the Nambu-scheme preserves energy and potential en- strophy more exactly than the ICON-scheme. Results also showed that the Nambu-scheme is indeed conservative with no significant error caused by the spatial discretization. This leads to the difference in conservation between the schemes which is largest for low grid resolution and smaller for higher resolution. Two issues that should also be mentioned are the great increase in computational time of the Nambu-scheme at high resolution and that the finest grid had an average edge length of approximately 70 kilometers.

The next experiment was designed to study how conservation and stabil- ity is affected by the number of layers employed. Stability was judged by the amount of time that passed before potential enstrophy reached twice the starting value. Ten runs per scheme were initialized with a balanced Rossby- Haurwitz wave which had a total height of roughly 20 kilometers. Runs were generated for level 5 and 6 grid resolution employing one to ten lay- ers. The timestep was adjusted to maintain a constant Courant number for both grids. Results show that the ICON and Nambu-scheme seem unaffected by the multi-layer extension in regard to conservation. In contrast, the sta- bility varies dramatically. The Nambu-scheme consistently performed better than the ICON-scheme, though both schemes are more unstable for more lay- ers. Results did not differ greatly when more than four layers are employed, but for less than five the discrepancies were considerable. It is assumed that the Hollingsworth instability which only occurs in multi-layer models (Hollingsworth et al. (1983)) contributes strongly to the ICON-scheme’s poor performance. Similar findings by other researchers of the ICON project sup- port this assumption which explains why the multi-layer ICON-scheme desta- bilizes much sooner than its single-layer counterpart. It is unclear whether and to which degree this instability, which is caused by a nonconservation of momentum, affects the Nambu-scheme. A possible explanation why stability decreases when more layers are employed is that thinner layers make it easier for numerical errors to cause negative heights.

The final experiment of this thesis was to test how the icosahedral multi- layer model handles baroclinic instability. Stationary, zonally-symmetric ini- tial conditions were set so that the Northern Hemisphere resembled a baro- clinic jet stream. The Southern Hemisphere served as a barotrope control. A single run over 50 days at level 6 grid resolution showed that the North- ern Hemisphere developed expected fluctuations with a wave number of five. The wave number of five indicates that the initial disturbances were caused by the icosahedral irregularities of the ICON grid. In contrast, the South-

60 ern Hemisphere preserved its stationary form. It should be emphasized that the model developed no numerical instabilities despite the long duration of the simulation. In addition, both energy and potential enstrophy were well preserved.

7.2 Conclusion The main objective to construct a conservative scheme for the multi-layer shallow-water system based on Nambu representation and the ICON grid has been achieved. A number of tests confirmed its correct implementation and that energy and potential enstrophy are preserved algebraically exact by the spatially discretized ordinary differential equations. The conservative scheme was compared against a scheme derived from the shallow-water equations in standard momentum form and proved itself superior in preserving energy and potential enstrophy as well as stability. These findings show that the favorable results derived by Sommer and N´evir(2009) for the single-layer model also apply to the multi-layer model. However, is should be mentioned that the Hollingsworth instability almost certainly affects the stability of the scheme based on standard momentum form. These improvements come with a significant rise in computational cost due to the required reconstruction of the potentials from divergence and vortic- ity, especially at the highest grid resolution. It is unclear whether and how the computational cost could be reduced by modifying the Laplace solvers employed. If desired additional certainty of the conservative scheme’s superi- ority in respect to conservation and stability could be achieved by revising the kinetic energy gradient of the other scheme to avoid the Hollingsworth insta- bility. Other options are replacing the Leapfrog method with a higher order temporal discretization and/or running the model at higher grid resolutions. The results are promising and encourage the possible application of schemes derived from Nambu representation in numerical weather prediction and cli- mate modelling.

61 Appendices

A Notation E potential enstrophy of shallow-water system F arbitrary functional H total energy Hkin kinetic energy Hpot potential energy HApot available potential energy E relative error of potential enstrophy M H relative error of energy M Hmin minimal potential energy Ψ Bernoulli function α Asselin parameter γ velocity potential ρi relative density of layer i to bottom layer µ divergence χ stream function ζ vorticity ζa absolute vorticity ce phase velocity of external mode ci phase velocity of internal mode C Courant number ∆t timestep size ∆x distance between grid points et error due to temporal discretization ex error due to spatial discretization f Coriolis parameter g gravitational constant G squared momentum of rigid rotator h layer thickness H energy of finite system J Poisson tensor K mass specific kinetic energy n dimension of system

62 N total number of layers p generalized momentum q absolute potential vorticity q generalized coordinates, cf. Section 2. u wind in zonal direction v wind in meridional direction x, y horizontal rectangular coordinates k vertical unit vector v horizontal wind J (, ) Jacobi-operator

A note on indexes: When two low indices are used the first index refers to the grid location and the second indicates the layer. For example, hij refers to the height at the mass point i on the layer j. The Notation used for the ICON grid and all discrete variables can be found in Subsection 5.3 and 5.4.

63 B Additional Figures

B.1 Stationarity Test

Stationarity Test after 4.5 days

Total Height fields

(a) ICON-scheme

(b) Nambu-scheme

Figure 18: Total height fields of ICON and Nambu-scheme after ≈ 4.5 days: n = 5000, ∆t = 75 s, level 6 grid resolution, α = 0.01, no diffusion, 4 layers: ρ1 = 1.0, ρ2 = 0.9, ρ3 = 0.5, ρ4 = 0.2

64 B.2 Gravity Wave Test

Height Fields at end of Gravity Wave Test after 2.2 Days

Height of Gridpoints vs. Latitude

(a) ICON-scheme

(b) Nambu-scheme

Figure 19: Height fields at end of gravity wave test: n = 1900, ∆t = 100 s, level 5 grid resolution, α = 0.01, no diffusion, 2 layers: ρ1 = 1.0, ρ2 = 0.9

65 B.3 Rossby-Haurwitz Wave

Height fields of two-layer Rossby-Haurwitz Wave after approximately 1.7 Days

ICON-scheme Nambu-scheme

(a) Lower layer

(b) Upper layer

(c) Total height

Figure 20: Height fields of Rossby-Haurwitz wave: n = 1666, ∆t = 90 s, level 4 grid resolution, α = 0.01, no diffusion, 2 layers: ρ1 = 1.0, ρ2 = 0.5

66 Initial Conditions - Vertical Resolution Dependencies

Height of Gridpoints vs. Latitude

(a) Single-layer

(b) Ten-layer

Figure 21: Initial layer height of single-layer (upper plot) and ten-layer (lower plot) Rossby-Haurwitz test. ∆t = 100 s, level 5 grid resolution, α = 0.1, no diffusion, 1-10 layers: ρ = 1.0, 0.9, 0.8, ..., 0.1

67 Destabilization of ICON-Scheme Rossby-Haurwitz Wave

Height Field of Bottom Layer

(a) t ≈ 1.2 days, n = 1000

(b) t ≈ 1.7 days, n = 1500

(c) t ≈ 2.3 days, n = 2000

Figure 22: Bottom layer height field of two-layer Rossby-Haurwitz wave: ∆t = 100 s, level 5 grid resolution, α = 0.1, no diffusion, 2 layers: ρ1 = 1.0, ρ2 = 0.5

68 Destabilization of ICON-Scheme Rossby-Haurwitz Wave

Height Field of Upper Layer

(a) t ≈ 1.2 days, n = 1000

(b) t ≈ 1.7 days, n = 1500

(c) t ≈ 2.3 days, n = 2000

Figure 23: Top layer height field of two-layer Rossby-Haurwitz wave: ∆t = 100 s, level 5 grid resolution, α = 0.1, no diffusion, 2 layers: ρ1 = 1.0, ρ2 = 0.5

69 Destabilization of ICON-Scheme Rossby-Haurwitz Wave

Total Height Field

(a) t ≈ 1.2 days, n = 1000

(b) t ≈ 1.7 days, n = 1500

(c) t ≈ 2.3 days, n = 2000

Figure 24: Total height field of two-layer Rossby-Haurwitz wave: ∆t = 100 s, level 5 grid resolution, α = 0.1, no diffusion, 2 layers: ρ1 = 1.0, ρ2 = 0.5

70 C Functionals and Their Derivatives

A functional F is a map from a vectorspace V to the real (or complex) numbers R. F : V → R For all functionals used in this thesis the vectorspace will be the function space. For example the enstophy E of a two-dimensional flow is a functional of the vorticity. 1 ZZ E[ζ] = ζ2dA 2 Functional derivatives are a generalization of the directional derivative. They too are a functionals. Using the delta function δ they can be written as following. δF F[f(x) + δ(x − y)] − F[f(x)] = lim δf(y) →0  To illustrate functional derivatives here are two examples taken from Beste- horn (2006).

Example 1. Z F [f] = f(x)ndx

δF 1 Z = lim ((f(x) + δ(x − y))n − f(x)n) dx δf(y) →0  δF 1 Z = lim f(x)n + nδ(x − y)f(x)n−1 + O(2) − f(x)n dx δf(y) →0  δF Z = n δ(x − y)f(x)n−1dx = nf(y)n−1 δf(y)

Example 2. 1 Z ∂f(x)2 F[f] = dx 2 ∂x ! δF 1 Z ∂(f(x) + δ(x − y))2 ∂f(x)2 = lim − dx δf(y) →0 2 ∂x ∂x

! δF 1 Z ∂f(x)2 ∂f(x) ∂δ(x − y) ∂f(x)2 = lim + 2 + O(2) − dx δf(y) →0 2 ∂x ∂x ∂x ∂x

δF Z ∂f(x) ∂δ(x − y) Z ∂2f(x) ∂2f(x) = dx = − δ(x − y)dx = − δf(y) ∂x ∂x ∂x2 ∂x2

71 Now a very short note to explain why functional derivatives are so essential for the energy-vorticity theory. Using what was shown in Example 1. it follows that δE[ζ(x, t)] = ζ(x, t) . δζ(x, t) Here we see that the derivative of the enstrophy (which is a global conser- vation property for incompressible two-dimensional flows) is space and time dependent.

As an additional example the functional derivatives of the potential enstro- phy of the single-layer shallow-water system are presented. The potential enstrophy E can be written in a number of ways employing the vorticity ζ, the absolute vorticity ζa, the Coriolis parameter f, the absolute potential vorticity q and the height h.

1 Z ζ 2 1 Z 1 Z E = a dA = q(ζ + f)dA = hq2dA 2 h 2 2 To formulate the shallow-water equations in Nambu form the functional derivatives with respect to µ, ζ and h are needed, which are

δE δE δE 1 = q = 0 = − q2 . δζ δµ δh 2 δE When deriving δh one must not forget that q is a function of h.

72 References

Arakawa A. 1966. Computational design for long-term numerical integration of the equa- tions of fluid motion: Two-dimensional incompressible flow. Part I. J. Comput. Phys. 1(1): 119–143. Bestehorn M. 2006. Hydrodynamik und Strukturbildung. Springer. Bihlo A. 2008. Rayleigh-B´enardConvection as a Nambu-metriplectic problem. J. Phys A 41(29). Bonaventura L, Ringler T. 2005. Analysis of discrete shallow-Water models on geodesic Delaunay grids with C-Type staggering. Mon. Wea. Rev. 133: 2351–2371. Bonaventura L, et al. 2005. The ICON shallow water model: scientific documentation and benchmark tests. [Available at http://icon.enes.org]. Gassmann A, Herzog HJ. 2008. Towards a consistent numerical compressible nonhydrostatic model using generalized Hamiltonian tools. Quart. J. Roy. Meteor. Soc. 134: 1597–1613. Hollingsworth A, Kallberg P, Renner V, Burridge DM. 1983. An internal symmetric com- putational instability. Quart. J. Roy. Meteor. Soc. 135: 417–428. Lange HJ. 2002. Die Physik des Wetters und des Klimas. Dietrich Reimer Verlag Berlin. L¨auterM, Giraldo F, Handorf D, Dethloff K. 2008. A discontinuous Galerkin method for the in spherical triangular coordinates. J. Comput. Phys. 227: 10 226–10 242. Lee JL, Macdonald A. 2009. A Finite-Volume Icosahedral Shallow-Water Model on a Local Coordinate. Mon. Weather Rev. 137: 1422–1437. Li X, Chen D, Peng X, Takahashi K, Xiao F. 2008. A Multimoment Finite-Volumne Shallow- Water Model on the Yin-Yang Overset Spherical Grid. Mon. Weather Rev. 136: 3066– 3086. Morrison PJ. 1998. Hamiltonian description of the ideal fluid. Rev. Mod. Phys. 70(2): 467– 521. Nair RD, Loft STRD. 2005. A Discontinous Galerkin Transport Scheme on the Cubed Sphere. Mon. Weather Rev. 133: 814–828. Nambu Y. 1973. Generalized Hamiltonian Dynamics. Phys. Rev. D 7(8): 2405–2412. N´evirP. 1998. Die Nambu-Felddarstellungen der Hydro-Thermodynamik und ihre Bedeu- tung f¨urdie dynamische Meteorologie. Habilitation thesis, Freie Universit¨atBerlin. N´evirP, Blender R. 1993. A Nambu representation of incompressible hydrodynamics using helicity and enstrophy. J. Phys. A 26(22): L1189–L1193. N´evirP, Sommer M. 2009. Energy-Vorticity Theory of Ideal Fluid Mechanics . J. Atmos. Sci. 66: 2073–2084. Salmon R. 1998. Geophysical Fluid Dynamics. Oxford University Press, 1 edn. Salmon R. 2005. A general method for conserving quantities related to potential vorticity in numerical models. Nonlinearity 18(5): R1–R16. Salmon R. 2007. A general method for conserving energy and potential enstrophy in shallow water models. J. Atmos. Sci. 64: 515–531. Sommer M, N´evirP. 2009. A conservative scheme for the shallow-water sytem on a staggered geodesic grid based on a Nambu Representation. Quart. J. Roy. Meteor. Soc. 135: 485– 494. Swinbank R, Purser J. 2006. Fibonacci Grids: A novel approach to global modelling. Quart. J. Roy. Meteor. Soc. 132(619): 1769–1793. Thuburn J. 2008. Some conservation numbers for the dynamical cores of NWP and climate models. J. Comput. Phys. 207: 3715–3730. Wan H. 2009. Developing and testing a a hydrostatic atmospheric dynamical core on tri- angular grids. PhD thesis, Max Planck Institute of Meteorology. Williamson D, Hack J, Jakob R, Swarztrauber P. 1991. A standard test set for numerical

73 approximations to the shallow water equations in spherical geometry. ORNL/TM-11895 .

74 Acknowledgments I would like to thank my supervisor Peter N´evirfor making this thesis possi- ble and Matthias Sommer, who has my respect and gratitude for the amount of time he devoted to willingly answering my each and every question. I also owe thanks to Ulrich Cubasch who agreed to review this thesis and to Almut Gassmann and Hui Wan for the helpfull correspondence.

My thanks also goes out to the open-source community, especially the folks at the University of Illinois at Urbana-Champaign who support the sadly flawed PHOTRAN.

Of all my lecturers Lutz Heindorf, Rupert Klein and Bernold Fiedler were the best, thank you for your efforts.

And last but not least: Christopher, Simon, Bergemann, Daniel, Tim & Krushke as well as Max & Till. Without you guys my years of study would have been much less enjoyable.

75