Dynamic stage-discharge rating curve analysis using Bayesian inference
This web page presents programs for doing Bayesian dynamical
rating curve inference.
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
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.
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.
ar1_vf8.C is a
pure MCMC based program for doing dynamic rating curve inference.
particle filtering in combination with MCMC techniques (PMCMC).
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.
- Haga bru A large measurement set (208)
in a large Norwegian river. Shows signs of dynamic behaviour.
- Håkadalsbrua A smaller measurement
set (44). Shows signs of dynamic behaviour.
- Fiskum A stable profile, used for testing if
the simplest model (all parameters static) wins when it should win.