Models and Modelling in FEWS Part II

57
Models and Modelling in FEWS Part II Micha Werner Deltares & UNESCO-IHE

description

Models and Modelling in FEWS Part II . Micha Werner Deltares & UNESCO-IHE. Error correction ARMA & ADJUST-Q. - PowerPoint PPT Presentation

Transcript of Models and Modelling in FEWS Part II

Page 1: Models and Modelling in FEWS Part II

Models and Modelling in FEWSPart II

Micha WernerDeltares & UNESCO-IHE

Page 2: Models and Modelling in FEWS Part II

Error correctionARMA & ADJUST-Q

In this section we will discuss two methods used for correcting the outputs of a hydrological model. The method used widely in the NWS is ADJUST-Q, which typically requires manual interaction during the forecast run. The second is the ARMA method in FEWS. This is a statistical error model that is widely used in forecasting. This does not need interaction during the forecast process

Page 3: Models and Modelling in FEWS Part II

3

Improving the Forecast

P rocess m od e l

S ta te Va ria b le s | P a ram e te rs

U p da tin g p roce du re

A B C D

O bse rve d va riab le sInp u t va riab les

A: Input correctionB: State Updating (data assimilation)C: Parameter UpdatingD: Postprocessing (including Error Correction)

Page 4: Models and Modelling in FEWS Part II

4

Output Processing

This can be done using very simple approaches as well as with more complex methods that canb also provide an estimate of uncertainty

Simple methods:• Adjust Q (correction at start forecast)• AR or ARMA type error correction

More “complex” methods:• Quantile regression• Bayesian Output Processor (HUP)

Page 5: Models and Modelling in FEWS Part II

5

Overview of error correction models/methods

Available methods for error correction in FEWS

Internal• AdjustQ type operation• ARMA Error correction method

External (models) – run using the adapter approach• MCRM/DODO Error Correction approach• CEH ARMA Module• PDM Error correction/State updating• Implementations of Quantile Regression & HUP

Page 6: Models and Modelling in FEWS Part II

6

Overview of available error correction methods

ADJUST-Q: Empirical error correction• Parameter steps determines convergence speed• steps may be changed interactively during forecast

steps

Example: simple model with constant bias

Page 7: Models and Modelling in FEWS Part II

7

Overview of available error correction methods

Statistical model of error• Time series modeling• ARMA: Auto Regressive – Moving Average

Concept• Error is typically highly correlated in time• Establish model of error – predict future error• Correct model simulation in forecast period with predicted error

1 1( ) ( ) ( )K M

res k res mk mQ t Q t k e t m

,k m ,K MModel Order

Model Parameters

Page 8: Models and Modelling in FEWS Part II

8

ARMA module Delft-FEWS - 1

Autoregressive Moving Average Models used for forecasting of stationary timeseries – in this case applied to modelling the time evolution of the model error

AR: This part of the model describes how each observation (error) is a function of the previous k observations (errors). For example, if k = 1, then each observation is a function of only one previous observation. That is,

where Qres(t) represents the observed residual (error) value at time t, Qres(t−1) represents the previous observed residual (error) at time t − 1, e(t) represents some random error and c and a1 are constants. Other observed values of the series can be included in the right-hand side of the equation if k > 1:

1( ) ( 1) ( )res resQ t c Q t t

1 2( ) ( 1) ( 2)..... ( ) ( )res res res k resQ t c Q t Q t Q t k t

Page 9: Models and Modelling in FEWS Part II

9

ARMA module Delft-FEWS - 2

MA: This part of the model describes how each observation is a function of the previous y errors. For example, if y = 1, then each observation is a function of only one previous error. That is,

Here e(t) represents the random error at time t and e(t−1) represents the previous random error at time t − 1. Other errors can be included in the right-hand side of the equation if y > 1.

1( ) ( 1) ( )resQ t c e t t

Page 10: Models and Modelling in FEWS Part II

10

ARMA Model

Example of error correction using ARMA. Corrected time series (red) will converge to uncorrected time series (pink) as lead time increases

Page 11: Models and Modelling in FEWS Part II

11

ARMA Model

Simple example of ARMA model

date/time QIN SQIN Error (SQIN-QIN) Error (obs,AR1) Forecast (SQIN+Error)0.95

28-08-2010 07:00 58.89 172.25 113.36 113.36 58.8928-08-2010 08:00 47.05 159.61 112.56 112.56 47.0528-08-2010 09:00 38.95 150.19 111.24 111.24 38.9528-08-2010 10:00 37.93 140.71 102.78 102.78 37.9328-08-2010 11:00 35.96 135.87 99.91 99.91 35.9628-08-2010 12:00 34.1 135.69 101.59 101.59 34.1028-08-2010 13:00 32.03 135.15 103.12 103.12 32.0328-08-2010 14:00 30.48 131.29 97.96 33.3328-08-2010 15:00 29.98 124.15 93.07 31.0828-08-2010 16:00 31.34 115.73 88.41 27.3228-08-2010 17:00 31.27 107.68 83.99 23.6928-08-2010 18:00 29.01 99.98 79.79 20.1928-08-2010 19:00 28.55 93.47 75.80 17.6728-08-2010 20:00 27.92 87.76 72.01 15.7528-08-2010 21:00 27.53 84.75 68.41 16.3428-08-2010 22:00 26.47 80.23 64.99 15.2428-08-2010 23:00 25.21 76.29 61.74 14.5529-08-2010 00:00 24.53 72.68 58.65 14.03

See also spreadsheet…

Page 12: Models and Modelling in FEWS Part II

12

AR module Delft-FEWS - 3

What is required for setting up an ARMA Model• Simulated trace (typically SQIN)• Observed trace (typically QIN)

Parameterisation of error model- Model Order – - Model parameters

Three ways of defining error model in FEWS - Automatic: Establish both order & parameters dynamically (AR only)- Defined order: Order defined by user; Dynamic parameter identification- Define all: Order & parameters defined by user

1 1( ) ( ) ( ) ( )K M

res k res mk mQ t Q t k e t m t

,k m ,K M

Page 13: Models and Modelling in FEWS Part II

13

Establishing ARMA model order and parameters

Statistical behavior of error in window of defined length used to identify order and/or parameters of error model. Rule of thumb: Window should be > 50 x order of AR model

Window length

Page 14: Models and Modelling in FEWS Part II

14

Establishing ARMA model order and parameters

Length of window will influence the estimation of AR parameters. As window increases autocorrelation of errors will decrease for most hydrological time series

Window length

When estimating order of model: Define maximum orderTypical AR orders vary in range 1-3

Page 15: Models and Modelling in FEWS Part II

15

Error Correction using FEWS ARMA model

FEWS ARMA Error model

Additional Features• Error correction using AR and MA• pre-processing methods to normalize errors (Log, Box-Cox etc)

• Additional options• Interpolation of observed data to remove “small’ gaps• Data hierarchy for simulated inputs• Constraints on outputs• Constraints on inputs

Page 16: Models and Modelling in FEWS Part II

16

Error Correction using FEWS ARMA model

Options for ARMA model

Free order & Free parameters

This allows the error model to establish both order & parameters dynamically

Fixed order & Free parameters

Order is now fixed – but parameters dynamically - order established/calibrated offline

Free order & Fixed parameters

not applicable

Fixed order & Fixed parameters

Everything is now fixed – parameters & order established/calibrated offline

Page 17: Models and Modelling in FEWS Part II

17

Error Correction using FEWS ARMA model

Options for ARMA model – pro’s and con’s

Free order & Free parameters

Pro: may utilize full potentialCon: statistical optimization with many degrees of freedom –small risk of coming unstuck Con: behavior with strange data/bad model unpredictable

Fixed order & Free parameters

Pro: utilize potential of dynamic ordersCon: very small risk of coming unstuck Con: behavior with strange data/bad model unpredictableCon: need to establish - order. 3 is good working max.

Free order & Fixed parameters

not applicable

Fixed order & Fixed parameters

Pro: controlled, predictable, behavior Con: need to establish order & parameters. Calibration required

Page 18: Models and Modelling in FEWS Part II

18

Error Correction using FEWS ARMA model

Notes on inputs to Error model• 2 Traces are required

• Simulated trace – shoud cover historical & forecast period• Observed trace – normally ends at T0

• When there is missing data in simulated time series – failure

• Error correction module allows multiple simulated time series to be allocated• Simulated – Forecast• Simulated – Historical• Simulated – Backup (use in case problems with cold start!)

Page 19: Models and Modelling in FEWS Part II

19

Error Correction using FEWS ARMA model

Additional options – manipulating inputs

Range check on input can be defined (min/max)• This is like validation – values beyond range become Missing • Better to apply a more stingent validation berfore going in to error model

(e.g rate change checks etc)

• Interpolation of input data• Avoid spurious results due to small gaps• Same function as in InterpolationModule: Linear Interpolation for defined

gap length

• Ignore Doubtfull. Doubtfull data can be set to be ignored• Be very careful – as rated flows often doubtful beyond range of rating –

but we do want these to be used

Page 20: Models and Modelling in FEWS Part II

20

Error Correction using FEWS ARMA model

Additional options – manipulating outputs

• Range check on outputs can be defined (min/max)• This is NOT a validation – values are constrained to min-max• Typically used for constraining discharge values to zero (or a

minimum flow, e.g. as input to HD model)

Page 21: Models and Modelling in FEWS Part II

21

Application of Error correction

General notes• Error correction is a form of modeling!

• Careful thought of the nature of errors being corrected

• Calibration & validation • Calibration required if orders are fixed• Validation required in both cases !

Page 22: Models and Modelling in FEWS Part II

22

Application

Typical application of error model• Rainfall-runoff model calculates flow to catchment outlet (C)

• Error correction applied to flow at C• Routing-model calculates propagation of flow in steep river

• Uses error corrected flow as input• Error correction applied to flow at B

• HD model calculates levels & flows in reach from B to A• Uses error corrected flow as input

A

B

C

Main River

Small River

Sub-Catchment

Legend:

Page 23: Models and Modelling in FEWS Part II

23

Application

Error model cannot be applied to tidal signal as is!• Periodic signal requires different approach

• Approach 1: Correction of surge residuals• Possible – but…• Forecast surge may be very different from observed surge (bias)

• Approach 2: Correction Frequency domain (Prosymfo2)• Significant training periods (several months data)• If to be considered – integrate as external module

Page 24: Models and Modelling in FEWS Part II

24

Setting up the ARMA Model in FEWS

Configuration when using automatic estimation methods is very easy• Identify inputs and outputs• If fixing order - set order of AR to e.g. 3 (typically maximum order)• Typically MA can be ignored – as AR dominates

If fixing both order AND parameters: Recommended approach• Set up models & ARMA in UpdateStates workflow

• Configure ARMA to estimate parameters• Run UpdateStates for extended period (e.g. 1 year)• Run ARMA in DEBUG mode for 1 year of data (through e.g. cold

state selection).

Page 25: Models and Modelling in FEWS Part II

25

Configuration

ARMA model run in DEBUG mode – allow parameters to be estimated

• Read AR (and MA values if relevant from DEBUG message• Copy values as fixed

Page 26: Models and Modelling in FEWS Part II

26

Comparison of ADJUSTQ to AR

Blending steps = 100Blending steps = 1Blending steps = 12

Page 27: Models and Modelling in FEWS Part II

27

Comparison of ADJUSTQ to AR

Blending steps = 100Blending steps = 12Blending steps = 30Blending steps = 1

Page 28: Models and Modelling in FEWS Part II

28

Calibrating and Validating ARMA models

Calibration of ARMA models using e.g. FEWS inernal routines, or other statistical packages

Validation• Run series of hindcast runs• Plots of lead time accuracy

0 20 40 60 80 1000

100

200

300

400

500

600

Lead time (hours)

RM

SE in

fore

cast

dis

char

ge (m

3 /s)

(a)

Cochem (corrected)Cochem (simulated)Maxau (corrected)Maxau (simulated)

12/23 12/24 12/25 12/26 12/27 12/281400

1600

1800

2000

2200

2400

start of forecast

Date

Wat

er L

evel

(m)

(b)

observerdcorrectedsimulated

Fig. 3. (a) Lead time accuracy of the discharge forecast expressed as RMSE at the gauging stations of Cochem on the Mosel River, and Maxau on the River Rhine. Both the accuracy with and without error correction are shown. (b) Shows an example of the corrected and simulated flows at the gauge of Maxau in the Rhine for the forecast of 24th of December 2002

Page 29: Models and Modelling in FEWS Part II

29

Calibrating and Validating ARMA models

FEWS can be easily applied in setting up such hindcast runs

Page 30: Models and Modelling in FEWS Part II

30

ARMA versus ADJUST-Q

Pros;• ARMA allows for an automated approach to adjusting errors –

reduces need for interactivity• ARMA makes statistical sense – errors typically have structure• ARMA provides an objective method – can be verified using

hindcasts• ADJUST-Q supports changing interactively when not behaving

properlyCons;• ARMA is a statistical model – not a hydrological model – statistical

sanity is not always hydrologically correct• ADJUST-Q is subjective – difficult to apply in verification

Page 31: Models and Modelling in FEWS Part II

Questions…

Page 32: Models and Modelling in FEWS Part II

Routing models in FEWSHydrodynamic models

In this section we will discuss the application of routing models in FEWS – focusing primarily on the use of hydrodynamic models such as HEC-RAS. Some of the particular aspects of using HD models in real time are discussed.

Page 33: Models and Modelling in FEWS Part II

33

Routing models

Objective: Calculate propagation of flood wave through river system• Simple Hydrological Routing (KW, Lag-K, Muskingum, …)• Complex with 1-D hydrodynamic model (ISIS, Mike11, SOBEK,

HEC)• Potentially more complex – 2D models (Delft3D, Telemac, Flow2D

etc)

Page 34: Models and Modelling in FEWS Part II

34

Routing models linked to FEWS (Examples)

Hydrological LAG-KTATUMKinematic Wave (KW)2-Lyr Muskingum

NWSNWSCEH-WallingfordDeltares

USUSEngland & Wales, Scotland-

Hydrodynamic

SOBEK-1DISISMike-11HEC-RASDelft3DSOBEK-1D2D

DeltaresHR Wallingford/HalcrowDHIUSACEDeltaresDeltares

Rhine basin, WaterboardsEngland & Wales, ScotlandEngland & Wales, Italy, SpainUS, Italy, SudanScotlandThailand

Page 35: Models and Modelling in FEWS Part II

35

Differences between model approaches

Kinematic Wave

Diffusive Wave

Dynamic Wave (all other cases) Full Equations

bix

h

0121

fSbix

h

t

Q

sgAsA

Q

xsgA

hibx

531

Q B h is bn

15 231 hQ B h is b xn

1Fr

0121

fSbix

h

t

Q

sgAsA

Q

xsgA

Most models are derivations of the shallow water equations – ignoring different terms that are insignificant: Depends on the hydraulic situation

Page 36: Models and Modelling in FEWS Part II

36

Hydrodynamic vs. Hydrological Models

Typical set-up

A

B

C

Main River

Small River

Sub-Catchment

Legend:

Simple routing – often in hydrological modele.g. UNIT-HG

Hydrological routinge.g. LAG-K, Kinematic Wave

Hydrodynamic routinge.g. HEC-RAS

Page 37: Models and Modelling in FEWS Part II

37

Hydrodynamic vs. Hydrological Models

Pros;• Hydrodynamic routing provides more realistic simulation of flood

wave propagation• Deals well with backwater effects, change in flood wave

propagation when flow goes out of bank• Allows incorporation of structures and control of structures• Allows outputs at intermediate locations (not gage gage)

Cons;• More complex models, data intensive• Computationally more demanding• Risk of instability

Page 38: Models and Modelling in FEWS Part II

38

Hydrodynamic vs. Hydrological Models

Apply HD models only when really required• Extensive floodplains• Reaches with structures• Tidal Reaches• Confluences

Mixing models• Hydrological Hydrodynamic• Hydrodynamic Hydrological

Page 39: Models and Modelling in FEWS Part II

39

HD model in a forecast workflow

Page 40: Models and Modelling in FEWS Part II

40

Exchange between HD models & FEWS

• All HD models integrated with FEWS using standard adapter approach• Inputs (typical)

• Flows at upstream boundary and tributary inflows• Level at downstream boundary – may be a tidal boundary

(not required when internal rating curve boundary is used)• Inputs (less common)

• Gate settings• Temperature

• Outputs (typical)• Water Level & Flow

(point – or – longitudinal)

Page 41: Models and Modelling in FEWS Part II

41

Exchange between HD models & FEWS

• Location of boundaries needs careful thought to avoid “reading” a defined boundary as the result of a HD model

Upstream boundary – Q(t)

Downstream boundary – Q-h

Reach influenced by d/s boundary condition

Ignore results from this point

Flow direction

Page 42: Models and Modelling in FEWS Part II

42

Exchange between HD models & FEWS

Tidal boundaries offer a specific problems• Astronomical constants to derive astronomical tide• Difficult to work with harmonic constants• Work with surge residuals (interpolate, ARMA modeling etc) – then add back to

astronomical tide• ADJUST-T (NWS operation addresses similar issue)• Other option – link with coastal shelf model (see case study…)

Page 43: Models and Modelling in FEWS Part II

43

Hydrodynamic models & Error correction• Hydrodynamic models typically cover long reaches of river, which means

that intermediate gages are not utilized for error correction

Options• State updating: e.g. Ensemble/Extended Kalman Filter; Particle Filter)

• Particle filter applied in Rhine for updating• Simple “nudging” techniques

• Available in Mike11 & ISIS These are computationally intensive

• Splitting model in sections – use error correction at each gage• Assumes rating curve is reliable!

Glenfield GS Shewalton GS

h-t Irvine Bay

New

miln

s

East Holmes

Burnside St

Waterside

Bur

n A

nne

Hoo

dsto

n B

r

Tem

plet

onbu

rn

How

ard

Pk

Car

mel

Wat

er

Ann

ick

Wat

er

Queen’s Drive

Page 44: Models and Modelling in FEWS Part II

44

Model cascades

Hydrodynamic – Hydrodynamic model cascade

Complex interaction• State in d/s hydrodynamic model

affects state in u/s hydrodyanic model• Overlap models

I

II

III

IVVI

VII

Model 2

Model 1

Model 1 Model 2

Region of influence of d/s boundary

Page 45: Models and Modelling in FEWS Part II

45

Model cascades

Connecting two hydrodynamic models

Error correction on flow from u/s model• Note that this does assume rating curve is reliable!! May not

include hysterisis

Model 1 Model 2

Gauge u/s of model transitionCalculate error

Add error to flow at d/s boundary Model 1u/s boundary Model 2Read Levels from d/s model!!!

ε

Q+ε

Q

Page 46: Models and Modelling in FEWS Part II

46

Burn-in profiles

Avoid “abrupt” shock on startupMainly relevant to HD modules (stability)Only applied when starting from a cold state

• Identify start value in cold state• Gradual “climb” to actual value

Burn-in section

Page 47: Models and Modelling in FEWS Part II

47

Inundation Mapping

Inundation maps provide spatial view of extent of inundation

Two main approaches in integrating these maps in FEWS

• Running external (2D) hydrodynamic model – importing resulting grid data to view dynamic inundation profile• HEC-RAS (ID + Interpolation)• TUFlow• SOBEK-1D2D

• Running a 1D hydrodynamic model• Export levels at cross sections to FEWS Flood Mapping Module• Interpolate water surface profile in GIS (PCRaster)• Import dynamic flood map to FEWS

Page 48: Models and Modelling in FEWS Part II

48

Inundation Mapping using a 2D model

• Model runs through General Adapter – as does any model

• Time series of grid data returned – map stack

• Imported to FEWS database – displayed as any other grid

Example:SOBEK 1D2D model of the Barotse FloodplainZambezi River, Zambia

DEM extent 303 x 541 cells; 720m resolution (resampled from 90m SRTM data)SOBEK model using 1D for main stem rivers

Page 49: Models and Modelling in FEWS Part II

49

Inundation Mapping using a 1D model + Interpolation

Page 50: Models and Modelling in FEWS Part II

25/04/23

Example: Modeling of bifurcation/Confluence1D: Modeler decides division2D: Division depends on water level

Pannerdensche Kop

?

Page 51: Models and Modelling in FEWS Part II

51

Forecasting using 1D & 2D HD models in the Firth of Clyde, Scotland

increased tide levels

Low Pressure

Page 52: Models and Modelling in FEWS Part II

52

Firth of Clyde (FoC) Flood Forecasting Model setup in Delft3D-FLOW

• Hydrodynamics module of Delft3D framework, applied for the modelling of surface water systems

FoC Model provides

• Tidal surge forecasts at locations distributed in Firth of Forth

• Downstream boundary to 1D river models

Forecasting using 1D & 2D HD models in the Firth of Clyde, Scotland

Page 53: Models and Modelling in FEWS Part II

53

Firth of Clyde model development

Model setup - computational grid

• Orthogonal curvilinear grid, aligned with local geometric features

• Spatially varying resolution (1 km – 100 m)

• Run in 2D, 3D effects are secondary

• Based on a time step of 1 minute, a 1 day simulation takes approximately 6 minutes

•Model does not run often (4x per day) when forcings are updated. Provides d/s boundary for river models

•Runs on dedicated server to avoid conflicting with other resources

Page 54: Models and Modelling in FEWS Part II

54

Firth of Clyde model development

Model setup - boundary forcing

• Tidal boundary conditions (harmonic constituents) for 50 tidal components

• External surge conditions by time-varying, spatially uniform water level elevation

• Meteorological forcing by time-varying, spatially uniform wind speed and direction

• Assuming one-way coupling at rivers (model provides d/s level boundary), no river discharge taken into account

Page 55: Models and Modelling in FEWS Part II

Questions…

Page 56: Models and Modelling in FEWS Part II

Wrap-up

Page 57: Models and Modelling in FEWS Part II

57

Wrap up of models in FEWS

• Variety of different types of models available for running in FEWS• All integrated using the same “adapter” concept• Models can be mixed in a single workflow – extremely useful for

creating “integrated modeling structures”

• Increasing use of distributed & physically based models in forecasting• Issues: speed, database sizes, complexity, …

• Variety of models & adapters available and used operationally• Actual availability depends on model & supplier (licences)• Adapters to new models can be readily developed