Reduction of Temporal Discretization Error in an Atmospheric General Circulation Model (AGCM) Daisuke Hotta Advisor: Prof. Eugenia Kalnay.

Slides:



Advertisements
Similar presentations
Finite Difference Discretization of Hyperbolic Equations: Linear Problems Lectures 8, 9 and 10.
Advertisements

Sigal Gottlieb, UMass Dartmouth: SAMSI workshop November 15, 2007 STRONG STABILITY PRESERVING RUNGE-KUTTA & MULTI-STEP TIME DISCRETIZATIONS Sigal Gottlieb,
An Introduction to Numerical Methods
ECMWF Governing Equations 3 Slide 1 Numerical methods IV (time stepping) by Nils Wedi (room 007; ext. 2657) In part based on previous material by Mariano.
Discrete variational derivative methods: Geometric Integration methods for PDEs Chris Budd (Bath), Takaharu Yaguchi (Tokyo), Daisuke Furihata (Osaka)
Geometric Integration of Differential Equations 1. Introduction and ODEs Chris Budd.
Example Project and Numerical Integration Computational Neuroscience 03 Lecture 11.
Formal Computational Skills
Ordinary Differential Equations
4 th order Embedded Boundary FDTD algorithm for Maxwell Equations Lingling Wu, Stony Brook University Roman Samulyak, BNL Tianshi Lu, BNL Application collaborators:
Computational Modeling for Engineering MECN 6040
(c) MSc Module MTMW14 : Numerical modelling of atmospheres and oceans Staggered schemes 3.1 Staggered time schemes.
Krakow - September, 15th 2008COSMO WG 2 - Runge Kutta1 Further Developments of the Runge-Kutta Time Integration Scheme Investigation of Convergence (task.
Ordinary Differential Equations
Coupling Continuum Model and Smoothed Particle Hydrodynamics Methods for Reactive Transport Yilin Fang, Timothy D Scheibe and Alexandre M Tartakovsky Pacific.
Jan Verwer Convergence and Component Splitting for the Crank-Nicolson Leap-Frog Scheme Hairer-60 Conference, Geneva, June 2009 TexPoint fonts used in EMF.
Numerical Integration of Partial Differential Equations (PDEs)
1cs542g-term Notes  Even if you’re not registered (not handing in assignment 1) send me an to be added to a class list.
CSE245: Computer-Aided Circuit Simulation and Verification Lecture Note 5 Numerical Integration Spring 2010 Prof. Chung-Kuan Cheng 1.
Atms 4320 Lab 2 Anthony R. Lupo. Lab 2 -Methodologies for evaluating the total derviatives in the fundamental equations of hydrodynamics  Recall that.
ECIV 301 Programming & Graphics Numerical Methods for Engineers Lecture 31 Ordinary Differential Equations.
Ordinary Differential Equations (ODEs) 1Daniel Baur / Numerical Methods for Chemical Engineers / Implicit ODE Solvers Daniel Baur ETH Zurich, Institut.
Numerical Solutions to ODEs Nancy Griffeth January 14, 2014 Funding for this workshop was provided by the program “Computational Modeling and Analysis.
Numerical Methods for Partial Differential Equations
Finite Differences Finite Difference Approximations  Simple geophysical partial differential equations  Finite differences - definitions  Finite-difference.
M. Baldauf, DWD Numerical contributions to the Priority Project ‘Runge-Kutta’ COSMO General Meeting, Working Group 2 (Numerics) Bukarest,
Most physically significant large-scale atmospheric circulations have time scales on the order of Rossby waves but much larger than the time scales.
Variants of the 1D Wave Equation Jason Batchelder 6/28/07.
1 A Framework for The Analysis of Physics-Dynamics Coupling Strategies Andrew Staniforth, Nigel Wood (Met Office Dynamics Research Group) and Jean Côté.
Implementation of an Advection Scheme based on Piecewise Parabolic Method (PPM) in the MesoNH The main goal of this study was to estimate if the RGSW model.
Lecture 3.
1 EEE 431 Computational Methods in Electrodynamics Lecture 4 By Dr. Rasime Uyguroglu
1 Computational Methods Dr. Farzad Ismail School of Aerospace and Mechanical Engineering Universiti Sains Malaysia Nibong Tebal Pulau Pinang Week.
Computer Animation Algorithms and Techniques
© Crown copyright Met Office A Framework for The Analysis of Physics-Dynamics Coupling Strategies Andrew Staniforth, Nigel Wood (Met O Dynamics Research)
Integration of 3-body encounter. Figure taken from
Professor Walter W. Olson Department of Mechanical, Industrial and Manufacturing Engineering University of Toledo Performance & Stability Analysis.
3.3.3: Semi-Lagrangian schemes AOSC614 class Hong Li.
7. Introduction to the numerical integration of PDE. As an example, we consider the following PDE with one variable; Finite difference method is one of.
Model Task 0B: Implementing different schemes ATM 562 Fall 2015 Fovell 1.
+ Numerical Integration Techniques A Brief Introduction By Kai Zhao January, 2011.
Phase Separation and Dynamics of a Two Component Bose-Einstein Condensate.
Rieben IMA Poster, 05/11/ UC Davis /LLNL/ ISCR High Order Symplectic Integration Methods for Finite Element Solutions to Time Dependent Maxwell Equations.
Author: Daisuke Hotta Advisor: Prof. Eugenia Kalnay
Large Timestep Issues Lecture 12 Alessandra Nardi Thanks to Prof. Sangiovanni, Prof. Newton, Prof. White, Deepak Ramaswamy, Michal Rewienski, and Karen.
Numerical Analysis – Differential Equation
Particle Systems. Applications Particle systems are broadly defined for: Explosion Cloth Fluid And more… It is integrated into many animation software,
Requirements of High Accuracy Computing 1) Adopted numerical scheme must resolve all physical time and length scales. 2) Numerical scheme must be neutrally.
1 Reformulation of the LM fast- waves equation part including a radiative upper boundary condition Almut Gassmann and Hans-Joachim Herzog (Meteorological.
ECE 576 – Power System Dynamics and Stability Prof. Tom Overbye Dept. of Electrical and Computer Engineering University of Illinois at Urbana-Champaign.
Numerics of Parametrization ECMWF training course May 2006 by Nils Wedi  ECMWF.
The story so far… ATM 562 Fovell Fall, Convergence We will deploy finite difference (FD) approximations to our model partial differential equations.
1 Spring 2003 Prof. Tim Warburton MA557/MA578/CS557 Lecture 32.
Time Integration Schemes Bill Skamarock NCAR/MMM 1.Canonical equations for scheme analyses. 2.Time-integration schemes used in NWP models.
Lecture 4: Numerical Stability
ივანე ჯავახიშვილის სახელობის
ECE 576 – Power System Dynamics and Stability
Improving computational stability with time-splitting of vertical advection considering 3-dimensional CFL condition Kohei Kawano1, Kohei Aranami1, Tabito.
NUMERICAL INVESTIGATIONS OF FINITE DIFFERENCE SCHEMES
Convergence in Computational Science
21th Lecture - Advection - Diffusion
CSE245: Computer-Aided Circuit Simulation and Verification
Class Notes 19: Numerical Methods (2/2)
Ordinary differential equaltions:
CSE245: Computer-Aided Circuit Simulation and Verification
topic11_shocktube_problem
6th Lecture : Numerical Methods
Semi-implicit predictor-corrector methods for atmospheric models
Presentation transcript:

Reduction of Temporal Discretization Error in an Atmospheric General Circulation Model (AGCM) Daisuke Hotta Advisor: Prof. Eugenia Kalnay Dept. of Atmospheric and Oceanic Science, University of Maryland, College Park

Numerical Weather Prediction (NWP): = Initial Value Problem of PDE Atmospheric Phenomena Governing Equations Numerical Discretization Solve ! (Simulate) (Real Atmosphere) (from JMA website) Simulated Atmosphere from php Hydrodynamic PDE O(10 9 )-dimensional ODE from a-eng/jma-center/nwp/nwp- top.htm AGCM: Atmospheric General Circulation Model = a computer program which simulates the flow of global atmosphere by numerically integrating the governing fluid dynamical PDEs

Introduction: Motivation Due to computational restrictions … most AGCMs adopt low-order time-integration schemes, such as -Leap-frog with Robert-Asselin filter (1 st order) -Explicit Backward Euler (aka. Matsuno; 1 st order) Often, Δt is taken as the largest value for which computational instability is suppressed, under the premise that temporal discretization errors are negligible compared to those associated with spatial discretization or Physical Parameterizations.

Introduction: Motivation However … Spatial resolutions become finer and finer as the supercomputers become faster. Is the premise that time truncation errors are negligible justified ? If not, how can we alleviate such errors ?  Goal of the Project: Reduction of such model errors Approaches : Phase 1: Use a more accurate scheme with the same computational cost Phase 2: Identify and parameterize the error, and reduce it using data assimilation

Phase 1 : A Better integration scheme (Lorenz N-cycle) Lorenz (1971) proposed an incredibly smart time-integration scheme which: requires only 1 function evaluation per step but yet (every N steps) it is of - (up to) 4 th -order accuracy (for nonlinear systems) - arbitrary order of accuracy (for linear systems) However, this scheme seems to have remained forgotten. No applications have been made to AGCMs.  Apply Lorenz N-cycle to an AGCM (Phase 1)

Phase 1: Approach Implement Lorenz N-cycle to an existing AGCM Implement 4 th order Runge-Kutta (RK4) as well as a reference Compare the accuracy and efficiency of the newly introduced schemes with the original scheme Perform verification by the Jablonowski- Williamson (2006) Dynamical-core Tests

Phase 1: Algorithms Lorenz N-cycle (existing) Leap-frog with Robert-Asselin Filter 4 th order Runge-Kutta Memory consumption: 2 x dim{model state} Memory consumption: 2 x dim{model state} Memory consumption: 5 x dim{model state} F-evaluation: 1 per time step F-evaluation: 4 per time step accuracy: (N <= 4) O((NΔt) N ) (every N steps) O(NΔt ) (in between) accuracy: O(Δt ) accuracy: O(Δt 4 ) ODE to be solved:

AGCM: SPEEDY model A fast AGCM with simplified physical parameterizations Developed in ICTP (Italy) by Drs. F. Molteni and F. Kucharski Horizontal Discretization: Spectral Representation with Spherical Harmonics truncated at total wavenumber 30 (T30) ≈ 400km mesh Vertical Discretization: 8-layers Finite Difference on σ-coordinate Temporal Discretization: Leap-Frog scheme with Robert-Asselin Filter (1 st order Forward Euler for the physical parameterizations)

The equations solved: the “primitive” equation system (PDEs) on a spherical geometry + parametrized processes Dynamical Core ….. Sub-grid Parametrizations

AGCM: SPEEDY model Language: Fortran77 Platform: Any machine which supports Fortan77 compiler (a Linux server will be used in this study) Code statistics:  10,000 lines, 73 files # predicted variables:    Implementation to be made: Add new subroutines for N-cycle and RK4 schemes (for validation) Add an Option to Switch-off Physical Parameterizations Add an Option to run with flat orography

Achievements of the semester 1.Implementation of Lorenz N-cycle and RK4 schemes to SPEEDY 2.Code Validations 3.Options for the Dynamical-Core tests (=Verification) 4.Results of the Dynamical-Core tests (=Verification) 5.Several Formulations of Semi-implicit scheme and their stability analysis tested with toy models

Code Validation: Idea Lorenz N-cycle: – Lorenz 1-cycle is equivalent to Forward Euler, which is built-in in the SPEEDY model. –  Compare Lorenz 1-cycle with Forward Euler. RK4 : – For a linear system, RK4 with 4Δt is equivalent to Lorenz 4-cycle with Δt. –  Remove all nonlinear terms from SPEEDY and Compare RK4 (4Δt) with Lorenz 4-cycle (Δt).

Code Validation: Results Outputs of single step integrations of Lorenz 1- cycle and Forward Euler from the same initial condition are compared using UNIX diff command. – Result  no difference (Success)! Similarly, outputs of single step integration of RK4 and four-step integration of Lorenz 4-cycle from the same initial condition are compared using UNIX diff command. – Result  no difference (Success)!

Verification: Dynamical-Core test cases Standardized tests for dynamical cores of AGCM proposed by Jablonowski and Williamson (2006) which consists of two tests: 1.Steady-State test: – A model is integrated from an analytical steady-state solution of the primitive equation – The model evaluated by how well it can keep the steady- state intact. 2.Baroclinic-Wave test: – The model is integrated with initial and boundary conditions which is designed to produce an idealized baroclinic wave (= extratropic cyclones and highs)

Baroclinic-wave Test: Result (Lorenz 4-cycle)

Snapshots of surface-pressure at Day 9 Hi-res. reference solution Leapfrog (dt=20min) Leapfrog (dt=1min) RK4 (dt=1min) N-cycle (dt=20min)

Quantitative Comparison: RMSE of surface pressure (vs. RK4) Time(Days)

Deliverables (Phase 1) Upgraded code for SPEEDY model – subroutines for Lorenz N-cycle – 4 th order Runge-Kutta Test-case results for the SPEEDY model (both for the original scheme and the new schemes) ✔ ✔ ✔

Schedule and Milestones Phase 1: Implement RK4 and N-cycle, Nov. Write the mid-year report, prepare the oral presentation, Dec. Switch-off physical parameterizations, prepare flat topography, Jan. perform the dynamical core tests. Feb. Phase 2: Generate initial values from the NCEP/NCAR reanalysis, end of Feb. build the bias and covariance matrix, Mar. Code and test a program for SVD, Apr. Compare the model errors for the new and the original shcemes, May. Write the final report (paper draft), May. ✔ ✔ ✔ ✔

Unexpected Problem: N-cycle, RK4 and Euler-forward blow up when physical parameterizations are on Temperature Vorticity Divergence RK4 N-cycle Leapfrog

(Possible) Modification to the Plan The original plan for the Phase 2 is to identify and correct model errors of N-cycle SPEEDY with physics, using NCEP/NCAR reanalysis as truth which is impossible if N-cycle with physics blows up. Plan: – Continue working on the issue with physics for one more month. – If the issue is fixed, then continue Phase 2 as planned. – If not, modify the Phase 2: Use RK4 without physics as Truth. Try to identify and correct model errors of N-cycle without physics.

Summary Implemented and tested Lorenz N-cycle and RK4 for the SPEEDY AGCM Code validation was successful Verification with the Dynamical Core test confirmed that Lorenz N-cycle is much more accurate than the conventional Leapfrog. However, SPEEDY with full physics blows up if the temporal discretization is Lorenz N-cycle, RK4 or forward Euler (i.e. anything other than leapfrog). Modification to the Phase 2 may be in order.

Bibliography Lorenz N-cycle Lorenz, Edward N., 1971: An N-cycle time-differencing scheme for stepwise numerical integration. Mon. Wea. Rev., 99, 644–648. SPEEDY model Molteni, Franco, 2003: Atmospheric simulations using a GCM with simplified physical parameterizations. I. Model climatology and variability in multi-decadal experiments. Clim. Dyn., 20, Kucharski F, Molteni F, and Bracco A, 2006: Decadal interactions between the western tropical Pacific and the North Atlantic Oscillation. Clim. Dyn., 26, SPEEDY-LETKF Miyoshi, T., 2005: Ensemble Kalman filter experiments with a primitive-equation global model. Ph.D. dissertation, University of Maryland, College Park, 197pp. Atmospheric GCM Dynamical Core test cases Jablonowski, C. and D. L. Williamson 2006: A baroclinic instability test case for atmospheric model dynamical cores, Q. J. R. Metorol. Soc., 132, NCEP/NCAR reanalysis Kalnay, E., and Coauthors, 1996: The NCEP/NCAR 40-Year Reanalysis Project. Bull. Amer. Meteor. Soc., 77, 437–471. Model Error Correction Danforth, Christopher M., Eugenia Kalnay, Takemasa Miyoshi, 2007: Estimating and Correcting Global Weather Model Error. Mon. Wea. Rev., 135, 281–299. Danforth, Christopher M., Eugenia Kalnay, 2008: Using Singular Value Decomposition to Parameterize State- Dependent Model Errors. J. Atmos. Sci., 65, 1467–1478.

back-up slides

Lorenz N-cycle with semi-implicit integration

Motivation For a practical AGCM, semi-implicit treatment of fast inertia-gravity wave is indispensable to allow for a large time stepping. Semi-implicit treatment “unlocks” CFL constraint associated with the fast waves. However, for some schemes (including Forward Euler or 3 rd -order Adans-Bashforth), semi-implicit treatment does not help stabilize integration  Examine the stability for Lorenz N-cycle

Method Following Durran (1991, 1999; MWR) and Williamson (2011; MWR), apply semi-implicit modification to the second term of the equation: Examine the modulus of Amplification factor A. If |A| < 1, the scheme is stable. Range of interest: i.e., CFL condition is met for low-frequency part but is violated for high-frequency part.

Approach 1: Semi-implicit correction on every time step Algorithm By choosing β=1/2 (Crank-Nicolson), the scheme becomes second-order Truncation Error:

Plots of |A|-1 (β=1/2: Crank-Nicolson) Leapfrog with R/A filter: Stable almost everywhere Lorenz 1-cycle (=Forward Euler): Unstable everywhere Lorenz 2-cycle: Unstable everywhere Lorenz 3-cycle: Absolutely Unstable for > 1.5 Lorenz 4-cycle: Absolutely Unstable for > 2.7 Stable Unstable Stable Unstable

Plots of |A|-1 (β=1: Backward Euler) Ref: Leapfrog+R/A filter Lorenz 1-cycle (=Forward Euler): Lorenz 2-cycle: Lorenz 3-cycle: Lorenz 4-cycle: Stable Unstable Stable Unstable Stable Unstable Stable Unstable Stable Stability is good, but damping is too strong (  50%)

Approach 2: Semi-implicit correction on every N time steps Algorithm The scheme is only 1 st order, even for β=1/2 (Crank-Nicolson) Stability is also horrible (not shown) Truncation Error:

After trial and errors, I found that the following algorithm: gives the truncation error which, for β=1/2, makes the scheme 2 nd order.

Plots of |A|-1 (β=1/2: Crank-Nicolson) Reference: Leapfrog wirh R/A filter Lorenz 1-cycle (=Forward Euler): Unstable everywhere Lorenz 2-cycle: Unstable everywhere Lorenz 3-cycle: Stable for < 0.5 Stable Unstable Stable Unstable Lorenz 4-cycle: Stable for < 0.7

Stability for larger N Stable Unstable Stable Unstable 5-cycle: stable only in the band 0.4< < cycle: everywhere unstable 7-cycle: stable only for < cycle: stable only for < cycle: stable only in the band 0.2< < 0.5

Phase error (β=1/2: Crank-Nicolson) Reference: Leapfrog wirh R/A filter Lorenz 3-cycleLorenz 4-cycle

Swinging-pendulum problem A simple nonlinear test-bed for semi-implicit schemes. Fast oscillation = elastic spring Slow oscillation = pendulum Fast mode is treated implicitly, slow mode explicitly. For this test, I use Δt=0.075 which gives ω LOW Δt=0.225, ω HIGH Δt=2.25, From Williams (2011)

Leapfrog with RA filter (α=0.01) RK4 with Δt= Leapfrog θ η Energy

4-cycle with semi-implicit correction on every 4 steps (Crank-Nicolson) θ η Energy RK4 with Δt= Leapfrog

4-cycle with semi-implicit correction on every 4 steps (Backward)  stable but very dissipative θ η Energy RK4 with Δt= Leapfrog

4-cycle with semi-implicit correction on every time step  unstable θ η Energy RK4 with Δt= Leapfrog

Explicit 4-cycle  unstable θ η Energy RK4 with Δt= Leapfrog

Summary Consistent with the linear analysis, N-cycle with semi-implicit on each time step  unstable N-cycle with semi-implicit on every N steps  Crank-Nicolson: stable, but comparable accuracy with Leapfrog  Backward Euler: stable, very dissipative

Reference: Williams, P. D. 2011: The RAW Filter: An Improvement to the Robert–Asselin Filter in Semi-Implicit Integrations, Mon. Weath. Rev., 139,

Runge-Kutta 4 th -order scheme with semi-implicit correction

Introduction I implemented semi-implicit Runge-Kutta 4 th -order scheme to SPEEDY model and found that – for Crank-Nicolson, the model blows up, even for very small dt (1min). – for Backward Euler, the model is too diffusive that the baroclinic-wave dynamical core test fails to produce the baroclinic wave. Explicit Runge-Kutta 4 th -order scheme with small dt (5min) works fine for the dynamical core test.  examine stability using the toy-model

Method Following Durran (1991, 1999; MWR) and Williamson (2011; MWR), apply semi-implicit modification to the second term of the equation: Examine the modulus of Amplification factor A. If |A| < 1, the scheme is stable. Range of interest: i.e., CFL condition is met for low-frequency part but is violated for high-frequency part.

Algorithm: RK4 for ω L, Crank-Nicolson for ω H Truncation Error: the accuracy is only 1 st order

Plot of |A|-1 β=1/2: Crank-Nicolson -> Absolutely unstable β=1: backward Euler -> Absolutely stable,but extremely dissipative

Summary Runge-Kutta 4 th -order scheme with semi- implicit time is – only of first order (with respect to fast modes) – absolutely unstable if Crank-Nicolson is used – absolutely stable if Backward Euler is used, but the numerical damping is too strong (more than halving on every time step) all of the above are consistent with what I found for the SPEEDY model.

Conclusion Runge-Kutta 4 th -order scheme with semi-implicit time-stepping for gravity waves is impossible (either unstable or too dissipative) The accuracy becomes only of 1 st order. Since the motivation for implementing Runge- Kutta 4 th -order scheme is to produce a reference solution, I will not try to resolve this issue, and use the explicit scheme with small dt.

Stability analysis of Forward Euler “split physics” for Leapfrog, Lorenz 4-cycle and RK4

Toy model: linear advection-diffusion equation Undiscretized equation: The first term of the RHS simulates the dynamics of AGCM, and the second the physics.

Discretization: Leapfrog(dyn) + Euler(phys) Discretized equation: The amplification factor A satisfies the following equation: (+) and (-) correspond, respectively, to physical and computational modes. The scheme is stable if the maximum of the moduli of them is less than 1.

Discretization: Leapfrog for both dyn & phys Discretized equation: The amplification factor A satisfies the following equation: (+) and (-) correspond, respectively, to physical and computational modes. The scheme is stable if the maximum of the moduli of them is less than 1.

Discretization: Lorenz 4-cycle (dyn) + Euler(phys) Discretized equation: Amplification factor (per time step):

Discretization: Lorenz 4-cycle for both dyn & phys Discretized equation: Amplification factor (per time step):

Discretization: RK4(dyn) + Euler(phys) Discretized equation: Amplification factor :

Discretization: RK4 for both dyn&phys Discretized equation: Amplification factor (per time step):

Leapfrog: “split physics” stabilizes the otherwise absolutely unstable scheme Leapfrog for both dyn & phys: absolutely unstable Leapfrog (dyn) + Euler (phys): Stable within the triangle unstable stable

Lorenz 4-cyle: “split physics” destabilizes the scheme Lorenz 4-cycle for dyn & phys: absolutely unstable L4-cycle (dyn) + Euler (phys): Stable within the triangle unstable stable unstable stable

RK4: again, “split physics” destabilizes the scheme unstable stable unstable stable RK4 for dyn & phys: absolutely unstable RK4 (dyn) + Euler (phys): Stable within the triangle

Summary For leapfrog, doing “split physics” works very well (stabilizes the scheme) However, for Lorenz 4-cycle (and equivalently, for RK4), “split physics” acts to destabilized the scheme. The latter is consistent with what I found by doing “split physics” with SPEEDY model.

Next to do I found that “symmetric splitting” semi- implicit scheme significantly stabilizes Lorenz N-cycle. Analogously, there is a hope that doing “symmetric splitting” for physics may help stabilized the model.  Examine this possibility with the “Toy model” and SPEEDY.