calculate_volume

postprocessinglib.evaluation.visuals.calculate_volume(flow_df: Series, use_jday=False) float

Calculate the volume under the flow curve using the trapezoidal rule.

Parameters:

flow_series (pd.Series) –

DataFrame where each column is a timeseries of streamflow values in m³/s. Index must be datetime-like or day-of-year (1–366) if use_jday is True.

use_jday : bool, optional If True, treats the index as day-of-year (1–366). Assumes evenly spaced 24-hour intervals.

Returns:

Total volume in cubic meters (m³).

Return type:

float