This release is a pre-release and may not be stable for production use.
Weather generator software
wxgen is a command-line tool for generating arbitrarily long weather time-series. The generator produces gridded output for multiple variables (e.g. temperature, precipitation) and aims to have realistic covariances in space, time, and across variables.
The generator uses a database of past weather model simulations (e.g 15 day forecasts) and combines the segments stochastically. Longer trajectories are created by concatenating the shorter trajectories from the database. This is done by matching the end state of one trajectory with the beginning state of another. The matching is done using a specified metric, such as the sum of the square differences between states (with some kind of normalization strategy as each atmospheric variable has different variances).
Installation
Ubuntu
Install the required pacakges:
sudo apt-get update
sudo apt-get install netcdf-bin libnetcdf-dev libhdf5-serial-dev
sudo apt-get install python-setuptools python-pip
sudo apt-get install python-numpy python-scipy python-matplotlib python-mpltoolkits.basemap
Then install wxgen by executing the following inside the extracted folder:
sudo pip install .
This will create the executable /usr/local/bin/wxgen. If /user/local/bin is not in your PATH environment variable, then add it (i.e add export PATH=/usr/local/bin/:$PATH to ~/.bashrc). If you do not have sudo privileges do:
pip install .
This will create the executable ~/.local/bin/wxgen. Add the folder to your PATH environment variable (if necessary).
If you are working on the code, the -e flag ensures that you do not need to rerun pip install every time you make changes to the code:
sudo pip install -e .
Example use
Wxgen has three commands. The first simulates sequences of weather as follows:
wxgen sim -db examples/database.nc -n 10 -t 1000 -o output.nc
This command uses a NetCDF database file and creates 10 trajectories that are 100 days long. Results are stored in output.nc. In order to evaluate the performance of the generated data, a “truth” file can be created using the following command:
wxgen truth -db examples/database.nc -o truth.nc
This command uses the day 1 forecasts from the database as the truth, and joins these together into a sequence that spans the dates in the dataset.
Finally, the generated sequences can be evaluated using th verif command:
wxgen verif -truth truth.nc output.nc -m timeseries
wxgen verif -truth truth.nc output.nc -m variance
The -m switch selects the verification metric, in this case a timeseries.
Copyright and license
Copyright (C) 2017 MET Norway. Wxgen is licensed under LGPL version 3 or (at your option) any later version.
Metadata
Release files for wxgen 0.2.0a1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| wxgen-0.2.0a1.tar.gz | 27.0 kB | Without provenance | Details for wxgen-0.2.0a1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| wxgen-0.2.0a1-py2-none-any.whl | Python 2 | none | any | Details for wxgen-0.2.0a1-py2-none-any.whl |
Total release size: 59.1 kB
Release files / wxgen-0.2.0a1.tar.gz
| Download URL | wxgen-0.2.0a1.tar.gz |
|---|---|
| Size | 27.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
87a35fb44f3dc2447e8d17da483da280b88e3e3fb3559ef479aa43e96aff1b65
|
|
BLAKE2b-256 checksum How to use checksums |
f688125fa229dae8a15f07217c4032d3d4ce7d4932b75516fab8edc0b0bba4ee
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / wxgen-0.2.0a1-py2-none-any.whl
| Download URL | wxgen-0.2.0a1-py2-none-any.whl |
|---|---|
| Size | 32.1 kB |
| Tags | Python 2 |
|
SHA-256 checksum How to use checksums |
be60e14bc32eeed1e3eb7da4fc4c924f2a28cf9c61b3dbac214411e3f70d555b
|
|
BLAKE2b-256 checksum How to use checksums |
1a0a3c07153f0b1955ac4b03185a99f3fcc6c6be26e82f52b3af0445f571b260
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for wxgen 0.2.0a1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.