Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

Travis build status GPL license GitHub version CRAN_Status_Badge

Streamflow Reconstruction Using Linear Dynamical System

A typical streamflow reconstruction model is linear: the relationship between streamflow y and the paleoclimate proxies u is modelled as

Linear models do not account for the catchment state and the catchment memory effect. To tackle this, we experiment with using the Linear Dynamical System (LDS) model. The relationship between streamflow and paleoclimate proxies is characterized as follows:

Observe that linear regression is a special case of LDS. The constant term \alpha of linear regression is replaced by a state-dependent term Cx_t, and the system state follows a state transition equation.

We described the method in full detail, together with a case study for the Ping River (Thailand), in Nguyen and Galelli (2018)---please cite this paper when you use the package. We also used the method to reconstruct streamflow for 48 stations in 16 countries in Asia (Nguyen et al, 2019).

For a tutorial on how to use the package, please see the package's vignette.


ldsr is now available on CRAN, so you can install with


To install the development version, if you are using Windows, you will first need to install Rtools to compile the C++ code. For R 4.0.0. For older R.

Now to install the development version



Nguyen, H. T. T., & Galelli, S. (2018). A linear dynamical systems approach to streamflow reconstruction reveals history of regime shifts in northern Thailand. Water Resources Research, 54, 2057– 2077.

Nguyen, H. T. T., Turner, S. W., Buckley, B. M., & Galelli, S. (2019). Coherent streamflow variability in Monsoon Asia over the past eight centuries---links to oceanic drivers.