spell: Spell statistics

View source: R/spell.R

spellR Documentation

Spell statistics

Description

Statistics of spell durations (consecutive wet and dry days), e.g. dry and wet periods or duration of extremes. Similar functions include: count returns a count of cases with values over s threshold value. exceedance estimates statistics for peak-over-threshold, and nevents returns the number of events with exceeding values (e.g. the number of rainy days X > 1 mm/day). wetfreq returns the wet-day frequency (a fraction) and wetmean returns the wet-day mean. CDD: Cooling degree day GDD: Growing degree days (http://en.wikipedia.org/wiki/Growing_degree-day) HDD: Heating degree day qqgeom produces a quantile-quantile plot of streak statistics comparing the empirical quantiles with the distribution function quantiles (see qgeom).

Usage

spell(x, threshold, ...)

Arguments

x

station or field object

threshold

threshold value

upper

upper limit for maximum length - ignore any above this because they are likely erronoeus

higher

argument of count, if TRUE: count values above threshold, FALSE: count values below threshold

fraction

TRUE: divide the number of counts by number of samples

FUN

function

Value

Station or field objects

See Also

hotsummerdays coldwinterdays coldspells heatwavespells nwetdays plot

Examples


# Example 1 : 
data(bjornholt)
x <- spell(bjornholt, threshold=.1)
plot(x, new=FALSE)

# Example 2 :
x.ann <- annual(x, FUN="max")
plot(x.ann, plot.type="multiple", new=FALSE)

# Quantile-quantile plot for the duration of dry and wet spells
# comparing their distribution against the geometric distribution
qqgeom(bjornholt, treshold=1, pois=TRUE)

#' # Growing degree days:
data(ferder)
plot(annual(ferder,FUN='GDD'), new=FALSE)


metno/esd documentation built on Sept. 9, 2024, 5:07 a.m.