OCTOBER 2013 J I A E T A L . 3435
A Spectral Deferred Correction Method Applied to the Shallow Water Equations on a Sphere
JUN JIA,JUDITH C. HILL,KATHERINE J. EVANS, AND GEORGE I. FANN Oak Ridge National Laboratory, Oak Ridge, Tennessee
MARK A. TAYLOR Sandia National Laboratories, Albuquerque, New Mexico
(Manuscript received 13 February 2012, in final form 7 December 2012)
ABSTRACT
Although significant gains have been made in achieving high-order spatial accuracy in global climate modeling, less attention has been given to the impact imposed by low-order temporal discretizations. For long-time simulations, the error accumulation can be significant, indicating a need for higher-order temporal accuracy. A spectral deferred correction (SDC) method is demonstrated of even order, with second- to eighth-order accuracy and A-stability for the temporal discretization of the shallow water equations within the spectral-element High-Order Methods Modeling Environment (HOMME). Because this method is stable and of high order, larger time-step sizes can be taken while still yielding accurate long-time simulations. The spectral deferred correction method has been tested on a suite of popular benchmark problems for the shallow water equations, and when compared to the explicit leapfrog, five-stage Runge–Kutta, and fully implicit (FI) second-order backward differentiation formula (BDF2) time-integration methods, it achieves higher accuracy for the same or larger time-step sizes. One of the benchmark problems, the linear advection of a Gaussian bell height anomaly, is extended to run for longer time periods to mimic climate-length simula- tions, and the leapfrog integration method exhibited visible degradation for climate length simulations whereas the second-order and higher methods did not. When integrated with higher-order SDC methods, a suite of shallow water test problems is able to replicate the test with better accuracy.
1. Introduction (ii) near-term future climate scenarios (within the next 100 yr) with varied settings to evaluate a model’s Accurate simulation over long time periods is nec- response to external and internal forcings, essary for the investigation of global-scale climate dy- (iii) paleoclimate simulations that model the earth’s namics because the impacts and societal implications are climate during much earlier periods including pre- great. These simulations require the resolution of atmo- vious geological times, and, more recently, spheric features with time scales covering multiple orders (iv) investigations of subglobal atmospheric features of magnitude. For example, variations in the strength of that require high spatial resolutions to resolve local synoptic-scale weather features and tropical cyclones oc- phenomena, such as tropical cyclones. cur within a day; however, global climate change, under which these features could be affected, occurs over decades. Present versions of the dynamical component (dycore) Currently, global climate models are used to perform of these models rely on explicit and semi-implicit a variety of experiments, but most fall into the following stability-limited lower-order (second or lower) time- categories: integration schemes so that the time-step size depends (i) comparison of simulated present-day climate (ap- on the spatial resolution (Neale et al. 2010). Operation- proximately spanning the range of years 1970–2011) ally, the largest stable time-step size is taken to minimize with observations, the time to solution, without considerable attention being paid to the temporal accuracy. Corresponding author address: Jun Jia, Oak Ridge National Recent experiments investigating the present-day re- Laboratory, 1 Bethel Valley Rd., MS 6367, Oak Ridge, TN 37831. cord and near-term future climate (categories i and ii E-mail: [email protected] above) generally use 28 to 18 resolutions, which correspond
DOI: 10.1175/MWR-D-12-00048.1
Ó 2013 American Meteorological Society Unauthenticated | Downloaded 10/04/21 10:16 AM UTC 3436 MONTHLY WEATHER REVIEW VOLUME 141 to a maximum time-step size of approximately 20– 10 min on relatively even grids (e.g., Collins et al. 2004), respectively. Future scenario simulations run for a lon- ger time and generally use a 28 or use a 18 horizontal resolution as well. In contrast, climate science numerical experiments that fall into categories iii and iv are con- figured differently to produce relevant data. The paleo- climate simulations of category iii typically use coarse 3.758 grids and thus use a larger 30-min time step. How- ever, the simulations extend 80001 yr in length (e.g., Liu et al. 2009; Winguth et al. 2010), corresponding to about 108 time steps. Alternatively, present-day simula- tions in category iv are configured for regional and shorter-term climate features, and so they cover only several decades (McClean et al. 2011). Because fine- scale resolutions of about 1/38 to 1/48 horizontal reso- lution are stability limited and use 150 s and smaller time-step sizes to integrate the dynamical variables, a total of at least 6 3 106 times steps are needed for high-resolution simulations to remain stable. The need for more accurate temporal discretizations has recently been receiving attention. The continuous Galerkin version of the High-Order Methods Modeling Environment (HOMME) model, which has become the default dynamical core option within the recently re- leased Community Atmosphere Model (CAM), version 5.2 (Neale et al. 2010), uses a second-order five-stage Runge–Kutta (RK2) method. However, the size of the time step is still stability limited. A fully implicit (FI) second-order backward differentiation formula (BDF2) method has been implemented (Evans et al. 2010) into the shallow water version of the HOMME spectral FIG. 1. A Gaussian bell height anomaly at (top) the initial time, element model. The FI option in HOMME uses the (middle) 36 days, and (bottom) 9612 days is advected around second-order BDF2 discretization of the Jacobian-free the earth using a prescribed zonal velocity and the leapfrog- Newton–Krylov (JFNK) method to generate solutions discretization method. In this plot, 48 elements along a cube edge to the available benchmark suite of shallow water test were used, with degree 3 (np 5 4) polynomials within each element cases of Williamson et al. (1992) for a range of time steps for the spatial discretization. The time discretization was the op- erational explicit leapfrog with a 180-s time step. above the stability limits that restrict the existing explicit and semi-implicit time integration schemes. Efficiency is yet to be achieved, but will be improved once pre- 10 000 time steps, the second-order-filtered explicit conditioning methods have been developed for these leapfrog method retains only two significant digits. For schemes; a discussion of this is provided at the end of the 10 000 simulation days, or about 3.5 million time steps, methods section. there are no longer any significant digits of accuracy, Larger time steps reduce the temporal-error accu- with an L2 error of 0.65, as shown inÐ Fig. 1, where the L2 mulation due to numerical round-off errors during the norm of a function f is defined as ( f 2)1/2. course of a computer simulation for long-time events; By implementing an implicit spectral-in-time spectral otherwise, the solution will lose precision as simulations deferred correction (SDC) method of even order, from proceed, even with high-order spatial approximations. second to eighth order, for the two-dimensional shallow To illustrate this, a basic test problem from Williamson water equations in HOMME, we demonstrate below et al. (1992), the linear advection of a Gaussian bell height that high-order time-stepping methods improve the long anomaly, is extended to cover a longer time period to time accuracy of the shallow water test cases presented. correspond to climate rather than weather time scales. The accuracy maintained even when taking the large In as little as 1 month of simulation time, which is about time steps permitted by SDC for modeling climate
Unauthenticated | Downloaded 10/04/21 10:16 AM UTC OCTOBER 2013 J I A E T A L . 3437
FIG. 2. An illustration of the horizontal discretization in the HOMME dycore adapted from Taylor et al. (2008). Each cube face, which is mapped to the sphere, is subdivided into a user- specified number of square elements (from which the arrow originates). Within each element, GLL quadrature points are specified.
dynamics is advantageous because the temporal error a. Shallow water formulation in the HOMME model accumulation is reduced for long-time simulations com- Global atmospheric modelers typically implement pared to the temporal discretizations currently used in and test novel solution schemes with the two-dimensional practice. shallow water equations because they are simpler than The SDC method, which was originally introduced by the full atmospheric model, yet still retain many of the Dutt et al. (2000), constructs an arbitrarily high-order important physical scales and interactions (e.g., Lin and time-integration method based on a chosen low-order Rood 1997; Bonaventura and Ringler 2005). The two- method, such as the first-order forward Euler method. dimensional shallow water equations in HOMME are It combines the ideas of iterative deferred correction constructed in vector invariant form, (Zadunaisky 1966; Pereyna 1968), the Picard integral equation, and spectral integration. Recently, an arbitrary › high-order SDC method has been applied successfully to v 52 z 1 3 2 $ 1 1 › ( f )k v v v gH the solution of the Euler equations, the gas-dynamics t 2 equations, and the Navier–Stokes equations (Minion ›z 52$ (zv), (1) 2004; Layton and Minion 2004; Jia and Liu 2011). ›t This paper is organized as follows. A brief overview of the shallow water equation dycore and the SDC method with some initial conditions, where v 5 (u, y)T is the two- as implemented in HOMME is summarized in section 2. dimensional velocity vector. The vorticity, gradient, and The results from a temporal error analysis of a suite of divergence operators are given by z, $,and$ ,re- benchmark shallow water test cases in HOMME using spectively. The unit vector k is the normal vector to the the SDC method are presented in section 3 and we x–y plane. The geopotential height of the fluid is gH, discuss these numerical results and their implications in where g is gravity and H 5 z 1 zs,wherez is the thick- section 4. ness of the fluid above the bottom topography zs.The Coriolis parameter is f 5 2V sinu,whereV is the angular rate of rotation and u is the latitude. 2. Methodology The spherical surfaces in the HOMME dycore are In this section, we introduce the shallow water for- divided by inscribing a cube within the sphere and using mulation and underlying discretization scheme used in an equal-angular gnomonic projection to map the cube HOMME. Then, we briefly discuss the mathematical to the sphere (Rancic et al. 1996). Each cube face is underpinnings of the SDC method and provide a brief further subdivided into a user-specified number of analysis of the computational cost incurred by this higher- quadrilateral elements. Refer to the left side of Fig. 2 for order method. an illustration. Each element is represented with a nodal
Unauthenticated | Downloaded 10/04/21 10:16 AM UTC 3438 MONTHLY WEATHER REVIEW VOLUME 141 basis using a tensor product of Gauss–Lobatto–Legendre (GLL) quadrature points [see earlier development ci- tations, e.g., Nair et al. (2009), for a fuller explanation of this discretization]. This layout allows for spatial re- finement through the variation in element count along a cube edge ne and the spectral order within an element np, each of which has benefits and downsides (Taylor FIG. 3. An illustration of SDC. One single time step (t , t 1 ) et al. 1997). To illustrate this discretization, an example n n 1 is subdivided into subintervals by p ( p 5 3inthisfigure)grid with 8 elements per cube face edge (ne 5 8) and fourth points, tm. For an approximate solution (represented by the filled spectral order (np 5 4) is given in Fig. 2. The horizontal dots), an error equation is formed based on the interpolating poly- layout of HOMME is referred to as an unstructured grid nomial (represented by the curve). An estimated error (represented with a ‘‘cube–sphere’’ layout, so the difference in ele- by the difference between the filled dots and hollow ones at the same time grids t ) is then computed by a low-order method. A new– ment size is minimal, as shown by the color bar in Fig. 2. m improved approximate solution (hollow dots) is thus obtained and Conversely, the intra-element edge spatial layout be- this procedure is repeated. comes highly irregular with increasing spectral order due to the location of the nodal basis points, so stability- A schematic demonstration is shown in Fig. 3. For more limited time-integration methods can be severely re- detail about SDC, please refer to Dutt et al. (2000) and stricted. Descriptions of the discretization details for Huang et al. (2006), and the references therein. the spectral element (SE) method in HOMME as well as The resulting spectral deferred correction implicit other attributes of the scheme, including the local con- time-integration method is A-stable and L-stable (Dutt servation of mass and moist total energy, are outlined et al. 2000; Huang et al. 2006), with a larger region of in detail in Evans et al. (2013) and other articles cited convergence when compared with other higher-order within. The efficiency of the SE method is maximized by methods. Presently, the backward Euler (BE) method is distributing the elements on supercomputing platforms chosen to be the low-order solver for constructing an and by taking advantage of the regular structure of the implicit SDC. The BE method is implicit and robust for cube–sphere grid and the diagonal mass matrix. As a large time steps applied to stiff problems and also has result, the spectral element method within CAM has low storage requirements. Explicit forward Euler time shown scalability and improved efficiency at more than stepping may also be used to develop an explicit SDC 100 000 cores (Dennis et al. 2012; Worley et al. 2011) when scheme for nonstiff problems. Presently, we demon- solving the full primitive hydrostatic equations. strate the accuracy of the SDC using the A-stable im- b. The spectral deferred correction method plicit formulation since the stiffness is not known a priori in a production environment, especially as the The flexibility in the spatial distribution of points method is extended to more complex and complete around the sphere can be fully realized with equally fluid equations. flexible time-discretization options. The SDC method is a variable-order temporal discretization scheme that 1) THE MODIFIED PICARD INTEGRAL EQUATION converts a discretized time-dependent ordinary differ- AND THE ERROR EQUATION ential equation or a partial differential equation such Without loss of generality, we rewrite the shal- as (1) to a corresponding Picard integral equation. The low water equations (1) in terms of the solution vector time step is subdivided, and an error equation is initially u 5 (u, y, z)T. The right-hand side of (1) can be then approximated on each substep using Gauss–Legendre denoted as G(u), and the equation becomes quadrature points. In essence, an interpolating poly- nomial based on the quadrature points is used to ap- ›u 5 G(u). (2) proximate the solution in time, similar to the SE method ›t in space; the Gauss–Legendre quadrature points are u 5 now exactly the collocation points on the time axis. A We also assume an initial value 0 is given at time t 0. recursive sequence of error equations of the same form Following Huang et al. (2007), to apply the SDC is derived for each application of a solution method. For method, the first step is to derive the error equation efficiency, the error equation can be solved approxi- equivalent to (2) in Picard integral form. Defining mately using a low-order method, which can then be c 5 ›u/›t, we have used to iteratively correct the solution to higher accu- ð t racy. Each error correction improves the accuracy and u 5 u 1 c 0 dt. (3) the precision of the initially approximated solution. 0
Unauthenticated | Downloaded 10/04/21 10:16 AM UTC OCTOBER 2013 J I A E T A L . 3439
c 5 t u(0) c(0) Rewriting (2) in terms of , we obtain a Picard integral Letting m ( m)[ m and m , respectively], the back- type equation for c ward Euler discretization of (8) is ð t « 5 u(0) 1 2 c(0) c 5 u 1 c G[ m S«(m)] m , (9) G 0 dt . (4) m 0 5 m « t 2 t where S«(m) åj51 j( j j21) is the right Riemann Suppose that an approximate solution c(0) to (2) is given 1 sum approximating the integral of « from 0 to tm. c(0) in terms of as Denoting the ‘‘low order’’ approximation of e(t)by ð (0) t « 5 («1, «2, ..., «p), a refined solution is given by u(0) 5 u 1 c(0) c(1) 5 c(0) 1 e(0) 0 dt. (5) and the order of accuracy of the ap- 0 proximate solution increases by one, which is the order of the underlying Euler methods. The SDC method it- Let « denote the error: erates until the error or correction « is smaller than « 5 c 2 c(0) . (6) a prescribed tolerance. u(0) To complete the discretization, the terms m are (0) c(0) t Assuming no error at time zero, substituting c 5 c 1 « computed with m on the p quadrature points m using into (4) and recognizing that (5) yields the modified Picard spectral integration. To define the spectral integration, integral equation for the error produces we form an interpolating polynomial by the values of c(0) ð : t (0) (0) c 1 « 5 G u 1 « dt . (7) p 0 p c(0) 5 c(0) å L [ , t] m cm(t), m51 The error equation (7) is equivalent to (2), and solving this error equation is not any easier than solving the where original one. However, this form gives us an opportunity to improve the approximate solution iteratively until « t 2 t c t 5 k m( ) P t 2 t . reaches a desired tolerance. k6¼m m k 2) EULER’S METHODS USING GAUSSIAN QUADRATURE NODES The spectral integration is a linear map from the func- tion values c(0) to u(0), the values of the integral of Given (2) in the form of (7), we present the SDC Lp[c(0), t] at those p points, so (5) becomes framework for one time-step interval (tn, tn11). The SDC ðt # t , m method divides (tn, tn11) into subintervals tn 1 u(0) 5 u 1 p c(0) t , ... , t # t ... t m 0 L [ , t] dt 2 p tn11 by p grid points 1, , p.An t c(0) t 5 n approximate solution for ( m) is computed for m ð t 2 2 p ( t )/(t 1 t ) 1, ..., p basedonanorder-j method A (where A could be 5 u 1 2 å c(0) m n n 1 n 0 (tn11 tn) m cm(t) dt. backward Euler, Runge–Kutta, etc.). Once we have an m51 0 initial approximate solution c(0), iteratively a sequence of t l solutions to the correction equation (7) at m is solved by This map can be represented by the so-called spectral an order-k method B, improving the approximate solu- integration matrix. Denoting the p 3 p spectral inte- t tion. We approximate the integral in (5) using the m as gration matrix by S , (3) in matrix form is quadrature points. Therefore, the temporal order of ac- curacy is min(O , j 1 lk), where O is the accuracy of the u(0) 5 u 1 2 Sc(0) p p 0 (tn11 tn) , (10) quadrature (Huang et al. 2006; Hagstrom and Zhou 2006). The SDC framework is general; it leaves the choice u u where 0 is 0 replicated into p dimensions. In this case, of the methods A and B and the quadrature to the user. S is dense and can be precomputed once the quadrature The temporal dependence is explicitly used for each points are chosen. of the functions in the time discretization. For con- Each backward Euler step on the quadrature nodes, t 5 venience, defining 0 tn, the initial condition gives given by (9), is solved to obtain «m11 using the nonlinear «(t0) 5 0. At grid point tm, we use (7) to obtain