WindChill
汇总
标识可能引起冻疮或体温过低的冬天恶劣的气候条件,具体取决于暴露在这些条件下的具体时间。
讨论
该函数使用下列公式来计算风寒指数:
\(Wind \space Chill \space = \space 35.74 \space + \space (0.6215 \space * \space T) \space - \space (35.75 \space * \space WS\textasciicircum 0.16) \space + \space (0.4275 \space * \space T \space * \space WS\textasciicircum 0.16)\)
T = 气温,以华氏度为单位
WS = 风速,以英里/每小时为单位
有关此函数工作原理的详细信息,请参阅 风寒指数 栅格函数。
栅格对象所引用的栅格数据集是临时性的。 要将其设置为永久,可以调用栅格对象的 save 方法。
语法
WindChill(temperature_raster, wind_speed_raster, {temperature_units}, {wind_speed_units}, {wind_chill_units})
| 参数 | 说明 | 数据类型 |
|---|---|---|
|
temperature_raster |
单波段栅格,其中像素值表示环境空气温度。 |
Raster |
|
wind_speed_raster |
像素值表示风速的单波段栅格。 |
Raster |
|
temperature_units |
与输入温度栅格有关的测量单位。 可用输入单位包括摄氏度、华氏度和开氏度。 (默认值为 Fahrenheit) |
String |
|
wind_speed_units |
定义风速栅格的测量单位:
(默认值为 mph) |
String |
|
wind_chill_units |
与输出栅格有关的测量单位。 可用输出单位包括摄氏度、华氏度和开氏度。 (默认值为 Fahrenheit) |
String |
返回值
| 数据类型 | 说明 |
|---|---|
|
Raster |
输出栅格。 |
代码示例
根据输入栅格中的温度和风速来计算风寒指数。
from arcpy.sa import *
out_windchill_raster = WindChill("temperature.tif", "windspeed.tif", "",
"km/h", "Celsius")
out_windchill_raster.save("C:/arcpyExamples/outputs/wind_chill_C.tif")
根据输入栅格中的温度和风速来计算风寒指数。
# 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_wind_speed_raster = "windspeed.tif"
# Run WindChill function
out_windchill_raster = WindChill(in_temperature_raster, in_wind_speed_raster,
"", "knots", "Kelvin")
# Save the output
out_windchill_raster.save("C:/arcpyExamples/outputs/wind_chill_K.tif")