# `swxg`
`swxg` is a Python package for modern [stochastic weather generation](https://www.ipcc-data.org/guidelines/pages/weather_generators.html). It quickly generates arbitrarily-long sequences of monthly or daily weather variables that match spatial and temporal correlations of input observations by:
1. fitting observed precipitation individually to a (Gaussian mixture model) hidden Markov model;
2. fitting both observed precipitation and temperature with hydroclimatic copulae;
3. sampling precipitation from its fit, disaggregating to finer resolution where necessary, and;
4. conditionally sampling temperature from the sampled precipitation and its fit, disaggregating to finer resolution where necessary
## Dependencies
The required dependencies to use `swxg` are:
* `Python >= 3.10`
* `copulae >= 0.8`
* `copulas >= 0.12`
* `hmmlearn >= 0.3`
* `matplotlib >= 3.10`
* `numpy >= 2.2`
* `pandas >= 2.3`
* `scikit-learn >= 1.7`
* `scipy >= 1.15`
* `statsmodels >= 0.14`
## Installation
To install `swxg` from PyPI with `pip`:
pip install swxg
Alternatively, you can install from this repository:
git clone https://github.com/xthames/swxg.git
cd swxg
pip install .
## Important Links
* [Official Source Code](https://github.com/xthames/swxg)
* [Documentation](https://swxg.readthedocs.org)
If your work uses `swxg`, please cite:
* [JOSS PAPER IN PREP], specifically for software
* [WRR PAPER IN PREP], if relevant to applied (first) use case
Raw data
{
"_id": null,
"home_page": null,
"name": "swxg",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.10",
"maintainer_email": null,
"keywords": "swxg, stochastic, synthetic, weather, generator, semiparametric, copula, precipitation, temperature",
"author": null,
"author_email": "Alexander Thames <alexander.b.thames@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/d8/ff/3e94e86ad489ed719ca3150df1573060b0c066955ffacaf82d2311a01cdc/swxg-0.1.0.tar.gz",
"platform": null,
"description": "# `swxg`\n`swxg` is a Python package for modern [stochastic weather generation](https://www.ipcc-data.org/guidelines/pages/weather_generators.html). It quickly generates arbitrarily-long sequences of monthly or daily weather variables that match spatial and temporal correlations of input observations by: \n 1. fitting observed precipitation individually to a (Gaussian mixture model) hidden Markov model; \n 2. fitting both observed precipitation and temperature with hydroclimatic copulae;\n 3. sampling precipitation from its fit, disaggregating to finer resolution where necessary, and;\n 4. conditionally sampling temperature from the sampled precipitation and its fit, disaggregating to finer resolution where necessary\n\n## Dependencies\nThe required dependencies to use `swxg` are:\n * `Python >= 3.10`\n * `copulae >= 0.8`\n * `copulas >= 0.12`\n * `hmmlearn >= 0.3`\n * `matplotlib >= 3.10`\n * `numpy >= 2.2`\n * `pandas >= 2.3`\n * `scikit-learn >= 1.7`\n * `scipy >= 1.15`\n * `statsmodels >= 0.14`\n\n## Installation\nTo install `swxg` from PyPI with `pip`:\n\n pip install swxg\n\nAlternatively, you can install from this repository:\n\n git clone https://github.com/xthames/swxg.git\n cd swxg\n pip install .\n\n## Important Links\n * [Official Source Code](https://github.com/xthames/swxg)\n * [Documentation](https://swxg.readthedocs.org)\n\nIf your work uses `swxg`, please cite: \n * [JOSS PAPER IN PREP], specifically for software\n * [WRR PAPER IN PREP], if relevant to applied (first) use case\n\n",
"bugtrack_url": null,
"license": null,
"summary": "Fast, region-agnostic stochastic weather generation",
"version": "0.1.0",
"project_urls": {
"Documentation": "https://swxg.readthedocs.io/",
"Homepage": "https://github.com/xthames/swxg",
"Repository": "https://github.com/xthames/swxg.git"
},
"split_keywords": [
"swxg",
" stochastic",
" synthetic",
" weather",
" generator",
" semiparametric",
" copula",
" precipitation",
" temperature"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "426dd63b8143b3304ffc21ff6dc24c83f8119fd0cc34b13458d51dc0e38f5c30",
"md5": "6f5ebb31952b17f83bf0cdfd3975a7bb",
"sha256": "b4697ef76671ba613cd888f6bcd958011a23ffb53eeec1e3538e6921285e78b3"
},
"downloads": -1,
"filename": "swxg-0.1.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "6f5ebb31952b17f83bf0cdfd3975a7bb",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10",
"size": 31378,
"upload_time": "2025-08-22T15:46:46",
"upload_time_iso_8601": "2025-08-22T15:46:46.485953Z",
"url": "https://files.pythonhosted.org/packages/42/6d/d63b8143b3304ffc21ff6dc24c83f8119fd0cc34b13458d51dc0e38f5c30/swxg-0.1.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "d8ff3e94e86ad489ed719ca3150df1573060b0c066955ffacaf82d2311a01cdc",
"md5": "c73b5cd39bc934e04c5a6ab8698b8253",
"sha256": "ea1bc9e59e6dcd6bf5cdb88f444215d6ff24296431fed3c1cbd205a410b64810"
},
"downloads": -1,
"filename": "swxg-0.1.0.tar.gz",
"has_sig": false,
"md5_digest": "c73b5cd39bc934e04c5a6ab8698b8253",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10",
"size": 30576,
"upload_time": "2025-08-22T15:46:47",
"upload_time_iso_8601": "2025-08-22T15:46:47.512005Z",
"url": "https://files.pythonhosted.org/packages/d8/ff/3e94e86ad489ed719ca3150df1573060b0c066955ffacaf82d2311a01cdc/swxg-0.1.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-08-22 15:46:47",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "xthames",
"github_project": "swxg",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "swxg"
}