development of kalman filter assimilation package based on qg 2-layer model
DESCRIPTION
Development of Kalman Filter Assimilation Package Based on QG 2-layer Model . School of Earth and Environmental Studies, SNU Kim Baek Min. Collaborators: Hyo-Jong, Song Joo-Wan, Kim Nam-Gyu, Noh Gyu-Ho, Lim. Today’s talk. Review the current status of EnKF - PowerPoint PPT PresentationTRANSCRIPT
Development of Kalman Filter Assimilation Package Development of Kalman Filter Assimilation Package Based on QG 2-layer Model Based on QG 2-layer Model
Collaborators:Collaborators: Hyo-Jong, SongHyo-Jong, Song Joo-Wan, KimJoo-Wan, Kim Nam-Gyu, NohNam-Gyu, Noh Gyu-Ho, LimGyu-Ho, Lim
School of Earth and Environmental Studies, SNUSchool of Earth and Environmental Studies, SNUKim Baek MinKim Baek Min
Today’s talk
1.1. Review the current status of EnKFReview the current status of EnKF
2.2. Exploration of world of EnKF with Lorenz modelExploration of world of EnKF with Lorenz model
3.3. Description of Lorenz QG 2-layer modelDescription of Lorenz QG 2-layer model
4.4. EnKF test with QG modelEnKF test with QG model
5.5. (If you are not still hungry or not still bored^^;) (If you are not still hungry or not still bored^^;) Introduction to New Efficient EKFIntroduction to New Efficient EKF
•Many centers still use 3D-Var though it can not represent time-varying error statistics.
•Several centers (ECMWF, UK, Canada) have switched to 4D-Var, better than 3D-Var.
•4D-Var was clearly better than 3D-Var, but EnKF was only comparable to 3D-Var (Mitchell and Houtekamer,2003).
•Whitaker and Hamill(2005) show EnKF better than NCEP’s 3D-Var for real data.
•Houtekamer and Mitchell(2005) show that EnKF is now as good as 4D-Var.
Current status of EnKF
EnKF Exploration with Lorenz ModelEnKF Exploration with Lorenz Model
1( ) ( )a f f T f T fobsP H HP H R d H
Analysis equationAnalysis equation
obs trued H
( )( )T Tf f true f true f fp
•Forecast covariance matrixForecast covariance matrix should be given apriori should be given apriori
H
( )( )T Tobs true obs true obs obsR d d
Traditional OITraditional OI
•There is no model for covarianceThere is no model for covariance
•Observation error is represented by:Observation error is represented by:
• transforms from model space to obs. spacetransforms from model space to obs. space
1( ) ( )a f f T f T fobsP H HP H R d H
1f f Tt tP LP L
Analysis equationAnalysis equation(just same with OI)(just same with OI)
Traditional Kalman FilterTraditional Kalman Filter
•There is There is modelmodel for covariance for covariance
•Covariance is updated with the aid of Model LCovariance is updated with the aid of Model L
•Model L should be linear model in Kalman filterModel L should be linear model in Kalman filter
•Forecast is provided by integration of L with analysisForecast is provided by integration of L with analysis
( )f aL
1( ) ( )a f f T f T fobsP H HP H R d H
1f f Tt tP MP M
Analysis equationAnalysis equation(just same with OI)(just same with OI)
Extended Kalman FilterExtended Kalman Filter
•There is There is modelmodel for covariance for covariance
•Covariance is updated with the aid of Covariance is updated with the aid of TLM TLM of NLof NL
•Model Model NN is nonlinear model in Kalman filter is nonlinear model in Kalman filter
•Forecast is provided by integration of Forecast is provided by integration of NN with analysis with analysis
( )f aN
RfP
1 2( , ) ( ) ( )a f a f aP d P P d
2 ( )aP d1( )a fP
a fd
( , )a fP d 1( )a fP 2 ( )aP d
Interpretation of OI analysisInterpretation of OI analysis
•Given observation( ) , forecast ( ),Given observation( ) , forecast ( ),
find the find the conditional probabilityconditional probability(a posteriori prob.) through Bayes theorem.(a posteriori prob.) through Bayes theorem.
•Then, we get final analysis( ) by taking point maximizing Then, we get final analysis( ) by taking point maximizing that pdfthat pdf..
d f
a•The conditional probability is given byThe conditional probability is given by
•The structure of is solely determined by The structure of is solely determined by
•The structure of is solely determined by The structure of is solely determined by •When both PDF of obs. And forecast are gaussian!
•When both obs. and forecast are unbiased!
1( ) ( )a f f T f T fj j j jP H HP H R d H
1 2( , ,...., )f f fN
•Consider ensemble of forecast vector and observation vector:Consider ensemble of forecast vector and observation vector:
1 2( , ,...., )Nd d d
•Apply Kalman filter eq. for each jth ensemble memberApply Kalman filter eq. for each jth ensemble member : :
Introducing Ensemble Introducing Ensemble
1
1( )( )
1
Nf f f f fe j j
j
PN
fP
•Flow dependent forecast covariance through the benefit from the wellFlow dependent forecast covariance through the benefit from the well distributed distributed forecast ensemble membersforecast ensemble members..
•No more predefinition of forecast covariance except for the I.C.No more predefinition of forecast covariance except for the I.C.
•Now, forecast model has Now, forecast model has ability to produce its own error statisticsability to produce its own error statistics..
•Forecast PDF follows Focker–planck equation(FPE) theoretically.Forecast PDF follows Focker–planck equation(FPE) theoretically.
•Direct linear approximation to FPE = EKF (Need TLM)Direct linear approximation to FPE = EKF (Need TLM)
•Monte-carlo approximation to FPE = EnKF(No need for TLM)Monte-carlo approximation to FPE = EnKF(No need for TLM)
1
1 Nf f
jjN
Heart of EnKF(1)Heart of EnKF(1)
R1
1( )( )
1
N
e j jj
R d d d dN
•Not essential for obtaining best estimate(analysis).Not essential for obtaining best estimate(analysis).
•But, helps to improve the spreading of analysis variance of analysisBut, helps to improve the spreading of analysis variance of analysis(Burgers et al., 1998)(Burgers et al., 1998)
•If ensemble is small, however, this is source of errorneous analysisIf ensemble is small, however, this is source of errorneous analysis
1
1 N
jj
d dN
Heart of EnKF(2)Heart of EnKF(2)
1( ) ( )a f f T f T fe e eP H HP H R d H
•Finally, the ananlysis equation for EnKF is given by:Finally, the ananlysis equation for EnKF is given by:
a fd
eRfeP
( , )a fP d
1 2( , ) ( ) ( )a f fa aP d P P d
1( )a fP 2 ( )aP d
approximates second mom. ofapproximates second mom. of 2 ( )aP d
approximates second mom. ofapproximates second mom. of 1( )a fP
Interpretation of EnKF analysisInterpretation of EnKF analysis
Example of EnKF analysisExample of EnKF analysis
10( )
8
3
dxy x
dtdy
rx y xzdtdz
xy zdt
•Suppose we conduct EnKF assimilation applied to Lorenz modelSuppose we conduct EnKF assimilation applied to Lorenz model
•Lorenz model •Dimension of model space is three
•Dynamics of the model considerably differs depending on parameter r
•r=21:Stable point attractorr=21:Stable point attractor •r=28: Chaotic attractorr=28: Chaotic attractor
Application to Lorenz ModelApplication to Lorenz Model
1 2 100
1 2 100 1 2 100
1 2 100
...
( , ,...., ) ...
...
f f f
f f f f f f
f f f
x x x
A y y y
z z z
•Dimension of Model state is 3 and 100 ensemble members are used.Dimension of Model state is 3 and 100 ensemble members are used.
...
( , ,...., ) ...
...
f f f
f f f f f f
f f f
x x x
A y y y
z z z
'A A A
' '
1
Tfe
A AP
N
Matrix representation of EnKF(1) (Evensen, 2003)Matrix representation of EnKF(1) (Evensen, 2003)
1 2 100
1 2 100 1 2 100
1 2 100
...
( , ,...., ) ...
...
obs obs obs
obs obs obs
obs obs obs
x x x
D d d d y y y
z z z
...
( , ,...., ) ...
...
obs obs obs
obs obs obs
obs obs obs
x x x
D d d d y y y
z z z
'D D D
' '
1
T
e
D DR
N
Matrix representation of EnKF(2) (Evensen, 2003)Matrix representation of EnKF(2) (Evensen, 2003)
1' ' ( ' ' ' ' ) ( )a T T T T TA A A A H HA A H D D D HA
1( ) ( )a T T Te e eA A P H HPH R D A
1( ) ( )a f f T f T fj j e e e j jP H HP H R d H
1 0 0
0 1 0
0 0 1
H
for our experiment.for our experiment.
Integration Integration with modelwith model
10( )
8
3
dxy x
dtdy
rx y xzdtdz
xy zdt
Weighted Weighted MeanMean
DMeasurement of Obs.Measurement of Obs. Random generatorRandom generator
Gaussian, Normal Gaussian, Normal PDFPDF
aA
Ensemble Ensemble of 100 of 100
analysisanalysis
A
Ensemble Ensemble of 100 of 100
ForecastForecast
feP
Statistics Statistics of of
EnsembleEnsemble
D
Ensemble of 1Ensemble of 100 Obs.00 Obs.
eR
Statistics Statistics of of
Ensemble Ensemble
Summary of EnKF analysisSummary of EnKF analysis
FC = pgf90FC = pgf90FCFLAGS = -Mfree -O2 -r8FCFLAGS = -Mfree -O2 -r8
.SUFFIXES= .F .i .o .f.SUFFIXES= .F .i .o .f
.f.o:.f.o:$(FC) -c $(FCFLAGS) $*.f $(FC) -c $(FCFLAGS) $*.f
OBJS = m_multa.o random.o EnKF.o OBJS = m_multa.o random.o EnKF.o analysis.oanalysis.o lorzrk.o rk4.o lorzrk.o rk4.o
EnKF.exe: $(OBJS)EnKF.exe: $(OBJS)$(FC) -o $@ $(OBJS) $(FCFLAGS) ../../lib/$(FC) -o $@ $(OBJS) $(FCFLAGS) ../../lib/lapack_LINUX.alapack_LINUX.a ../.. ../..
/lib//lib/blas_LINUX.ablas_LINUX.a$(RM) $(OBJS)$(RM) $(OBJS)$(RM) *.mod$(RM) *.mod
clean:clean:$(RM) EnKF.exe $(RM) EnKF.exe
MakefileMakefile
•analysis.f is obtained from http://www.nrsc.no/Code/
•LAPACK, BLAS is obtained from http://netlib.org
•Time step=0.01
•Analysis time=every 0.5(every fifty step)
•Chaotic model regime( r=28)
•Assume true trajectory (x=1.5,y=-1.5,z=25.5)
•Observations are simulated by adding std. dev. 1 perturbation (gauss pdf).
to true trajectory at every analysis time(OSSE)
Experiment 1(Chaotic regime)Experiment 1(Chaotic regime)
Result(Chaotic regime)Result(Chaotic regime)
How does error grow?How does error grow?
T=0.5sT=0.5s
T=1sT=1s
T=1.5sT=1.5s
T=2sT=2s
T=2.5sT=2.5s
T=3sT=3s
•Time step=0.01
•Analysis time=every 0.5(every fifty step)
•Stable model regime( r=21)
•Assume true trajectory (x=1.5,y=-1.5,z=25.5)
•Observations are simulated by adding std. dev. 5 perturbation (gauss pdf).
to true trajectory at every analysis time(OSSE)
•Model dynamics converges to stable equilibrium point. Henceforth, cloud of model ensemble should be shrink as analysis goes by…
•We still expect good result even though we provide quite bad obs(std. dev.=5).
Experiment 2(Stable regime)Experiment 2(Stable regime)
T=0.5sT=0.5s
T=1sT=1s
T=5sT=5s
T=10sT=10s
ResultResult
Lorenz QG 2-layer modelLorenz QG 2-layer model
•Beta plane, channel
•Fourier basis
•Exact calculation of nonlinear terms using interaction coefficient method(exact but slow compared to Transform method)
•Runge-Kutta 4th order time integration scheme
•Periodic boundary condition in west/east direction
•No mass flux across the lateral boundary
•Model can be as simple as possible to Lorenz 3variable model.
•Model can be run in a very high resolution mode.
CharacteristicsCharacteristics
Friction at the interface
Ekman friction
Radiative cooling
10000km
5000km
Radiative equilibrium mean potentialtemperature (θ*(x,y))
H
ρ1
ρ2
Dynamics Quasi-Geostrophic 2-layer
β-plane(mid-latitude)
Parameter-izations
Ekman damping ( k )
Friction at interface ( k´ )
Radiative cooling ( h´´ )
Latent heat release (α0 )
SchematicsSchematics
Variables and parametersVariables and parameters
2 2 2 20
2 2 2 ' 2 20 0
' *
1 1( , ) ( , ) , ( )
2 2
1 1( , ) ( , ) 2 , ( )
2 2
( , ) ( )
d
d d
d
f hJ J J k
t x H
f w f hJ J k J k
t x H H
wJ h
t H
A
Equation setEquation set
( )
( , )
( , )
2 cos( )
2cos( )sin( )
2sin( )sin( )
i
j j
j j
A P i
K M P j j
L H P j j
f P y
f M x P y
f H x P y
1,2, ,
1, 2, ,
1, 2, ,
i T
j T
j T
P Y
M X
H X
Basis functionBasis function
Baroclinic eddy simulationBaroclinic eddy simulation
From Master thesis of Joo-Wan, KimFrom Master thesis of Joo-Wan, Kim
Tangent Linear ModelTangent Linear Model
•For the development of EKF of QG model, TLM of QG model is needed.For the development of EKF of QG model, TLM of QG model is needed.
•Multi-variable taylor expansion is given by:
0 0 0
0 0 0
0 0 0
, , , ,
, , , , . .
, , , ,
F F FD
Dt F FF F FD
F F H OTDt
F FD F F FDt
F F FD
DtF F FD
DtD F F FDt
•TLM is defined as:TLM is defined as:
Basis expansion converts PDE ->ODE
2 2 2 201 1( , ) ( , ) , ( )
2 2 d
f hJ J J k
t x H
,
( ( ) ( ) ( ) ( )) ...iijk j k j k ij j
j k j
dA t t t t B
dt
,
( ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( )) ...iijk j k j k j k j k ij j
j k j
dA t t t t t t t t B
dt
Example of Tangent LinearizationExample of Tangent Linearization
Preliminary EnKF Experiment(High resolution)Preliminary EnKF Experiment(High resolution)
Percentage of errors averaged in 192 grid points
0
20
40
60
80
100
120
140
160
0 1 2 3 4 5 6 7 8Analysis time (6hr interval)
Depart
ure
s o
f estim
ate
s o
r
analy
sis
fro
m a
tru
e (
%)
Perturbed observation
Unperturbed observation
Percentage of errors averaged in 192 grid points
0
20
40
60
80
100
120
140
160
0 1 2 3 4 5 6 7 8Analysis time (6hr interval)
Dep
art
ure
s o
f esti
ma
tes o
r a
na
lysis
fro
m a
tru
e (
%)
100 members
50 members
25 members
10 members
Preliminary EnKF Experiment(High resolution)Preliminary EnKF Experiment(High resolution)
Preliminary EnKF Experiment(Low resolution)Preliminary EnKF Experiment(Low resolution)
Percentage of errors averaged in 48 grid points
0
2
4
6
8
10
12
14
16
18
20
0 1 2 3 4 5 6 7 8Analysis time (6hr interval)
Depart
ure
s of
est
imate
s or
analy
sis
from
a t
rue (
%)
Perturbed observation
Unperturbed observation
Percentage of errors averaged in 48 grid points
02
46
810
1214
1618
20
0 1 2 3 4 5 6 7 8
Analysis time (6hr interval)
Dep
art
ures
of
estim
ate
s or
ana
lysi
s fr
om
a t
rue
(%)
100 members50 members25 members10 members
Preliminary EnKF Experiment(Low resolution)Preliminary EnKF Experiment(Low resolution)
Model HistoryModel History
•Kim(Baek Min) implemented QG-2layer model based on Cehelsky and Tung(1987).Kim(Baek Min) implemented QG-2layer model based on Cehelsky and Tung(1987). He used the model in his master thesis for the predictability study(2001).He used the model in his master thesis for the predictability study(2001).
•Kim(Joo Wan) made a TLM version and obtained a singular vector ofKim(Joo Wan) made a TLM version and obtained a singular vector of QG-2layer model in his master thesis(2003).QG-2layer model in his master thesis(2003).
•Noh(Nam Kyu) implemented EKF of QG-2layer model.Noh(Nam Kyu) implemented EKF of QG-2layer model. He compared 4Dvar and EKF in his master thesis using Lorenz model(2005).He compared 4Dvar and EKF in his master thesis using Lorenz model(2005).
•Song(Hyo Jong) implemented EnKF of QG-2layer model.Song(Hyo Jong) implemented EnKF of QG-2layer model.
Estimate of the Forecast Error Covariance with Governing Eigen-modes
• The forecast error covariance matrix consists of eigen-values and eigenvectors.
• To estimate a variance of each eigen-mode, we need statistically 100 ensemble members.
• The number of eigen-modes, which can be detected by forecast ensemble, is equal to that of ensemble members.
Estimate of the Forecast Error Covariance with Governing Eigen-modes
Rank of the analysis error covariance matrix
02468
1012141618
0 1 2 3 4 5 6 7 8
Analysis time (6hr interval)
Num
ber
of
go
vern
ing
eig
enm
od
es
• If the number of governing eigen-modes is smaller than 100, the forecast error covariance may be estimated by another method to reduce computational cost.
Estimate of the Forecast Error Covariance with Governing Eigen-modes
100.an smaller th is modes-eigen governing ofnumber
theifcost low with covarianceerror forecast theestimatecan We).( of form
expansion Talyor in first than sorder termhigher discards ly,Particular linear.
tangent and model a does and also state, model a and covarianceerror an
denotes and true,and analysis forecast,for stand and , tssuperscrip where
)( ,}))()())(()({(1
)( }))({(
}))()(())(()({(
interval, analysis
anfor validis covarianceerror forecast theion toapproximatlinear tangent If
1
T2
111
T
TTTT222
TT111
T
T
Mf
xP
xfexfxfexf
eMeM
MeMeMeMeMeMe
MMP
xfxfxfxfP
taf
E
k
i
aii
aaii
a
kk
k
iiiii
nnn
a
tataf