Common Set of Tools for Assimilation of Data COSTA Data Assimilation Summer School, Sibiu, 6 th...

32
Data Assimilation Summer School, Sibiu, 6 th August 2009 Common Set of Tools for Assimilation of Data COSTA COSTA An Introduction Nils van Velzen email: [email protected] www.costapse.org

Transcript of Common Set of Tools for Assimilation of Data COSTA Data Assimilation Summer School, Sibiu, 6 th...

Page 1: Common Set of Tools for Assimilation of Data COSTA Data Assimilation Summer School, Sibiu, 6 th August 2009 COSTA An Introduction Nils van Velzen email:

Data Assimilation Summer School, Sibiu, 6th August 2009

Common Set of Tools for Assimilation of Data

COSTA

COSTA

An Introduction

Nils van Velzen email: [email protected]

www.costapse.org

Page 2: Common Set of Tools for Assimilation of Data COSTA Data Assimilation Summer School, Sibiu, 6 th August 2009 COSTA An Introduction Nils van Velzen email:

Data Assimilation Summer School, Sibiu, 6th August 2009

Common Set of Tools for Assimilation of Data

COSTA

Outline

• Data assimilation and calibration

• Existing software and programming issues

• COSTA

• Application of COSTA with WAQUA/TRIWAQ

• Conclusions

www.costapse.org

Page 3: Common Set of Tools for Assimilation of Data COSTA Data Assimilation Summer School, Sibiu, 6 th August 2009 COSTA An Introduction Nils van Velzen email:

Data Assimilation Summer School, Sibiu, 6th August 2009

Common Set of Tools for Assimilation of Data

COSTA

Data assimilation and calibration

• (Dynamic) simulation models– Weather forecast

– Air quality

– Shallow water (storm surge)

– Ocean modelling

– Reservoir

• Predictions are not perfect!

Page 4: Common Set of Tools for Assimilation of Data COSTA Data Assimilation Summer School, Sibiu, 6 th August 2009 COSTA An Introduction Nils van Velzen email:

Data Assimilation Summer School, Sibiu, 6th August 2009

Common Set of Tools for Assimilation of Data

COSTA

Data assimilation and calibration

• Measurements:– Satellites

– Buoy

– Radar

– Weather stations

Page 5: Common Set of Tools for Assimilation of Data COSTA Data Assimilation Summer School, Sibiu, 6 th August 2009 COSTA An Introduction Nils van Velzen email:

Data Assimilation Summer School, Sibiu, 6th August 2009

Common Set of Tools for Assimilation of Data

COSTA

Data assimilation and calibration

– Make model perform better using the available observations:

• Calibration: change model parameters in order to reduce the difference between the model predictions and observations

• Data assimilation: combine the model forecast and observations into a mixed forecast

Page 6: Common Set of Tools for Assimilation of Data COSTA Data Assimilation Summer School, Sibiu, 6 th August 2009 COSTA An Introduction Nils van Velzen email:

Data Assimilation Summer School, Sibiu, 6th August 2009

Common Set of Tools for Assimilation of Data

COSTA

Existing software and programming issues

• Simulation software is complex• More complex is combined with Data

assimilation and/or Calibration methods• Expensive to develop and maintain• Splitting up software is in general a

good idea– Less complex– Possible to reuse (parts of) the code

Page 7: Common Set of Tools for Assimilation of Data COSTA Data Assimilation Summer School, Sibiu, 6 th August 2009 COSTA An Introduction Nils van Velzen email:

Data Assimilation Summer School, Sibiu, 6th August 2009

Common Set of Tools for Assimilation of Data

COSTA

Existing software and programming issues

• Why people think they have to develop a custom implementation of a DA method:– Computational efficient– Need to handle model specific issues

• Are these assumptions correct? Issues are:– Which method to implement?– Expensive– Incompatible– Potentially full of bugs

Page 8: Common Set of Tools for Assimilation of Data COSTA Data Assimilation Summer School, Sibiu, 6 th August 2009 COSTA An Introduction Nils van Velzen email:

Data Assimilation Summer School, Sibiu, 6th August 2009

Common Set of Tools for Assimilation of Data

COSTA

COSTA

• A problem solving environment for data assimilation and calibration– Components and their interface

– Data assimilation methods

– Platform for exchanging models and methods

• Free software (LGPL)

Page 9: Common Set of Tools for Assimilation of Data COSTA Data Assimilation Summer School, Sibiu, 6 th August 2009 COSTA An Introduction Nils van Velzen email:

Data Assimilation Summer School, Sibiu, 6th August 2009

Common Set of Tools for Assimilation of Data

COSTA

Steps to prepare model codes for implementing data assimilation

• Identify the state-vector of your model and those parameters and forcing (you think) you want to use

• Isolate the model time step

--This is 90% of the work and has to be done for a custom data assimilation implementation as well

--COSTA provides tools to simplify this work

Page 10: Common Set of Tools for Assimilation of Data COSTA Data Assimilation Summer School, Sibiu, 6 th August 2009 COSTA An Introduction Nils van Velzen email:

Data Assimilation Summer School, Sibiu, 6th August 2009

Common Set of Tools for Assimilation of Data

COSTA

COSTA

• A generic environment where user can easily try out different DA-methods to their models

• A generic environment where method developers can easily implement their method to different models

Page 11: Common Set of Tools for Assimilation of Data COSTA Data Assimilation Summer School, Sibiu, 6 th August 2009 COSTA An Introduction Nils van Velzen email:

Data Assimilation Summer School, Sibiu, 6th August 2009

Common Set of Tools for Assimilation of Data

COSTA

COSTA

• Most data assimilation actually only requires information about model state and observation at the same time.

• This makes it possible to implement model, observation and data assimilation methods separately as independent components.

Page 12: Common Set of Tools for Assimilation of Data COSTA Data Assimilation Summer School, Sibiu, 6 th August 2009 COSTA An Introduction Nils van Velzen email:

Data Assimilation Summer School, Sibiu, 6th August 2009

Common Set of Tools for Assimilation of Data

COSTA

COSTA components

Model, observations and DA-method

Page 13: Common Set of Tools for Assimilation of Data COSTA Data Assimilation Summer School, Sibiu, 6 th August 2009 COSTA An Introduction Nils van Velzen email:

Data Assimilation Summer School, Sibiu, 6th August 2009

Common Set of Tools for Assimilation of Data

COSTA

Model Component

• Model component in COSTA (formal)

• State of a model instance

• Methods to get or change the state of model instance

, , ,d t

M t t tdt

x

x p u w

, , , , tx u p w

Page 14: Common Set of Tools for Assimilation of Data COSTA Data Assimilation Summer School, Sibiu, 6 th August 2009 COSTA An Introduction Nils van Velzen email:

Data Assimilation Summer School, Sibiu, 6th August 2009

Common Set of Tools for Assimilation of Data

COSTA

Model Component

• Propagate the model state-vector

• Get, set, axpy for

• GetObsValues:

, , ,t t

t

t M t t t dt

x x p u w

y t H t x

, , ,t t tx p u w

Page 15: Common Set of Tools for Assimilation of Data COSTA Data Assimilation Summer School, Sibiu, 6 th August 2009 COSTA An Introduction Nils van Velzen email:

Data Assimilation Summer School, Sibiu, 6th August 2009

Common Set of Tools for Assimilation of Data

COSTA

Using COSTA

Page 16: Common Set of Tools for Assimilation of Data COSTA Data Assimilation Summer School, Sibiu, 6 th August 2009 COSTA An Introduction Nils van Velzen email:

Data Assimilation Summer School, Sibiu, 6th August 2009

Common Set of Tools for Assimilation of Data

COSTA

Using COSTA

• Use the “costawb” program to combine a model with a DA-method without any programming

• Model components are dynamic libraries and are linked to the “costawb” program

Page 17: Common Set of Tools for Assimilation of Data COSTA Data Assimilation Summer School, Sibiu, 6 th August 2009 COSTA An Introduction Nils van Velzen email:

Data Assimilation Summer School, Sibiu, 6th August 2009

Common Set of Tools for Assimilation of Data

COSTA

WAQUA/TRIWAQ

• Simulation model for shallow water

• Used operational by the Dutch Rijkswaterstaat

• Long history of data assimilation– Too expensive

– Inflexible

Page 18: Common Set of Tools for Assimilation of Data COSTA Data Assimilation Summer School, Sibiu, 6 th August 2009 COSTA An Introduction Nils van Velzen email:

Data Assimilation Summer School, Sibiu, 6th August 2009

Common Set of Tools for Assimilation of Data

COSTA

WAQUA/TRIWAQ

• Domain decomposition and parallel computing

• COSTAmodel component

• RRSQRTFilter

Page 19: Common Set of Tools for Assimilation of Data COSTA Data Assimilation Summer School, Sibiu, 6 th August 2009 COSTA An Introduction Nils van Velzen email:

Data Assimilation Summer School, Sibiu, 6th August 2009

Common Set of Tools for Assimilation of Data

COSTA

The WAQUA/TRIWAQ model Deterministic model:

Stochastic model:

or

φ ti+ 1=A [ φ t i ,u t i ,g ]

φt t i+1 pu t i+ 1p A t i+ 1 = A [ φ t t i ,u f t i +W u pu t i ,g ]+W A p A t i

diag α A p A t i diag α u pu t i 0

η u t i η A t i

x t t i+1 =M i [ x t i ]+η t i

Page 20: Common Set of Tools for Assimilation of Data COSTA Data Assimilation Summer School, Sibiu, 6 th August 2009 COSTA An Introduction Nils van Velzen email:

Data Assimilation Summer School, Sibiu, 6th August 2009

Common Set of Tools for Assimilation of Data

COSTA

Page 21: Common Set of Tools for Assimilation of Data COSTA Data Assimilation Summer School, Sibiu, 6 th August 2009 COSTA An Introduction Nils van Velzen email:

Data Assimilation Summer School, Sibiu, 6th August 2009

Common Set of Tools for Assimilation of Data

COSTA

Page 22: Common Set of Tools for Assimilation of Data COSTA Data Assimilation Summer School, Sibiu, 6 th August 2009 COSTA An Introduction Nils van Velzen email:

Data Assimilation Summer School, Sibiu, 6th August 2009

Common Set of Tools for Assimilation of Data

COSTA

Deterministic and Stochastic We want a separation between

deterministic and stochastic model Use deterministic model for other applications Play with alternative

noise models

Page 23: Common Set of Tools for Assimilation of Data COSTA Data Assimilation Summer School, Sibiu, 6 th August 2009 COSTA An Introduction Nils van Velzen email:

Data Assimilation Summer School, Sibiu, 6th August 2009

Common Set of Tools for Assimilation of Data

COSTA

Deterministic and Stochastic WAQUA/TRIWAQ uses ADI-scheme:

One time step consist of two half time steps Time correlation applied each half time step

New approach: Time correlation

each whole time step

Different results!

Page 24: Common Set of Tools for Assimilation of Data COSTA Data Assimilation Summer School, Sibiu, 6 th August 2009 COSTA An Introduction Nils van Velzen email:

Data Assimilation Summer School, Sibiu, 6th August 2009

Common Set of Tools for Assimilation of Data

COSTA

Challenge Can we:

Separate filter and method Method?

have same results? Similar performance?

Is the COSTA modelinterface sufficientfor this task?

Page 25: Common Set of Tools for Assimilation of Data COSTA Data Assimilation Summer School, Sibiu, 6 th August 2009 COSTA An Introduction Nils van Velzen email:

Data Assimilation Summer School, Sibiu, 6th August 2009

Common Set of Tools for Assimilation of Data

COSTA

Page 26: Common Set of Tools for Assimilation of Data COSTA Data Assimilation Summer School, Sibiu, 6 th August 2009 COSTA An Introduction Nils van Velzen email:

Data Assimilation Summer School, Sibiu, 6th August 2009

Common Set of Tools for Assimilation of Data

COSTA

Conclusions

• COSTA offers a flexible framework for using and developing data assimilation methods.

• Successful coupling with “real” models:– WAQUA/TRIWAQ

– Lotos-Euros

– Chimere

Page 27: Common Set of Tools for Assimilation of Data COSTA Data Assimilation Summer School, Sibiu, 6 th August 2009 COSTA An Introduction Nils van Velzen email:

Data Assimilation Summer School, Sibiu, 6th August 2009

Common Set of Tools for Assimilation of Data

COSTA

Conclusions

• Easy to use

• Complete basic functionality available:– Implementation available for all basic

building blocks

– Growing number of available methods

• Support for parallel computing

Page 28: Common Set of Tools for Assimilation of Data COSTA Data Assimilation Summer School, Sibiu, 6 th August 2009 COSTA An Introduction Nils van Velzen email:

Data Assimilation Summer School, Sibiu, 6th August 2009

Common Set of Tools for Assimilation of Data

COSTA

Thank you!

Page 29: Common Set of Tools for Assimilation of Data COSTA Data Assimilation Summer School, Sibiu, 6 th August 2009 COSTA An Introduction Nils van Velzen email:

Data Assimilation Summer School, Sibiu, 6th August 2009

Common Set of Tools for Assimilation of Data

COSTA

Existing software and programming issues

Page 30: Common Set of Tools for Assimilation of Data COSTA Data Assimilation Summer School, Sibiu, 6 th August 2009 COSTA An Introduction Nils van Velzen email:

Data Assimilation Summer School, Sibiu, 6th August 2009

Common Set of Tools for Assimilation of Data

COSTA

Tools for creating COSTA models

• Simple model builder– Handles the “object oriented” aspects of the model

– You only need to implement 4 functions

• Model combiner– Combine multiple COSTA models in one composite

model

– Create a stochastic model from a deterministic model

• Black Box model builder– Create a COSTA component for a model without

changing the model code

• Support for parallel models

Page 31: Common Set of Tools for Assimilation of Data COSTA Data Assimilation Summer School, Sibiu, 6 th August 2009 COSTA An Introduction Nils van Velzen email:

Data Assimilation Summer School, Sibiu, 6th August 2009

Common Set of Tools for Assimilation of Data

COSTA

Automatic parallelization

Page 32: Common Set of Tools for Assimilation of Data COSTA Data Assimilation Summer School, Sibiu, 6 th August 2009 COSTA An Introduction Nils van Velzen email:

Data Assimilation Summer School, Sibiu, 6th August 2009

Common Set of Tools for Assimilation of Data

COSTA

Using parallel models