Resumen
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.
Debate
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.
Sintaxis
HeatIndex (temperature_raster, relative_humidity_raster, {temperature_unit}, {heat_index_unit})
Parámetro | Explicación | Tipo de datos |
temperature_raster | Un ráster de una única banda en el que los valores de píxeles representan la temperatura ambiente del aire. | 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 | La unidad de medida asociada al ráster de temperatura de entrada. Las unidades de entrada disponibles son Celsius, Fahrenheit y Kelvin. (El valor predeterminado es Fahrenheit) | String |
heat_index_unit | La unidad de medida asociada al ráster de salida. Las unidades de salida disponibles son Celsius, Fahrenheit y Kelvin. (El valor predeterminado es Fahrenheit) | String |
Tipo de datos | Explicación |
Raster | The output raster. |
Muestra de código
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")