Maximum rain intensity for 30-min interval (Matlab clone Fix).
This implementation is a fixed version of the Python-translation of the original
Matlab implementation by [3].
Changes to the original script are:
In the if-statement ‘if timestamps[-1] - timestamps[0] <= 30:’ this methode
calculates the total amount of rain during the interval while the original
method only looks at the first rainfall entry.
In the same if-statement, the *2 was removed, since this is already done in
the ‘return’ step of the model. This *2 causes the model to steeply over
estimate the rainfall during short rainfall events.
Parameters:
df (pandas.DataFrame) – DataFrame with rainfall time series. Needs to contain the following columns:
- datetime (pandas.Timestamp): Time stamp
- rain_mm (float): Rain in mm. No NaN or 0-values allowed
- event_rain_cum (float): Cumulative rain in mm
Returns:
maxprecip_30min – Maximal 30-minute intensity during event (in mm/h).
Maximum rain intensity for 30-min interval (Matlab clone).
The implementation is a direct Python-translation of the original Matlab
implementation by Verstraeten et al. (2006) [3].
Parameters:
df (pandas.DataFrame) – DataFrame with rainfall time series. Needs to contain the following columns:
- datetime (pandas.Timestamp): Time stamp
- rain_mm (float): Rain in mm. No NaN or 0-values allowed
- event_rain_cum (float): Cumulative rain in mm
Returns:
maxprecip_30min – Maximal 30-minute intensity during event (in mm/h).
The rain energy per unit depth \(e_r\) (\(\text{MJ}.\text{mm}^{-1}.
\text{ha}^{-1}\)) is defined by [4] and [5]:
\[e_r = 0.29*(1-0.72*exp(-0.05*i_r)\]
with
\(i_r\) the rain intensity for every 10-min
increment (mm \(\text{h}^{-1}\) ).
The rain energy is multiplied by the volume of rain (per 10 minutes) and summed
per event to compute the total energy of the event. The formula applies for a 10
minute rainfall input data set.
The rain energy per unit depth \(e_r\) (\(\text{MJ}.\text{mm}^{-1}.
\text{ha}^{-1}\)) is defined by [6]:
\[e_r = 0.29*(1-0.72*exp(-0.08*i_r)\]
with
\(i_r\) the rain intensity for every 10-min
increment (mm \(\text{h}^{-1}\) ).
The rain energy is multiplied by the volume of rain (per 10 minutes) and summed per
event to compute the total energy of the event. The formula applies for a 10
minute rainfall input data set.
The rain energy per unit depth \(e_r\) (\(\text{MJ}.\text{mm}^{-1}.
\text{ha}^{-1}\)) for an application for Flanders/Belgium is defined
by [1] , [2] and [3]:
\[e_r = 0.1112i_r^{0.31}\]
with
\(i_r\) the rain intensity for every 10-min
increment (mm \(\text{h}^{-1}\) ).
The rain energy is multiplied by the volume of rain (per 10 minutes) and summed per
event to compute the total energy of the event. The formula applies for a 10
minute rainfall input data set.
Example load functions developed in context of Flanders.
Translated the input file_path to the default input data used this package. This
functions can be used for users an example to format functions. The file is a
tab delimited files (extension: .txt), and holds the timeseries for one
location. The name of the file is the tag that will be used.
interpolate (str, default None) – Interpolation method to use for NaN-Values. Possible values:
see pandas.DataFrame.interpolate.
interval (int, default np.inf) – The max interval length over which NaN values are interpolated. The value
needs to fit the index of the timeseries. For example, a timeseries with
resolution of 10 min will have a maximum interval length of 6 hours if the
interval value is set to 36 (36 * 10 min = 6 hours).
threshold_outliers (int, default None) – Set rainfall values above this threshold to NaN.
Returns:
rain – DataFrame with rainfall time series. Contains the following columns:
datetime (pandas.Timestamp): Time stamp.
minutes_since (float): Minutes since start of year.
Load (legacy Matlab) file format of rainfall data of a single station/year.
The input files are defined by text files (extension: .txt) that hold
non-zero rainfall timeseries. The data are split per station and per year with
a specific datafile tag (file name format: SOURCE_STATION_YEAR.txt). The data
should not contain headers, with the first column defined as ‘minutes since the
start of the year’ and the second as the rainfall depth during the t last minutes
(t is the temporal resolution of the timeseries).
Parameters:
file_path (pathlib.Path) – File path with rainfall data according to defined format, see notes.
Returns:
rain – DataFrame with rainfall time series. Contains the following columns:
minutes_since (int): Minutes since the start of the year
Write output erosivity to (legacy Matlab format) in folder.
Written data are split-up for each year and station
(file name format: SOURCE_STATION_YEAR.txt) and does not contain any headers.
The columns (no header!) in the written text files represent the following:
days_since (float): Days since the start of the year.
erosivity_cum (float): Cumulative erosivity over events.
all_event_rain_cum (float): Cumulative rain over events.