
swxg: A Python Library for Generalized Multivariate, Multisite, Copula-Based Stochastic Weather Generation
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.
© 2026 Alexander B. Thames, Antonia Hadjimichael, Julianne D. Quinn, published by Ubiquity Press
This work is licensed under the Creative Commons Attribution 4.0 License.