Articles | Volume 16, issue 4
https://doi.org/10.5194/gmd-16-1265-2023
https://doi.org/10.5194/gmd-16-1265-2023
Model description paper
 | 
22 Feb 2023
Model description paper |  | 22 Feb 2023

A mixed finite-element discretisation of the shallow-water equations

James Kent, Thomas Melvin, and Golo Albert Wimmer
Abstract

This paper introduces a mixed finite-element shallow-water model on the sphere. The mixed finite-element approach is used as it has been shown to be both accurate and highly scalable for parallel architecture. Key features of the model are an iterated semi-implicit time-stepping scheme, a finite-volume transport scheme, and the cubed sphere grid. The model is tested on a number of standard spherical shallow-water test cases. Results show that the model produces similar results to other shallow-water models in the literature.

1 Introduction

The dynamical core of an atmospheric model numerically approximates the solution to the governing fluid dynamics equations that determine the evolution of the atmosphere. An operational dynamical core must be both accurate, to give confidence in the forecast, and efficient, to produce a forecast in the desired time frame. Current supercomputer architectures focus on using an increasing number of processors to decrease runtime, and so future dynamical cores must be suitable for massively parallel architecture. Key aspects of the dynamical core that will greatly affect both accuracy and parallel scalability are the type of grid and the numerical methods used to discretise the equations.

Traditionally, atmospheric models used a latitude–longitude grid (Wood et al.2014). However, the convergence of the meridians at the pole leads to a computational bottleneck, and thus the latitude–longitude grid is not suitable for future supercomputers. Hence, a number of different approaches to gridding the sphere without a pole have been developed and used in dynamical cores, such as icosahedral grids and the yin–yang grid (Staniforth and Thuburn2012). One such promising grid is the cubed sphere, which uses quadrilateral cells on six panels that cover the sphere (Ronchi et al.1996).

The choice of numerical methods used in a dynamical core will affect both the accuracy and the efficiency of the model. High-order methods generally improve accuracy but increase the computational cost. There are a variety of spatial methods (for example, finite-difference, finite-volume, semi-Lagrangian) and temporal methods (for example, explicit, semi-implicit, horizontally explicit, vertically implicit) used in atmospheric models by different operational centres and modelling groups (see Ullrich et al.2017, and references within). The mixed finite-element method of Cotter and Shipton (2012) and Cotter and Thuburn (2014) is a spatial method that allows high-order schemes to be defined whilst retaining good parallel properties (Melvin et al.2019). Mixed finite elements retain many properties of C-grid finite-difference and finite-volume methods, such as good numerical dispersion relations. They also have the advantage of not requiring orthogonal grids (Cotter and Shipton2012), better consistency of the Coriolis operator (Thuburn and Cotter2015), and the flexibility to increase accuracy by using higher-order elements. In practice, most current atmospheric dynamical cores aim for second-order accuracy overall (with the transport scheme often higher order) (Wood et al.2014). For this reason the lowest-order mixed finite-element method will be a building block of the model described in this article.

The shallow-water equations are an important step in testing the methods used for the development of a dynamical core (Williamson et al.1992). The shallow-water equations contain many of the properties of the full atmospheric governing equations but with a reduction in complexity. In practice, if a method is not good enough (by whatever metric) for a shallow-water model, it will not be good enough for an atmospheric dynamical core. This allows the methods to be evaluated in a simpler setting and design decisions to be made early in development.

This document presents a novel mixed finite-element discretisation, extending that of Melvin et al. (2019) for atmospheric dynamics in Cartesian geometry, of the rotating shallow-water equations in a spherical domain. This is the natural next step from Melvin et al. (2019) in the development of a three-dimensional dynamical core in spherical geometry, allowing the impact of the chosen spherical grid to be investigated in a simplified context using an evolution of the same numerics. As with the model of Melvin et al. (2019), the shallow-water discretisation presented here has been developed in the LFRic framework: see Adams et al. (2019). Key components of the model are the semi-implicit iterated time-stepping scheme and the finite-volume transport. The governing shallow-water equations are given in Sect. 2. The discretisation, including the spatial and temporal aspects, is given in Sect. 3, the finite-volume transport scheme is described in Sect. 4, and the solution procedure is outlined in Sect. 5. Results from standard shallow-water test suites are given in Sect. 7, with a concluding summary in Sect. 8.

2 Governing equations

The shallow-water equations in a rotating domain are given in vector-invariant form by

(1)ut+qΦu+K+Φ+Φs=0,(2)Φt+uΦ=0,

where u=(u,v) is the velocity, Φ=gh is the geopotential (with gravity g and free surface height h), Φs is the surface geopotential, and K1/2|u|2 is the kinetic energy. The perpendicular operator is defined by (u,v)=(-v,u).

The potential vorticity (PV) q is defined as

(3) q = u + f Φ ,

where f is the Coriolis parameter and k×, and taking the curl of Eq. (1) gives a conservative transport equation for PV:

(4) Φ q t + u Φ q = 0 .
3 Discretisation

The governing Eqs. (1) and (2) are discretised in time using a two-time-level iterated implicit scheme (Sect. 3.1) and in space using a mixed finite-element method (Sect. 3.2) for the wave-dynamic terms and a high-order upwind finite-volume scheme (Sect. 4) for the advection terms. This process is an extension to the shallow-water equations on the sphere of Melvin et al. (2019), who presented a similar discretisation in a three-dimensional Cartesian domain.

3.1 Temporal discretisation

To achieve second-order temporal accuracy, a time-centred approach is used. The target discretisation, as in Melvin et al. (2019), is a two-time-level iterated implicit scheme where terms responsible for the fast-wave dynamics are treated by the iterative semi-implicit scheme and the transport terms (those involving the mass flux in Eq. 2 and the potential vorticity in Eq. 1) are computed using a high-order, upwind, explicit finite-volume scheme. Taking Eqs. (1) and (2) and applying this discretisation results in

(5)δtu+FqnΦn,u1/2+K+Φ+Φsα=0,(6)δtΦ+FΦn,u1/2=0,

where δtssn+1-sn/Δt, sααsn+1+1-αsn, and 𝓕(s,u) are the fluxes computed by the transport scheme of variable s by wind field u. We use α=1/2 to achieve the second order centred in the time scheme.

3.2 Mixed finite-element discretisation

The mixed finite-element formulation in two spatial dimensions requires the specification of three finite-element function spaces: V0,V1,V2 (cf. the four function spaces Wi,i=03 used in Melvin et al.2019). The scalar spaces are an H1 space consisting of point-wise scalars, 𝕍0 (zero forms), or an L2 space consisting of area-integrated scalars, 𝕍2 (two forms). There are two choices for the vector space 𝕍1 corresponding to either V1C, a Hcurl space of circulation vectors, or V1D, a Hdiv space of flux vectors. Each choice has an associated discrete de Rham complex,

(7) V 0 V 1 C k × V 2

for curl-conforming vectors and

(8) V 0 k × V 1 D V 2

for div-conforming vectors. For this paper only the div-conforming complex Eq. (8) will be considered: V1V1D, with u∈𝕍1 and Φ∈𝕍2. This is analogous to the standard C-grid staggering (Arakawa and Lamb1977) where the normal components of the velocity vector are stored at the cell edges. The div-conforming complex, with the locations of the prognostic variables u, v, and Φ, is shown in Fig. 1.

https://gmd.copernicus.org/articles/16/1265/2023/gmd-16-1265-2023-f01

Figure 1The finite-element function spaces 𝕍0, 𝕍1, and 𝕍2 for the div-conforming complex, showing the locations of the velocity components and the geopotential.

Download

The potential vorticity q∈𝕍2 is collocated with Φ and is computed diagnostically as follows. The velocity u is represented in the Hcurl space as vV1C using a Galerkin projection, and then the curl is taken to give the relative vorticity ωk×vV2. The absolute vorticity is projected into 𝕍2 and then divided by the geopotential. As the lowest-order space is used, this gives the potential vorticity q∈𝕍2.

Taking Eq. (5), multiplying by a test function w from the velocity space and integrating over the domain D gives

(9) D w δ t u + F q n Φ n , u 1 / 2 - w K + Φ + Φ s α d A = 0 ,

where, since the geopotential and kinetic energy are discontinuous between cells, the third term has been integrated by parts and the boundary term vanishes due to the continuity of the test functions w. Similarly, taking Eq. (6), multiplying by a test function σ from the geopotential space and integrating over the domain gives

(10) D σ δ t Φ + F Φ n , u 1 / 2 d A = 0 ,

where it is assumed that the advection scheme returns fluxes 𝓕∈𝕍1.

3.3 Transforms

As in Melvin et al. (2019), the equations are transformed from a physical cell C to a reference cell C^ using the mapping ϕ:C^C. The physical cell, on the cubed sphere, has coordinates χ, and the reference cell, a unit square, has coordinates χ^, and the transform is such that χ=ϕ(χ^). Transforming the equations to a single reference cell provides a number of computational efficiencies such as a single set of basis functions and quadrature points (Rognes et al.2009). The Jacobian of this transformation is defined as Jϕχ^/χ^ and is used in transforming variables between the physical and reference cells. The transformations used for spaces 𝕍1 and 𝕍2 are designed to preserve fluxes through an edge (𝕍1) and area-integrated values (𝕍2) respectively. The transformation for 𝕍1 is vχvϕχ^=Jv^χ^/detJ. Following Melvin et al. (2019), for the 𝕍2 transformation rehabilitation, the approach of Bochev and Ridzal (2010) is used so that the 𝕍2 mapping is modified to σχσϕχ^=σ^(χ^). Applying these to Eqs. (9) and (10) gives

(11) D J w ^ det J δ t J u ^ + J F ^ q n Φ n , u 1 / 2 - ^ w ^ K ^ + Φ ^ + Φ s ^ α d A ^ = 0

and

(12) D σ ^ δ t Φ ^ det J + ^ F ^ Φ n , u 1 / 2 d A ^ = 0 .
4 Transport scheme

The transport scheme is an extension to the method-of-lines scheme used by Melvin et al. (2019), computing fluxes 𝓕 of a scalar field s by a wind field u:

(13) F s , u = t t + Δ t s u d t .

The flux 𝓕 is obtained using a method-of-lines scheme where a conservative transport equation

(14) s n + 1 - s n + Δ t F s n , u = 0

is solved to obtain 𝓕. The temporal aspects of this scheme are handled in the same manner as Melvin et al. (2019) using an m-stage Runge–Kutta scheme

(15)si=sn-Δtj=1i-1ai,jFsj,u,i=1,,m,(16)sn+1=sn-Δtk=1mbkFsk,u.

The coefficients ai,j and bk in Eqs. (15) and (16) are given by the Butcher tableau for the scheme:

0
c2 a2,1
c3 a3,1 a3,2
cm am,1 am,m-1
b1 b2 bm−1 bm

Here the three-stage third-order strong stability preserving (SSP3) method of Gottleib (2005) is used, which has the Butcher tableau:

0
1 1
1/2 1/4 1/4
1/6 1/6 4/6

At each stage i we need to compute Fsi,usˇiu, where sˇ is a high-order upwind reconstruction of s. We use a quadratic reconstruction for sˇ (see Sect. 4.1), resulting in a transport scheme that is third order in both time and space. As the model uses the cubed sphere grid, the spatial reconstruction of Melvin et al. (2019) is extended to take into account the non-uniformity of the mesh by using a two-dimensional horizontal reconstruction. The scheme defined in this section works on order l=0 spaces.

4.1 Reconstruction of a scalar field

The advection scheme computes a high-order upwind reconstruction sˇ of a given scalar field s. The reconstructed field is computed at points staggered half a grid length in all directions from the original field, so for a field s∈𝕍2, which is located at cell centres, the reconstructed field sˇ is computed at the centre of each cell edge. The reconstruction is computed by fitting a polynomial through a number of cells and evaluating this polynomial at the staggered points. The reconstruction is such that the integral of the polynomial is equal to the integral of s within each cell. This is given an upwind bias by choosing even-order polynomials for the reconstruction which require an odd number of s points and hence can be weighted to the upwind side of the point at which the reconstruction is needed; for example, for a one-dimensional quadratic reconstruction at a point sˇi+1/2 with a positive wind field, two upwind points si−1 and si and one downwind point si+1 are used.

The horizontal spatial reconstruction is based on that used in Thuburn et al. (2014), which uses a similar method to Baldauf (2008) and Skamarock and Menchaca (2010). To summarise, a series of polynomials Pk of a given order n in a local Cartesian coordinate system (x,y) is defined over a stencil of ns cells. The polynomial is required to fit (in a least squares sense) the discrete field being reconstructed. The integral along the cell edge of the reconstructed field sˇ is approximated by Gaussian quadrature and is given by

(17) s ˇ d S k = 1 n s P k x , y s k d S j = 1 n q k = 1 n s w j P k x j , y j s k ,

where (xj,yj) are the integration points and wj the weights of the Gaussian quadrature. In practice, a nq=2 point quadrature is used, and this is found to give a small improvement over single-point quadrature.

The weights Pk(xr,yr) that multiply each value sk in the stencil are obtained by evaluating a polynomial

(18) P k x , y = i = 0 n j = 0 n - i a i , j k x i y j

at (xr,yr). The coefficients ai,jk of Pk are determined by minimising the residual rk

(19) r k = j = 1 n s j P k - δ j k d A j 2 ,

so that the integral of Pk=1 in cell k and Pk=0 otherwise.

For an order n reconstruction, there are nm(n+1)(n+2)/2 coefficients ai,jk, and so, to avoid an under-determined problem, this requires at least nm cells in the stencil. Additionally, the stencil should be symmetric about the central cell. To ensure these properties hold, the stencils are generated in the same manner as Thuburn et al. (2014). To summarise, the following algorithm is used.

  1. Add the central cell to the stencil (if n=0, stop).

  2. Loop until the number of cells in the stencil ns is at least the number of monomials nm.

  3. Find the set S of all neighbouring cells of cells currently in the stencil.

  4. Either add all cells in S that are not already in the stencil and are neighbours of two cells already in the stencil or, if no cell in S is a neighbour of two cells in the stencil, add all cells in S that are not already in the stencil.

An example of the type of stencil this generates around a corner of the cubed sphere is shown in Fig. 2.

https://gmd.copernicus.org/articles/16/1265/2023/gmd-16-1265-2023-f02

Figure 2Stencil for a quadratic reconstruction of a field around the corner of a cubed sphere. Numbers indicate at which iteration of the stencil generation the cell is added, lightly shaded cells indicate cells used for the reconstruction that are fitted in a least squares manner, and the darkly shaded cell indicates the central cell which is fitted exactly.

Download

For example, with a quadratic reconstruction n=2 there are nm=6 monomials, and the stencil algorithm will generate a stencil with ns=9 cells in general and ns=8 cells near the corners of the cubed sphere. As in Thuburn et al. (2014) the central cell (k=1) in the stencil is fitted exactly (r1=0 in Eq. 19), and the others are fitted in a least squares sense.

The local Cartesian coordinates (x,y) are computed as in Thuburn et al. (2014), the origin of the coordinate system x0 is taken to be the centre of the cell in the centre of the stencil, and the direction of the x axis is then taken as the direction from x0 to an arbitrary neighbour. Then it is straightforward to reconstruct any point xiXi,Yi,Zi in the stencil in terms of the local coordinates (xi,yi); see Thuburn et al. (2014) for more details.

4.2 Flux computation

Once the scalar field s has been reconstructed at the locations of the 𝕍1 degrees of freedom to give sˇ, the flux of that field on a cell face is obtained by multiplying the reconstructed scalar by the normal component of the velocity field at that point:

(20) F ^ = u ^ s ˇ ,

where sˇ is the vector containing all sˇ at cell edges.

4.3 Predictors

The temporal discretisation is designed to mimic a semi-implicit semi-Lagrangian discretisation such as that used in Wood et al. (2014). For the transport scheme this includes advecting predictors p,qp) for the geopotential and potential vorticity fields instead of the values at the start of the time step n,qn). This is motivated by considering a semi-Lagrangian discretisation of a prototypical equation

(21) D s D t + G s = 0 ,

with D/Dt/t+u. Discretising across a trajectory from xD at time level n to xA at time level n+1 gives

(22) s + α Δ t G s A n + 1 = s - 1 - α Δ t G s D n ,

with subscripts “A” and “D” denoting evaluation at arrival xA and departure xD points respectively. Evaluation of a function F at a departure point can be expressed as

(23) F D n = F A n - A sl F n , u 1 / 2 ,

where 𝒜sl is the operation of the semi-Lagrangian advection operator. Applying this approximation to Eq. (21) gives

(24)s+αΔtGsn+1=sp-Aslsp,u1/2,(25)sps-1-αΔtGsn,

where the subscript “A” has been dropped for convenience. Applying this idea to Eq. (2), the geopotential predictor to be advected is then

(26) Φ p Φ - 1 - α Δ t Φ u n .

This can also be applied to potential vorticity using Eq. (4). These predictors come from considering the continuity and PV equations in advective form Ds/Dt+su=0, where s or qΦ, as would be used in a semi-Lagrangian model.

5 Solution procedure

The procedure for the solution of the shallow-water equations is as follows. The semi-implicit governing equations, Eqs. (5) and (6), are repeated here for clarity:

(27)δtu+FqnΦn,u1/2+K+Φ+Φsα=0,(28)δtΦ+FΦn,u1/2=0.

An iterated implicit scheme is used to solve Eqs. (27) and (28). At each stage (k) of the iterative scheme, the time-level n+1 terms are lagged and included in the residuals such that

(29)Ruu+αΔt(K+Φ+Φs)k-u-1-αΔt(K+Φ+Φs)n+ΔtF(qΦ)p,u1/2,(30)RΦΦk-Φn+ΔtFΦp,u1/2,

where k is the estimate for the n+1 terms after k iterations of the iterative scheme. Increments uuk+1-uk and ΦΦk+1-Φk to Eqs. (29)–(30) are sought such that the fast-wave terms are handled implicitly:

(31)u+τf(u)+τΔtΦ=-Ru,(32)Φ+τΔtΦ*u=-Rϕ,

where Φ* is a reference state used to obtain the linearisation and τ is a relaxation parameter (usually chosen to be τ=1/2). In practice, we use Φ*=Φn as the reference state. Applying the mixed finite-element discretisation, this becomes the system

(33) M 1 + τ Δ t C - τ Δ t D 1 T τ Δ t D Φ * M 2 u Φ = - R u R Φ ,

where 𝓡u and Φ are the finite-element discretisations of Eqs. (29) and (30) respectively given by Eqs. (11) and (12). The matrices are defined as

(34)M1i,jDJw^iJdetJw^jdA^,(35)M2i,jDσ^iσ^jdetJdA^,(36)Ci,jfDJw^iJdetJw^jdA^,(37)Dψi,jD^w^iψσjdA^.

At each iteration (k) the system (33) is solved using an iterative Krylov subspace method (in this case the generalised minimal residual method – GMRES). For the tests presented in this paper (see Sect. 7), GMRES generally converged in two to three iterations to a tolerance of 10−4.

6 Mesh

An equiangular cubed sphere mesh is used to grid the sphere. We use the notation Cn to describe a cubed sphere with n×n cells per panel. The mesh is parameterised using a finite-element representation of the sphere within a cell with polynomials of order m. Note therefore that a point within a cell does not necessarily lie on the sphere, with the error depending on the order of the elements used. For example, a linear element lies on the sphere at the vertices of the element and uses a linear approximation to the surface of the sphere within the element. Representing the sphere with these elements removes the need for analytical transforms to the reference grid, allowing the use of an arbitrary grid if required (in this paper we use the standard equiangular cubed sphere). To compute the error of the mesh parameterisation, the geocentric coordinates (X,Y,Z) at a point in the cell are computed using the finite-element representation. The error is the difference between the true radius of the sphere and the radius using (X2+Y2+Z2)1/2.

Figure 3 shows the error within a cell when using linear and quadratic elements on a C96 grid with the Earth's radius. The error for the linear element is largest at the cell centre, with a maximum error of 426.39 m. The quadratic element reduces the error by 5 orders of magnitude, with a maximum error of 0.0018 m. Figure 3c shows the convergence of the maximum error within a cell. The linear element error converges at second order, with the quadratic element converging at fourth order. For this reason the quadratic element is used to create the mesh for the shallow-water model. Note that the quadratic element is for the representation of the mesh, whereas the lowest-order finite elements are used for the spatial discretisation of the model.

https://gmd.copernicus.org/articles/16/1265/2023/gmd-16-1265-2023-f03

Figure 3The error from linear and quadratic finite-element representations of the sphere within a cell. The left and centre plots show the absolute error (true – FE) for the linear and quadratic basis functions respectively on the C96 cubed sphere grid. The right plot shows the convergence of the inf error, using C24, C48, C96 and C192 cubed sphere grids.

Download

7 Numerical results

This section shows the results of the model runs using a standard set of spherical shallow-water test cases. The full initial conditions for each of the tests are given in the references under each test case.

7.1 Williamson 2: steady state

The first test case is the steady-state test described in Williamson et al. (1992). The steady flow means that the initial conditions are the analytical solution at any time, and thus error norms can be calculated for the runs at different resolutions.

The normalised 2 error norms of the geopotential field at 15 d are given in the top two rows of Table 1 for the C24 (Δt=3600), C48 (Δt=1800), and C96 (Δt=900) resolutions. The error norms can be used to determine the convergence rate and hence the empirical order of accuracy of the model. The convergence rates of the 2 and error norms are approximately second order. This is expected as the finite-element discretisation and the time-stepping scheme are both second-order methods. The error fields after 15 d for the C96 resolution are shown in Fig. 4: these errors show a wave number 4 pattern coming from the underlying cubed sphere mesh; however, the errors are large scale and are not particularly clustered around the edges and corners of the cubed sphere, indicating an acceptable level of grid imprinting.

Table 1The normalised 2 and geopotential error norms for the Williamson 2 test (top) and the normalised 2 and absolute geopotential error norms for the Williamson 5 test (bottom) at different resolutions after 15 d.

Download Print Version | Download XLSX

https://gmd.copernicus.org/articles/16/1265/2023/gmd-16-1265-2023-f04

Figure 4Errors after 15 d for the Williamson 2 test at C96 resolution for geopotential (a) and zonal wind (b) showing the large-scale nature of the error.

Download

7.2 Williamson 5: mountain test

The mountain test case of Williamson et al. (1992) is used to show the performance of the model when orography is present (i.e. Φs≠0). The initial zonal flow is over a mountain centred at 90 longitude and 30 latitude. The same grid resolutions and time steps used for the Williamson 2 test are used for the mountain test.

https://gmd.copernicus.org/articles/16/1265/2023/gmd-16-1265-2023-f05

Figure 5Results for the Williamson mountain test on the C96 grid. Panel (a) shows the total geopotential (Φ+Φs) after 15 d. Panel (b) shows the potential vorticity (q) after 50 d.

Download

The geopotential at day 15, shown in Fig. 5a for the C96 grid, is comparable to other shallow-water models at similar resolutions (see for example Thuburn et al.2010, 2014; Ullrich2014). We investigate the errors in the total geopotential by comparing them with a high-resolution solution generated using the semi-implicit semi-Lagrangian (SISL) shallow-water model of Zerroukat et al. (2009). This reference solution uses a time step of Δt=60 s and a high-resolution latitude–longitude grid of 1536×768 points. The high-resolution solution is then interpolated, using bi-cubic interpolation, to the corresponding cubed sphere grid where the difference is taken to produce the error plots and diagnostics.

https://gmd.copernicus.org/articles/16/1265/2023/gmd-16-1265-2023-f06

Figure 6Absolute error plots for total geopotential (Φ+Φs) for the Williamson mountain test on the C24 grid (a) and the C48 grid (b) after 15 d. Note the different scales on the colour bars.

Download

The error plots for the total geopotential are shown in Fig. 6 for the C24 and C48 resolutions. The error for the C48 solution is visually similar to that of the finite-element cubed sphere model of Thuburn and Cotter (2015) (their Fig. 7), with a large negative error near the mountain and the wave train error in the Southern Hemisphere. The errors decrease significantly as the resolution increases. The normalised 2 and absolute error norms, calculated from the high-resolution SISL model, are given in the bottom of Table 1.

The C48 maximum errors (given in Fig. 6 and in Table 1) are smaller in magnitude than those for the 13 824-cell finite-volume cubed sphere model of Thuburn et al. (2014) and have a similar magnitude to the SISL model (Zerroukat et al.2009) at 160×80 resolution (note that Thuburn et al.2014, use total height, not total geopotential, in their results, and so their results need to be multiplied by gravity to give an equivalent value). The absolute error norm values converge at a rate of 1.6, similarly to those given in Thuburn et al. (2014) (note that they use a smaller time step than presented in our results).

The normalised 2 errors of the geopotential, given in the bottom of Table 1, have a convergence rate of 2.42 between C24 and C48. However, at higher resolution the error convergence stalls, similarly to that found in Thuburn et al. (2014) for comparable time steps, with a rate of only 0.53 between C48 and C96. Even with this stalling, the total rate between C24 and C96 is 1.48.

To demonstrate the conservation properties of the model, the mass, total energy and potential enstrophy are computed at each time step. The total energy is defined as

(38) E = D 1 2 h | u | 2 + Φ + 2 Φ s d A ,

and the potential enstrophy is defined as

(39) Z = D 1 2 Φ q 2 d A ,

where the integrals are over the whole domain.

Mass, energy, and potential enstrophy are conserved in the continuous equations. As the model uses a finite-volume transport scheme, the mass is conserved to machine precision; however, energy and potential enstrophy are not conserved by the discretisation presented here, and in fact, in the discrete case, potential enstrophy cascades downscale from resolved to unresolved scales and thus is expected to decrease with time.

The normalised total energy and potential enstrophy are plotted against time in Fig. 7 for different grid resolutions (C24, C48, and C96) up to day 50. As the resolution increases, the dissipation in the model decreases, and the total energy and potential enstrophy curves are closer to conservation (a horizontal line). The flow is initially weakly non-linear, and so for the first 15 d there are no significant cascades to unresolved scales. After 15 d the percentage loss in total energy is 0.0355 % for C24, 0.0062 % for C48, and 0.001 % for C96. For potential enstrophy the percentage loss is 0.3648 % for C24, 0.076 % for C48, and 0.014 % for C96. Extending to 50 d, the flow becomes more non-linear, and this results in more dissipation of energy and potential enstrophy. The percentage losses are 0.221 % for C24, 0.063 % for C48, and 0.014 % for C96 in the total energy and 3.33 % for C24, 2.19 % for C48, and 1.45 % for C96 in the potential enstrophy.

https://gmd.copernicus.org/articles/16/1265/2023/gmd-16-1265-2023-f07

Figure 7The normalised total energy (a) and potential enstrophy (b) against time for the Williamson mountain test.

Download

The potential vorticity at day 50 is shown in Fig. 5b for the C96 resolution. As the flow has become non-linear, the potential vorticity contours start to wrap up. The model captures the potential vorticity filaments without producing noise. The results for this test indicate that the model is correctly simulating flow over orography.

https://gmd.copernicus.org/articles/16/1265/2023/gmd-16-1265-2023-f08

Figure 8The potential vorticity q after 6 d for the Galewsky instability test. Panel (a) shows the C48 solution, panel (b) shows the C96 solution, panel (c) shows the C192 solution, and panel (d) shows the C384 solution.

Download

7.3 Galewsky instability test

For the Galewsky instability test (Galewsky et al.2004), a perturbation is added to a balanced jet to create a barotropic instability. As the instability progresses, many small-scale potential vorticity filaments are produced.

The potential vorticity solutions at day 6 are shown in Fig. 8 for the C48, C96, C192, and C384 resolution runs (with Δt=900, 450, 225, and 112.5 s respectively). At C48 resolution the grid imprinting from the cubed sphere is evident. A wave number 4 pattern appears on the jet, dominating the development of the instability. Increasing the resolution to C96, C192, or C384 reduces the impact of the grid imprinting; however, the instability has still developed more than in the reference solution of Galewsky et al. (2004) at T341 resolution. This is consistent with the finite-element cubed sphere model of Thuburn and Cotter (2015), which uses a similar mixed finite-element discretisation to the one used here. In Thuburn and Cotter (2015) it is stated that the grid imprinting may be exaggerated by the highly unstable initial state of this test.

https://gmd.copernicus.org/articles/16/1265/2023/gmd-16-1265-2023-f09

Figure 9The potential vorticity q for the vortices test case. Panel (a) shows the initial conditions, and panel (b) shows the solution after 15 d from a high-resolution C192 simulation.

Download

At the higher resolution many small-scale features are resolved by the model without producing grid-scale noise. This is due to the implicit diffusion from the transport scheme damping grid-scale features. These solutions are comparable to the results shown in Thuburn et al. (2014) and Thuburn and Cotter (2015).

https://gmd.copernicus.org/articles/16/1265/2023/gmd-16-1265-2023-f10

Figure 10The potential vorticity q for the vortices test case after 15 d for the C24 resolution (a) and the C96 resolution (b).

Download

7.4 Vortices test

The final test case is the field of vortices test from Kent et al. (2016). A field of vortices (shown by the potential vorticity in Fig. 9a) is set to evolve over a number of days. The vortices interact, leading to small-scale vorticity filaments and fingers as the vortices are stretched out as well as the merger of vortices. A high-resolution run (using C192 resolution, with potential vorticity shown after 15 d in Fig. 9b) is used as a reference solution.

Figure 10 shows the day 15 potential vorticity for the C24 and C96 runs (with Δt=1800 and 450 s respectively). The C24 run is unable to resolve many of the features of the vortices, but the implicit diffusion from the transport scheme is sufficient to prevent grid-scale noise. For the higher-resolution C96 run, the small-scale features of the potential vorticity are well represented, and the solution matches the reference solution well. This demonstrates the model's ability to represent small-scale features without producing grid-scale noise.

8 Conclusions

This article presents a new shallow-water model on the sphere. The model is comprised of a mixed finite-element spatial discretisation, a high-order finite-volume transport scheme, and an iterated semi-implicit time scheme and makes use of the cubed sphere grid. The finite-element discretisation is chosen as it has been shown to be both accurate and scalable on many processors (Cotter and Shipton2012). The lowest-order finite-element method is used to give second-order spatial accuracy, and the finite-element spaces are such that they are analogous to a C-grid staggering. The semi-implicit time stepping provides stability for the fast gravity waves along with second-order temporal accuracy. The method-of-lines advection scheme, using third-order Runge–Kutta time stepping with a quadratic finite-volume reconstruction, gives high accuracy and conservation for transport.

The model achieves computational efficiency through the use of the mixed finite-element method and the cubed sphere grid. The cubed sphere cells are more uniform in size than the traditional latitude–longitude grid, and so fewer cells are required for the same resolution. For example, a 1× 1-resolution grid requires 360×180=64800 cells on a latitude–longitude grid but only 48 600 cells on a C90 cubed sphere grid (with both grids having 360 cells around the Equator). The cubed sphere grid also removes the pole problem of the latitude–longitude grid and thus is more scalable on massively parallel architecture (Staniforth and Thuburn2012).

The model has been tested on a standard set of shallow-water test cases. The Williamson steady-state test shows that the model converges at second-order accuracy. The mountain test demonstrates the model's ability to capture flow over orography. Grid imprinting from the Galewsky instability test is evident at coarse spatial resolutions but is significantly reduced at higher resolutions, in line with results from other models with similar discretisations and cubed sphere meshes. The vortex field test highlights that the model can resolve small-scale features without producing grid-scale noise. The results presented from this testing are comparable to other models in the literature. This indicates that this model has a similar level of accuracy to these other well-known shallow-water models.

This shallow-water model has been developed alongside the mixed finite-element Cartesian model for atmospheric dynamics of Melvin et al. (2019). The vector-invariant model presented here is a building block towards a mixed finite-element spherical geometry dynamical core for the atmosphere.

Code availability

The shallow-water model code, at LFRic revision r39707, can be found on Zenodo with DOI https://doi.org/10.5281/zenodo.7446738 (Kent et al.2022). This repository includes the configuration files used for the tests in this article and instructions for running the model. In addition, the code at the same revision is also available on GitHub at https://github.com/thomasmelvin/gungho-swe (last access: 15 February 2023).

Data availability

The data can be accessed by running the shallow-water model code using the configurations specified in lfric/miniapps/shallow_water/configurations at https://doi.org/10.5281/zenodo.7446738 (Kent et al.2022).

Author contributions

JK and TM developed the shallow-water code with contributions from GW. JK performed the model simulations. JK and TM prepared the manuscript with contributions from GW.

Competing interests

The contact author has declared that none of the authors has any competing interests.

Disclaimer

Publisher's note: Copernicus Publications remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Acknowledgements

We would like to thank the two reviewers for comments that improved the manuscript. We would also like to thank John Thuburn for providing the semi-implicit semi-Lagrangian comparison model.

Review statement

This paper was edited by James Kelly and reviewed by two anonymous referees.

References

Adams, S., Ford, R., Hambley, M., Hobson, J., Kavčič, I., Maynard, C., Melvin, T., Müller, E., Mullerworth, S., Porter, A., Rezny, M., Shipway, B., and Wong, R.: LFRic: Meeting the challenges of scalability and performance portability in Weather and Climate models, J. Parall. Distr. Com., 132, 383–396, https://doi.org/10.1016/j.jpdc.2019.02.007, 2019. a

Arakawa, A. and Lamb, V. R.: Computational design of the basic dynamical processes of the UCLA general circulation model, Methods Comp. Phys., 17, 174–265, 1977. a

Baldauf, M.: Stability analysis for linear discretisations of the advection equation with Runge-Kutta time integration, J. Comp. Phys., 227, 6638–6659, 2008. a

Bochev, P. B. and Ridzal, D.: Rehabilitation of the lowest-order Raviart-Thomas element on quadrilateral grids, SIAM J. Num. Anal., 47, 487–507, 2010. a

Cotter, C. J. and Shipton, J.: Mixed finite elements for numerical weather prediction, J. Comput. Phys., 231, 7076–7091, 2012. a, b, c

Cotter, C. J. and Thuburn, J.: A finite element exterior calculus framework for the rotating shallow-water equations, J. Comp. Phys., 257, 1506–1526, 2014. a

Galewsky, J., Scott, R. K., and Polvani, L. M.: An initial-value problem for testing numerical models of the global shallow-water equations, Tellus A, 56, 429–440, 2004. a, b

Gottleib, S.: On high order strong stability preserving Runge-Kutta and multi step time discretizations, J. Sci. Comput., 25, 105–128, 2005. a

Kent, J., Jablonowski, C., Thuburn, J., and Wood, N.: An energy-conserving restoration scheme for the shallow-water equations, Q. J. Roy. Meteor. Soc., 142, 1100–1110, https://doi.org/10.1002/qj.2713, 2016. a

Kent, J., Melvin, T., and Wimmer, G.: thomasmelvin/gungho-swe: LFric SWE (v1.1), Zenodo [code], https://doi.org/10.5281/zenodo.7446738, 2022. a, b

Melvin, T., Benacchio, T., Shipway, B., Wood, N., Thuburn, J., and Cotter, C.: A mixed finite-element, finite-volume, semi-implicit discretization for atmospheric dynamics: Cartesian geometry, Q. J. Roy. Meteor. Soc., 145, 2835–2853, https://doi.org/10.1002/qj.3501, 2019. a, b, c, d, e, f, g, h, i, j, k, l, m

Rognes, M. E., Kirby, R. C., and Logg, A.: Efficient assembly of H(div) and H(curl) conforming finite elements, SIAM Journal on Scientific Computing, 31, 4130–4151, 2009. a

Ronchi, C., Iacono, R., and Paolucci, P.: The cubed sphere: A new method for the solution of partial differential equations in spherical geometry, J. Comput. Phys., 124, 93–114, 1996. a

Skamarock, W. and Menchaca, M.: Conservative transport schemes for spherical geodesic grids: High-order reconstructions for forward-in-time schemes, Mon. Weather Rev., 138, 4497–4508, 2010. a

Staniforth, A. and Thuburn, J.: Horizontal grids for global weather prediction and climate models: a review, Q. J. Roy. Meteor. Soc., 138, 1–26, 2012. a, b

Thuburn, J. and Cotter, C. J.: A Primal-Dual Mimetic Finite Element Scheme for the Rotating Shallow Water Equations on Polygonal Spherical Meshes, J. Comput. Phys., 290, 274–297, https://doi.org/10.1016/j.jcp.2015.02.045, 2015. a, b, c, d, e

Thuburn, J., Zerroukat, M., Wood, N., and Staniforth, A.: Coupling a mass-conserving semi-Lagrangian scheme (SLICE) to a semi-implicit discretization of the shallow-water equations: Minimizing the dependence on a reference atmosphere, Q. J. Roy. Meteor. Soc., 136, 146–154, https://doi.org/10.1002/qj.517, 2010. a

Thuburn, J., Cotter, C. J., and Dubos, T.: A mimetic, semi-implicit, forward-in-time, finite volume shallow water model: comparison of hexagonal–icosahedral and cubed-sphere grids, Geosci. Model Dev., 7, 909–929, https://doi.org/10.5194/gmd-7-909-2014, 2014. a, b, c, d, e, f, g, h, i, j, k

Ullrich, P. A.: A global finite-element shallow-water model supporting continuous and discontinuous elements, Geosci. Model Dev., 7, 3017–3035, https://doi.org/10.5194/gmd-7-3017-2014, 2014.  a

Ullrich, P. A., Jablonowski, C., Kent, J., Lauritzen, P. H., Nair, R., Reed, K. A., Zarzycki, C. M., Hall, D. M., Dazlich, D., Heikes, R., Konor, C., Randall, D., Dubos, T., Meurdesoif, Y., Chen, X., Harris, L., Kühnlein, C., Lee, V., Qaddouri, A., Girard, C., Giorgetta, M., Reinert, D., Klemp, J., Park, S.-H., Skamarock, W., Miura, H., Ohno, T., Yoshida, R., Walko, R., Reinecke, A., and Viner, K.: DCMIP2016: a review of non-hydrostatic dynamical core design and intercomparison of participating models, Geosci. Model Dev., 10, 4477–4509, https://doi.org/10.5194/gmd-10-4477-2017, 2017. a

Williamson, D. L., Drake, J. B., Hack, J. J., Jakob, R., and Swarztrauber, P. N.: A standard test set for numerical approximations to the shallow-water equations in spherical geometry, J. Comp. Phys., 102, 211–224, 1992. a, b, c

Wood, N., Staniforth, A., White, A., Allen, T., Diamantakis, M., Gross, M., Melvin, T., Smith, C., Vosper, S., Zerroukat, M., and Thuburn, J.: An inherently mass-conserving semi-implicit semi-Lagrangian discretization of the deep-atmosphere global non-hydrostatic equations, Q. J. Roy. Meteor. Soc., 140, 1505–1520, https://doi.org/10.1002/qj.2235, 2014. a, b, c

Zerroukat, M., Wood, N., Staniforth, A., White, A. A., and Thuburn, J.: An inherently mass-conserving semi-implicit semi-Lagrangian discretisation of the shallow-water equations on the sphere, Q. J. Roy. Meteor. Soc., 135, 1104–1116, https://doi.org/10.1002/qj.458, 2009. a, b

Download
Short summary
This paper introduces the Met Office's new shallow water model. The shallow water model is a building block towards the Met Office's new atmospheric dynamical core. The shallow water model is tested on a number of standard spherical shallow water test cases, including flow over mountains and unstable jets. Results show that the model produces similar results to other shallow water models in the literature.