Learn R Programming

hydroGOF (version 0.2-2)

pbiasfdc: Percent Bias in the Slope of the Midsegment of the Flow Duration Curve

Description

Percent Bias in the slope of the midsegment of the flow duration curve (FDC) [%]. It is related to the vertical soil moisture redistribution.

Usage

pbiasfdc(sim, obs, ...)

## S3 method for class 'default': pbiasfdc(sim, obs, lQ.thr=0.7, hQ.thr=0.2, na.rm=TRUE, plot=TRUE, verbose=FALSE, ...)

## S3 method for class 'data.frame': pbiasfdc(sim, obs, lQ.thr=0.7, hQ.thr=0.2, na.rm=TRUE, plot=TRUE, verbose=FALSE, ...)

## S3 method for class 'matrix': pbiasfdc(sim, obs, lQ.thr=0.7, hQ.thr=0.2, na.rm=TRUE, plot=TRUE, verbose=FALSE, ...)

Arguments

sim
numeric, zoo, matrix or data.frame with simulated values
obs
numeric, zoo, matrix or data.frame with observed values
lQ.thr
numeric, used to classify low flows. All the streamflows with a probability of exceedence larger or equal to lQ.thr are classified as low flows
hQ.thr
numeric, used to classify high flows. All the streamflows with a probability of exceedence larger or equal to hQ.thr are classified as high flows
na.rm
a logical value indicating whether 'NA' values should be stripped before the computation proceeds.
plot
a logical value indicating if the flow duration curves corresponding to obs and sim have to be plotted or not.
verbose
logical; if TRUE, progress messages are printed
...
further arguments passed to the fdc function of the hydroTSM package or from other methods.

Value

  • Percent Bias in the slope of the midsegment of the flow duration curve, between sim and obs. If sim and obs are matrixes, the returned value is a vector, with the Percent Bias in the slope of the midsegment of the flow duration curve, between each column of sim and obs.

References

Yilmaz, K. K., H. V. Gupta, and T. Wagener (2008), A process-based diagnostic approach to model evaluation: Application to the NWS distributed hydrologic model, Water Resour. Res., 44, W09417, doi:10.1029/2007WR006716

See Also

fdc

Examples

Run this code
require(hydroTSM)
sim <- 1:10
obs <- 1:10
pbiasfdc(sim, obs)

sim <- 2:11
obs <- 1:10
pbiasfdc(sim, obs)

##################
# Loading daily streamflows of the Ega River (Spain), from 1961 to 1970
require(zoo)
data(EgaEnEstellaQts)
obs <- EgaEnEstellaQts

# Generating a simulated daily time series, initially equal to the observed series
sim <- obs 

# Computing the relative index of agreement for the "best" (unattainable) case
pbiasfdc(sim=sim, obs=obs)

# Randomly changing the first 2000 elements of 'sim', by using a normal distribution 
# with mean 10 and standard deviation equal to 1 (default of 'rnorm').
sim[1:2000] <- obs[1:2000] + rnorm(2000, mean=10)

# Computing the new relative index of agreement
pbiasfdc(sim=sim, obs=obs, col=c("black", "blue"))

Run the code above in your browser using DataLab