Calculate Antecedent Discharge Conditions

Calculates some antecedent discharge conditions useful in water quality modeling. Includes methods for calculating flow anomalies, base flow, and smooth discounted flows from daily flow measurements. Antecedent discharge algorithms are described and reviewed in Zhang and Ball (2017) .


adc

adc statusbadge

license R-CMD-check Codecov testcoverage

adc provides functions to calculate discharge-based metrics that are useful in water quality concentration and flux regression equations.

Installation

Install adc from CRAN:

install.packages('adc')

The development version is available on https://txwri.r-universe.dev/adc and can be installed with:

install.packages('adc', repos = c(txwri = 'https://txwri.r-universe.dev'))

Example

Flow anomalies represent how different the current discharge period is (current day, current week, current month, etc.) from previous periods (previous week, previous month, period of record, etc.).

library(adc)
## example code is lavaca and includes dates and mean daily flow

data(lavaca)

x <- fa(lavaca$Flow,
        dates = lavaca$Date,
        T_1 = "1 month",
        T_2 = "1 year",
        clean_up = TRUE,
        transform = "log10")

plot(lavaca$Date, x, type = "l", xlab = "Date", ylab = "Anomaly [unitless]")

The packages also includes functions to calculate an exponentially weighted discounted flow, base-flow, and rate of change for mean daily streamflow. Functions generally work well using the dplyr::mutate() function to facilitate tidy workflows.

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("adc")

1.0.0 by Michael Schramm, 4 years ago


https://github.com/TxWRI/adc, https://txwri.github.io/adc/


Report a bug at https://github.com/TxWRI/adc/issues


Browse source code at https://github.com/cran/adc


Authors: Michael Schramm [aut, cre, cph] , Nick Bond [ctb] (Author of the hydrostats::baseflow function)


Documentation:   PDF Manual  


GPL (>= 3) license


Imports runner, stats

Suggests covr, testthat


See at CRAN