HeatIndex

Résumé

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.

Syntaxe

HeatIndex (temperature_raster, relative_humidity_raster, {temperature_unit}, {heat_index_unit})
ParamètreExplicationType de données
temperature_raster

Raster monocanal où les valeurs de pixel représentent la température de l’air ambiant.

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

Unité de mesure associée au raster de température en entrée. Les unités disponibles en entrée sont Celsius, Fahrenheit et Kelvin.

(La valeur par défaut est Fahrenheit)

String
heat_index_unit

Unité de mesure associée au raster en sortie. Les unités disponibles en sortie sont Celsius, Fahrenheit et Kelvin.

(La valeur par défaut est Fahrenheit)

String
Valeur renvoyée
Type de donnéesExplication
Raster

The output raster.

Exemple de code

HeatIndex example 1

This example calculates the heat index based on ambient temperature and relative humidity from the input raster.

from arcpy.ia import *
out_heatindex_raster = HeatIndex("temperature", "relative_humidity", "Celsius", "Kelvin")
out_heatindex_raster.save("C:/arcpyExamples/outputs/heat_index_K.tif")
HeatIndex example 2

This example calculates the heat index based on ambient temperature and relative humidity from the input raster.

# Import system modules
import arcpy
from arcpy.ia 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")