hotspell.indices module
- class hotspell.indices.HeatWaveIndex(name, var, pct, fixed_thres, min_duration, window_length)
Bases:
objectA class used to represent a heat wave index.
- name
The name of the index. For predefined indices it follows the naming conventions of Perkins & Alexander (2013)
- Type:
str
- var
The meteorological variable.
- Type:
str, one of “tmin” or “tmax”
- pct
The percentile used as a threshold.
- Type:
int
- fixed_thres
The absolute threshold of the meteorological value. If both pct and fixed_thres are set, pct has precedence over fixed_thres.
- Type:
int or float
- min_duration
The minimum number of consecutive days should last so that a warm event is considered a heat wave.
- Type:
int
- window_length
The total number of days that a moving window has when computing the percentile value for each day.
- Type:
int
- hotspell.indices.index(name=None, var=None, pct=None, fixed_thres=None, min_duration=None, window_length=None)
Create a predefined or custom HeatWaveIndex object.
- Parameters:
name (str) – The name of the index. For predefined indices it follows the naming conventions of Perkins & Alexander (2013)
var (str) – The meteorological variable.
pct (int) – The percentile used as a threshold.
fixed_thres (int or float) – The absolute threshold of the meteorological value. If both pct and fixed_thres are set, pct has precedence over fixed_thres.
min_duration (int) – The minimum number of consecutive days should last so that a warm event is considered a heat wave.
window_length (int) – The total number of days that a moving window has when computing the percentile value for each day.
- Return type:
HeatWaveIndex object