Calculating Wind Chill Factor(WCF) or Wind Chill Index(WCI) in Python

PythonServer Side ProgrammingProgramming

Wind Chill Factor is an indication of how cold we feel not just because of the atmospheric temperature but also taking into account the speed of the wind. It combines both these factors in form of an equation and gives us a measurement of how cold it actually feels when the wind blows at a higher speed even without any change in temperature.

Below is the equation for calculating the Wind Chill Factor.

Twc=13.12 + 0.6215Ta-11.37v+0.16 + 0.3965Tav+0.16

where Twc is the wind chill index, based on the Celsius temperature scale;
Ta is the air temperature in degrees Celsius; and v is the wind speed at 10 m
(33 ft) standard anemometer height, in kilometres per hour.[9]

 To apply this formula for calculating the value of the wind chill factor we will use the python math library as the power function in available in it. The below program achieves this. 


import math
wind = float(input("Enter wind speed in kilometers/hour: "))
temperature = float(input("Enter air temperature in degrees Celsius: "))
wind_chill_factor_index = 13.12 + 0.6215*temperature \
   - 11.37*math.pow(wind , 0.16) \
   + 0.3965*temperature*math.pow(wind , 0.16)
print("The wind chill index is", int(round( wind_chill_factor_index, 0)))


Running the above code gives us the following result −

Enter wind speed in kilometers/hour: 16
Enter air temperature in degrees Celsius: 27
The wind chill index is 29
Published on 19-Dec-2019 15:57:08