Summary
Calculates apparent temperature based on ambient temperature and relative humidity. The apparent temperature is often described as how hot it feels to the human body.
Discussion
The formula that the Heat Index function uses to compute heat index is as follows:
Heat Index = ( -42.379 + (2.04901523 * T) + (10.14333127 * R)
- (0.22475541 * TR) - (6.83783e-3 * TT) - (5.481717e-2 * RR)
+ (1.22874e-3 * TTR) + (8.5282e-4 * TRR) - (1.99e-6 * TTRR) )
where:
- T = Air temperature
- R = Relative humidity
For more information about how this function works, see the Heat Index raster function.
The referenced raster dataset for the raster object is temporary. To make it permanent, you can call the raster object's save method.
Syntax
HeatIndex (temperature_raster, relative_humidity_raster, {temperature_unit}, {heat_index_unit})
Parameter | Explanation | Data Type |
temperature_raster | A single-band raster where pixel values represent ambient air temperature. | Raster |
relative_humidity_raster | A single-band raster where pixel values represent relative humidity as a percentage value between 0 and 100. | Raster |
temperature_unit | The unit of measurement associated with the input temperature raster. Available input units are Celsius, Fahrenheit, and Kelvin. (The default value is Fahrenheit) | String |
heat_index_unit | The unit of measurement associated with the output raster. Available output units are Celsius, Fahrenheit, and Kelvin. (The default value is Fahrenheit) | String |
Data Type | Explanation |
Raster | The output raster. |
Code sample
This example calculates the heat index based on ambient temperature and relative humidity from the input raster.
from arcpy.sa import *
out_heatindex_raster = HeatIndex("temperature", "relative_humidity", "Celsius", "Kelvin")
out_heatindex_raster.save("C:/arcpyExamples/outputs/heat_index_K.tif")
This example calculates the heat index based on ambient temperature and relative humidity from the input raster.
# Import system modules
import arcpy
from arcpy.sa import *
# Set the analysis environments
arcpy.env.workspace = "C:/arcpyExamples/data"
# Set the local variables
in_temperature_raster = "temperature.tif"
in_relative_humidity_raster = "relativehumid.tif"
# Execute the HeatIndex function
out_heat_index_raster = HeatIndex(in_temperature_raster, in_relative_humidity_raster, "", "Celsius")
# Save the output
out_heat_index_raster.save("C:/arcpyExamples/outputs/heat_index_C.tif")