COMPARISON OF FINITE DIFFERENCE- AND PSEUDOSPECTRAL METHODS FOR CONVECTIVE FLOW OVER A SPHERE

Similar documents
SOLVING HYPERBOLIC PARTIAL DIFFERENTIAL EQUATIONS IN SPHERICAL GEOMETRY WITH RADIAL BASIS FUNCTIONS

A Fast Spherical Filter with Uniform Resolution

The Hamiltonian Particle-Mesh Method for the Spherical Shallow Water Equations

Atmospheric Dynamics with Polyharmonic Spline RBFs

Fourier Spectral Computing for PDEs on the Sphere

Comparison between Wavenumber Truncation and Horizontal Diffusion Methods in Spectral Models

Development of Yin-Yang Grid Global Model Using a New Dynamical Core ASUCA.

Acceleration of Time Integration

The spectral transform method

Physics 342 Lecture 23. Radial Separation. Lecture 23. Physics 342 Quantum Mechanics I

Transport Schemes on a Sphere Using Radial Basis Functions

Newton-Krylov-Schwarz Method for a Spherical Shallow Water Model

MODEL TYPE (Adapted from COMET online NWP modules) 1. Introduction

GEOMETRICAL TOOLS FOR PDES ON A SURFACE WITH ROTATING SHALLOW WATER EQUATIONS ON A SPHERE

Spectral transforms. Contents. ARPEGE-Climat Version 5.1. September Introduction 2

On simplifying incremental remap -based transport schemes

Challenges and Opportunities in Modeling of the Global Atmosphere

On choosing a radial basis function and a shape parameter when solving a convective PDE on a sphere

Fast Direct Solver for Poisson Equation in a 2D Elliptical Domain

A RADIAL BASIS FUNCTION METHOD FOR THE SHALLOW WATER EQUATIONS ON A SPHERE

Journal of Computational Physics 161, (2000) doi: /jcph , available online at

c 1999 Society for Industrial and Applied Mathematics

Transport Schemes on a Sphere Using Radial Basis Functions

Physics 6303 Lecture 11 September 24, LAST TIME: Cylindrical coordinates, spherical coordinates, and Legendre s equation

Overview of the Numerics of the ECMWF. Atmospheric Forecast Model

A spectral finite volume transport scheme on the cubed-sphere

Spherical Harmonics and Related Topics. David Randall 2 S = 0, r 2 r r S 2. S = r n Y n

A Second-order Finite Difference Scheme For The Wave Equation on a Reduced Polar Grid DRAFT

Anouncements. Assignment 3 has been posted!

Application of the Yin-Yang grid to a thermal convection of a. Boussinesq fluid with infinite Prandtl number in a threedimensional

Scaling the Universe via a Transit of Venus

Scientific Computing: An Introductory Survey

Lecture 2: Reconstruction and decomposition of vector fields on the sphere with applications

2.3. Quantitative Properties of Finite Difference Schemes. Reading: Tannehill et al. Sections and

Numerical simulation of the Gailitis dynamo David Moss 1 School of Mathematics University of Manchester Oxford Rd Manchester M13 9PL UK

Does the Surface Pressure Equal the Weight per Unit Area of a Hydrostatic Atmosphere?

Attractor of a Shallow Water Equations Model

Physics 6303 Lecture 22 November 7, There are numerous methods of calculating these residues, and I list them below. lim

A Global Atmospheric Model. Joe Tribbia NCAR Turbulence Summer School July 2008

The Spectral Method (MAPH 40260)

On an Eigenvalue Problem Involving Legendre Functions by Nicholas J. Rose North Carolina State University

Contents. Preface to the Third Edition (2007) Preface to the Second Edition (1992) Preface to the First Edition (1985) License and Legal Information

Development of high vorticity structures in incompressible 3D Euler equations.

Recent Developments in Numerical Methods for 4d-Var

A Discontinuous Galerkin Global Shallow Water Model

Mountain Torques Caused by Normal-Mode Global Rossby Waves, and the Impact on Atmospheric Angular Momentum

1. Introduction. A radial basis function (RBF) interpolant of multivariate data (x k, y k ), k = 1, 2,..., n takes the form

Stability Ordinates of Adams Predictor-Corrector Methods

APPLIED PARTIM DIFFERENTIAL EQUATIONS with Fourier Series and Boundary Value Problems

4 Power Series Solutions: Frobenius Method

13 Spherical geometry

Westward drift in secular variation of the main geomagnetic field inferred from IGRF

A Simple Compact Fourth-Order Poisson Solver on Polar Geometry

Index. C 2 ( ), 447 C k [a,b], 37 C0 ( ), 618 ( ), 447 CD 2 CN 2

Analogues for Bessel Functions of the Christoffel-Darboux Identity

Evaluation of Chebyshev pseudospectral methods for third order differential equations

Seismic modeling with radial basis function-generated finite differences (RBF-FD)

Physics 221A Fall 1996 Notes 14 Coupling of Angular Momenta

Simulation Study on the Generation and Distortion Process of the Geomagnetic Field in Earth-like Conditions

Section 5.2 Series Solution Near Ordinary Point

Chapter 5 HIGH ACCURACY CUBIC SPLINE APPROXIMATION FOR TWO DIMENSIONAL QUASI-LINEAR ELLIPTIC BOUNDARY VALUE PROBLEMS

Solutions to Laplace s Equations- II

(ii) Observational Geomagnetism. Lecture 5: Spherical harmonic field models

Advanced. Engineering Mathematics

Laplace s Equation on a Sphere

Math Methods for Polymer Physics Lecture 1: Series Representations of Functions

Outline. The Spectral Method (MAPH 40260) Part 4: Barotropic Vorticity Equation. Outline. Background. Rossby-Haurwitz Waves.

NUMERICAL SIMULATION OF THE TAYLOR-GREEN VORTEX

MATHEMATICAL METHODS INTERPOLATION

An Overly Simplified and Brief Review of Differential Equation Solution Methods. 1. Some Common Exact Solution Methods for Differential Equations

AICS TECHNICAL REPORT

Approximate Solutions of the Grad-Schlüter-Shafranov Equation

Symmetry methods in dynamic meteorology

Finite Differences for Differential Equations 28 PART II. Finite Difference Methods for Differential Equations

Using Radial Basis Functions to Interpolate Along Single-Null Characteristics

A Proposed Test Suite for Atmospheric Model Dynamical Cores

Optimized Schwarz Methods with the Yin-Yang Grid for Shallow Water Equations

Linear advection characteristics of a variable resolution global spectral method on the sphere

Fluid Dynamics: Theory, Computation, and Numerical Simulation Second Edition

ASSESMENT OF THE SEVERE WEATHER ENVIROMENT IN NORTH AMERICA SIMULATED BY A GLOBAL CLIMATE MODEL

Gauss s Law. Phys102 Lecture 4. Key Points. Electric Flux Gauss s Law Applications of Gauss s Law. References. SFU Ed: 22-1,2,3. 6 th Ed: 16-10,+.

Modeling the atmosphere of Jupiter

Mathematics Qualifying Exam Study Material

Supporting Information. I. A refined two-state diabatic potential matrix

free space (vacuum) permittivity [ F/m]

### dv where ρ is density, R is distance from rotation axis, and dv is

The choice of origin, axes, and length is completely arbitrary.

GRAVITATIONAL LENSING BY A COLLECTION OF OBJECTS WITH RADIAL DENSITIES. 1. Introduction

Physics 200 Lecture 4. Integration. Lecture 4. Physics 200 Laboratory

Ordinary Differential Equations

Prof. Simon Tett, Chair of Earth System Dynamics & Modelling: The University of Edinburgh

Thaddeus V. Samulski Department of Radiation Oncology, Duke University Medical Center, Durham, North Carolina 27710

STABLE CALCULATION OF GAUSSIAN-BASED RBF-FD STENCILS

MATRIX DETERMINANTS. 1 Reminder Definition and components of a matrix

Harbor Creek School District

a( i), where N i N ) is accurately d( i), where N i N. The derivative at ( ) ( ) ( )

13 Spherical Coordinates

Math 411 Preliminaries

The Fourier spectral method (Amath Bretherton)

Appendix C: Recapitulation of Numerical schemes

Transcription:

COMPARISON OF FINITE DIFFERENCE- AND PSEUDOSPECTRAL METHODS FOR CONVECTIVE FLOW OVER A SPHERE BENGT FORNBERG and DAVID MERRILL Abstract. For modeling convective flows over a sphere or within a spherical shell, pseudospectral (PS) methods are in general far more cost-effective than finite difference- (or finite element) methods. This study confirms this, and proceeds by comparing a Fourier-PS implementation (based on a longitude-latitude grid) with one using spherical harmonics. For similar resolutions, both these versions are found to be of similar accuracy. However, the former is computationally about one order of magnitude faster. Introduction. Convective flows in spherical geometries arise in many areas, such as geophysics, astrophysics, and meteorology (key references in these areas include Bunge et.al. 1995, Glatzmaier and Roberts, 1995, Trenberth, 1992 and Zhang and Yuen, 1996). A very simple but still very useful model problem is obtained by considering solid body rotation in different directions over a spherical surface. For the four methods considered here, a third (radial) direction can be added with little further difficulty, to obtain the geometry of a 3-D spherical shell or of a full sphere. Figures 1 and 2 illustrate schematically two different discretization ideas: i. longitude-latitude - type grids, and ii. spherical harmonics (these are not immediately associated with any specific grid, but represent functions in terms of expansion coefficients). Numerous additional discretization ideas have been attempted, e.g. grids which refine the faces of regular polyhedra [Taylor et.al., 1997] or combine overlapping stereographic coordinate systems [Browning et.al., 1989]. In the comparisons that follow, we consider four numerical methods; three based on the discretization i and one on ii: i. FD-2 Second order finite differences, FD-4 Fourth order finite differences, PS-F Pseudospectral (PS) approximation based on approximating derivatives by FFTs in both longitude- and latitude directions [Merilees 1973, 1974, Fornberg 1995, 1996], and ii. PS-SH PS approximation based on a spherical harmonic (SH) representation of the dependent variable [Hack and Jakob, 1992] - derivatives are calculated by analytic manipulation of the coefficients in the SH expansion. Department of Applied Mathematics, University of Colorado, Boulder, CO 80309-0526. E-mail: fornberg@colorado.edu. The research of this author was supported in part by NSF grant DMS-9706916. 76 Park Ave #5, Portland, ME 04101. E-mail: davemma@javanet.com.

The test problem is described further in Section 2. It amounts to solid-body rotation in different directions over a sphere; generalizations to general variable coefficients and inclusion of nonlinearities are straightforward for the FD-2, FD-4 and PS-F - methods, but require for PS-SH conversions between expansion coefficients and grid-based representations during each time step [Eliasen et.al. 1970, Orszag, 1970]. Section 3 gives more details about the numerical implementations, and computational results are presented in Section 4. Section 5 presents some conclusions - notably the great advantages in accuracy and cost of the PS methods over finite differences, and in cost of PS-F over PS-SH. The basic idea when using longitude-latitude grids is to simply let FD or PS stencils extend right across the poles - taking note of the fact that a pole does not represent any physical singularity (at most causing change of sign for certain vector quantities). This very simple approach has previously been found to be more accurate than the use of special "pole conditions" in 2-D polar regions; cf. comparisons on the same Bessel eigenvalue problem [Fornberg 1995, 1996 (pp 87-88)] vs. [Huang and Sloan, 1993, Matsushima and Marcus, 1995]. Test Problem. Numerous test problems have been proposed for flows over a sphere. One set [Williamson et.al. 1992 a,b] includes seven different ones, all designed to test aspects relevant to meteorology. We confine ourselves here to the first one from this set - solid-body rotation in an arbitrary direction, cf. Figure 3. Figure 4 enlarges the area where the two equatorial lines meet, and illustrates the notation used in the two spherical coordinate systems. Solid body rotation amounts to a steady increment in the ϕ -direction. Expressed in the (ϕ, θ) -system, this amounts to solving the PDE where h t + u h a cos θ ϕ + a v h θ = 0 u = u 0 (cos θ cos α sin θ sin ϕ sin α), v = u 0 cos ϕ sin α. (2) (1) In the test runs, we make the (dimensional) choices a = 6.37122 10 6 m u 0 = 2 π a 40 m/s 12 days (mean radius of the earth), (making a full rotation take 12 days). As initial condition, we choose a 'cosine bell' h(ϕ, θ) = h 0 2 1 + cos π r R if r < R 0 if r R with h 0 = 1000 m, R = a and (r thus 3, r = a arccos [sin θ c sin θ + cos θ c cos θ cos (ϕ ϕ c )] becoming the great circle distance between (ϕ, θ) and the center (ϕ c, θ c ) taken as (0,0)). Analytical solutions to the convection problem described by (1) and (2) can readily be obtained from the transformation rules between the spherical coordinate systems shown in Figures 3 and 4:

and in reverse sin θ = sin ϕ cos θ sin α + sin θ cos α sin ϕ cos θ = sin ϕ cos θ cos α + sin θ sin α sin θ = sin ϕ cos θ sin α + sin θ cos α sin ϕ cos θ = sin ϕ cos θ cos α sin θ sin α (3). (4) Several different choices of the inclination α of the rotation axis were tested numerically. It has been noted earlier [Williamson et.al. 1992 a,b] that the choice of α = π represents a particularly 2 0.05 critical case. We present here results only in this case (since other cases gave similar results). Convection π occurs here almost straight over the poles; the small deviation from eliminates possibly beneficial 2 symmetries. Numerical methods. The four methods are summarized briefly below: FD-2 The spatial differences are approximated with the second order accurate FD formula h ϕ 1 2 h(ϕ ϕ) + 1 2 h(ϕ + ϕ) / ϕ (5) and similarly for θ. The (ϕ, θ) -grid differs from the schematic illustration in Figure 1 in that the horizontal grid lines are shifted by a distance of θ/2 (to eliminate the need of approximating (1) at the poles, i.e. where cos θ = 0). A discretization parameter M denotes that we use 4 M + 1 points in the ϕ direction and 2 M in the θ direction: ϕ i = i ϕ, i = 2M,..., 2M θ j = j M 1 2 θ, j = 1,..., 2M, where ϕ = θ = π Whenever a FD stencil were to extend outside the basic grid, values need to be 2M. fetched according to the periodicities indicated by dashed arrows in the right part of Figure 1. To avoid severe CFL stability restrictions near the poles, increasingly many high frequency components for h in the ϕ direction were removed as the poles were approached, so as to obtain a roughly uniform spatial resolution over the full sphere (reminiscent of this same exact property of truncated spherical harmonics expansions). Such ϕ direction filtering was applied for the FD-2, FD-4 and PS-F methods. FD-4 The FD-4 scheme is implemented exactly as the FD-2 scheme above with the exception that (5) is replaced by the fourth order accurate approximation - again similarly for θ: h ϕ 1 12 h(ϕ 2 ϕ) 2 3 h(ϕ ϕ) + 2 3 h(ϕ + ϕ) 1 12 h(ϕ + 2 ϕ) / ϕ. (6)

PS-F One can implement FD formulas still wider than (6). In the limit of width (and formal order of accuracy) tending to infinity, one obtains the Fourier PS method. An effective way to implement this limit method is to transform the periodic data to Fourier space (by an FFT), perform differentiation analytically on the resulting interpolating trigonometric polynomial and, with inverse FFT, obtain the derivative values at all the grid points (see [Fornberg, 1996] for theory and implementation details). PS-SH The spherical harmonic technique is by far the most complicated of the four to implement. We refer the reader to [Fornberg, 1996] for a brief general overview of spherical harmonics. Actual implementation has described in some detail [Hack and Jakob, 1992]. In brief: Figure 2 illustrates the top of an infinite triangular array of basis functions. Whenever this array is truncated after a full row (fixed n), an expansion using these functions will possess - for arbitrary rotations over the sphere - the same remarkable property that truncated Fourier expansions possess with regard to periodic translations: only existing expansion coefficients will get modified; no higher expansion terms will ever need to be introduced. In spite of the impossibility of distributing more than 20 grid points fully uniformly over a sphere, a truncated spherical harmonics expansion achieves an entirely uniform resolution across the whole sphere. Given the coefficients of such an expansion, differentiation in both ϕ and θ can be carried out analytically by recursive manipulations of the expansion coefficients. The inclusion of variable coefficients will either lead to complicated convolutions in spherical harmonics space or, which is more effective, the expansion is converted over to grid data, variable coefficients are applied pointwise, and the result is converted again into an expansion. In general, for each time step, one conversion each way is required. The costs for these are included in the operation count estimates given below. Results. Figure 5 displays the numerical solutions on the 'unrolled' (ϕ,θ)-grid for methods FD-2, FD-4 and PS-F. In all cases, a standard fourth order Runge-Kutta scheme was used to advance the solutions 12 days (one full revolution) in time. The time steps were sufficiently small that time errors are negligible - all errors seen are due to the spatial approximations. For both grid densities, the error in PS-F is invisible - as it is for PS-SH. The shown PS-F results can therefore also serve to illustrate the initial cosine bells. The errors in the FD methods are far higher; grid refinement to reach an accuracy to match the PS methods is prohibitive in both computer time and memory already at the error level achieved here with the PS methods. To assess the difference between PS-F and PS-SH, we need to display the errors differently. Table 1 compares the relative errors in the L 2 - and L - norms after the 12-day (one revolution) test runs: TABLE 1 Comparison of errors after one revolution (α = π/2-0.05) Norm PS-F M = 16 PS-SH T31 (n = 31) L 2 (integrated over sphere) 0.018 0.014 L (max norm) 0.016 0.012

PS-F with M = 16 and PS-SH with n = 31 (in the notation of Foster et.al. 1992, Hack and Jakob 1992) correspond to approximately the same number of unknowns (and grid points for the associated PS-SH grid). The errors are essentially equivalent (PS-SH with n = 30 instead of n = 31 would be less accurate than PS-F, M = 16). The operation counts (including all floating point operations) for one calculation of the two space derivatives in (1) become approximately: PS-F: 48 M + 336 M 2 + 240 M 2 log 2 4M PS-SH: 8 + 15.6 n + 195 n 2 +550 n 2 log 2 n + 35.2 n 3 (see Foster et.al. 1992) Table 2 compares these costs for the two grid sizes considered here: TABLE 2 Comparisons of operation counts for equivalent resolution; PS-F vs. PS-SH PS - Fourier PS - Spherical Harmonics Grid Resolution Size M = Operation Count Size n = Operation Count 64 32 16 0.455 10 6 31 3.855 10 6 128 64 32 2.065 10 6 63 22.63 10 6 Conclusions. Four numerical schemes; FD-2, FD-4, PS-F and PS-SH have been compared for a simple convective model problem in spherical geometry. The two PS methods prove to be far more accurate than the FD methods (with FD-4 notable more accurate than FD-2 at only a minor increase in cost). At the same level of discretization, PS-F and PS-SH are of comparable accuracy. However the former is not only far easier to implement - the operation count is also approximately an order of magnitude lower. Acknowledgment. The PS-SH code was implemented for NCAR and then customized for these tests by the late Prof. Ruediger Jacob-Chien. We are grateful to him for his invaluable help with this work. REFERENCES BUNGE, H.-P. AND BAUMGARDNER, J.R., Mantle Convection Modeling on Parallel Virtual Machines, Computers in Physics, 9, 207-215, 1995. BROWNING, G.L.,HACK, J.J. AND SWARZTRAUBER, P.N., A Comparison of Three Numerical Methods for Solving Differential Equations on the Sphere, Monthly Weather Review, 117, 1058-1075, 1989. ELIASEN, E., MACHENHAUER,B. AND RASMUSSEN, E., On a Numerical Method for Integration of the Hydrodynamical Equations with a Spectral Representation of the Horizontal Fields, Report No. 2, Institute of Theoretical Meteorology, University of Copenhagen, Denmark, 1970.

FORNBERG, B., A Pseudospectral Approach for Polar and Spherical Geometries, SIAM J. Sci. Comput. 16, 1071-1081, 1995. FORNBERG, B., A Practical Guide to Pseudospectral Methods, Cambridge University Press, 1996. FOSTER, I., GOPP, W. AND STEVENS, R., Parallel Scalability of the Spectral Transform Method, in Computer Hardware, Advanced Mathematics and Model Physics, Department of Energy Report DOE/ER-0541T, 7-10, 1992. GLATZMAIER, G.A. AND ROBERTS, P.H., A Three-dimensional Self-consistent Computer Simulation of a Geomagnetic Field Reversal, Nature, 377, 203-209, 1995. HACK, J.J. AND JAKOB, R., Description of a Global Shallow Water Model Based on the Spectral Transform Method, NCAR Technical Note 343+STR, 1992. MATSUSHIMA, T. AND MARCUS, P.S., A Spectral Method for Polar Coordinates, J. Comput. Phys. 120, 365-374, 1995. MERILEES, P. E., The Pseudospectral Approximation Applied to the Shallow Water Equations on a Sphere, Atmosphere, Vol. 11, No. 1, 13-20, 1973. MERILEES, P. E., Numerical Experiments with the Pseudospectral Method in Spherical Coordinates, Atmosphere, Vol. 12, No. 3, 77-96, 1974. ORSZAG, S.A., Transform Method for Calculation of Vector Coupled Sums: Application to the Spectral Form of the Vorticity Equation, J. Atmosph. Sci. 27, 890-895, 1970. TAYLOR, M., TRIBBIA, J. AND ISKANDARANI, M.,The Spectral Element Method for the Shallow Water Equations on the Sphere, J. Comput. Phys. 130, 92-108, 1997. TRENBERTH, K. (ed.), Climate System Modeling, Cambridge University Press, 1992. 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 with Example Solutions, in Computer Hardware, Advanced Mathematics and Model Physics, Department of Energy Report DOE/ER-0541T, 41-49. 1992. 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. Comput. Phys., 102, 211-224, 1992. ZHANG, S. AND YUEN, D.A., Various Influences on Plumes and Dynamics in Time-Dependent, Compressible Mantle Convection in 3-D Spherical Shell, Physics of the Earth and Planetary Interiors, 94, 241-267, 1996.

Figure 1. Longitude-latitude (ϕ, θ) grid for a sphere. The dotted arrows indicate how the data repeats periodically. Figure 2. Zero contour lines for some low-order spherical harmonics.

Figure 3. Solid body rotation over a sphere in a direction forming an angle α relative to the computational longitude-latitude grid (as measured between the equatorial lines or between the poles). Figure 4. An arbitrary point expressed in both the and coordinate systems (ϕ, θ) (ϕ, θ ) (corresponding to computational grid and grid associated with rotation respectively).

M = 16 (64 32 grid) M = 32 (128 64 grid) FD-2 FD-4 PS-F Figure 5. Numerical solutions after one revolution for methods FD-2, FD-4 and PS-F.