Streamflow is one of the most important variables in hydrology but is
difficult to measure continuously. As a result, nearly all streamflow
time series are estimated from rating curves
that define a mathematical relationship between streamflow and some
easy-to-measure surrogate like water-surface elevation (stage). Most
ratings are still fit manually, which is time-consuming and subjective.
To improve that process, the U.S. Geological Survey (USGS), among
others, is evaluating algorithms to automate that fitting. Several
automated methods already exist,
and each parameterizes the rating curve slightly differently. Because of
the nonconvex nature of the problem, those differences can greatly
After some trial and error, we settled on reparameterizing the classic
segmented power law somewhat like a Bayesian physics-informed neural
network. Being physics-informed and Bayesian, the algorithm requires
minimal data and also estimates uncertainty.
Its implementation is open source and easily modified so that others can
contribute to improving the quality of USGS streamflow data.