Welcome to the RWGEN repository!
RWGEN is a stochastic spatiotemporal Rainfall and Weather GENerator built around the Neyman-Scott Rectangular Pulse (NSRP) rainfall model. The package provides an open Python implementation of the NSRP model coupled with (i) an autoregressive model for other weather variables and (ii) FAO56 Penman-Monteith potential evapotranspiration calculations.
RWGEN can currently conduct data pre-processing, model fitting, simulation and selected post-processing. Both single site (point) and spatial simulations are supported. See below for more details on the package status, getting started, documentation and ways to get in touch!
Example of observed and simulated annual maximum rainfall for different durations at Heathrow, UK.
The package is new and still undergoing development. It should be considered as a pre-release for testing at present. Some features may not work properly, but the core functionality should behave reasonably in most cases. Development of the rainfall model component is ahead of the weather model component, but the outputs and behaviour of both should be checked carefully if used in an application. Parts of the interface may still change.
Package documentation is available that explains the core features of RWGEN and typical use. Please check back for updates, as work on the documentation is ongoing.
Installation is described in the documentation.
Examples are available in the GitHub repository (see the examples folder
above and the documentation for further explanation). Both Jupyter notebooks
and scripts are available.
A demo version of the rainfall model component can be tried in the browser without the need for any Python knowledge or installation. To run the model with your own data, please see the documentation.
Following the link above should load Jupyter in the default browser. If you
then navigate into the examples folder you should find sub-folders
containing the Jupyter notebooks. These notebooks contain explanations and
example usages of the rainfall model.
Note that the load times for the demo notebook can vary, as it is hosted on the free mybinder service. If it is being slow (more than a few minutes), try closing the tab and reopening (or try again later).
Note also that the demo version currently uses an older version of the rainfall model with some small differences in the interface.
Selected open data have been pre-processed to help facilitate RWGEN applications in the UK. Please see the documentation for details and download links.
Please feel free to get in touch if you would like to discuss ways to contribute to the code. All questions, feedback, ideas, problems, bug reports and other comments etc are also much appreciated. For most things (including questions and problems) it is best to start a conversation by raising an issue on GitHub if possible.
RWGEN was largely developed during an Embedded Researcher project as part of the UK Climate Resilience Programme funded by UK Research and Innovation (UKRI). The authors are also grateful to the researchers whose work over many years has formed the basis for RWGEN, as well as to the developers who have contributed to the code on which RWGEN depends.
Distributed under the GNU GPL V3 license. See LICENSE for more details.
