data assimilation with openda
DESCRIPTION
General OpenDA presentation. Given at a short OpenDA workshop at eScience center in Amsterdam (November 2012)TRANSCRIPT
Data assimilation with OpenDAOpenDa workshop
November 2012
eScience center
8-11-12
Nils van Velzen, Martin Verlaan, Stef Hummel, Julius Sumihar, Alja Vrieling, Albrecht Weerts, Ghada El Serafy, Herman Gerritsen
Outline
Data assimilation and calibration in one sheet
What is OpenDA
OpenDA architecture
Coupling models into OpenDA
Example of Calibration
Example of Data assimilation
OpenDA and Parallel computing
Summary
2Data assimilation with OpenDA
Data assimilation and Model calibration in one sheet
• A generic toolbox for data-assimilation
– (real time) data assimilation
– model calibration
– impact of observations
– reconstruction of sources
3Data assimilation with OpenDA
What is OpenDA
• Motivation for a toolbox:
– The algorithms are model/observation independent BUT(!)
– DA methods work on top of models → serious changes to model code.
– Spaghetti code
– Difficult to change algorithm
– Maintenance problems
– Difficult to test algorithms
– Difficult/impossible to reusecode
– Expensive!
4Data assimilation with OpenDA
What is OpenDA
• Content:
– Set of interfaces that define interactions between components
– Library of data-assimilation algorithms
– DA philosophy
– Building blocks only need to be implemented once
5Data assimilation with OpenDA
What is OpenDA
• Open source (LGPL)
• Why OpenDA?
– More efficient than development for each application
– Shared knowledge between applications
– Development of algorithms with e.g. universities
– Easier to test, which should result in fewer bugs
– Optimized building blocks
– Development template
6Data assimilation with OpenDA
OpenDA Website
7Data assimilation with OpenDA
• www.openda.org• Downloads
– Users
– Developers
• Documentation
• Wrappers for models
• OpenDA association
OpenDA Main Application
8Data assimilation with OpenDA
Single program for
• Editing input files
• Running simulations and calibrations
• All models and observation sources
• GUI and command line
• Sequential and parallel
OpenDA architectureObject Oriented Approach
9Data assimilation with OpenDA
Models in OpenDA
Formal form of a model
State of model instance
Object oriented concepts:
Data encapsulation; state cannot be directly changed only through the methods like:
GetState, AxpyState, Compute...
Multiple instances of model
Algorithm has no knowledge on model internals
10Data assimilation with OpenDA
dxdt
=M (x (t ) ,u (t ) , p ,w(t ))
x (t) , u (t ) , p ,w(t)
Models in OpenDA
• Models in Data assimilation context are stochastic!
• Normal dynamic model (codes) are not
11Data assimilation with OpenDA
Models in OpenDA
• A model wrapper is needed for each model:
– Black box
– Java
– C/Fortran
– C#
• Testing OpenDA models
– Java
– Matlab
– C#
12Data assimilation with OpenDA
Models in OpenDA
13Data assimilation with OpenDA
OpenDA
MyStochModel MyWrapper
TheirModel.exe
MyStochModel
Black Box wrapperOpe
nDA
OpenDABridge
java
C/Fortran
other
own
3rd p
arty
MyModel MyModel
Models in OpenDA
14Data assimilation with OpenDA
OpenDA
Black Box wrapperOpe
nDA
java
C#
own
3rd p
arty
MyModel
OpenDA
Black Box wrapper OpenMI Wrapper
OpenMI Model
Generate
Example of model calibration SWAN 3rd generation wave model
15Data assimilation with OpenDA
Wave breaking and interaction over a bar
0.4
0.3
0.2
0.1
0
0.5m
X
Z0 10 20 30m
WAVES
STATIONS01 02 0403 0705 06 08
totS =wind input+ non-linear interactions (quadruplets & triads)+ whitecapping + bottom friction+ depth induced wave breaking
Example of model calibration
SWAN 3rd generation wave model
16Data assimilation with OpenDA
Example of model calibration
SWAN 3rd generation wave model
17Data assimilation with OpenDA
Example of data assimilationOperational storm surge forecasting
18Data assimilation with OpenDA
Example of data assimilationOperational storm surge forecasting
19Data assimilation with OpenDA
EnKF semi parallel
07-11-12 20Data assimilation with OpenDA
ξif (t k )=M (ξi
a(t k−1))+wi(t k )
x f (t k )=1N
ξif (t k)
E f (t k )=[ξ1f (t k )−x
f (t k) ,ξ2f (t k )−x
f (t k) , ... ,ξNf (t k)−x
f (tk )]⋮
Semi parallelCommunication
volume
Cm+n N
0
ξia(t k)=ξi
f (t k)+K (t k)[ y (tk )−H (t k)ξif (t k)+v i(tk )]
n N
Only parallelize model steps:• Not scalable, often sufficient
EnKF semi parallel
07-11-12 21Data assimilation with OpenDA
Lotos-euros air quality model
EnKF semi parallel
07-11-12 22Data assimilation with OpenDA
Generic semi parallel due to OO concepts
EnKF parallel
07-11-12 23Data assimilation with OpenDA
ξif (t k )=M (ξi
a(t k−1))+wi(t k )
x f (t k )=1N
ξif (t k)
ξia(t k)=ξi
f (t k)+K (t k)[ y (tk )−H (t k)ξif (t k)+v i(tk )]
Stochastic model time steps
Mean of Ensemble
Update (for all ensemble members)
EnKF parallel
07-11-12 24Data assimilation with OpenDA
Column wise distribution
Separate Combined
n Np
n log2( p) n log2( p)
n N log2( p−1)
Row wise distribution
Separate Combined
C m
n Np
+n N log 2( p−1)
0 C m+n Np
00
0n Np
EnKF parallel
07-11-12 25Data assimilation with OpenDA
Column wise distribution
Separate Combined
n Np
n log2( p) n log2( p)
n N log2( p−1)
Row wise distribution
Separate Combined
C m
n Np
+n N log 2( p−1)
0 C m+n Np
00
0n Np
EnKF parallel
07-11-12 26Data assimilation with OpenDA
WAQUA shallow water model
Comparison of parallelization strategies for RRSQRT (Roest et al.)
EnKF parallel
Full parallel using OO concepts:
All filters run same code
State vectors are distributed (parallel vector)
Operations on parallel vectorsby a parallel vector implementation
NO need to change the model andfilter code
All complexities hidden in genericsupport layers/implementations
07-11-12 27Data assimilation with OpenDA
Parallel computing with black box models
Black box models
No change to model code
Data exchange using files
Note: disk can be slow/more data written than needed
07-11-12 28Data assimilation with OpenDA
Parallel computing with black box models
Swan model for wind generated waves
Operational model + DA for the north sea
Black box model
1 hour, 8 cpu's 10 min 50% IO
EnKF implementation (?)
Parallelization of filter
07-11-12 29Data assimilation with OpenDA
Parallel computing with black box models
Black box model is normal model
Semi parallel+full parallel
Note disk speed,
Use local disks:
Faster
No sequentialbottleneck
07-11-12 30Data assimilation with OpenDA
Summary
• OpenDA: Data assimilation toolbox for Data assimilation/calibration.
• Object oriented design allows easy exchange of building blocks.
• End users do not need to do any programming for experimenting.
• Various ways for adjusting (your) model for use in OpenDA.
• Conceptual support for all kinds of parallel computing.
31Data assimilation with OpenDA