HeatIndex

摘要

根据环境温度和相对湿度来计算体感温度。 通常体感温度描述为人体感受到的热度。

说明

用来计算炎热指数的炎热指数函数的公式如下:

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) )

其中:

  • T = 空气温度
  • R = 相对湿度

有关此函数工作原理的详细信息,请参阅炎热指数栅格函数。

栅格对象所引用的栅格数据集是临时性的。 要将其设置为永久,可以调用栅格对象的 save 方法。

语法

HeatIndex (temperature_raster, relative_humidity_raster, {temperature_unit}, {heat_index_unit})
参数说明数据类型
temperature_raster

单波段栅格,其中像素值表示环境空气温度。

Raster
relative_humidity_raster

单波段栅格,其中像素值以介于 0 到 100 之间的百分比值来表示相对湿度。

Raster
temperature_unit

与输入温度栅格有关的测量单位。 可用输入单位包括摄氏度、华氏度和开氏度。

(默认值为 Fahrenheit)

String
heat_index_unit

与输出栅格有关的测量单位。 可用输出单位包括摄氏度、华氏度和开氏度。

(默认值为 Fahrenheit)

String
返回值
数据类型说明
Raster

输出栅格。

代码示例

HeatIndex 示例 1

本示例将根据输入栅格中的环境温度和相对湿度来计算炎热指数。

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 示例 2

本示例将根据输入栅格中的环境温度和相对湿度来计算炎热指数。

# 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")