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.1.tar.gz (22.4 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.1-py3-none-any.whl (23.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pyblrp-1.0.1.tar.gz
  • Upload date:
  • Size: 22.4 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.1.tar.gz
Algorithm Hash digest
SHA256 6194a0c7c4c576c11c33019f473935feca977d4bf47a04321b1f8e6c18087ac9
MD5 d0bf0cc39eecb237469262b832aa797e
BLAKE2b-256 b0ac18fcee6803a13cd283d9bf60e8aff77abcfeed3d0bd275b5e7c9a39f6da0

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyblrp-1.0.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 6c94cd7432f5caad4f3d46c61109998a43c6b8b4b9fb18f350eb40ce0982a6e9
MD5 11db773659ca5a1c7e9af14530f696bd
BLAKE2b-256 f129d0bd77c7a8480e4b55a9ca8a06e66d57ae93b98ea4c1e9dec4a94cb64bcd

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