Fovell Fall 2018 See course notes Chapter 16 1 Motivation We often look at a forecast and wonder where did this come from and how could this be changed especially if it involves model error ID: 741436
Download Presentation The PPT/PDF document "Adjoint models: Theory ATM 562" is the property of its rightful owner. Permission is granted to download and print the materials on this web site for personal, non-commercial use only, and to display it on your personal computer provided you do not modify the materials and that you retain all copyright notices contained in the materials. By downloading content from our website, you accept the terms of this agreement.
Slide1
Adjoint models: Theory
ATM 562FovellFall 2018(See course notes, Chapter 16)
1Slide2
Motivation
We often look at a forecast and wonder “where did this come from” and “how could this be changed”, especially if it involves model errorOften our strategy involves posing a hypothesis that explains the error’s origin, changing the model initial conditions and/or model parameters to compensate, and running the model… usually over and over and over
Ideally, we want an
active, dynamic tracer
that shows how the error came about in the model – which fields, where, and whenThe adjoint model is a simplified version of the forward model that runs backwardsThe forward model predicts temperature, pressure, winds, etc., forward in time“The future evolves from the past”The adjoint model predicts sensitivity to temperature, pressure, winds, etc.., backwards in time“Traces error back to its roots” (in theory)
2Slide3
Background: simple problem
1D wave equation: M real (interior) grid points, 1 prognostic variable, 2 time level schemeRewrite in explicit form
c
> 03Slide4
Background: matrix form
Write in matrix form (interior points j = 1, 2, …, M)
M
x1
M
x
M
M
x1
4
For this simple problem, same
C
every time step.
Not true for more realistic problems.
Boundary condition needs to be applied
(currently presuming u=0 at left side)Slide5
Background: integrate model
Initial condition is u0. Integrate for N time steps.
We can relate the
final forecast
to the
initial condition
through the
transition matrix
P
N
5Slide6
Background: generalize model
x is p prognostic fields x M interior gridpoints
p
≥ 4 (i.e., u, w,
q’, p’,…) M = MX x MY x MZ
6Slide7
Tangent linear model (TLM) #1
A simple model equationExamples:
u
= prognostic variable
= model parameter
1D wave equation (parameter = -
c
)
Exponential decay (parameter = -
a
)
7Slide8
Tangent linear model (TLM) #2
Run the model twice, using two different initial conditions and/or two different values for parameter a.
Control solution
u
C(x,z,t)Alternative solution uA(x,z,t) [example: more warm vs. less warm thermal]Control parameter aCAlternative parameter
a
A
[example: faster vs. slower sound speed]
Difference between simulations and their parameters
8Slide9
Tangent linear model (TLM) #3
You can always subtract two simulations.However, the TLM is a model that attempts to estimate the difference between the control and alternative runs, based on the control run
run
run
calculate
TLM run
run
estimate
Instead of…
…do this
Why?
We’ll see…
9Slide10
Tangent linear model (TLM) - example
10
Example:
Model task 0B with
slightly different
c
or slightly shifted
initial conditions
Keep in mind:
differences have to
be smallSlide11
Tangent linear model (TLM) #4
TLM can be formed via
perturbation analysis
, and as usual presumes the perturbations are (& remain)
small so higher order terms absent1Uses Taylor series to approximate u”if
then the TLM is
11
1
See course notes for qualifications and disclaimersSlide12
Tangent linear model (TLM) #5
The perturbation model has been linearized (no u’’a
’’ term) and is constrained to (“tangent to”) the control run (
u
C, aC).“Tangent linear model”Discretize TLM and write in matrix form
12
C
n
based on
control
model run
- Run control simulation
- Archive
C
n
“every time step” (ideally)
- Initialize and run TLM
Ignore for simplicitySlide13
Tangent linear model (TLM) #6
Integrate the TLM. Initial condition is u’’0
13
C
n
based on
control
model run
- Run control simulation
- Archive
C
n
“every time step” (ideally)
- Initialize and run TLMSlide14
Tangent linear model (TLM) #7
Generic form. x
” is
p
variables by M points. Initial condition is x’’014Slide15
Forecast aspect
JThe forecast aspect
J
is something about the control run we want to examine
How did some feature appear?Why did some error occur?A J at time N is a scalar function of the control run at that timeJN = J(xN)JN can be changed by perturbing
the control run (ignoring higher order terms)
15Slide16
Change of forecast aspect ∆
JN
16
Change of
J at time N
Sensitivity
of
J
to
x
l
at time
N
Perturbation applied
to variable/location
x
l
at time
N
p
variables
M
locations
Perturb a variable/location
It only changes
J
if
J
is
sensitive
to it!!!!Slide17
Change of forecast aspect ∆
JN
17
Let
JN be surface pressure at one point, say 30˚N 60˚W, at time N∆JN is the change in surface pressure at that place and timeAt time N, ∆
J
N
is sensitive to only
one
variable and location – pressure at that location
Therefore, of the
p
x
M
terms in the sum,
only one sensitivity is nonzero
, and it is
equal to 1
Thus ∆
J
N is KNOWN information and is TRIVIALSlide18
Rewrite as an inner product
Postulate the adjoint model, a prediction model for sensitivity x*
Making this less trivial
18
Take the TLM model and
Replace
x
’’ by
x
*
Transpose
C
n
Operate it
backwards
Note
C
n
T
≠ C
n
-1
, so we are NOT running the TLM backwards
From control run
Renaming sensitivity for convenience
TLM
AdjointSlide19
TLM vs. adjoint
19
The control run “information” used to step
perturbations
forward in time...
...is transposed and used to step
sensitivity
backwards
in timeSlide20
TLM and adjoint
Relating initial and final times for TLM and adjoint models
Next, we will make use of the
adjoint
propertyThis is how the adjoint model got its name…20
a
,
b
are vectors
M
x 1
L
is a matrix
M
x
M
x”
,
x*
are vectors
M
x 1
P
is a matrix
M
x
MSlide21
The recipe
21
trivial
by definition
relate final to initial time
invoke
adjoint
property
relate final to initial time
Note therefore that Slide22
The recipe
22
KNOWN
TRIVIAL
KNOWN
NOT TRIVIAL!
x* identifies what perturbations
x
’’ have
to be at the
initial time
to get that
desired change to J at time
NSlide23
Integrating the adjoint
23
(1) Run the control model forwards to time
N
and archive Cn every time step (ideally)(2) Initialize adjoint model at time N(3) Integrate adjoint model backwards,
reading in
C
n
from archive
You DON’T need to integrate the TLM at all!!!Slide24
To summarize
The control simulation is made by integrating a (likely nonlinear) model forward in time, producing forecasts of temperature, pressure, winds, etc..The tangent linear model is a linearized version of the forward model, producing forecasts of perturbations (deviations) from the control forecast
The inescapable assumption is the deviations are small (truncated Taylor series)
The
adjoint model is a transposed version of the TLMThe adjoint model runs backwards in timeThe adjoint propagates sensitivity to temperature, pressure, winds, etc., backwardsIt represents an active, dynamical “tracer” that shows how model got to final stateIt also must assume that deviations are small
Our simple examples involved differentiating the model differential equation to create the TLM. In practice, we differentiate the model
code
.
For code with a lot of complicated physics, especially on/off switches (microphysics!), this is very difficult
24