The spectral transform method

Similar documents
Overview of the Numerics of the ECMWF. Atmospheric Forecast Model

A Fast Spherical Filter with Uniform Resolution

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

Improving ECMWF s IFS model by Nils Wedi

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

( )e ikx. ( ) = ˆq k

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

Representation of inhomogeneous, non-separable covariances by sparse wavelet-transformed matrices

Recurrence Relations and Fast Algorithms

Current Limited Area Applications

Latest thoughts on stochastic kinetic energy backscatter - good and bad

ICON. The Icosahedral Nonhydrostatic model: Formulation of the dynamical core and physics-dynamics coupling

Formulation and performance of the Variable-Cubic Atmospheric Model

Computational challenges in Numerical Weather Prediction

Recent Developments in Numerical Methods for 4d-Var

A fast randomized algorithm for approximating an SVD of a matrix

The WRF NMM Core. Zavisa Janjic Talk modified and presented by Matthew Pyle

Comparison between Wavenumber Truncation and Horizontal Diffusion Methods in Spectral Models

Fast Algorithms for the Computation of Oscillatory Integrals

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

Linear model for investigation of nonlinear NWP model accuracy. Marko Zirk, University of Tartu

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

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

Towards a Faster Spherical Harmonic transform

Analogues for Bessel Functions of the Christoffel-Darboux Identity

ATS 421/521. Climate Modeling. Spring 2015

Chapter 4. Nonlinear Hyperbolic Problems

The Spectral Method (MAPH 40260)

Fourier Analysis. 19th October 2015

NCAR Global Atmospheric Core Workshop, Boulder, June 2008

MATHEMATICAL METHODS INTERPOLATION

PARTIAL DIFFERENTIAL EQUATIONS

Conservation of Mass Conservation of Energy Scaling Analysis. ESS227 Prof. Jin-Yi Yu

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

Reflecting on the Goal and Baseline of Exascale Computing

Randomized algorithms for the low-rank approximation of matrices

1/18/2011. Conservation of Momentum Conservation of Mass Conservation of Energy Scaling Analysis ESS227 Prof. Jin-Yi Yu

The Shallow Water Equations

Scalability Programme at ECMWF

(f(x) P 3 (x)) dx. (a) The Lagrange formula for the error is given by

ECMWF Overview. The European Centre for Medium-Range Weather Forecasts is an international. organisation supported by 23 European States.

Advanced. Engineering Mathematics

CAM-SE: Lecture I. Peter Hjort Lauritzen

Mass-conserving and positive-definite semi-lagrangian advection in NCEP GFS: Decomposition for massively parallel computing without halo

A stable treatment of conservative thermodynamic variables for semi-implicit semi-lagrangian dynamical cores

Optimal Prediction for Radiative Transfer: A New Perspective on Moment Closure

Progress in Numerical Methods at ECMWF

TABLE OF CONTENTS INTRODUCTION, APPROXIMATION & ERRORS 1. Chapter Introduction to numerical methods 1 Multiple-choice test 7 Problem set 9

Atmospheric Fronts. The material in this section is based largely on. Lectures on Dynamical Meteorology by Roger Smith.

New variables in spherical geometry. David G. Dritschel. Mathematical Institute University of St Andrews.

Evaluation of three spatial discretization schemes with the Galewsky et al. test

Green s Functions, Boundary Integral Equations and Rotational Symmetry

Split explicit methods

Stochastic methods for representing atmospheric model uncertainties in ECMWF's IFS model

Numerical Mathematics

A Fast N-Body Solver for the Poisson(-Boltzmann) Equation

Comparing the formulations of CCAM and VCAM and aspects of their performance

Numerical Methods I Orthogonal Polynomials

Review. Numerical Methods Lecture 22. Prof. Jinbo Bi CSE, UConn

Exascale challenges for Numerical Weather Prediction : the ESCAPE project

Blurring the boundary between dynamics and physics. Tim Palmer, Peter Düben, Hugh McNamara University of Oxford

Numerical methods Revised March 2001

Kernel-based Approximation. Methods using MATLAB. Gregory Fasshauer. Interdisciplinary Mathematical Sciences. Michael McCourt.

Lateral Boundary Conditions

11 days (00, 12 UTC) 132 hours (06, 18 UTC) One unperturbed control forecast and 26 perturbed ensemble members. --

Operational and research activities at ECMWF now and in the future

ICON. The Icosahedral Nonhydrostatic modelling framework

A Strategy for the Development of Coupled Ocean- Atmosphere Discontinuous Galerkin Models

Laplace Transform Integration (ACM 40520)

Hilbert Space Methods for Reduced-Rank Gaussian Process Regression

Fast Multipole Methods for The Laplace Equation. Outline

Background Error Covariance Modelling

2. Outline of the MRI-EPS

ACCELERATING WEATHER PREDICTION WITH NVIDIA GPUS

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

Research Statement. James Bremer Department of Mathematics, University of California, Davis

Preface. 2 Linear Equations and Eigenvalue Problem 22

Introduction to Isentropic Coordinates: a new view of mean meridional & eddy circulations. Cristiana Stan

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

ECMWF Scalability Programme

Introduction to Isentropic Coordinates:! a new view of mean meridional & eddy circulations" Cristiana Stan

Weather Forecasting Models in Met Éireann. Eoin Whelan UCD Seminar 3 rd April 2012

MOX EXPONENTIAL INTEGRATORS FOR MULTIPLE TIME SCALE PROBLEMS OF ENVIRONMENTAL FLUID DYNAMICS. Innsbruck Workshop October

Challenges and Opportunities in Modeling of the Global Atmosphere

Assimilation Techniques (4): 4dVar April 2001

Parallel Algorithms for Four-Dimensional Variational Data Assimilation

Growth of forecast uncertainties in global prediction systems and IG wave dynamics

Problem descriptions: Non-uniform fast Fourier transform

Physics/Dynamics coupling

The General Circulation of the Atmosphere: A Numerical Experiment

Numerical Weather Prediction. Meteorology 311 Fall 2010

Exam 2. Average: 85.6 Median: 87.0 Maximum: Minimum: 55.0 Standard Deviation: Numerical Methods Fall 2011 Lecture 20

Numerical Weather prediction at the European Centre for Medium-Range Weather Forecasts (2)

Tangent-linear and adjoint models in data assimilation

ON INTERPOLATION AND INTEGRATION IN FINITE-DIMENSIONAL SPACES OF BOUNDED FUNCTIONS

GSI Tutorial Background and Observation Errors: Estimation and Tuning. Daryl Kleist NCEP/EMC June 2011 GSI Tutorial

4. DATA ASSIMILATION FUNDAMENTALS

Lecture 1. Equations of motion - Newton s second law in three dimensions. Pressure gradient + force force

Fast Algorithms for Spherical Harmonic Expansions

Introduction. Finite and Spectral Element Methods Using MATLAB. Second Edition. C. Pozrikidis. University of Massachusetts Amherst, USA

Transcription:

The spectral transform method by Nils Wedi European Centre for Medium-Range Weather Forecasts wedi@ecmwf.int Advanced Numerical Methods for Earth-System Modelling Slide 1

Advanced Numerical Methods for Earth-System Modelling Slide 2

The Integrated Forecasting System (IFS) technology applied at for the last 30 years A spectral transform, semi-lagrangian, semi-implicit (compressible) (non-)hydrostatic model Advanced Numerical Methods for Earth-System Modelling Slide 3

Schematic description of the spectral transform method in the IFS model FFT Fourier space Grid-point space -semi-lagrangian advection -physical parametrizations -products of terms No grid-staggering of prognostic variables Inverse FFT Fourier space LT Spectral space -horizontal gradients -semi-implicit calculations -horizontal diffusion Inverse LT FFT: Fast Fourier Transform, LT: Legendre Transform Advanced Numerical Methods for Earth-System Modelling Slide 4

Several transpositions within the spectral transforms need to communicate, e.g. using MPI alltoallv Advanced Numerical Methods for Earth-System Modelling Slide 5

Direct spectral transform (Forward) Fourier transform: Legendre transform: FFT (fast Fourier transform) using N F 2N+1 points (linear grid) (3N+1 if quadratic grid) Direct Legendre transform by Gaussian quadrature using N L (2N+1)/2 Gaussian latitudes (linear grid) ((3N+1)/2 if quadratic grid) (normalized) associated Legendre polynomials Advanced Numerical Methods for Earth-System Modelling Slide 6

Inverse spectral transform (Backward) Inverse Legendre transform N m m (,,, t) (,) t Y (, ) N m N n m Spherical harmonics n n Triangular truncation (isotropic) Triangular truncation: n N m = -N m = N m Advanced Numerical Methods for Earth-System Modelling Slide 7

A useful property of spherical harmonics total wavenumber 2 n( n 1 m ) n 2 a m n Earth radius Advanced Numerical Methods for Earth-System Modelling Slide 8

Fast Multipole Method (FMM) and spectral filtering (Jakob-Chien and Alpert, 1997; Tygert 2008) For all j=1,..,j FMM: We can do above sum for all points j in O(J+N) operations instead of O(J*N)! Example: From Christoffel-Darboux formula for associated Legendre polynomials We can do a direct and inverse Legendre transform for a single Fourier mode as: Advanced Numerical Methods for Earth-System Modelling Slide 9

The Gaussian grid About 30% reduction in number of points Full grid Reduced grid Reduction in the number of Fourier points at high latitudes is possible because the associated Legendre polynomials are very small near the poles for large m. Note: number of points nearly equivalent to quasi-uniform icosahedral grid cells of the ICON model. Advanced Numerical Methods for Earth-System Modelling Slide 10

Spectral vs. physical space 2N+1 gridpoints to N waves : linear grid 3N+1 gridpoints to N waves : quadratic grid 4N+1 gridpoints to N waves : cubic grid ~ 1-2 Δ ~ 2-3 Δ ~ 3-4 Δ Spatial filter range Effective resolution of NWP models today : 6-8 Δ (Abdalla et al, 2013) Advanced Numerical Methods for Earth-System Modelling Slide 11

Aliasing Aliasing of quadratic terms on the linear grid (2N+1 gridpoints per N waves), where the product of two variables transformed to spectral space cannot be accurately represented with the available number of waves (as quadratic terms would need a 3N+1 ratio). Absent outside the tropics in E-W direction due to the design of the reduced grid (obeying a 3N+1 ratio) but present throughout (and all resolutions) in N-S direction. De-aliasing in IFS: By subtracting the difference between a specially filtered and the unfiltered pressure gradient term at every time-step the stationary noise patterns can be removed at a cost of approx. 5% at T1279 (2 extra transforms). Advanced Numerical Methods for Earth-System Modelling Slide 12

De-aliasing E-W 500hPa adiabatic zonal wind tendencies (T159) Advanced Numerical Methods for Earth-System Modelling Slide 13

De-aliasing Advanced Numerical Methods for Earth-System Modelling Slide 14

De-aliasing N-S 500hPa adiabatic meridional wind tendencies (T159) Advanced Numerical Methods for Earth-System Modelling Slide 15

De-aliasing Advanced Numerical Methods for Earth-System Modelling Slide 16

Kinetic Energy Spectra 100 hpa Advanced Numerical Methods for Earth-System Modelling Slide 17

Kinetic Energy Spectra 100 hpa Advanced Numerical Methods for Earth-System Modelling Slide 18

A fast Legendre transform (FLT) (O Neil, Woolfe, Rokhlin, 2009; Tygert 2008, 2010) The computational complexity of the ordinary spectral transform is O(N^3) (where N is the truncation number of the series expansion in spherical harmonics) and it was therefore believed to be not computationally competitive with other methods at very high resolution The FLT is found to be O(N^2 log N^3) for horizontal resolutions up to T7999 (Wedi et al, 2013) Advanced Numerical Methods for Earth-System Modelling Slide 19

Number of floating point operations for direct or inverse spectral transforms of a single field, scaled by N 2 log 3 N dgemm FLT 120 100 80 60 40 20 0 799 1279 2047 3999 7999 Advanced Numerical Methods for Earth-System Modelling Slide 20

Matrix-matrix multiply for each zonal wavenumber m Gaussian latitude Field, vertical level apply butterfly compression, this step is precomputed only once! Advanced Numerical Methods for Earth-System Modelling Slide 21 total wavenumber zonal wavenumber

Butterfly algorithm: pre-compute S C rxs rxk A kxs With each level l, double the columns and half the rows Advanced Numerical Methods for Earth-System Modelling Slide 22

Advanced Numerical Methods for Earth-System Modelling Slide 23

Advanced Numerical Methods for Earth-System Modelling Slide 24

Butterfly algorithm: apply f S Advanced Numerical Methods for Earth-System Modelling Slide 25

Interpolative Decomposition (ID) The compression uses the interpolative decomposition (ID) described in Cheng et al (2005). The r x s matrix S may be compressed such that S rxs C rxk A kxs With an r x k matrix C constituting a subset of the columns of S and the k x s matrix A containing a k x k identity as a submatrix. k is the ε-rank of the matrix S (see also e.g. Martinsson and Rokhlin, 2007). Advanced Numerical Methods for Earth-System Modelling Slide 26

T1279 FLT using different ID epsilons for INV (1.e-3) + DIR (1.e-7) Advanced Numerical Methods for Earth-System Modelling Slide 27

The FLT in a nutshell O(N 2 log 3 N) Speed-up the sums of products between associated Legendre polynomials at all Gaussian latitudes and the corresponding spectral coefficients of a field (e.g. temperature on given level) The essence of the FLT: Exploit similarities of associated Legendre polynomials at all (Gaussian) latitudes but different total wave-number Pre-compute (once, 0.1% of the total cost of a 10 day forecast) a compressed (approximate) representation of the matrices (for each m) involved Apply the compressed (reduced) representation at every time-step of the simulation. Advanced Numerical Methods for Earth-System Modelling Slide 28

Average wall-clock time compute cost of 10 7 spectral transforms scaled by N 2 log 3 N dgemm FLT 4.5 4 3.5 3 2.5 2 1.5 1 0.5 0 799 1279 2047 3999 7999 Advanced Numerical Methods for Earth-System Modelling Slide 29

The quadratic or cubic grid (Wedi, 2014) Adjustment of formal accuracy/relative resolution in spectral and physical space. All nonlinear rhs forcings, advection, moist quantities, physical forcings and surface processes are computed on the higher resolution grid. All horizontal derivatives (T,vor/div, u/v,ln p) and the spectral computations are filtered to the cubic truncation wavenumber. Advanced Numerical Methods for Earth-System Modelling Slide 30

The computational cost distribution with full radiation and high-res wave model Advanced Numerical Methods for Earth-System Modelling Slide 31

10000 dgemm FLT 1000 Average total wall-clock time computational cost (ms) per transform as obtained from actual NWP simulations 222.7 187.2 1543.1 1091.7 100 39.8 39.5 10 3.3 4.1 10.3 11.4 1 799 1279 2047 3999 7999 Advanced Numerical Methods for Earth-System Modelling Slide 32

10 km IFS model scaling on TITAN (CRESTA project) NO GPU! Advanced Numerical Methods for Earth-System Modelling Slide 33

5 km IFS model scaling on TITAN (CRESTA project) NO GPU! Advanced Numerical Methods for Earth-System Modelling Slide 34

? The energy cost of computing bites us! Advanced Numerical Methods for Earth-System Modelling Slide 35

Additional slides Advanced Numerical Methods for Earth-System Modelling Slide 36