# R code for generating multi-site stochastic precipitation

**a modeler's tribulations, gopi goteti's web log**, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)

Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

In water resource management, climate change, hydrology and related disciplines long time series of precipitation/rainfall data is required. Since historical records are relatively short, typically 50 years or less, mathematical/statistical models are used to generate synthetic data of required length. This data generation process requires that the spatio-temporal statistics are preserved between the observations and the synthetic data. There are a number of procedures in the literature, largely beginning in the late 1990s with the work of Wilks (see references below). However, the code required to generate the synthetic data is typically not available.

I created R code for the computationally and conceptually simple implementation of the modified Wilks approach of Mhanna and Bauwens (2012). See my GitHub repo – https://github.com/RationShop/StochasticPrecipitation

There are also two R packages which have been made available recently (see links at the above GitHub site).

The R code, for the example dataset provided, takes only a few minutes or less. Someday I plan to make a package out of this.

**leave a comment**for the author, please follow the link and comment on their blog:

**a modeler's tribulations, gopi goteti's web log**.

R-bloggers.com offers

**daily e-mail updates**about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.

Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.