Heatwave: Calculates The Frequency And Duration Of Heatwaves

Description Usage Arguments Value Author(s) Examples

Description

Returns the number of distint heatwave events and the total duration of all the heatwave events combined. Here, a heatwave occurs when the temperature exceeds the threshold for more than a specified minimum number of days

Usage

1
Heatwave(proj, ref, threshold = NULL, quantile = 0.99, min_length = 3)

Arguments

proj

Vector of projected or forecasted temperatures

ref

Vector of temperatures from the references period

threshold

The minimum temperature needed for a heatwave

quantile

The quantile used to define the threshold from the reference data, if threshold = NULL.

\tem

min_length The minimum number of consecutive days that the temperature must exceed the threshold for a heatwave classification.

Value

$ref.freq: the number of heatwave events in the reference data
$ref.duration: the total duration of all heatwave events combined in the reference data
$proj.freq: the number of heatwave events in the reference data
$proj.duration: the total duration of all heatwave events combined in the reference data
$threshold the temperature threshold used to define a heatwave

Author(s)

History:
0.1 - 2017-02 (A. Hunter, alasdair.hunter@bsc.es) - Original code

Examples

1
2
3
ref <- c(1,1,1,1,1,3,3,3,3,3,8,8,8,8,3,3,3,3,3,3,3)
proj <- c(3,3,3,10,10,10,10,3,3,3,10,10,10,10,10)
hw <- Heatwave(proj, ref, quantile = 0.8)

alasdairhunter/MagicWP7 documentation built on May 10, 2019, 8:50 a.m.