CoSMoS - Complete Stochastic Modelling Solution

CoSMoS is an R package that makes time series generation with desired properties easy. Just choose the characteristics of the time series you want to generate, and it will do the rest. The generated time series preserve any probability distribution and any linear autocorrelation structure. Users can generate as many and as long time series from processes such as precipitation, wind, temperature, relative humidity etc. It is based on a framework that unified, extended, and improved a modelling strategy that generates time series by transforming “parent” Gaussian time series having specific characteristics (Papalexiou, 2018).


To install the latest version of the package run:

if (!require('devtools')) {install.packages('devtools'); library(devtools)} 

install_github('strnda/CoSMoS', upgrade = 'never')



The package was partly funded by the Global institute for Water Security (GIWS; and the Global Water Futures (GWF; program.


Coded and maintained by: Filip Strnad
Conceptual design by: Simon Michael Papalexiou, and Filip Strnad
Beta tested by: Filip Strnad, Yannis Markonis, and Simon Michael Papalexiou


Papalexiou, S.M., 2018. Unified theory for stochastic modelling of hydroclimatic processes: Preserving marginal distributions, correlation structures, and intermittency. Advances in Water Resources 115, 234-252.