getIDI function

Inter-Draught Interval (IDI)

Inter-Draught Interval (IDI)

Compute Inter-Draught Interval (IDI) from the given residual values.

getIDI(resid, years, highflow.start, highflow.end, unique.years, for.year = NULL)

Arguments

  • resid: A vector of residual values generated with respect to the baseline signal

  • years: A vector of years corrosponding to the residual values

  • highflow.start: A vector giving start index of high-flow window in each year

  • highflow.end: A vector giving end index of high-flow window in each year

  • unique.years: A vector or year values corresponding to the highflow.start

    and highflow.end values.

  • for.year: (optional) Calculate IDI values only for the given year in this argument. If argument is omitted, IDI values for all years are calculated.

Returns

Data frame containing two columns:

yearFirst column, represents year
IDISecond column, represents IDI values

Examples

# load sample data data("sycamore") x = sycamore # get streamflow object for the sample data x.streamflow = asStreamflow(x) # prepare baseline signal x.bl = prepareBaseline(x.streamflow) # signal parts x.sp = getSignalParts(x.bl$pred2, candmin = c(40:125), candmax = c(190:330), years = x.streamflow$data$year, months = x.streamflow$data$month, jdays = x.streamflow$data$jday) # IDI idi = getIDI(x.bl$resid.sig, x.streamflow$data$year, x.sp$HF.window.start, x.sp$HF.window.end, x.sp$year)
  • Maintainer: Samarth Shah
  • License: GPL-3
  • Last published: 2019-03-08

Useful links