Energy conserving upwinded compatible finite element schemes for the rotating shallow water equations
Golo Wimmer, Colin Cotter, Werner Bauer

TL;DR
This paper introduces an energy conserving finite element scheme for the rotating shallow water equations that incorporates upwinding for enhanced stability, extending previous Hamiltonian formulations.
Contribution
It develops a novel compatible finite element discretisation that includes upwinding in both velocity and depth fields within an energy conserving Hamiltonian framework.
Findings
Energy conservation validated through coupled time discretisation.
Upwinding improves stability and field development.
New method extends previous energy conserving schemes.
Abstract
We present an energy conserving space discretisation of the rotating shallow water equations using compatible finite elements. It is based on an energy and enstrophy conserving Hamiltonian formulation as described in McRae and Cotter (2014), and extends it to include upwinding in the velocity and depth advection to increase stability. Upwinding for velocity in an energy conserving context was introduced for the incompressible Euler equations in Natale and Cotter (2017), while upwinding in the depth field in a Hamiltonian finite element context is newly described here. The energy conserving property is validated by coupling the spatial discretisation to an energy conserving time discretisation. Further, the discretisation is demonstrated to lead to an improved field development with respect to stability when upwinding in the depth field is included.
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Energy conserving upwinded compatible finite element schemes for the
rotating shallow water equations
Golo Wimmer*, Colin Cotter* and Werner Bauer*
** Imperial College London, **INRIA Rennes
Abstract
We present an energy conserving space discretisation of the rotating shallow water equations using compatible finite elements. It is based on an energy and enstrophy conserving Hamiltonian formulation as described in McRae and Cotter (2014), and extends it to include upwinding in the velocity and depth advection to increase stability. Upwinding for velocity in an energy conserving context was introduced for the incompressible Euler equations in Natale and Cotter (2017), while upwinding in the depth field in a Hamiltonian finite element context is newly described here. The energy conserving property is validated by coupling the spatial discretisation to an energy conserving time discretisation. Further, the discretisation is demonstrated to lead to an improved field development with respect to stability when upwinding in the depth field is included.
1 Introduction
The compatible finite element approach has recently been proposed as a discretisation method for numerical weather prediction [5]. It relies on the use of so-called de Rham complexes of finite element spaces, where one space is mapped to another via differential operators. This leads to desirable stability and convergence properties and, in the context of weather prediction, further allows the use of pseudo-uniform grids on the sphere that avoid the parallel computing issues associated with the latitude-longitude grid. These issues arise due to a relatively fine mesh resolution towards the grid poles, which in turn requires more communication between mesh cells during each time step [7]. Moreover, the compatible finite element method is quite general, allowing for adaptive mesh refinement and higher-order discretisations. For this reason, the Met Office’s next generation dynamical core, that is the atmosphere model’s fluid dynamics component, will be based on a compatible finite element method. Further details on recent results for compatible finite elements in numerical weather prediction can be found in [18].
An integral part of the governing equations used in numerical weather prediction are convection terms, and their discretisation has attracted the interest of many researchers [3]. For finite element methods, the scheme to be used depends on the underlying finite element spaces, requiring the application of different schemes for different fields in the compatible framework. These schemes should be consistent and stable, while avoiding an excessive use of diffusion to achieve the latter. Two classical examples of such schemes are the standard upwind Discontinuous Galerkin method [10] and the streamline upwind Petrov-Galerkin method [2] for discontinuous and continuous Galerkin finite element spaces, respectively. However, for the spaces occurring in the compatible framework in the context of numerical weather prediction, adjusted or mixed versions of the aforementioned methods may be required [18].
Another aspect important for numerical weather prediction, particularly for long-term simulations, is conservation of quantities such as mass and energy. One way to ensure conservation of the latter is to discretise the governing equations within a Hamiltonian framework, where the system’s Hamiltonian represents the total amount of energy. A description of the compressible Euler equations within this framework was first presented in [15] in the setting of magneto-hydrodynamics, and relies on a formulation with a Poisson bracket. This allows for the use of non-canonical (and hence in this case physical) variables [21], and many fluid dynamical equations have been formulated in Poisson bracket form since [13, 14]. Conservation of energy follows easily from this setup via the bracket’s antisymmetry, and will be maintained in any space discretisation that preserves the latter. In the context of numerical weather prediction, the Poisson bracket framework has already been considered e.g. in [20] and [9] for finite difference discretisations. Further, for compatible finite element methods, it has first been considered in [12] for the rotating shallow water equations and by extension for the sphere and hemisphere with boundaries in [11] and [1], respectively.
One way to incorporate both upwinding and energy conservation in a space discretisation is to follow the Poisson bracket framework, adding upwinding terms while ensuring that the bracket’s antisymmetry is maintained. In a compatible finite element setting, this has already been achieved for potential vorticity upwinding for the rotating shallow water equations in [1], while upwinding for the velocity field for the incompressible Euler equations has been introduced in [17], using a geometric approach including Lie derivatives. Further, upwinding for buoyancy has been introduced for the thermal rotating shallow water equations in [6]. For the compressible Euler equations, energy-conserving upwinding schemes for the density and temperature fields remain to be formulated. For simplicity, we will focus on the former and revert to the rotating shallow water equations, replacing density with depth. Hence, in this paper we extend the energy-conserving formulation for the rotating shallow water equations as given in [12] to include upwinding in the depth field , and further incorporate the velocity upwinding scheme of [17]. To do so, we introduce an additional operator to recover the velocity field from the momentum flux arising in the Hamiltonian framework. The resulting discretisation is then tested for energy conservation using an energy-conserving time discretisation as introduced in [4], and further assessed for its qualitative field development in comparison to a version not upwinded in , and a non-energy conserving version including the same type of upwinding.
The rest of the paper is structured as follows: In section 2 we first review the existing, non-upwinded compatible finite element formulation of the rotating shallow water equations, and then describe the incorporation of upwinding. In section 3, we present numerical results. Finally, in section 4 we review our results and discuss ongoing work.
2 Energy conserving formulation for Rotating Shallow Water equations with upwinding terms
In this section, we extend the energy conserving space discretisation for the rotating shallow water equations presented in [12], by introducing an upwind formulation for the depth field, and further using the energy conserving velocity field upwinding as presented for the incompressible Euler equations in [17].
2.1 Hamiltonian formulation
To construct an energy conserving space discretisation for the rotating shallow water equations, we consider a derivation of the equations that contains a direct condition for energy conservation. It is based on the symplectic form of the Hamiltonian structure underlying fluid dynamics, and is given in terms of Poisson brackets [21]. For Hamiltonian , i.e. the system’s total energy, and any functional of the dynamic variables, we have
[TABLE]
for Poisson bracket , which is bilinear and antisymmetric. Its form depends on the choice of dynamic variables, and in the case of the rotating shallow water equations with velocity and depth it is defined by
[TABLE]
where denotes the inner product over the domain in consideration, , and denotes potential vorticity, i.e.
[TABLE]
for Coriolis parameter . The functional derivatives are defined weakly as
[TABLE]
for a suitable space to be defined, and similarly for the variation in . To complete the functional equation (2.1.1) for the rotating shallow water equations, we need to define the Hamiltonian . It is given by
[TABLE]
for gravitational acceleration and bottom profile . In view of the Poisson bracket, we find that the variational derivatives are given by
[TABLE]
The usual form of the equations then follows by choosing and , respectively for arbitrary test functions in , noting that for the former we have , while for the latter . Using these in (2.1.1), we recover the usual form of the rotating shallow water equations, i.e.
[TABLE]
noting that we applied integration by parts for the second bracket term, assuming suitable boundary conditions.
Using this framework, we find that energy conservation follows immediately due to the bracket’s antisymmetry. Setting , we find
[TABLE]
and in particular, any space discretisation whose bracket is still antisymmetric will also satisfy conservation of energy.
2.2 Existing discretised formulation without upwinding terms
An energy conserving space discretisation of the rotating shallow water equations in boundary-free domains was presented in [12]. It is based on the Hamiltonian framework as reviewed above, together with a compatible finite element discretisation. The finite element spaces for the prognostic variables and the diagnostic potential vorticity are given by such that
[TABLE]
that is the differential operators appearing in our equations map one finite element space to another. For this to be well-defined, is chosen to be a finite element subspace of a space for which the divergence operator is well-defined, i.e. . Examples of such finite element spaces and the resulting spaces , required to satisfy (2.2.1) are given in [12]. For our numerical tests below, we consider the second order Brezzi-Douglas-Marini triangular finite element, which requires three point evaluations of the vector field’s normal component at each of the element’s edges, as well as three additional interior moments. Consequently, the potential vorticity finite element space is given by the standard triangular third order Continuous Galerkin space, while the depth space is the first order Discontinuous Galerkin space. In short, .
The discrete bracket is identical to the continuous one (2.1.2) presented above, and complemented with an auxiliary equation for the vorticity (2.1.3), given by
[TABLE]
In the discrete case, the Hamiltonian variations are given by projections into the relevant finite element spaces, i.e.
[TABLE]
where denotes projection into the velocity space , and similar for the depth space . The resulting space-discretised weak form of the rotating shallow water equations thus reads
[TABLE]
Note that the divergence operator maps into , implying that the projection is not explicitly needed for the variation of in .
2.3 Formulation including upwinding terms
The Poisson bracket (2.1.2) leads to a natural energy-conserving space discretisation of the rotating shallow water equations in the sense that the discretised bracket is equal to the non-discretised one. However, the resulting transport schemes may produce spurious small scale features, and their stability can be improved e.g. by incorporating upwinding in , , or . In the following two subsections, we introduce a method to incorporate discontinuous Galerkin upwinding in the depth field while maintaining the bracket’s antisymmetry, and show how to incorporate the energy-conserving upwinding in the velocity field as given in [18].
2.3.1 DG upwinding for
In (2.2.5), the depth field is advected using a discontinuous Galerkin discretisation. To improve stability, it is desirable to include an upwinding term, accounting for the total amount of depth that is flowing from one cell to another in each time step. Given an advection equation such as the depth equation
[TABLE]
the corresponding DG upwind formulation is given by [10]
[TABLE]
where the last integral is over all mesh facets, with jump operator and upwind value defined by
[TABLE]
noting that the two sides of each mesh facet are arbitrarily denoted by + and - (and hence ). If the solution of a given problem is smooth, we find that the facet term in (2.3.1) vanishes as we refine our discretisation’s resolution, showing that the incorporation of upwinding is still consistent.
In the context of the energy-conserving discretisation reviewed above, note that in (2.3.1) the velocity and depth fields , are separated in the facet integral, while they appear implicitly in the flux projection in the discretised equation set (2.2.5). Possible alternative forms of the facet integral including , such as
[TABLE]
are not mass-conserving ((2.3.3)), or can be shown to produce no improvement with respect to stability ((2.3.4)) or unstable fields ((2.3.5)). To incorporate the standard upwinding (2.3.1) in an energy conserving discretisation, we will need to introduce an additional operator to avoid the occurrence of projections due to the discrete Hamiltonian variations. In particular, we introduce an operator to recover our velocity from , arising due to the Hamiltonian variation with respect to . Hence, define implicitly by
[TABLE]
Note that in the continuous sense, corresponds to division of by . Since in our shallow water setting , we find that is well-defined and further that if is any function in of flux form , then
[TABLE]
pointwise.
Using , we are in a position to alter bracket (2.1.2) introducing upwinding terms for , and arrive at a Poisson bracket of form
[TABLE]
noting that we also had to introduce upwinding for the corresponding antisymmetric term of the momentum equation (second term in 2.1.2) to maintain antisymmetry. Further, note that (2.3.9) corresponds to the standard upwinding formulation (2.3.1), provided that (2.3.7) holds.
2.3.2 Upwinding in
It is possible to also apply upwinding in , as done in [1]. Alternatively, we can aim to improve stability for the evolution of the velocity field by considering the momentum equation purely in and , recalling that
[TABLE]
Using this form of , the term in the weak equations (cf (2.2.5)) corresponding to the vorticity part of the bracket reads
[TABLE]
noting that for the purpose of presenting the velocity upwinding scheme, we temporarily ignore the projection in . We can then replace this form by an upwind formulation for , e.g. as introduced in [18]:
[TABLE]
To formulate a Poisson bracket that leads to a set of governing equations with this form of upwinding, we need to use our velocity recovering operator again to avoid projections of form . Note that in terms of functionals and , the formulation of (2.3.11) without and its upwinded extension (2.3.12) read
[TABLE]
We find that this time, since each of the advection bracket terms are by themselves antisymmetric, we have to apply twice in each integral: once for to recover the upwinding velocity , and once for to maintain antisymmetry. Note that as corresponds to division by , we introduce, for the purpose of consistency, an additional depth term wherever is not applied to a velocity space element of flux form . Thus, the above upwinding form (2.3.12) is given in the Hamiltonian variational setting by
[TABLE]
Altogether, the full Poisson bracket including upwinding for depth and velocity advection is hence given by
[TABLE]
Checking for antisymmetry, we find that the terms in line (2.3.17) as well as the Coriolis term are antisymmetric by themselves (due to the perpendicular ), while the first and second terms respectively in (2.3.18) and (2.3.19) form antisymmetric pairs.
In view of the time discretisations to follow and for ease of notation, we rewrite the above bracket as
[TABLE]
with velocity advection operator corresponding to (2.3.17), forcing operator to (2.3.18), and depth advection operator to (2.3.19). The choice of notation for advection is based on the usual notation for the Lie derivative , which in the case of advecting velocity field and advected velocity field is given by
[TABLE]
More specifically, comparing this to (2.3.12), we see that corresponds to the divergence-free part of velocity advection (in the Lie derivative sense, noting that in our case the divergence part is contained in ). Finally, the choice of notation for forcing is simply to resemble , in that the lowered terms indicate acting fields. Note that since does not explicitly contain the velocity field it is acting on, its only explicit argument in this notation is the test function .
Remark 1
Comparing the advection form (2.3.12), which was derived in a non-energy conserving context, with the Poisson bracket based form introduced above, we find
[TABLE]
that is we replaced the advecting velocity by the flux-recovered velocity , while the advected velocity remains unchanged. Further, the test function is replaced by a discrete multiplication and division of by . Similarly, for advection in the advection velocity is now also given by compared to standard DG upwinding (2.3.1):
[TABLE]
3 Numerical results
In the previous section we introduced bracket (2.3.17) - (2.3.19), which is based on the variational scheme (2.2.5) as given in [12] and extends it to include upwinding in the depth and velocity fields. To demonstrate conservation of energy, we additionally use an energy conserving time discretisation, thus expecting energy conservation to machine precision. Before moving on to the test cases, we review the time discretisation as well as the solver scheme for the resulting nonlinear system of equations.
3.1 Energy conserving time discretisation
The time integrator is given by a Poisson integrator, which was introduced in [4] and ensures conservation of higher degree Hamiltonians. This includes the Hamiltonian corresponding to the total energy of the shallow water equations, which is cubic. To use the integrator, we follow [1] and exploit the fact that our Poisson bracket formulation (2.1.1) can be written as a system of form
[TABLE]
for unknown , Hamiltonian and a skew-symmetric transformation determined by the Poisson bracket via the relation
[TABLE]
A Hamiltonian conserving time integrator for a system of ODEs of form (3.1.1) is then given by
[TABLE]
with time-averaged Hamiltonian given by
[TABLE]
and similar for . In our case, we can integrate the time-averaged Hamiltonians and find
[TABLE]
Remark 2
Since is not of a simple flux form anymore, we find that the pointwise relation (2.3.7) for our velocity recovering operator does not hold anymore for this time scheme, and we have to revert to the defining relation of , now given by
[TABLE]
*Note that in accordance with (3.1.3), we choose a midpoint time average for here since in view of the Poisson system (3.1.1), this relation is part of the transformation . For , the above relation (3.1.7) is hence given by
[TABLE]
replacing the pointwise version (2.3.7).
Writing , , and for the solution to (3.1.8), we arrive at a fully discretised set of nonlinear equations of form
[TABLE]
to be solved for , . Note that the Poisson integrator also requires upwinding using , as the upwinded is part of the transformation (cf (2.3.2)).
3.1.1 Nonlinear solver
In this subsection, we briefly describe the scheme used for finding a solution for the nonlinear system of equations (3.1.9) - (3.1.10). We revert to a Picard iteration scheme, starting from the governing equations in a residual formulation:
[TABLE]
for defined as the difference of the left-hand and right-hand sides of (3.1.9) and (3.1.10) respectively. In the iteration scheme, we aim to find the next time value given the old value and the latest guess for the next time value . Using an increment , we find
[TABLE]
and hence
[TABLE]
To treat the right-hand side variational derivative, we first simplify by considering the residual derived from a weak form of the continuous equations (2.1.8) - (2.1.9) instead of , thus avoiding projections introduced in the energy-conserving framework. Further, we revert to a Picard iteration scheme by linearising over a background state given by for reference height . Altogether, we then arrive at a right-hand side of form
[TABLE]
Remark 3
In order to consider the left-hand side of (3.1.13), we need to find a way to treat the velocity recovery operator applied to test functions, i.e. , in the fully discretised momentum equation (3.1.9). Noting that corresponds to a discrete division by , this can be done by using test functions weighted by . That is, to solve for general G\big{(}\mathbb{U}(\bar{D},\mathbf{w})\big{)}, we can find such that
[TABLE]
Then in particular, for any given test function , we have
[TABLE]
where we used (3.1.15) for the first equality and the time-discrete defining relation (3.1.7) of for the second one, noting that here plays the role of in the defining relation, while corresponds to a particular choice of test function .
Finally, the residual can be calculated directly using the discretised equations (3.1.9) and (3.1.10). For the momentum equation, we first find forcing and advection velocities given by
[TABLE]
that is corresponds to the additional velocity induced by forcing, while corresponds to after advection. Next, given that (3.1.18) and (3.1.17) hold, we find that in particular they hold for (as described in remark 3), so that for any , (3.1.9) can be reformulated to
[TABLE]
noting that we used the time-discrete defining relation (3.1.7) of for the flux mass terms (i.e. ) of , and . Similarly, for the residual in we find
[TABLE]
where corresponds to after advection and is solved for analogously to in (3.1.18). Note that and can be seen as a guess for the next iteration value . Further, note that the residual on the left-hand side of (3.1.13) is explicit in that it depends on the known values and only. To increase the scheme’s robustness, we can instead also solve for a more implicit residual system of form
[TABLE]
where we replaced the known advected time-averages by implicit averages
[TABLE]
Further, now also appears in the forcing term via a modified variation , given by
[TABLE]
i.e. we replaced the known by . Note that this implicit setup constitutes a different Picard iteration scheme, which, however, can be shown to converge to the same solution as the more explicit version (3.1.17) - (3.1.18). For the test cases used below, we will use this form for the higher resolution Galewsky test case.
This completes the fully energy-conserving scheme, with numerical test results presented in subsection 3.3. The calculations are performed using the automated finite element toolkit Firedrake111see http://firedrakeproject.org [19], using a hybridised solver to solve for the updates .
Remark 4
A simpler time discretisation, albeit non-energy conserving, would be to use a midpoint rule for both and . If we further time-discretise the Hamiltonian variation in as and the velocity recovery operator as before ((3.1.7)), we find that the pointwise relation (2.3.7) holds again. The resulting left-hand side equations to be solved then read
[TABLE]
In particular, we find that in this case only one projection, i.e. , occurs. Since it is a projection into the discontinuous Galerkin space , the additional cost of calculating it in each Picard iteration is low. In contrast, for no upwinding in (as described in (3.2.1) below), this time discretisation leads to an additional Hamiltonian variation in rather than (appearing in the depth advection term), leading to a higher increase in computational cost as the underlying velocity space is not a DG space (i.e. contains nodes on cell boundaries, leading to a non-block diagonal matrix).
3.2 Comparison to other discretisations
To test the newly introduced upwinding in for the energy conservation as well as the qualitative field development, we compare our upwinded formulation (2.3.20), with one that includes upwinding in only, and one that does not conserve energy. The former is given by a Poisson bracket with velocity terms equal to (2.3.17), but velocity forcing and depth advection terms of non-upwinded form, i.e.
[TABLE]
As a non-energy conserving discretisation, we use standard DG upwinding for the depth field , velocity upwinding of form (2.3.12), and forcing equal to
[TABLE]
Note that in order to apply the same time discretisation to the non-energy conserving spatial discretisation, we need to rewrite the latter in terms of Hamiltonian variations and a bracket. It is given by
[TABLE]
and we find that as opposed to the energy-conserving upwinded version, the velocity advection operator is not antisymmetric in itself, and the depth advection and velocity forcing are not antisymmetric to each other.
3.3 Test cases
Having described the full discretisation as well as two other reference spatial discretisations, we proceed to our set of numerical tests. First, we consider a wave in a periodic unit square mesh as given in [12]. Being more of an artificial test case, it serves as a proof of concept for introducing upwinding in the velocity field , and thus in extension for the density field in the context of the compressible Euler equations. Since we do not test for energy-conservation yet, we only consider the two energy-conserving versions, with and without upwinding in . The initial conditions are given by
[TABLE]
with . The domain is divided into squares, each of which in turn is divided into two triangles. The resulting fields for and 1000 time steps, with 4 Picard iterations for each time step, are depicted in figure 1.
We find that the upwinding in not only significantly reduces small scale perturbations in the depth field, but also in the velocity field. Next, we consider more realistic spherical test cases. Since the depth field development in these cases is generally smoother than in the periodic unit square case, we anticipate the qualitative difference between the upwinded and non-upwinded versions to be small. Thus, the main purpose of these tests is to demonstrate an improved energy conservation as well as a qualitative field behaviour close to the projection-free non-energy conserving version.
To validate the new upwinded scheme’s energy conservation as well as consistency, we use the second of the standard Williamson spherical test cases given in [22], which describes a steady state scenario. Additionally, to compare the schemes with respect to their energy conservation properties as well as field development, we use the fifth test of the aforementioned test series, corresponding to flow past a mountain, as well as the Galewsky barotropic instability test case as described in [8]. In the Williamson 2 test case, the initial conditions are given by
[TABLE]
for a sphere of radius m, with rotation rate s*-1* (noting that ), and gravitational acceleration ms*-2*. The mean height and wind speed are given by m and m/day. The simulation is run for 50 days, with a time step of s, and 4 Picard iterations for each time step. The mesh is given by an icosahedral triangulation, where refinement level 0 corresponds to 20 triangles. For every higher level, each triangle is refined to 4 triangles (so that each increase corresponds to halving the cell side length ). The resulting relative energy error development, as well as the L2 depth field error, averaged over the last 1000 time steps and for different refinement levels, are depicted in figure 2.
As expected, we find that energy is conserved up to machine precision throughout the simulation, with the initial increase likely due to the simplified variational derivative of the residual . Further, the L2 depth field error convergence as we refine the mesh also matches the expected second order rate (the same holding true for the velocity field).
Next, we consider the fifth Williamson test, corresponding to unsteady flow over a mountain. The initial conditions are given by
[TABLE]
where describes the mountain’s surface, for , mountain height m and such that . and denote longitude and latitude respectively, and the mountain’s centre is chosen as and . The mean height and wind speed are given by m and m/s. The simulation is run for 25 days, with a time step of s. Since this test involves an unsteady nonlinear field evolution, we increase the number of Picard iterations to 8 for each time step in order to keep the relative energy error contribution of the nonlinear solver small. The resulting relative energy errors and potential vorticity fields for the energy conserving setup with and without upwinding as well as the non-energy conserving setup are given in figures 3 and 4.
Again, as expected the energy conserving formulations conserve energy up to a good degree, with a relative energy error of the order of , four orders of magnitude smaller than the relative energy error for the non-energy conserving setup. Additionally, we find a practically identical field development for all three setups, indicating that the new method for upwinding in in a Poisson bracket framework also behaves as expected in a spherical domain.
Remark 5
For 4 Picard iterations, the relative energy error for the energy conserving setups increases to the order of , while remaining at the order of for the non-energy conserving space discretisation. In fact, at this stage the error originating from the nonlinear solver surpasses the decrease in error due to the energy-conserving time discretisation. We find that the midpoint rule time discretisation given in remark 4, together with 4 Picard iterations, still yields relative energy errors of the order of and for the energy-conserving and non-energy conserving spatial discretisations, respectively. This demonstrates that the energy conserving spatial discretisations still lead to a significant improvement even for lower Picard iteration numbers and non-energy conserving time discretisations.
Finally, we consider the Galewsky test case, simulating a barotropic instability. The initial conditions are given by a zonal flow confined within latitudes and , and a background depth field in balance with , perturbed by a localised bump . The zonal flow is given by
[TABLE]
for m/s, and normalising constant e_{n}=\text{exp}\big{(}-4/(\theta_{1}-\theta_{0})^{2}\big{)}. To reach a steady state depth field, we integrate the continuity equation (in spherical form), leading to a field of form
[TABLE]
where is chosen such that the global mean height is equal to 10km. Finally, the perturbation is given by
[TABLE]
for m , , and (such that the perturbation is located directly in the zonal flow). The simulation is run for 6 days at mesh refinement level 6, with a time step of s, and 8 Picard iterations for each time step. The resulting relative energy errors as well as vorticity fields for the three setups are depicted in figures 5 and 6.
We find a similar behaviour to the Williamson 5 test case. With respect to the relative energy error, the two energy conserving setups outperform the non-energy conserving space discretisation by 6 orders of magnitude. Again, the field development is virtually the same for all setups.
Remark 6
Next to energy, the non-upwinded space discretisation (2.2.5) also conserves enstrophy. However, a controlled dissipation of enstrophy may be desirable, since the enstrophy cascades to small scales, eventually accumulating at the grid scale. This effect was countered in [1] by including an SUPG scheme for the potential vorticity, which implies enstrophy dissipation for a sufficiently large SUPG parameter . In our case, the upwinding in the velocity field also dissipates enstrophy, with little difference in the dissipation rate whether or not upwinding in is also included in the discretisation (see image 7). More details on the dissipation of enstrophy depending on the choice of upwinding can be found in [16].
4 Conclusion
In this paper, we introduced an energy conserving space discretisation for the rotating shallow water equations that includes upwinding in the depth and velocity fields. It is formulated using the compatible finite element method, and relies on a Hamiltonian framework with Poisson brackets to achieve energy conservation. The bracket is based on one without upwinding, which is described in [12], and uses upwinding for the velocity field as formulated for the incompressible Euler equations in [17]. Upwinding for the depth field in this context has been newly introduced here, and relies on the introduction of an additional operator to recover the velocity field from the Hamiltonian variation corresponding to the momentum flux. In our numerical tests, we confirmed the scheme’s energy conservation property, with a relative energy error close to machine precision when coupled with an energy conserving time discretisation. In the spherical test cases, we showed that the fully upwinded energy conserving scheme behaves as expected for spherical domains, leading to a field development virtually identical to that of a corresponding non-energy conserving upwinded reference scheme, despite the additional projections that are required to achieve energy conservation. Further, as demonstrated in the unit square test case, in the presence of large depth field gradients, the newly introduced upwinding in the depth field improves the field development compared to when upwinding is only applied for velocity, reducing small scale oscillations both in the depth and velocity fields.
The introduction of upwinding in the depth field was motivated by the development of a fully upwinded energy conserving space discretisation for the compressible Euler equations. In ongoing work, we aim to extend the Hamiltonian formulation presented here to the latter set of equations, incorporating upwinding for density as presented for the depth field in this paper, and additionally an SUPG formulation for the potential temperature field. While typical spherical shallow water scenarios feature a relatively small gradient in the depth field, the Euler equations often exhibit much stronger such gradients, therefore benefiting significantly from upwinding in the density field.
The reference list from the paper itself. Each links out to its DOI / PubMed record.
- 1[1] W. Bauer and C.J. Cotter. Energy–enstrophy conserving compatible finite element schemes for the rotating shallow water equations with slip boundary conditions. Journal of Computational Physics , 373:171 – 187, 2018.
- 2[2] A.N. Brooks and T.J.R. Hughes. Streamline upwind/Petrov-Galerkin formulations for convection dominated flows with particular emphasis on the incompressible Navier-Stokes equations. Computer methods in applied mechanics and engineering , 32(1-3):199–259, 1982.
- 3[3] B. Cockburn, G.E. Karniadakis, and C.W. Shu. The development of discontinuous Galerkin methods. In Discontinuous Galerkin Methods , pages 3–50. Springer, 2000.
- 4[4] D. Cohen and E. Hairer. Linear energy-preserving integrators for Poisson systems. BIT Numerical Mathematics , 51(1):91–101, 2011.
- 5[5] C.J. Cotter and J. Shipton. Mixed finite elements for numerical weather prediction. Journal of Computational Physics , 231(21):7076 – 7091, 2012.
- 6[6] C. Eldred, T. Dubos, and E. Kritsikis. A quasi-Hamiltonian discretization of the thermal shallow water equations. Journal of Computational Physics , 379:1 – 31, 2019.
- 7[7] R. Ford, M.J. Glover, D.A. Ham, C.M. Maynard, S.M. Pickles, G. Riley, and N. Wood. Gung Ho: A code design for weather and climate prediction on exascale machines. In Proceedings of the Exascale Applications and Software Conference , 2013.
- 8[8] J. Galewsky, R.K. Scott, and L.M. Polvani. An initial-value problem for testing numerical models of the global shallow-water equations. Tellus A: Dynamic Meteorology and Oceanography , 56(5):429–440, 2004.
