Skip to contents

Common baseflow separation separates quick- and baseflow with a block length of n = 5 with dfi_n(q_obs, n = 5). To generate multiple hydrograph separations for the DFI index n vary between 1 and nmax (e.g. 60, 90 or 120 days). To do this the function could be used with a n as a vector instead of a single integer (e.g. dfi_n(q_obs, n = 1:60)) Note, separation with n=0 is not possible. The DFI of n=1 is not 1 as due to the algorithm some streamflow peaks are separated from delayed flow.

Usage

dfi_n(q, n = 5, desc = TRUE, add_zero = TRUE)

Arguments

q

vector with streamflow series

n

block length n. If n is a integer (vector of length one) a single delayed flow separation is performed. If n is a vector (with length > 1) multiple separations for all n values are calculated. To analyze later on the DFI curve it is recommended that n starts at 1 and is a continuous vector (e.g. 1,2,3,.... 58, 59, 60). But also variations like n = c(1,5,10,15,30) are possible.

desc

logical, if TRUE DFI values are converted to be monotonically descreasing with cummin()

add_zero

logical, default is TRUE. If TRUE, n=0 and dfi=1 is added to output data.frame. Note that the in a hydrograph separation with n=0 is by definition DFI = 1.

Value

A data.frame with two columns: n for block length and dfi with the DFI(n) values. If n is a single integer the function returns a single integer (i.e. one DFI(n) value).

Examples

# same as BFI calculation
bfi <- dfi_n(q_data$q_obs, n = 5)
bfi
#> [1] 0.5194072

# 60 different separations based on various block length n
dfi_n(q_data$q_obs, n = 1:60)
#>     n       dfi
#> 1   0 1.0000000
#> 2   1 0.7898710
#> 3   2 0.6637347
#> 4   3 0.6014212
#> 5   4 0.5483716
#> 6   5 0.5194072
#> 7   6 0.4909109
#> 8   7 0.4733986
#> 9   8 0.4565189
#> 10  9 0.4447806
#> 11 10 0.4327920
#> 12 11 0.4236019
#> 13 12 0.4030594
#> 14 13 0.4030594
#> 15 14 0.3811144
#> 16 15 0.3756203
#> 17 16 0.3756203
#> 18 17 0.3639153
#> 19 18 0.3608225
#> 20 19 0.3503745
#> 21 20 0.3197631
#> 22 21 0.3035256
#> 23 22 0.2962165
#> 24 23 0.2962165
#> 25 24 0.2938946
#> 26 25 0.2938946
#> 27 26 0.2819608
#> 28 27 0.2799310
#> 29 28 0.2755482
#> 30 29 0.2754435
#> 31 30 0.2754435
#> 32 31 0.2739791
#> 33 32 0.2663682
#> 34 33 0.2586268
#> 35 34 0.2586268
#> 36 35 0.2500075
#> 37 36 0.2500075
#> 38 37 0.2500075
#> 39 38 0.2500075
#> 40 39 0.2286289
#> 41 40 0.2286289
#> 42 41 0.2286289
#> 43 42 0.2286289
#> 44 43 0.2286289
#> 45 44 0.2173933
#> 46 45 0.2173933
#> 47 46 0.2173933
#> 48 47 0.2173933
#> 49 48 0.2173933
#> 50 49 0.2066724
#> 51 50 0.1963658
#> 52 51 0.1689088
#> 53 52 0.1689088
#> 54 53 0.1689088
#> 55 54 0.1483255
#> 56 55 0.1349033
#> 57 56 0.1349033
#> 58 57 0.1293377
#> 59 58 0.1293377
#> 60 59 0.1211372
#> 61 60 0.1211372

# only specific block lengths are used
dfi_n(q_data$q_obs, n = c(1:5,10,30,60,90), add_zero = FALSE)
#>    n        dfi
#> 1  1 0.78987096
#> 2  2 0.66373472
#> 3  3 0.60142124
#> 4  4 0.54837156
#> 5  5 0.51940718
#> 6 10 0.43279199
#> 7 30 0.27635045
#> 8 60 0.15989630
#> 9 90 0.09605968