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.
Load any txt file which is formatted in the correct format.
The input files are defined by tab delimited files (extension: .txt) that
hold rainfall timeseries. The data are split per monitoring station and the file
name should be the station identifier. The file should contain two columns:
Strings --- in column Value [millimeter] -identifiers are converted to
NaN-values (np.nan). Note that the values in string should be convertable to
float (except ---).
Current function is not maintained in unit test until further notice.
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.