weathergen R Package

R Package of a Stochastic Weather Generator by the UMass HydroSystems Research Group

View project onGitHub


The weathergen R package provides a set of functions for generating synthetic climate timeseries. The package is designed to be used for performing a climate stress test of water resource systems.

This package is based on R scripts written by Scott Steinshneider. More information about these models can be found in Steinschneider and Brown (2013).

Package was created by and is maintained by Jeffrey D Walker, PhD.

NOTE: This package is no longer under development. Future changes are not guarranteed to be backwards-compatible. Use at your own risk.

Also note that the complete wavelet-based algorithm in Steinschneider et al. (2013) has not been entirely implemented. Only an ARIMA-based algorithm is available using the sim_daily() function.However, the wavelet-related functions could be used to construct the algorithm described in Steinschneider et al. (2013).


Before installing the weathergen package, you must mannual install the hydromad package, which is a required dependency but not available on CRAN.

install.packages(c("zoo", "latticeExtra", "polynom", "car", "Hmisc","reshape"))
install.packages("hydromad", repos="")

After install hydromad, weathergen can be installed using the devtools package.


Data Sources

This package is currently being developed for use with the Gridded Meteorological Data: 1949-2010 by Maurer et al, 2002. Tools for downloading and processing this dataset can be found in the walkerjeffd/climate-data repo.


The package includes a vignette that describes how to use the package, and how the package works. There is currently only one vignette, but more are in development


  • Maurer, E.P., A.W. Wood, J.C. Adam, D.P. Lettenmaier, and B. Nijssen, 2002, A Long-Term Hydrologically-Based Data Set of Land Surface Fluxes and States for the Conterminous United States, J. Climate 15, 3237-3251. doi: 10.1175/JCLI-D-12-00508.1
  • Steinschneider, S., and C. Brown (2013), A semiparametric multivariate, multisite weather generator with low-frequency variability for use in climate risk assessments, Water Resour. Res., 49, 7205–7220. doi:10.1002/wrcr.20528