swxg: A Python Library for Generalized Multivariate, Multisite, Copula-Based Stochastic Weather Generation
Open Access
- 19 June 2026
- journal article
- Published by Ubiquity Press, Ltd. in Journal of Open Research Software
- Vol. 14 (1)
Abstract
Swxg is a Python library for generalized multivariate, multisite, copula-based stochastic weather generation. It addresses the challenge of generating realistic, spatially and temporally correlated precipitation and temperature data for water resources planning and climate vulnerability assessments. The library uses semiparametric fitting for precipitation via Gaussian mixture hidden Markov models, followed by conditional copula-based temperature generation. swxg includes comprehensive validation tools to assess goodness of fit and ensure generated weather is statistically indistinguishable from observations. The software is openly available on GitHub under an MIT license and is designed for flexible integration into exploratory modeling frameworks, making it suitable for diverse hydroclimatic applications requiring synthetic weather data across multiple sites.Keywords
This publication has 41 references indexed in Scilit:
- A new scheme for multivariate, multisite weather generator with inter-variable, inter-site dependence and inter-annual variability based on empirical copula approachClimate Dynamics, 2018
- Modelling of interdependence between rainfall and temperature using copulaModeling Earth Systems and Environment, 2018
- Understanding the joint behavior of temperature and precipitation for climate change impact studiesTheoretical and Applied Climatology, 2016
- Creating long-term weather data from thin air for crop simulation modelingAgricultural and Forest Meteorology, 2015
- A hiddenMarkov model combined with climate indices for multidecadal streamflow simulationWater Resources Research, 2014
- Towards the probabilistic Earth‐system simulator: a vision for the future of climate and weather predictionQuarterly Journal of the Royal Meteorological Society, 2012
- Goodness-of-Fit Testing2010
- Implementing quality control on a random number stream to improve a stochastic weather generatorHydrological Processes, 2007
- Testing the null hypothesis of stationarity against the alternative of a unit rootJournal of Econometrics, 1992
- A Markov chain model for daily rainfall occurrence at Tel AvivQuarterly Journal of the Royal Meteorological Society, 1962