pyErosivity

Rainfall erosivity calculation in Python

View on GitHub



About

pyErosivity is a Python package for calculating rainfall erosivity (Re) from high-resolution precipitation time series at 5-minute and 60-minute temporal resolutions. Erosivity quantifies the potential of rainfall to detach and transport soil — a key input for soil erosion risk assessments using the RUSLE/USLE framework.

Note: The erosivity methodology and underlying theory were developed and published by Rogler & Schwertmann (1981) and Fischer et al. (2018). This repository provides a Python implementation of those methods. I developed this codebase as part of my PhD research at the University of Padova.

How It Works

Erosivity events are identified using the maximum 30-minute rainfall intensity (Imax30) threshold:

Resolution Imax30 threshold Temporal scaling factor
5 min12.7 mm/h
60 min5.79 mm/ht = 1.9

The package computes per-event kinetic energy (Ekin) and erosivity indices in both EU units (N/h) and US units (MJ·mm/ha·hr), following the DIN 19708 methodology, with an alternative Brown & Foster (1987) formulation also available.


Key Functions

FunctionDescription
remove_incomplete_years()Removes years with >10% missing data
get_events()Identifies independent precipitation events (min. 24 h separation)
get_events_Renard_RUSLE()Event detection following the Renard/RUSLE methodology
remove_short()Filters events shorter than minimum duration
get_only_erosivity_events()Selects events exceeding erosivity thresholds
get_events_values()Computes Imax30, depth, Ekin, and Re for each event
E_kin_i()Per-interval kinetic energy (DIN 19708)
E_kin_i_BrFr()Per-interval kinetic energy (Brown & Foster 1987)
boostrapping_erosivity_60min()Bootstrap resampling of annual erosivity metrics from observational 60-min data
boostrapping_erosivity_CPM_60min()Bootstrap resampling for Convection-Permitting Model (CPM) 60-min data; supports predefined random year sequences

Validation

The package was validated against RIST software output (the reference for 5-min erosivity) over 73–74 filtered events.

Erosivity comparison across methods and resolutions
Comparison of erosivity Re [MJ·mm/ha·hr] for station VE_0091. Left: pyErosivity 5-min vs. RIST reference (R²=1.00, MBR=1.01) — near-perfect agreement. Top-right: uncorrected 60-min underestimates (MBR=0.50). Bottom-right: corrected 60-min with temporal scaling (MBR=0.95, R²=0.93).


Dataset sizes used in validation
Number of erosive events identified per method. The German 60-min threshold (5.79 mm/h) yields more events (149) than the 5-min threshold (74) due to its lower sensitivity.

Event Detection Methods

Two event detection approaches are implemented, both combining the Imax30 intensity threshold with an accumulated precipitation criterion (>12.7 mm per event) using OR logic:

  • Wischmeier (1959)get_only_erosivity_events(use_both_thresholds=True): event qualifies if hourly intensity ≥ 12.7 mm/h or total accumulation ≥ 12.7 mm. Setting use_both_thresholds=False applies only the intensity criterion.
  • Renard/RUSLE (1997)get_only_erosivity_events_Renard(): event qualifies if peak Imax30 depth ≥ 12.7 mm or total accumulation ≥ 12.7 mm.

Methodology Citations

Rogler, H. and Schwertmann, U. (1981).
Erosivität der Niederschläge und Isoerodentkarte Bayerns.
Zeitschrift für Kulturtechnik und Flurbereinigung, 22, 99–112.

Fischer, F. K., Winterrath, T., and Auerswald, K. (2018).
Temporal- and spatial-scale and positional effects on rain erosivity derived from point-scale and contiguous rain data.
Hydrology and Earth System Sciences, 22, 6505–6518.
https://doi.org/10.5194/hess-22-6505-2018