Skip to contents

Calculates the Baseflow Index (BFI), defined as the ratio of total baseflow volume to total streamflow volume over a given period. The BFI represents the proportion of streamflow that comes from baseflow (groundwater contributions).

Usage

get_BFI(Q, BF, na.rm = TRUE)

Arguments

Q

Numeric vector of streamflow/discharge values L³/T

BF

Numeric vector of baseflow values L³/T, typically obtained from a baseflow separation method (must be same length as Q)

na.rm

Logical indicating whether to ignore missing values (NA) in the calculations. Default is TRUE.

Value

A numeric value between 0 and 1 representing the baseflow index:

  • 0 indicates all streamflow is quickflow (surface runoff)

  • 1 indicates all streamflow is baseflow

Details

The Baseflow Index is calculated as: $$BFI = \frac{\sum BF}{\sum Q}$$

Important notes:

  • The function assumes both vectors cover the same time period

  • No automatic alignment of time series is performed

  • Negative values in either vector will produce invalid results

  • Results are only meaningful when using consistent units for Q and BF

See also

BFS for baseflow separation methods that can generate the BF input.

Examples

# Example using synthetic data
Q <- c(10, 12, 15, 20, 18, 16, 14, 12, 10, 9)  # Streamflow
BF <- c(8, 8, 9, 9, 9, 8, 8, 8, 7, 7)          # Baseflow

# Calculate BFI
bfi <- get_BFI(Q, BF)
print(paste("Baseflow Index:", round(bfi, 3)))
#> [1] "Baseflow Index: 0.596"

# With missing values
Q[3] <- NA
get_BFI(Q, BF)               # Returns NA
#> [1] 0.6694215
get_BFI(Q, BF, na.rm=TRUE)   # Ignores NA
#> [1] 0.6694215