ecmwf governing equations 3 slide 1 numerical methods iv (time stepping) by nils wedi (room 007;...
TRANSCRIPT
ECMWFGoverning Equations 3 Slide 1
Numerical methods IV(time stepping)
by Nils Wedi (room 007; ext. 2657)
In part based on previous material by Mariano Hortal and Agathe Untch
ECMWFGoverning Equations 3 Slide 2
What is the basis for a stable numerical implementation ?
A: Removal of fast - supposedly insignificant - external and/or
internal acoustic modes (relaxed or eliminated), making use of
infinite sound speed (cs) and/or the hydrostatic approximation
from the governing equations BEFORE numerics is introduced.
B: Use of the full equations WITH a semi-implicit numerical framework, reducing the propagation speed (cs 0) of fast acoustic and buoyancy disturbances, retaining the slow convective-advective component (ideally) undistorted.
C: Split-explicit integration of the full equations, since explicit NOT practical (~100 times slower)
Determines the choice of the numerical scheme
ECMWFGoverning Equations 3 Slide 3
Choices for numerical implementation
Avoiding the solution of an elliptic equation
fractional step methods (eg. split-explicit); Skamrock and Klemp (1992); Durran (1999)
Solving an elliptic equation
Projection method; Durran (1999)
Semi-implicit Durran (1999); Cullen et. al.(1994); Benard et al. (2004); Benard (2004); Benard et al. (2005)
Preconditioned conjugate-residual solvers (eg. GMRES) or multigrid methods for solving the resulting Poisson or Helmholtz equations; Skamarock et. al. (1997); Saad (2003)
Direct Methods; Martinsson (2009)
ECMWFGoverning Equations 3 Slide 4
Split-explicit integrationSkamarock and Klemp (1992); Durran (1999);Doms and Schättler (1999);
‘Slow’ part of solution‘Fast’ part of solution
e.g. implemented in popular limited-area models: Deutschland Modell, WRF model
ECMWFGoverning Equations 3 Slide 5
Semi-implicit schemes
(i) coefficients constant in time and horizontally (hydrostatic models Robert et al. (1972), Benard et al. (2004), Benard (2004) ECMWF/Arpege/Aladin NH)
(ii) coefficients constant in time Thomas (1998); Qian, (1998); see references in Bénard (2004)
(iii) non-constant coefficients Skamarock et. al. (1997), (UK Met Office NH model, EULAG model)
non-linear term, treated explicit
linearised term, treated implicit
ECMWFGoverning Equations 3 Slide 6
Design of semi-implicit methods
Treat all terms involving the fastest propagation speeds implicitly (acoustic waves, gravity waves).
Assume that the energy in those components is negligible.Consider the solvability of the resulting implicit system,
which is typically an elliptic equation.
ECMWFGoverning Equations 3 Slide 7
Example: Shallow water equations
0
0
0
0
u u hU g
t x xh h u
U Ht x x
Linear analytic solution:
ikxti eeutxu 0),(
Phase speed: gHUk
c
0
Linearized:
H denotes here a mean state depth.
ECMWFGoverning Equations 3 Slide 8
0
0
( ) 0
u u uu v fv
t x y x
v v vu v fu
t x y y
u vu v
t x y x y
Shallow water equations
: advection
In the linear version:2
0202 VU
st
2
st
2 20 02
st
U V
: gravity-wave (or sometimes called ‘adjustment’) term
combinedadvection adjustment
In the atmosphere
5
300 /
10
gH m s
s m
in synoptic-scale models ==> Δt≤ 236 sec ~ 4 min
2 20 0U V
ECMWFGoverning Equations 3 Slide 9
Explicit time-stepping
• Leap-frog explicit scheme
1 1
1 1
1 1
n n n n nj j j j x j
n n n n nj j j j y j
n n n n nj j j j j
tu u tV u
st
v v tV vs
ttV V
s
&&&&&&&&&&&&&& &&&&&&&&&&&&&&
&&&&&&&&&&&&&& &&&&&&&&&&&&&&
&&&&&&&&&&&&&&&&&&&&&&&&&&&& &&&&&&&&&&&&&&
( , )
( , )
j j j
x y
x j j x j x
y j j y j y
gH
x y s
V u v
A A A
A A A
&&&&&&&&&&&&&&
&&&&&&&&&&&&&&
x x x
x x x
x x xj-Δx j+Δx
j+Δy
j-Δy
j
Stability:
If we treat implicitly the advection terms we do not get a Helmholtz equation
2
st
ECMWFGoverning Equations 3 Slide 10
Increasing the allowed timestep
• Forward-backward scheme
0
0
x
u
t
xt
u
)(2
)(2
11
11
1
111
nj
nj
nj
nj
nj
nj
nj
nj
x
tuu
uux
tforward
backward
von Neumann gives 2)sin(
xkx
tdoubles the leapfrogtimestep
• Pressure averaging
)]}()[())(21{(2
1
211
11
11
1111
11
nj
nj
nj
nj
nj
nj
nj
nj
xt
uu
if ε=0 ------> leapfrog
if ε=1/4 we get 2)sin(
xkx
t doubles the leapfrogtimestep
ECMWFGoverning Equations 3 Slide 11
Split-explicit time-stepping
1
1
1
s n n nj j s j j
s n n nj j s j j
s n n nj j s j j
u u t V u
v v t V v
t V
&&&&&&&&&&&&&& &&&&&&&&&&&&&&
&&&&&&&&&&&&&& &&&&&&&&&&&&&&
&&&&&&&&&&&&&& &&&&&&&&&&&&&&
Stability as beforebut M times a simplerproblem.
Note: The fast solution may be computed implicitly.
2f
st
1
1
1
fn s nj j x j
fn s nj j y j
fn s nj j j
tu u
st
v vs
tV
s
&&&&&&&&&&&&&&
slowfast
2 20 02
s
st
U V
s ft M t
Potential drawbacks: splitting errors, conservation. However recent advances for NH NWP suggested in (Klemp et. al. 2007)
ECMWFGoverning Equations 3 Slide 12
Semi-implicit time-stepping
1 1 1 1
1 1 1 1
1 1 1 1
( )2
( )2
( )2
n n n n n nj j j j x j j
n n n n n nj j j j y j j
n n n n n nj j j j j j
tu u tV u
st
v v tV vs
ttV V V
s
&&&&&&&&&&&&&& &&&&&&&&&&&&&&
&&&&&&&&&&&&&& &&&&&&&&&&&&&&
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& &&&&&&&&&&&&&&
( , )
( , )
j j j
x y
x j j x j x
y j j y j y
x y s
V u v
A A A
A A A
&&&&&&&&&&&&&&
&&&&&&&&&&&&&&
x x x
x x x
x x xj-Δx j+Δx
j+Δy
j-Δy
j
Solve:2
2 1 1 , 12
4( )
( )n n n nj j
sF
t
Helmholtz equation !
Stability: now only limited by the advection termsNote: if we also treat the advection terms implicitly we do not get a Helmholtz equation!
ECMWFGoverning Equations 3 Slide 13
Compressible Euler equations
Davies et al. (2003)
ECMWFGoverning Equations 3 Slide 14
Compressible Euler equations
ECMWFGoverning Equations 3 Slide 15
A semi-Lagrangian semi-implicit solution procedure
Davies et al. (1998,2005)
(not as implemented, Davies et al. (2005) for details)
ECMWFGoverning Equations 3 Slide 16
A semi-Lagrangian semi-implicit solution procedure
ECMWFGoverning Equations 3 Slide 17
A semi-Lagrangian semi-implicit solution procedure
Non-constant-coefficient approach!
Helmholtz equation (solutions see e.g. Skamarock et al. 1997, Smolarkiewicz et al. 2000)
ECMWFGoverning Equations 3 Slide 18
Semi-implicit time integration in IFS
Choice of which terms in RHS to treat implicitly is guided by the knowledge of which waves cause instability because they are too fast (violate the CFL condition) and need to be slowed down with an implicit treatment.
In a hydrostatic model, fastest waves are horizontally propagating external gravity waves (long surface gravity waves), Lamb waves (acoustic wave not filtered out by the hydrostatic approximation)and long internal gravity waves. => implicit treatment of the adjustment terms.
L= linearization of part of RHS (i.e. terms supporting the fast modes) => good chance of obtaining a system of equations in the variables at “+” that can be solved almost analytically in a spectral model.
ECMWFGoverning Equations 3 Slide 19
Two-time-level semi-Lagrangian semi-implicit time integration in the hydrostatic IFS
xRHSDt
DX
0 0 1/2 1/2 *0.5 0.5 xX tL X tL tRHS tL X
Notations:X : advected variableRHS: right-hand side of the equationL: part of RHS treated implicitlySuperscripts: “0” indicates value at dep. point (t)
“1/2” indicates value at mid-point (t+0.5Δt) “+” indicates value at arrival point (t+Δt)
0 1/20.5 ( )tt L L L L For compact notation define:
“semi-implicit correction term”
L=RHS => implicit schemeL= part of RHS => semi-implicit (β=1)L=0 => explicit (β=0)
1/2x tt
DXRHS L
Dt =>
ECMWFGoverning Equations 3 Slide 20
Semi-implicit time integration in IFS
1
0
h
TT
vv
)v(1
)(ln
)1(1
lnvv
dp
pp
t
KPpq
T
Dt
DT
KPpTRkfDt
D
ss
v
vdhh
DRHSpt
DRHSDt
DT
pTRTRHSDt
D
ttps
ttT
srdtth
)(ln
lnγv
v
semi-implicitequations
semi-implicit corrections
ECMWFGoverning Equations 3 Slide 21
1
0
1
0
γ
1
d r
r
d r r
pd r
r
sr
R X dpX d
p d
R T dpX X d
c p d
dpX X d
p d
Semi-implicit time integration in IFS
semi-implicitequations
Where:
DRHSpt
DRHSDt
DT
pTRTRHSDt
D
ttps
ttT
srdtth
)(ln
lnγv
v
DRHSpt
DRHSDt
DT
pTRTRHSDt
D
ttps
ttT
srdtth
)(ln
lnγv
v
Reference state for linearization:
rT ref. temperature
srp ref. surf. pressure
=> lin. geopotential for X=T
=> lin. energy conv. term for X=D
ECMWFGoverning Equations 3 Slide 22
Linear system to be solved
2 *
*
*
0.5 ( log( ))
0.5
log( ) 0.5
d r s
s
D t T R T p D
T t D T
p t D P
2 *
*
*
0.5 ( log( ))
0.5
log( ) 0.5
d r s
s
D t T R T p D
T t D T
p t D P
Eliminate all variables to find also aHelmholtz equation for D+ :
2 2 2 * 2 * *(1 0.25 ( ) ) 0.5 ( )d r d rt R T D D t T R T P 2 2 2 * 2 * *(1 0.25 ( ) ) 0.5 ( )d r d rt R T D D t T R T P
DD~
I 2
rdTR γ operator acting only on the verticalI = unity operator
ECMWFGoverning Equations 3 Slide 23
Semi-implicit time integration in IFS
DD~
I 2
rdTR γ
Vertically coupled set of Helmholtz equations. Coupling through
Uncouple by transforming to the eigenspace of this matrix gamma(i.e. diagonalise gamma). Unity matrix “I” stays diagonal. =>
DDi
~1 2
One equation for each LevNi 1
In spectral space (spherical harmonics space):
mn
mni DD
a
nn ~)1(1
2
22
( 1)m mn n
n nY Y
a
because
Once D+ has been computed, it is easy to compute the other variables at “+”.