@BeginModule
@NewPage
@Name      = EcaHd
@Title     = Heating degree days per time period
@Section   = Climate indices
@Class     = Climate index
@Arguments = ifile ofile
@Operators = eca_hd

@BeginDescription
Let @file{ifile} be a time series of daily mean temperatures TG, then
the heating degree days are defined as the sum of T1 - TG, where only
values TG < T2 are considered. If T1 and T2 are omitted, a temperature
of 17 @celsius is used for both parameters. If only T1 is given, T2 is
set to T1. Note that TG have to be given in units of kelvin, whereas T1
and T2 have to be given in degrees Celsius.
The date information of a time step in @file{ofile} is the date of
the last contributing time step in @file{ifile}.
@EndDescription
@EndModule


@BeginOperator_eca_hd
@Title     = Heating degree days per time period
@Parameter = [T1] [T2]
@EndOperator


@BeginParameter
@Item = T1
DOUBLE   Temperature limit (° Celsius, default: T1 = 17° Celsius)
@Item = T2
DOUBLE   Temperature limit (° Celsius, default: T2 = T1)
@EndParameter


@BeginExample
To compute the heating degree days of a time series of daily
mean temperatures use:
@BeginVerbatim
   cdo eca_hd tgfile ofile
@EndVerbatim
@EndExample
