pyBL: An open-source Python package for stochastic modeling of rainfall using the Bartlett-Lewis Rectangular Pulse model.
- Key Features
- Model Description
- Installation
- Getting Started
- Documentation: https://ntu-comphydromet-lab.github.io/pyBL/
- Realistic rainfall Modelling: Simulations of rainfall time series with realistic feaytures using the Bartlett-Lewis Rectangular Pulse model.
- Efficient Sampling: Our innovative data structure enables the generation of a 100-year long time series within less than a second.
- High Resolution: Our model can simulate rainfall time series that preserves both standard and extreme statistcis at fine time scales, down to 1-minute intervals.
- Wide Range Applications: Suitable for hydrological modeling, design storm analysis, flood simulation, and climate risk studies.
- Open Source: Encourages contributions and customisation from the community.
The Bartlett-Lewis Rectangular Pulses model, enhanced in this package, draws on the cutting-edge research presented in Onof and Wang (2020). It operates as a robust stochastic framework designed to simulate rainfall intensity effectively. By modelling the behavior of rainfall through a Poisson cluster point process, the package accounts for individual characteristics of rain cells and storm patterns, including cell duration, intensity, and overall storm duration. Enhanced by the latest scientific advances, this model offers improved accuracy in predicting and simulating the stochastic nature of rainfall events.
To install the pyBL package, simply install with pip
.
pip install pyblrp
The pyBL package employs a systematic workflow to generate synthetic rainfall time series from historical data. The process involves:
- Statistical analysis of historical data.
- Fitting the Bartlett-Lewis model parameters.
- Sampling storms and generating synthetic rainfall time series.
- Rescaling and validating the synthesized time series.
You can refer to the tutorial in examples/quick_start
.
Here's a simple example of how to use the pyBL package:
- Start quickly: Begin with
examples/quick_start
, which demonstrates the end-to-end process using historical rainfall data from Bochum, Germany.
- Onof, C. and Wang, L.-P. (2020). Modelling rainfall with a Bartlett-Lewis process: new developments. Hydrology and Earth System Sciences. 24. 2791-2815. doi:10.5194/hess-24-2791-2020.