An introduction to the EnKF · An introduction to the EnKF Pavel Sakov Bureau of Meteorology...

20
An introduction to the EnKF Pavel Sakov Bureau of Meteorology Student Workshop on Data Assimilation 1–2 December 2016, Melbourne 1 / 21

Transcript of An introduction to the EnKF · An introduction to the EnKF Pavel Sakov Bureau of Meteorology...

Page 1: An introduction to the EnKF · An introduction to the EnKF Pavel Sakov Bureau of Meteorology Student Workshop on Data Assimilation 1{2 December 2016, Melbourne 1/21

An introduction to the EnKF

Pavel Sakov

Bureau of Meteorology

Student Workshop on Data Assimilation

1–2 December 2016, Melbourne

1 / 21

Page 2: An introduction to the EnKF · An introduction to the EnKF Pavel Sakov Bureau of Meteorology Student Workshop on Data Assimilation 1{2 December 2016, Melbourne 1/21

Outline

DA: the minimisation problem

Kalman filter

EnKF

Asynchronous DA

2 / 21

Page 3: An introduction to the EnKF · An introduction to the EnKF Pavel Sakov Bureau of Meteorology Student Workshop on Data Assimilation 1{2 December 2016, Melbourne 1/21

DA: the minimisation problem

{xai }Ki=1 = arg min{xi}Ki=1

LK (x1, . . . , xK ),

LK (x1, . . . , xK ) = (x1 − xf1)T(Pf1)−1(x1 − xf1)

+K∑i=1

[yi −Hi (xi )]T (Ri )−1 [yi −Hi (xi )]

+K∑i=2

[xi −Mi (xi−1)]T (Qi )−1 [xi −Mi (xi−1)]

Li – cost functioni – cycle numberxi – state estimate at t = tixf1 – initial state estimatePf

1 – initial state errorcovariance estimateyi – observationsHi – observation operatorHi (xi ) – estimatedobservationsRi – observation errorcovarianceMi – model operatorMi (xi−1) – state estimatepropagated from ti−1 to tiQi - model error covariance

3 / 21

Page 4: An introduction to the EnKF · An introduction to the EnKF Pavel Sakov Bureau of Meteorology Student Workshop on Data Assimilation 1{2 December 2016, Melbourne 1/21

Cost function example

−20

2

−20

2

0

10

20

30

xf

LP = (x − x

f)T P

−1 (x − x

f)

−20

2

−20

2

0

10

20

y

LR

= (y − H xf)T R

−1 (y − H x

f)

−20

2

−20

2

0

20

40

xa

LP + L

R

xf = (0.5, 0.5)T, Pf =

(1 00 2

)

y = −0.5, R = 1, H = (1 0)

xa = (0, 0.5)T

4 / 21

Page 5: An introduction to the EnKF · An introduction to the EnKF Pavel Sakov Bureau of Meteorology Student Workshop on Data Assimilation 1{2 December 2016, Melbourne 1/21

Cost function example

From Miller et al. (1994):

Lorenz (1963) model:x = σ(y − x)y = ρx − y − xzz = xy − βz

σ = 10, ρ = 28, β = 8/3

∆t = 0.25,R = 2I

5 / 21

Page 6: An introduction to the EnKF · An introduction to the EnKF Pavel Sakov Bureau of Meteorology Student Workshop on Data Assimilation 1{2 December 2016, Melbourne 1/21

The Kalman filter: linear recursive solutionI Consider the minimisation problem in the linear case

Mi (x(1))−Mi (x

(2)) = Mi (x(1) − x(2))

Hi (x(1))−Hi (x

(2)) = Hi (x(1) − x(2))

I Let us assume that

min{xi}

k−1i=1

Lk(x1, . . . , xk) = (xk − xak)T(Pak)−1(xk − xak) + Const

I Then

min{xi}ki=1

Lk+1(x1, . . . , xk , xk+1) = (xk+1 − xak+1)T(Pak+1)−1(xk+1 − xak+1) + Const,

where

xak+1 = xfk+1 + Kk+1[yk+1 −Hk+1(xfk+1)]

Kk+1 = Pfk+1(Hk+1)T[Hk+1P

fk+1(Hk+1)T + Rk+1]−1

Pak+1 = (I−Kk+1Hk+1)Pf

k+1

”analysis”

xfk+1 =Mk(xak)

Pfk+1 = MkP

ak(Mk)T + Qk

}”propagation”

6 / 21

Page 7: An introduction to the EnKF · An introduction to the EnKF Pavel Sakov Bureau of Meteorology Student Workshop on Data Assimilation 1{2 December 2016, Melbourne 1/21

A few notes about the KF solutionI The state X of the DA system is carried by the estimated model state

vector and state error covariance:

X = {xi ,Pi}

I The KF provides solution for the last analysis xak . As soon as the lastobservations are assimilated, the previous analyses xa1, . . . , x

ak−1 are no

longer optimal and can be improved by applying a smoother :

{xs1, xs2, . . . , xsk−1, xak} = arg min

{xi}ki=1

Lk(x1, . . . , xk)

I Because the SDAS represents a (part of a) solution of the global leastsquares problem, it does not depend on the order in which observationsare assimilated or on their grouping

I The SDAS does not depend on a linear non-singular transform of themodel state

I The KF solution can be used in a nonlinear case by approximating

Mi ← ∇Mi (xai−1)

Hi ← ∇Hi (xfi )

(“extended Kalman filter”, or EKF)7 / 21

Page 8: An introduction to the EnKF · An introduction to the EnKF Pavel Sakov Bureau of Meteorology Student Workshop on Data Assimilation 1{2 December 2016, Melbourne 1/21

Terminology

xkf x

kaP

k

f, xk+1f , f

k+1P

assimilation propagation

forecast analysis

,Pk

a

forecast

assimilation cycle

· · ·+︷ ︸︸ ︷[yk −H(xf

k)]TR−1

k [yk −Hk(xfk)] +

︷ ︸︸ ︷[xf

k+1 −Mk(xak)]

TQ−1k [xf

k+1 −Mk(xak)] + . . .

I State estimate after assimilation xa – analysis

I Quantity X after assimilation Xa – analysed X (or “analysis X”)

I Advancing the analysis in time M(xa) – propagation

I State estimate after propagation xfk+1 =Mk(xak) – forecast

I Quantity X after propagation Xf – forecast X

I One cycle of propagation and analysis – assimilation cycle

I Time interval between analyses – cycle length

I Time interval of assimilated observations – observation window

I The difference y −H(x) – innovation

I The sensitivity K of analysis to innovation – Kalman gain,xa − xf = K [y −H(xf )].

8 / 21

Page 9: An introduction to the EnKF · An introduction to the EnKF Pavel Sakov Bureau of Meteorology Student Workshop on Data Assimilation 1{2 December 2016, Melbourne 1/21

Problems with EKF

I Non-scalable: P is a n × n matrix(e.g. ocean model OFAM3: ∼ 109 state elements)

I Complex: requires tangent linear model (TLM) M = ∇M(x) andadjoint model (AM) MT

I Purely sequential; can not assimilate asynchronous observations

I In canonical form – can become numerically inconsistent(P looses positive definiteness)

9 / 21

Page 10: An introduction to the EnKF · An introduction to the EnKF Pavel Sakov Bureau of Meteorology Student Workshop on Data Assimilation 1{2 December 2016, Melbourne 1/21

Ensemble Kalman filter

KF: SDAS = {x,P}

EnKF: SDAS = {E} = {x,A}

where:

x =1

mE1

P =1

m − 1AAT

A ≡ E− x1Tm

n

x P E x A

KF EnKF

propagation xfk+1 =Mk(xak) Eak+1 =Mk(Ef

k)

Pfk+1 = MkP

akM

Tk + Qk

analysis xak = xfk + Kk [yk −Hk(xfk)] xak = xfk + Afkwk

Pak = (I−KHk)Pf

k Aak = Af

kTk

10 / 21

Page 11: An introduction to the EnKF · An introduction to the EnKF Pavel Sakov Bureau of Meteorology Student Workshop on Data Assimilation 1{2 December 2016, Melbourne 1/21

A solution for w,TLemma Let Pf = Af (Af )T/(m − 1), Af 1 = 0.

Then any solution of

Aa(Aa)T/(m − 1) ≡ Pa = (I−KH)Pf ,

Aa1 = 0

can be written as

Aa = AfTU,

where

T =[I + (HAf)TR−1HAf

]−1/2

U : UUT = I, U1 = 0.

Also,

xa = xf + Afw, w =[I + (HA)TR−1HA

]−1(HA)T

[y −H(xf )

].

Observation Both T and w depend only on observed elements of thestate: T = T(H(Ef ),R), w = w(H(Ef ), y,R).

11 / 21

Page 12: An introduction to the EnKF · An introduction to the EnKF Pavel Sakov Bureau of Meteorology Student Workshop on Data Assimilation 1{2 December 2016, Melbourne 1/21

EnKF: an algorithm example

01 function [E2] = enkf cycle(E1, y2,R2,M12,H2)

02 E2 =M12(E1)

03 HE2 = H2(E2)

03 Hx2 = HE2 1/m H(xf2)← H(Ef1) 1/m

04 HA2 = HE2 −Hx21T HAf

2 ← H(Ef2)(I− 11T/m)

05 D = [I + (HA2)TR−12 HA2/(m − 1)]−1

06 w = D (HA)TR−12 [y2 −Hx2]

07 T = D1/2

08 E2 = E2 (w1T + T) xa2 = xf2 + Af2w, Aa

2 = Af2T

12 / 21

Page 13: An introduction to the EnKF · An introduction to the EnKF Pavel Sakov Bureau of Meteorology Student Workshop on Data Assimilation 1{2 December 2016, Melbourne 1/21

Synchronous and asynchronous data assimilation

Synchronous, or “3D” assimilation = observations are assumed to betaken at the assimilation time

Asynchronous, or “4D” assimilation = observations can be taken at timedifferent than the assimilation time

t2 t2 t2

observations

updates

t1t1t1 t0t0t0

(a) (b) (c)

(a) Synchronous assimilation at each observation time

(b) Synchronous assimilation; asynchronous observations are assumed tobe synchronous

(c) Asynchronous assimilation

13 / 21

Page 14: An introduction to the EnKF · An introduction to the EnKF Pavel Sakov Bureau of Meteorology Student Workshop on Data Assimilation 1{2 December 2016, Melbourne 1/21

Asynchronous DAAssimilation at the time of observation

true trajectory

observation

forecast trajectory

forecast observation

innovation

analysis trajectory

t1 t2

14 / 21

Page 15: An introduction to the EnKF · An introduction to the EnKF Pavel Sakov Bureau of Meteorology Student Workshop on Data Assimilation 1{2 December 2016, Melbourne 1/21

Asynchronous DAIgnoring the time of observation (“3D”)

true trajectory

observation

forecast trajectory

forecast observation

innovation

analysis trajectory

t1 t2

15 / 21

Page 16: An introduction to the EnKF · An introduction to the EnKF Pavel Sakov Bureau of Meteorology Student Workshop on Data Assimilation 1{2 December 2016, Melbourne 1/21

Asynchronous DAUsing the actual innovation (“FGAT”)

true trajectory

observation

forecast trajectory

forecast observation

innovation

analysis trajectory

t1 t2

16 / 21

Page 17: An introduction to the EnKF · An introduction to the EnKF Pavel Sakov Bureau of Meteorology Student Workshop on Data Assimilation 1{2 December 2016, Melbourne 1/21

Asynchronous DAAsunchronous DA (“4D”)

true trajectory

observation

forecast trajectory

forecast observation

innovation

analysis trajectory

t1 t2

17 / 21

Page 18: An introduction to the EnKF · An introduction to the EnKF Pavel Sakov Bureau of Meteorology Student Workshop on Data Assimilation 1{2 December 2016, Melbourne 1/21

Evolution of correctionsLet us assimilate observations at t1

δx1 ≡ xa1 − xf1 = Af1 w1

δA1 ≡ Aa1 − Af

1 = Af1 T1

Let M12 be the tangent linear propagator along the forecast system trajectorybetween t1 and t2:

δx2 = M12 δx1 + O(|δx1|2

)At t2 the corrections become:

δx2 ∼M12 δx1 = M12(Af1w1) = (M12A

f1)w1 ∼ Af

2 w1

δA2 ∼M12 δA1 = M12(Af1T1) = (M12A

f1)T1 ∼ Af

2 T1

Applying ensemble transforms calculated at observation time to the forecastensemble at any other timer yields correctly evolved increments

But w,T are only functions of forecast ensemble observations and observations.

HE =(

[(HE)1]T, [(HE)2]T, . . . , [(HE)k ]T)T

18 / 21

Page 19: An introduction to the EnKF · An introduction to the EnKF Pavel Sakov Bureau of Meteorology Student Workshop on Data Assimilation 1{2 December 2016, Melbourne 1/21

EnKF: some basics that we have not got covered

I Rank deficiency and localisation

I Nonlinearity: what is a nonlinear system?

I Suboptimality and inflation

I Diagnosing a DA system

I Advantages and disadvatanges versus variational methods

I Iterative schemes

19 / 21

Page 20: An introduction to the EnKF · An introduction to the EnKF Pavel Sakov Bureau of Meteorology Student Workshop on Data Assimilation 1{2 December 2016, Melbourne 1/21

Summary

I Kalman filter is a linear recursive solution of the (generally)nonlinear global in time least squares problem

I Ensemble Kalman filter is aI simpleI scalableI deterministicI derivative-less

state space formulation of the KF

I The EnKF ensemble anomalies are just a factorisation of the stateerror covariance

I which means that the EnKF “ensemble” is not a statistical ensemble,

I and that it is not supposed to carry the PDF of the state error

21 / 21