heat_index#
- metpy.calc.heat_index(temperature, relative_humidity, mask_undefined=True)[source]#
Calculate the Heat Index from the current temperature and relative humidity.
The implementation uses the formula outlined in [Rothfusz1990], which is a multi-variable least-squares regression of the values obtained in [Steadman1979]. Additional conditional corrections are applied to match what the National Weather Service operationally uses. See Figure 3 of [Anderson2013] for a depiction of this algorithm and further discussion.
- Parameters:
temperature (
pint.Quantity
) – Air temperaturerelative_humidity (
pint.Quantity
) – The relative humidity expressed as a unitless ratio in the range [0, 1]. Can also pass a percentage if proper units are attached.mask_undefined (bool, optional) – A flag indicating whether a masked array should be returned with values masked where the temperature < 80F. Defaults to True.
- Returns:
pint.Quantity
– Corresponding Heat Index value(s)
Examples
>>> from metpy.calc import heat_index >>> from metpy.units import units >>> heat_index(30 * units.degC, 90 * units.percent) <Quantity([40.774647], 'degree_Celsius')> >>> heat_index(90 * units.degF, 90 * units.percent) <Quantity([121.901204], 'degree_Fahrenheit')> >>> heat_index(60 * units.degF, 90 * units.percent) <Quantity([--], 'degree_Fahrenheit')> >>> heat_index(60 * units.degF, 90 * units.percent, mask_undefined=False) <Quantity([59.93], 'degree_Fahrenheit')>
Changed in version 1.0: Renamed
rh
parameter torelative_humidity
See also