% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ehf.R
\name{ck_ehf}
\alias{ck_ehf}
\title{Excess Heat Factor (EHF, Nairn & Fawcett 2013)}
\usage{
ck_ehf(
  tmax,
  tmin,
  dates,
  ref_start = 1961L,
  ref_end = 1990L,
  stat = c("max", "n_positive", "sum_positive")
)
}
\arguments{
\item{tmax}{Numeric vector of daily maximum temperatures (degrees C).}

\item{tmin}{Numeric vector of daily minimum temperatures (degrees C).}

\item{dates}{Date vector of the same length as \code{tmax}. Must contain
data covering the reference period.}

\item{ref_start, ref_end}{Integer. Reference period boundary years
(inclusive). Defaults to 1961 and 1990.}

\item{stat}{One of \code{"max"}, \code{"n_positive"}, or \code{"sum_positive"}.}
}
\value{
A data frame with columns \code{period}, \code{value}, \code{index}, and \code{unit}.
}
\description{
Annual summary of the daily Excess Heat Factor heatwave intensity
metric. EHF combines a 3-day mean daily temperature anomaly above
the 95th percentile of the reference period with an acclimatisation
term (3-day mean minus previous 30-day mean). Positive EHF days
indicate heatwave conditions; larger values indicate more severe
or less-acclimatised events. This is the operational heatwave
metric used by the Australian Bureau of Meteorology.
}
\details{
Three annual summaries are exposed via the \code{stat} argument:
\itemize{
\item \code{"max"} (default): peak EHF in the year. Strongest
single-day intensity.
\item \code{"n_positive"}: count of days with \code{EHF > 0}. A
frequency-of-heatwave-conditions measure.
\item \code{"sum_positive"}: sum of EHF on days with \code{EHF > 0}.
A severity-weighted total.
}
}
\examples{
set.seed(1)
dates <- seq(as.Date("1961-01-01"), as.Date("1991-12-31"), by = "day")
s <- 2 * pi * as.integer(format(dates, "\%j")) / 365
tmax <- 20 + 10 * sin(s) + rnorm(length(dates))
tmin <- 10 +  8 * sin(s) + rnorm(length(dates))
tail(ck_ehf(tmax, tmin, dates))
}
\references{
Nairn, J. R., & Fawcett, R. J. B. (2013). Defining heatwaves:
heatwave defined as a heat-impact event servicing all community and
business sectors in Australia. \emph{CAWCR Technical Report No. 060}.

Perkins, S. E., & Alexander, L. V. (2013). On the measurement of
heatwaves. \emph{Journal of Climate}, 26(13), 4500-4517.
\doi{10.1175/JCLI-D-12-00383.1}.
}
