Dynamic stage-discharge rating curve analysis using Bayesian inference

Introduction

This web page presents programs for doing Bayesian dynamical rating curve inference.
Q=C(h-h0)^b *E
where E is independent log-normally distributed noise, E~logN(0,sigma^2), Q is what you want to predict (often water discharge) and h is the observation you want to use for the predictions (often water surface height). In this application, each of the parameters a=log(C),b and h0 are turrned into dynamic processes, all belonging to the Ornstein-Uhlenbeck (OU) family of stochastic differential equations (SDE).

The programs utilized Markov chain Monte Carlo (MCMC) methods for doing Bayesian inference. One program uses these methods both on parameters and hidden processes (a(t),b(t),h0(t)) while the other used particle filtering for the hidden processes and MCMC on the parameters. The latter method proved to be the most efficient.

Several sub-models are also contemplated, where some parameters are dynamic and som are static. Importance sampling, using a proposal distribution made from the MCMC samples, was used for determining the marginal likelihood for each model. With a model prior (usually assumed equal for each model) can then be made. With equal prior probability for each model, the model with the highest model likelihood wins.

Programs

I've made two programs that performs single segment Bayesian dynamic rating curve fitting. Some basic statistical and mathematical techniques are found in the Hydrasub library. The programs also utilizes the 'vvgraph', 'timeseriesgraph' and 'histogramme' programs for visualization of the analysis.

The programs are written on a Linux machine, but can also be compiled on the Cygwin subsystem of Windows, if X11-support and C++ compiler is included.

Measurement file examples

In order to run one of the three programs, you need a stage discharge measurement file in the correct text format. Examples of that is given below. The data is provided by NVE (the Norwegian Water and Energy Administration) and should not be used for commercial purposes.

Links