Skip to main content

Fast, region-agnostic stochastic weather generation

Project description

swxg

swxg is a Python package for modern stochastic weather generation. 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 with 1 or more hidden states;
  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

If your work uses swxg, please cite:

  • [JOSS PAPER IN PREP], specifically for the software
  • [WRR PAPER IN PREP], if relevant to applied (first) use case

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

swxg-0.2.0.tar.gz (170.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

swxg-0.2.0-py3-none-any.whl (170.4 kB view details)

Uploaded Python 3

File details

Details for the file swxg-0.2.0.tar.gz.

File metadata

  • Download URL: swxg-0.2.0.tar.gz
  • Upload date:
  • Size: 170.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.11

File hashes

Hashes for swxg-0.2.0.tar.gz
Algorithm Hash digest
SHA256 e75b643049677b559e00f93e2544216c3e370971f25ce728f2e4783b9ea39d45
MD5 00139590636acaa92d2009cc723242e6
BLAKE2b-256 d5d31e9bdf60dc4e96045f9ccab042e79b6cf269c7409c84afdd1504e34a173a

See more details on using hashes here.

File details

Details for the file swxg-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: swxg-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 170.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.11

File hashes

Hashes for swxg-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8615b0eed71a240a63f8ba3dc937d0e52440b582f149296a536bf1454d75311c
MD5 6b783fafaefcce356bb78031dd60f1e6
BLAKE2b-256 e7dffd953e7ff4f241063f423fc6e304e29f5d0a013020b0de266ce2dd956043

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page