Earth System Modeling Domain decomposition

Similar documents
Block-Structured Adaptive Mesh Refinement

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

The Shallow Water Equations

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

A High Order Conservative Semi-Lagrangian Discontinuous Galerkin Method for Two-Dimensional Transport Simulations

PDE Solvers for Fluid Flow

Well-balanced DG scheme for Euler equations with gravity

The Advanced Research WRF (ARW) Dynamics Solver

Well-balanced DG scheme for Euler equations with gravity

A Hybrid Method for the Wave Equation. beilina

Finite difference methods. Finite difference methods p. 1

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

High-resolution finite volume methods for hyperbolic PDEs on manifolds

Mixed Mimetic Spectral Elements for Geophysical Fluid Dynamics

Physics-Based Animation

Daniel J. Jacob, Models of Atmospheric Transport and Chemistry, 2007.

A semi-implicit non-hydrostatic covariant dynamical kernel using spectral representation in the horizontal and a height based vertical coordinate

Massively parallel semi-lagrangian solution of the 6d Vlasov-Poisson problem

A High-Order Galerkin Solver for the Poisson Problem on the Surface of the Cubed Sphere

The next-generation supercomputer and NWP system of the JMA

Open boundary conditions in numerical simulations of unsteady incompressible flow

A recovery-assisted DG code for the compressible Navier-Stokes equations

MASSACHUSETTS INSTITUTE OF TECHNOLOGY DEPARTMENT OF MECHANICAL ENGINEERING CAMBRIDGE, MASSACHUSETTS NUMERICAL FLUID MECHANICS FALL 2011

Fluid Animation. Christopher Batty November 17, 2011

Image Reconstruction And Poisson s equation

A Hamiltonian Numerical Scheme for Large Scale Geophysical Fluid Systems

Formulation and performance of the Variable-Cubic Atmospheric Model

Semi-Lagrangian Formulations for Linear Advection Equations and Applications to Kinetic Equations

ICON. The Icosahedral Nonhydrostatic modelling framework

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

Francis X. Giraldo,

Index. higher order methods, 52 nonlinear, 36 with variable coefficients, 34 Burgers equation, 234 BVP, see boundary value problems

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

Shock Capturing for Discontinuous Galerkin Methods using Finite Volume Sub-cells

Performance of WRF using UPC

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

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

Arches Part 1: Introduction to the Uintah Computational Framework. Charles Reid Scientific Computing Summer Workshop July 14, 2010

A Nodal High-Order Discontinuous Galerkin Dynamical Core for Climate Simulations

Diffusion / Parabolic Equations. PHY 688: Numerical Methods for (Astro)Physics

Overview of the Numerics of the ECMWF. Atmospheric Forecast Model

Numerical Solution Techniques in Mechanical and Aerospace Engineering

Chapter 17. Finite Volume Method The partial differential equation

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

A Space-Time Expansion Discontinuous Galerkin Scheme with Local Time-Stepping for the Ideal and Viscous MHD Equations

An Overview of Fluid Animation. Christopher Batty March 11, 2014

arxiv: v2 [physics.comp-ph] 4 Feb 2014

Math background. Physics. Simulation. Related phenomena. Frontiers in graphics. Rigid fluids

Drift-Diffusion Simulation of the Ephaptic Effect in the Triad Synapse of the Retina

High Order Semi-Lagrangian WENO scheme for Vlasov Equations

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

Direct Sum. McKelvey, and Madie Wilkin Adviser: Dr. Andrew Christlieb Co-advisers: Eric Wolf and Justin Droba. July 23, Michigan St.

Description of. Jimy Dudhia Dave Gill. Bill Skamarock. WPS d1 output. WPS d2 output Real and WRF. real.exe General Functions.

Time-Parallel Algorithms for Weather Prediction and Climate Simulation

Numerical methods Revised March 2001

A primal-dual mixed finite element method. for accurate and efficient atmospheric. modelling on massively parallel computers

Challenges and Opportunities in Modeling of the Global Atmosphere

Finite Volume Schemes: an introduction

Time-Parallel Algorithms for Weather Prediction and Climate Simulation

Advection / Hyperbolic PDEs. PHY 604: Computational Methods in Physics and Astrophysics II

Scalable Non-Linear Compact Schemes

Parallel Programming in C with MPI and OpenMP

High-Order Finite-Volume Methods! Phillip Colella! Computational Research Division! Lawrence Berkeley National Laboratory!

NUMERICAL METHODS FOR ENGINEERING APPLICATION

Numerically Solving Partial Differential Equations

Basic Aspects of Discretization

Mathematical Concepts & Notation

Finite Element Solver for Flux-Source Equations

Figure 1 - Resources trade-off. Image of Jim Kinter (COLA)

ECE 422/522 Power System Operations & Planning/Power Systems Analysis II : 7 - Transient Stability

Improving Dynamical Core Scalability, Accuracy, and Limi:ng Flexibility with the ADER- DT Time Discre:za:on

High resolution wildfires simulation, forecasting tools to estimate front evolution, fire induced weather and pollution

MATH 333: Partial Differential Equations

1 Introduction to Governing Equations 2 1a Methodology... 2

Introduction to Finite Volume projection methods. On Interfaces with non-zero mass flux

Stable Semi-Discrete Schemes for the 2D Incompressible Euler Equations

Inverse Lax-Wendroff Procedure for Numerical Boundary Conditions of. Conservation Laws 1. Abstract

Locally Linearized Euler Equations in Discontinuous Galerkin with Legendre Polynomials

Nonlinear Iterative Solution of the Neutron Transport Equation

ME Computational Fluid Mechanics Lecture 5

Performance of the fusion code GYRO on three four generations of Crays. Mark Fahey University of Tennessee, Knoxville

Advanced numerical methods for nonlinear advectiondiffusion-reaction. Peter Frolkovič, University of Heidelberg

HIGH-ORDER ACCURATE METHODS BASED ON DIFFERENCE POTENTIALS FOR 2D PARABOLIC INTERFACE MODELS

Overview: Synchronous Computations

Gradient Flows: Qualitative Properties & Numerical Schemes

Numerical Solutions to Partial Differential Equations

Elliptic Problems / Multigrid. PHY 604: Computational Methods for Physics and Astrophysics II

Chapter Two: Numerical Methods for Elliptic PDEs. 1 Finite Difference Methods for Elliptic PDEs

Description of the fire scheme in WRF

HIGH-ORDER ACCURATE METHODS BASED ON DIFFERENCE POTENTIALS FOR 2D PARABOLIC INTERFACE MODELS

A high-order fully explicit incremental-remap -based semi-lagrangian shallow-water model

Chapter 5. Methods for Solving Elliptic Equations

Semi-implicit methods, nonlinear balance, and regularized equations

A general well-balanced finite volume scheme for Euler equations with gravity

Chapter 4. Nonlinear Hyperbolic Problems

1 Introduction to MATLAB

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

Quasi-3D Multiscale Modeling Framework as a Physics Option in CAM-SE

A Variational Multiscale Stabilized Finite Element. Method for the Solution of the Euler Equations of

Fourier Spectral Computing for PDEs on the Sphere

Transcription:

Earth System Modeling Domain decomposition Graziano Giuliani International Centre for Theorethical Physics Earth System Physics Section Advanced School on Regional Climate Modeling over South America February 15-19, 2015

Modelling the Atmosphere : The Equations with: ρ + (ρu) = 0 t (1) u t = K (2Ω + ζ) u 1 p + Φ + Fep ρ (2) (ρɛ) + [(ρɛ + p + F R) u ] = 0 t (3) p = ρrt (4) Mass Density ρ, Pressure p, Temperature T, Velocity u, Gravity Potential Φ, Cinetic Energy K = u 2 /2, Relative Vorticity ζ = u Rotation Velocity of the Earth Ω, Ideal Gas Constant for dry air R Total energy per unit mass ɛ = c pt + K, c p = Specific heat at constant pressure, Radiation Heat Flux F R, Total external and parametrized forces F ep

Modeling the Atmosphere : The Problem The set of governing equations for the atmosphere are examples of system of nonlinear partial differential equations (PDEs), to be solved on some spatial domain D and time interval [0, t f ], given suitable boundary (BC) and initial (IC) conditions. Therefore the typical problem to be solved in ESM is an intial/boundary value problem of the (general) form: ψ t = L (ψ) ψ(0) = ψ 0 ψ(b) = Ψ B (t) (5) (6) (7)

Modeling the Atmosphere : The Challenge The Problem is typically highly nonlinear. As a consequence: There is an interaction between different space scales. The system is chaotic, i.e. the solution is strongly dependent on the initial conditions. Therefore: Ergodic hypothesis is made Ensemble simulations are considered Even if you can prove that it is well posed, in general it is not possible to find a representation formula for its solution ψ(x, t). An approximation φ of the solution ψ has to be searched, through the introduction of suitable: Space discretization techniques Parametrization of unresolved sub-grid processes Time integration techniques

Space Discretization The original domain D is replaced by a spatially discretized domain D h and the original problem is replaced by: where: φ i t = L h(φ) i, i = 1, 2,... m (8) φ i (0) = (φ 0 ) i, i = 1, 2,... m (9) φ(b h ) = Φ Bh (t) (10) L h denotes a discrete approximation of the continuous differential operator L h denotes the tipical size of the discrete spatial elements and determine the resolution of the spatial discretization.

Methods This semi-discrete problem is a system of ( generally nonlinear ) Ordinary Differential Equations (ODEs) whose unknowns φ i are approximations of the continuous solutions ψ. Main approaches: 1 Finite Differences 2 Finite Volumes 3 Spectral Transform 4 Galerkin Methods / Projection methods (Finite Element, Spectral Element, Discontinuous Galerkin)

Finite Differences D = x i, i = 1,... m, called grid, is a regular array of discrete locations, called nodes. h = x is the average spacing between nodes. φ i (t) ψ(x i, t) L h is obtained by replacing derivatives present in L with finite difference quotients Example in 1D: If D = [0, L] and L (ψ) = ψ, then D = {x i = ih, i = 1,... m} with h = x = L/m L h (φ) i = (φi+1 φi 1) /2h

Shallow Water Equations Example problem is the so called Shallow Water Equations, small amplitude wawes in a shallow basin of rest depth H. Given h the free surface wave amplitude with h H and g the gravity acceleration: h t + H u x = 0 u t + g h x = 0 (11) (12)

SWE discretization h i t + H u i+1 u i 1 2 x u i t + g h i+1 h i 1 2 x (13) (14)

Staggering in 1D h i t + H u i+1/2 u i 1/2 x u i t + g h i+1/2 h i 1/2 x (15) (16)

Staggering in 2D Example of Arakawa B staggering with nesting: easy to implement you need to be careful to ensure shape conservation and avoid spurious wave solutions tipically not high order accurate not easy to introduce adaptivity heavily in Atmospheric Models

Finite Volumes D h = {K i, i = 1,..., m}, called mesh, is a partition of D in nonoverlapping ( control volumes K i such that D = m i=1 K i and h = max i diam(ki ) ) is a measure of the typical size of the elements of D h. The approximated solution is: φ i (t) = 1 ψ(x, t)dx (17) K i K i They are inherently conservative, very robust, heavily used in industrial applications, mostly low order accurate (third order or less), but not used in atmospheric science.

Flux form and source terms The original continuous problem is rewritten in divergence (conservation) form ψ t + F(ψ) = S (18) and integrated over each control volume K i. By application of Gauss theorem a set of equations is obtained for the evolution of the averages φ i (t) in terms of their fluxes across the control volume edges: dφ i dt + F ˆndσ = K i K i S dx (19) these fluxes are not prognostic variables but need to be recovered by appropriate interpolation procedures from the cell averaged values (subgrid scale reconstruction).

Spectral Transform Methods They are the basis of all Global Circulation Methods. State Variables are not pointwise quantities, but the continuous field is written as a linear combination of modes. The Legendre function of first kind are a natural basis on the sphere. ψ(x, t) Pn m (n m)! 1 (µ) = (2n + 1) (n + m)! 2 n n! (1 µ2 ) m 2 N a k (t)φ k (θ, φ) (20) k=1 φ k (θ, φ) = cos(mφ)p m l (cosθ) (21) d n+m dµ n+m (µ2 1) (22)

Spectral Transform Methods Finite elements methods with the benefits of of the spectral transform methods with the locality principal of finite volume methods. Can be thought of as spectral transform in the element. Basis function in this case have compact support that can also jump at inter-element boundaries (discontinous Galerkin).

Time discretization The space discretized time continuous solution φ i (t), t [0, t f ] is approximated by introducing a timestep t = tf /n and a set of discrete time levels t k = k t, k = 0,..., n. The choice of t must comply with numerical CFL stability condition. Numerical ODE s methods give the fully discrete approximated solution: φ k i, k = 0,..., n; i = 1,..., m (23) Main approches include: 1 explicit schemes 2 semi-implicit schemes 3 semi-lagrangian shemes

Explicit Scheme The method do not require the solution of a system at each timestep to update the solution from one discrete time level to the next: decoupled. One of the most popular explicit time discretization is the leapfrog. It is a multistep method (three time levels scheme) derived by approximating the time derivative by a centered difference approximation: φ k+1 i φ k 1 i 2 t = L h (φ k ) i (24) Filters can be applied to remove computational modes from the solution. Efficiency of simple explicit schemes can be improved through the split-explicit or mode splitting technique: terms responsible for the fastest waves motion are treated separately, using a smaller timestep.

Semi Implicit Scheme They usually requires the solution of a system at each timestep to update the solution from one discrete time level to the next. The most used is the so called Crank-Nicolson scheme: φ k+1 i φ k 1 i 2 t = αl h (φ k+1 ) i + (1 α)l h (φ k ) i (25) with α [0, 1] averaging parameter: stability is guaranteed for α [ 1 /2, 1] and second order accuracy for α = 1 /2.

Semi Lagrangian Scheme SL method is a discretization approach that links the spatial and time discretization for advection equations. The governing equations can be written in advective form: dψ dt = L ˆ (ψ) (26) where d /dt = / t + u is the Lagrangian derivative. The above can be discretized as: φ k+1 i φ k 1 i, dt = ˆL h (φ k ) i, (27) where φ k i, denote an approximation of ψ(x, t k ) where x is the so-called departure point, solution at t = t k of dx(t, t k+1, x i ) dt = u X(t, t k+1, x i ), X(t k+1, t k+1, x i ) = x (28)

Stencil code Atmospheric models in their dynamical core are stencil codes: A class of iterative kernels which update array elements according to some fixed pattern, called stencil. Stencil codes perform a sequence of sweeps (called timesteps) through the simulation space, a 2- or 3-dimensional regular grid whose elements are referred to as nodes, cells or elements. In each timestep, the stencil code updates all array elements. Using neighboring array elements in a fixed pattern (called the stencil), each cell s new value is computed. Boundary values need to be adjusted during the course of the computation as well. Since the stencil is the same for each element, the pattern of data accesses is repeated.

Ghost Points The algorithm work on a patch library, which handles the synchronization of the ghost zone or halo and the boundaries. The code loops over big arrays, and for this reason usually cannot perform efficient cache blocking or wrapping of the code for accelerators.

RegCM4 2D scheme... PN Local index ici1:ici2 (ice1:ice2)......... do k=1,kz do i=ici1,ici2 do j=jci1,jci2 end do end do end do Exchange Boundary a(j,i,k)=b(j,i,k) P1 P2 P3... Local index jci1:jci2 (jce1:jce2) Optional band case with periodic exchange

Cartesian Grid RegCM4 works on a Cartesian 2D Grid Each processor has a 2D patch of the model domain Each processor may have exchange of ghost points Each processor may have boundary value area points

Cartesian Grid comunication library interface Different data types up to 4 dimensional One to all (mpi bcast, mpi send, mpi recv) call bcast(a) call grid_distribute(a_glob,a_loc,j1) call subgrid_distribute(a_glob,a_loc) All to one (mpi send, mpi recv) call grid_collect(a_loc,a_glob) call subgrid_collect(a_loc,a_glob) Ghost point exchange (mpi irecv, mpi send, mpi wait, mpi sendrecv) call exchange(a)

RegCM4 MPI 1D surface masked scheme Local index ici1:ici2 (ice1:ice2)............ CARTESIAN COMMUNICATORPN P1 P2 P3... Local index jci1:jci2 (jce1:jce2) 1D array of land points to Land Model P1 P2 P3... PN LINEAR COMMUNICATOR

Cartesian To Linear comunication interface Different data types up to 4 dimensional type(masked comm), uses mpi scatterv, mpi gatherv Each processors gives its internal 2D grid, gets 1D land point vector. We have also the option to order up things on the global grid first. call c2l_ss(masked_comm,local_matrix,vector) call c2l_gs(masked_comm,local_matrix,vector) call glb_c2l_ss(masked_comm,global_matrix,vector) call glb_c2l_gs(masked_comm,global_matrix,vector) Each processor gives 1D land point vector, gets its internal 2D grid call l2c_ss(masked_comm,vector,local_matrix) call glb_l2c_ss(masked_comm,vector,global_matrix)

RegCM5 New Non-Hydrostatic, semi-implicit, semi-lagrangian, p-adaptive discontinuous Galerkin method dynamical core Will need new parallel paradigma Grid element with 3D internal quadrature nodes Physical 3D Grid ( +1 for tracers, 4D) + 3D QN = 7D p-adaptive : variable number of QN = Imbalance All physical schemes do need mean vertical profile New expected target grid resolution < 10km Have an extendable Earth System Model Challenges Efficient data types which allow load balancing Efficient I/O interface to accomodate Terabytes of output Use Coupling paradigm to treat multiple model components Usage of Cell Based Libraries