Baseflow
baseflow.Rd
Given a complete (without missing values) series of streamflow, this function computes the baseflow using the filter proposed by Arnold and Allen (1999).
Arguments
- x
zoo or numeric object with streamflow records. The suggested time frequency should be hourly or daily, but the algorithm will work with any time frequency.
- beta
numeric representing the filter parameter. Default value is 0.925 as recommended by Arnold and Allen (1999)
- from
Character indicating the starting date for subsetting
x
. It has to be in the format indicated bydate.fmt
.
The default value corresponds to the date of the first element ofx
.- to
Character indicating the ending date for subsetting
x
. It has to be in the format indicated bydate.fmt
.
The default value corresponds to the date of the last element ofx
.- date.fmt
character indicating the format in which the dates are stored in
from
andto
, e.g. %Y-%m-%d. See ‘Details’ section instrptime
. By default,date.fmt
is missing, and it is automatically set to %Y-%m-%d whentime(x)
isDate
object, and set to %Y-%m-%d %H:%M:%S whenx
is a sub-daily zoo object.- tz
character, with the specification of the time zone used for
from
,to
. System-specific (see time zones), but""
is the current time zone, and"GMT"
is UTC (Universal Time, Coordinated). SeeSys.timezone
andas.POSIXct
.If
tz
is missing (the default), it is automatically set to the time zone used intime(x)
.This argument can be used when working with sub-daily zoo objects to force using time zones other than the local time zone for
from
andto
. It should be used with caution, being well aware of the time zone of the data. See examples.- na.fill
Character indicating how to fill any NA present in
x
. Valid values are:
-) remove => NAs are not plotted
-) linear => NAs are removed by linear interpolation, usingna.approx
-) spline => NAs are removed by spline interpolation, usingna.spline
- out.type
Character indicating the type of result that is given by this function. Valid values are:
-) last => only the baseflow computed after the third pass of the filter is returned.
-) all => the 3 baseflows computed after each pass of the filter are returned in a matrix or zoo object.- plot
logical. Indicates if the baseflow should be plotted or not. If plotted, the original
x
values are plotted as well.- xcol
character, representing the color to be used for ploting the streamflow time series. Only used when
plot=TRUE
.- bfcol
character of lenght 3, representing the color(s) to be used for ploting the baseflow time series. The first, second and third element are used to represent the baseflow after the third, second and first pass of the filter, respectively. Only used when
plot=TRUE
.- pch
numeric, representing the symbols used for ploting the streamflow time series (both, the original series and the baseflow). Only used when
plot=TRUE
.- cex
a numerical vector giving the amount by which plotting characters and symbols should be scaled relative to the default. This works as a multiple of
par("cex")
. Seeplot.default
. Only used whenplot=TRUE
.- ...
further arguments passed to or from other methods. Not used yet.
Details
Although most procedures to separate baseflow from total streamflow are based on physical reasoning, some elements of all separation techniques are subjective.
The digital filter technique (Nathan and McMahon, 1990) implemented in this function was originally proposed by Lyne and Hollick (1979) for signal analysis and processing. Although this technique has no true physical meaning, it is objective and reproducible.
The equation of the filter is:
q(t) = Beta*q(t-1) + [ (1+Beta)/2 ]*[ Q(t) - Q(t-1) ]
where q(t) is the filtered surface runoff (quick response) at the time step t (one day), Q is the original streamflow, and Beta is the filter parameter (Beta=0.925). The value Beta=0.925 was obtained by Nathan and McMahon (1990) and Arnold et al. (1995) to give realistic results when compared to manual separation techniques.
Baseflow b(t) is then computed as:
b(t) = Q(t) - q(t)
The filter can be passed over the streamflow data three times (forward, backward, and forward), depending on the user' selected estimates of baseflow from pilot studies. In general, each pass will result in less baseflow as a percentage of total streamflow.
Value
- If
out.type="last"
(default value), only the baseflow computed after the third pass of the filter is returned.
- If
out.type="all"
the 3 baseflows computed after each pass of the filter are returned in a matrix or zoo object.
References
Arnold, J. G., Allen, P. M., Muttiah, R., Bernhardt, G. (1995). Automated base flow separation and recession analysis techniques. Groundwater, 33(6), 1010--1018. doi:10.1111/j.1745-6584.1995.tb00046.x.
Arnold, J. G., Allen, P. M. (1999). Automated methods for estimating baseflow and ground water recharge from streamflow records. JAWRA Journal of the American Water Resources Association, 35(2), 411--424. doi:10.1111/j.1752-1688.1999.tb03599.x.
Lyne, V., Hollick, M. (1979). Stochastic time-variable rainfall-runoff modelling. Proceedings of the Hydrology and Water Resources Symposium, Perth, 10--12 September. Institution of Engineers National Conference Publication, No. 79/10, 89--92.
Nathan, R. J., & McMahon, T. A. (1990). Evaluation of automated techniques for base flow and recession analyses. Water resources research, 26(7), 1465--1473. doi:10.1029/WR026i007p01465.
Author
Mauricio Zambrano-Bigiarini, mzb.devel@gmail
Examples
######################
## Ex1: Computing and plotting the baseflows for the full time period
## of a given time series of streamflows.
## First, we load the daily Q time series for the Cauquenes en
## El Arrayan catchment, where Q, [m3/s] are stored in the sixth column.
data(Cauquenes7336001)
q <- Cauquenes7336001[, 6]
## Computing the daily baseflow for the full time period
#baseflow(q) # it can not run due to NA values in 'x'
# filling the NA values using spline interpolation
baseflow(q, na.fill="spline")
## Computing and plotting the daily baseflow for the full time period
baseflow(q, na.fill="spline", plot=TRUE)
######################
## Ex2: Computing and plotting the daily baseflow only for a
## specific time period, from April to December 2000.
baseflow(q, na.fill="spline", from="2000-04-01", to="2000-12-31")
######################
## Ex3: Computing and plotting the three daily baseflows (one for each pass
## of the filter) only for a specific time period, from April to December
## 2000.
baseflow(q, na.fill="spline", from="2000-04-01", to="2000-12-31",
out.type="all", plot=TRUE)