data assimilation by the adjoint method in coastal and river models
DESCRIPTION
Data Assimilation by the Adjoint Method in Coastal and River Models by Graham Copeland and Igor Gejadze. Workshop on Coastal Observatories. 17 – 19 October 2006, Proudman Oceanographic Laboratory. Department of Civil Engineering. Content Background to DA using Variational Methods :- - PowerPoint PPT PresentationTRANSCRIPT
Data Assimilation by the Adjoint Method in Coastal and River Models
by Graham Copeland and Igor Gejadze
Department of Civil Engineering
Workshop on Coastal Observatories.17 – 19 October 2006, Proudman Oceanographic Laboratory.
Content
Background to DA using Variational Methods:-
Direct and Inverse Models
The Variational Approach
The Adjoint Method
Examples of DA for the SWE and fsNSE
Propagation of Adjoint Sensitivity Information
Effective use of Data
Model Coupling and Data Assimilation
1D St.Venant - 2D SWE
This begs the questions:-
What data are we likely to have?
What data do we really need?
How does the data control the solution?
How do we make best use of data?
PROBLEM STATEMENT
We require to either Reconstruct or Predict
state variables (e.g. flow fields) based on:-
OBSERVATIONS and GOVERNING EQUATIONS.
Required Data – Model Controls
Topography Depth(x,y)
Friction coeff (x,y)
Current v(L,y)
Control Data
Depth(x,y)
Friction(x,y)
Initial conditions: water levels & currents.
Boundary conditions: currents or water levels .
These values are needed to completely determine the solution
but the boundary values are usually not all known from observations.
Current v(0,y)
Limited Area Model
An initial or boundary value problem, known as a direct model, becomes inverse when:- some or all of its boundary or initial data is missing and isreplaced by data located inside the domain.
data
data
data
datadata
data
ill-posed ? Inversealso ill-posed
Direct and Inverse Models
Direct and Inverse Models
So, since it most unlikely for all control data to beavailable at the boundaries, all models are inverse.
However, in practice, reasonable assumptions are made about the boundary controls and distributed coefficients and so good solutions can be found.
But there are methods available that use available data either
to recover the values of boundary controls to recover the initial conditions to recover values of distributed model parameters to recover information about sources
and so lead to:- assimilation of data into a model solution.
Variational Data Assimilation Methods
Variational Methods have the following features:-
They define an objective function J based on differencesbetween the solution of the equations and observationsi.e. a measure of ‘goodness of fit’.
Using a variational method, they calculate a gradient measure that determines how to adjust the controls
to minimise J and so improve the ‘goodness-of-fit’.
They use an iterative procedure to move step by step towards a solution that minimises J.
The Adjoint Sensitivity Method
This finds the gradient sensitivities of the type
This sensitivity information is propagated away from thedata locations back to the controls (e.g. at the boundary).
The controls are then adjusted systematically and the direct model is recomputed.
Eventually the values of controls are recovered that produce a solution that agrees with measured data.
It carries out an Objective Calibration of the model.
Useful for hindcasts and estimating initial conditions for forecasts
q
J
Integrate direct model forward
boundary conditions
xt
initial conditio
ns
Integrate adjoint model backwards
Adjust initial and boundary conditions untilSolution matches data
THE ADJOINT SENSITIVITY METHODShallow Water EquationsExample 1- dimensional(x), unsteady(t)
DATADATA
0
x
q
t
H
The Nonlinear shallow water equations:
x
z
t
H (x,t)
z(x,t)Channel bed
Free surface
0)(
/2
2
H
qqk
x
z
x
HgH
x
Hq
t
q
q
Define the Objective function & the Lagrangian:
Measure sensitivity to water level H(x0bs ,t0bs ) ≠ H0bs(x0bs ,t0bs)
Measure data mismatch : by quadratic measuring function r)( 0bsHH
)()()(5.0 002
0 bsbsbs ttxxHHr
T L
dtdxH
qqk
x
z
x
HgH
x
Hq
t
q
x
q
t
HrJ
0 0 2
2
)(/
Or, if we have flow data qobs as well as Hobs
r = 0.5 ( - obs)2 (x – xobs) (t – tobs) + 0.5 (q - qobs)2 (x – xobs) (t – tobs)
Take the first variation of J to get the adjoint equations in the Lagrange multipliers and (adjoint variables)
Source terms
02/3
22
H
r
H
qqK
x
zg
x
Hg
xHq
02
2/2
q
r
H
qK
xHq
x
Sensitivities at Control Boundaries by Adjoint Method
• Following the variational approach, the adjoint variables and give us the sensitivities :
the sensitivities of water depths at x=xobs being different from an observed depth H0bs In terms of changes in water depth “H” downstream.
),(
),(),(
),( 2
2
p
p
p
p tLH
tLqtLgH
tLH
J
( m s2 )
( m2 s )
),0( ptq
J
the sensitivities of calculated water depths at x=xobs being different from an observed depth H0bs in terms of changes in inflow discharge “q” upstream.
Hydrograph amplitude = 2 m
characteristic
Example: - Solution to forward equations
Discharge (q)
Calculated water depth (H)
Control (inflow) boundary
Driving Hydrograph
0.0
5.0
10.0
15.0
20.0
25.0
30.0
0.0 0.5 1.0 1.5 2.0
Time
Dis
char
gh
(q
)
x
time
‘Source’ for Adjoint (H-H0bs)
Trial Inflow hydrograph
‘water level mismatch’ informationcreates a source thatpropagates backwards awayfrom data towards boundaries
‘sensitivity’ informationhow control boundariesaffect levels at xobs
q
Jxobs
Source term & Adjoint Solution
t
x
Source
0
200
400
600
800
1000
1200
0 100 200 300 400
time step
se
ns
itiv
itie
s m
2 s
0
10
2030
40
50
6070
80
90
0 50 100 150 200 250 300 350
time step
sen
siti
viti
es m
s2
PhiPsi
),( ptLH
J
),0( ptq
J
Solution to adjoint equations & Sensitivities on Control Boundaries
Results courtesy of H. Elhanafy, U of Strathclyde
-1 .00
0 .00
1 .00
Wave of amplitude = 1 mdriven by data at x = 0 at all times
xtime
characteristic
Data time series
Data amplitude = 0.8 m
Control boundary
Sinusoidal solution to forward equations
xt
Final
data
data
Remainder of control not recovered
Control recovered
u(0,y,t)
y = 0 x
y
bed
Surface elevation data
Current dataUnknown boundary condition
),(ˆ txS k
),,(ˆ 1 tYxu l
),,(ˆ 2 tYxu l
flu id
L/2
channel bed 2/3
Z
L /2
passive boundary:
open
'open D irichet 'contro l boundary
X
Y
f(0 )=0
Z
free surfaceS(0,t)
L /4
e levation andve locity sensors
u
v
Adjoint Method2D section fsNSE
Example problem
definition
2D vertical section
p(x,y,t)
Adjoint variables
S*, u*, v*, p*
flu id
L/2
channel bed 2/3
Z
L /2
passive boundary:
open
'open D irichet 'contro l boundary
X
Y
f(0 )=0
Z
free surfaceS(0,t)
L /4
e levation andve locity sensors
u
v
Adjoint pressure p* at mid-depth based on velocity measurements
velocitysensors
step
Antiphase.Discontinuity in p*
Adjoint solution showing propagation of p* through model
S*
p*, u*,v*
c = (g d)0.5 20 ms-1
Wave transport Advectionu = 1 ms-1
800 m data‘source’
u*,v*
con
tro
l b
ou
nd
ary
y=0
y=40 m
Transport mechanisms in adjoint model•Wave transport affects all depths•Advective transport preserves profile but only within advective range
location of s ingulardriv ing source
(u - ve locity sensor)
Non-uniform profile in the vertical due to convertive transport
u - sensitivity at the control boundary.Wave disturbance arrives firstas p*followed by convective termsas uu*
Wave celerity = 20x convective speed
Vertical spread due relative vertical motion of source, not diffusion
u sensitivity through vertical at x = 0 due to a single velocity source at mid-depth at x = 800 m
Infl
ow
co
ntr
ol
bo
un
dar
y
Recovered by advection at speed u
Rec
over
ed b
y
plan
e SW
wav
e at
spee
d c=
(g h
)0.5
Observed
Current u
Separate influences on boundary control
by advection and by wave propagation in
2D SWE
Recovery of Boundary
Controls in presence
of standing waves
inflow open
Recovery of Boundary
Controls in presence
of standing waves.
Data from nodes does not recover controls at all.
Only H or only u does not recover controls very well
Co-located H and u recovers controls best.
Must retain phase info’
inflow closed
Recovery of distributed parameters by Adjoint DA
)()()(5.0 002
0 bsbsbs ttxxHHr
),()(
fnxz
J
T L
dtdxH
qqk
x
z
x
HgH
x
Hq
t
q
x
q
t
HrJ
0 0 2
2
)(/
Fom observations of water level H and velocities q/H we can recover bathymetry z(x).
This assumes that the boundary controls are known
For example recover y of bathymetry in SWE model
2 D example. Reference bathymetry used in an identical twin experiment
Flow field computed over this bathymetry and used to provide ‘observations’ of H and velocity at sparse locations
DA proceeds from an initially plane bed to recover bathymetry from sparse observations of H
Recovered z(x)
Recovery of bathymetry by DA of co-located observations of velocities u,v and H
Demonstrates the importance of having both u,v and H data
Initial z(x)
Recovered z(x)
Results courtesy of M. Honnorat, INRIA Rhone-Alpes, Grenoble
Flow modelFlow model - 1 - 1G lobal ocean (PE or SW E)
Estuarian/ m iddle stream(2D SW E)
F luvia l (S t.VE)
Precip ita tion, evaporation, w ind stress, heat flux,ground w aters, sedim ents- from other m odels
Tidal zone
C oasta l (PE or fsN S)Surface water flow modelSurface water flow model – essential part of the full physical model used for eco-modelling.
Flow model – 2Flow model – 2
G lobal ocean (PE or SW E)
Estuarian/ m iddle stream(2D SW E)
F luvia l (S t.VE)
Precip ita tion, evaporation, w ind stress, heat flux,ground w aters, sedim ents- from other m odels
Tidal zone
C oasta l (PE or fsN S)
It does not look always possible to create a single (integral) surface flow model based on most complete flow eqns (3D fsNSE). It does not look elegant either.
Can we use the existing models (blocks) to Can we use the existing models (blocks) to simulate integral phenomena?simulate integral phenomena?
Assuming all blocks are based on different eqns, implemented using different methods, run by different users in different places, runs are not necessarily synchronized, etc. No essential modifications in existing software are allowed!
Can we assimilate data collected in different parts of the flowCan we assimilate data collected in different parts of the flowto model integral phenomena without creating the single (integral)to model integral phenomena without creating the single (integral)model? model?
NO DEFINITE ANSWER !
Paradoxical, but more definitely YES !
Simple flow model: 1D St.Venant-2D SWE
shallow water flow m odel by 1D S t.Venan
2D SW E m odel
.
This simple set contains most properties of the general case.
Interface between models is ‘liquid’ or ‘open’ boundary.
1) What must be specified at the model interface to provide correct transfer ofinformation (in both directions!)?Exact answer exists only for 1D SWE
3) How to arrange information exchange in time? Time step is very different ! Different models could be run in different places!
2) Keep in mind: models are different. 1D St.V model cannot provide sufficient information to specify well-posed 2D SWE model by definition.
Flow example with propagating dry/wet front: reference solutionFlow example with propagating dry/wet front: reference solution
a) b)
c) d)
Difficulties in coupling flow models - 1
Interface between models is ‘liquid’ or ‘open’ boundary.
Therefore, all difficulties related to ‘open’ boundaries are applied here.What information should be transferred between models?How to synchronize information transfer?
Trivial case: two overlapping sub-domains, information exchange every time step, explicit numerical scheme
1
2
12
1'
2'
Derichlet or Neumann
Why does it work? Because both Derichlet and Neumann specify well-posed semi-discrete (frozen time) problem in sub-domain.However, not a global time problem!!!
General rule to follow:Boundary conditions applied at the ‘open boundary’ model interface must specify well-posed flow problem for each model (sub-domain).
Difficulties in coupling flow models - 2
Can we afford information exchange every time step?Do we use explicit solvers for all models?Are the models perfectly synchronized?
NO
Waveform relaxation methodWaveform relaxation method, orGlobal Time Schwarz methodGlobal Time Schwarz method(E. Lelarasmee, L.Halpern, M. Gander, …)
Need for ‘global time’ boundary conditions‘global time’ boundary conditions at the model interface, which specify a well-posed flow problem for each model.
Characteristic analysis Characteristic analysis : systematic (but still approximate) way
Characteristics and higher order invariants – 1
x,u
y,v
'W est boundary'
w
w
w
1
2
3
Characteristic analysis of the 2D SWE:Eigenvalues:
Invariants:
cuucu ,,
hucqw
vhpw
hucqw
)(
,
,)(
3
2
1
Characteristic analysis is approximate (even assuming small bathymetry and friction slopes) since x is considered as dominant incidence and flow direction.This results to the partial reflection (when using w asbc), which increases when incidence direction deviates from normal.Problem: flow may support many wave packages coming by different incidence angle.
Incoming invariants to be prescribed !,outgoing – extrapolated from the interior
Characteristics and higher order invariants – 2
1
'
2
21
Using characteristic invariants at the interface between sub-domains iseventually equivalent to the waveform relaxation method.The solution can be obtained by successively solving problems insub-domains (global time Schwarz ).In theory (for the 1D SWE), the process should converge in 2 iterations!
Outgoing quantities from = Incoming quantities to1 2Vice versa
0,
,1
22
2
11
)2(1
unww
ww
0,
,2
21
2
23
)1(3
unww
ww
Characteristics and higher order invariants – 3
More complex invariants can be build based on the theory of absorbing BC(B. Engquist, A. Majda)Higher order invariants used as bc allow reflections of waves coming to the boundary by angles deviating from the normal to be essentially reduced.
Example: second order invariants (E. Mazauric-Nourtier, build for
linearized SWE )
33
33222
211
,
2,
,4
2),(
wtyW
c
fw
y
wuc
y
wv
t
wtyW
y
wuc
t
wtyW
(in)
(in)
(out)Remarks:1. Still (x) remains the dominant flow and incidence direction. Improves treatment of waves in a certain cone around the normal.2. Numerical implementation of higher order invariants (more than 2nd)could be unstable.
Difficulties in coupling flow models - 3
The main problem is 1D->2D information transfer.The 1D model cannot provide full set of boundary conditions for the 2D
model :a) For the 2D model all invariants are distributed in the tangential direction.b) There is no tangential invariant in the 1D formulation exists.
x,u
y,v
1D SW E 2D SW E
1 2
'
1D->2D
2D->1D
11
)2(1 bwdw How to distribute along interface?
Need distribution rule! Uniform??
)2(1w
dwbw )2(3
13
x,u
y,v
'W est boundary'
w
w
w
1
2
3
No problem with it. No point in controlling
0,22 unw No information available! Trivial??
13w
Model coupling: steady-state, non-homogenous, optimal control - 1
Virtual control methods: J-L. Lions, O. Pironneau, A. Quarteroni
1
2
12
1'
2'
211211
11111
111
,
)(,)(
),(,
ugu
yxfuL
122122
22222
222
,
)(,)(
),(,
ugu
yxfuL
01 )( bbdivL 02 )( bbdivkL
convection convection-diffusion
2,1 - virtual controls
21
2221121 2
1,
dxuuJ
21, ,inf21
JCoupling is considered as the minimization problem:
Model coupling: steady-state, non-homogenous, optimal control – 2
1
'
2
21
A disjoint partition of or non-overlappingnon-overlapping case
dsdsuuJ 221
22121 2
1
2
1),(
11 unb
222 unbunk
The objective function reflects our a-priori ‘natural’ guess about solutions at the coupling interface.
Model coupling: global time, non-homogenous, optimal control – 3
x,u
y,v
1D SW E 2D SW E
1 2
'
Coupling is considered as the minimization problem for the objective functional:
T
vuuhh
T
ddddt
bwdwdtwJ
0
22212212
0
21
12
1)2(
1
2
1
2
1
vuh ,, - fluxes
dwbw )2(3
13Open bc for 1D:
Incoming invariant for 2D problem is the unknown control. 21w
Solution of the control problem gives result which tends to the solution bySchwarz iterations under trivial assumptions. Thus, by itself optimal control approach is not enough to get better results.
Its advantage is that it may allow additional information to be used.
Model coupling & data assimilation
x,u
y,v
1D SW E 2D SW E
1 2
'
sensors
If data is available and has to be assimilated,then coupling and assimilation can be performed in a single optimization loopsingle optimization loop. .
ddddt
bwdwdtwJwJ
vuuhh
T
T
22212212
0
2
0
21
12
11)2(
10)2(
1
2
2,,
Extended objective functional:
Could contain other controls, i.e. 0,11 xtw
This approach should be preferred for the non-homogenous modelbecause the ‘rigid’ coupling at the interface could be eventually harmful.Otherwise, solution in 2D area is dominated by data, which fills in gaps in our knowledge about bc at the coupling interface.
Common DA objectiveCommon DA objective
Numerical results on WFR coupling
(t)
1
2
51
2
3 4
6(t)
x, x '
y, y '
L
sensor A
sensor B
Generalized objective functionGeneralized objective function
21 JJJJ
)ˆ(,
2
1
2
2
UUmlar
dtdyyxxrJ
h
l mml
DA component
T
dtIWdwJ0
2111 )|)(
2
1
33
For the inlet coupling interface
For the outlet coupling interface
For the interfaces we use exactly what we know !
T
dtIWdwJ0
2222 )|)(
2
1
44
Joint DA-coupling algorithm – 1 (consistent 1D/2D meshes)Joint DA-coupling algorithm – 1 (consistent 1D/2D meshes)
Results of data assimilation: recovering the unknown inlet BC for the 1D model (together with BC for the 2D local model, which are not presented). Both elevation and discharge data are used.
The convergence history: for the generalized objective function (in bold line) and for its components
Joint DA-coupling algorithm – 2 (consistent 1D/2D meshes)Joint DA-coupling algorithm – 2 (consistent 1D/2D meshes)
Results of data assimilation: recovering the unknown inlet BC for the 1D model (together with BC for the 2D local model, which are not presented). Only elevation data are used.
The convergence history: for the generalized objective function (in bold line) and for its components
Conclusions
1. Coupling of flow models can be achieved together with DA within the same control loop.
2. The models and their adjoints run independently exchanging information between global time runs. No need to create single integrated model or generate its single integrated adjoint.
3. This arrangement should be preferred when incompatible (due to different reasons) models are involved into joint consideration. Measured data fills gaps in a-priori data needed in ‘coarse-to-fine’ information transfer. Thus, coupling together with DA is simpler task than without.
4. Boundary conditions applied on the model interfaces should be based on characteristics or higher order characteristic invariants.
5. In the overlapping areas the ‘finer’ model should adjust ‘coarser’ model via ‘defect correction’