Skip to main content

Python implementation of the Bartlett-Lewis based model for rainfall simulation

Project description

pyBL: An open-source Python package for stochastic modeling of rainfall using the Bartlett-Lewis Rectangular Pulse model.

Key FeaturesModel DescriptionWorkflow of pyBLInstallation GuideUsageReferences

Key Features

  • 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.

Model Description

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.

fig01-RBL

Workflow of pyBL

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.

fig02-package-workflow

Installation Guide

To install the pyBL package, follow these steps:

  1. Clone the project:

    git clone https://github.com/NTU-CompHydroMet-Lab/pyBL.git
    cd pyBL
    
  2. Install dependencies:

    pip install -r requirements.txt
    

Usage

Here's a simple example of how to use the pyBL package:

  1. Start quickly: Begin with quick_start.py, which demonstrates the end-to-end process using historical rainfall data from Bochum, Germany.

References

  • 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.

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

pyblrp-1.0.0.tar.gz (22.3 kB view details)

Uploaded Source

Built Distribution

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

pyblrp-1.0.0-py3-none-any.whl (23.0 kB view details)

Uploaded Python 3

File details

Details for the file pyblrp-1.0.0.tar.gz.

File metadata

  • Download URL: pyblrp-1.0.0.tar.gz
  • Upload date:
  • Size: 22.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.12

File hashes

Hashes for pyblrp-1.0.0.tar.gz
Algorithm Hash digest
SHA256 9c96a2616b838eebc7e6c243d47a06b4946eb060c738d515801b6e9241778578
MD5 1078f59fed48ac0d74e3383ea6d0661a
BLAKE2b-256 fdb7f3ab85f6b841df280b472a49a9e0dda7de601dc14f32c2b20db58d71fdb5

See more details on using hashes here.

File details

Details for the file pyblrp-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: pyblrp-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 23.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.12

File hashes

Hashes for pyblrp-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a1fae282557ba51646ad91752f339adf3c7590f22130cb65945cf9ba1f90ca6c
MD5 9d6eef13621e94b790cd50e0922bb0c4
BLAKE2b-256 8b818a28ed8e8ab34739d7fc3c8de36721997685f57a50d77926022832fd0ca7

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