Saturday, November 16, 2024
Google search engine
HomeLanguagesCalculating Wind Chill Factor(WCF) or Wind Chill Index(WCI) in Python

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

Wind-chill or Windchill is the perceived decrease in air temperature felt by the body on exposed skin due to the flow of air. The effect of wind chill is to increase the rate of heat loss and reduce any warmer objects to the ambient temperature more quickly.
Here is the standard formula that was adopted in 2001 by Canada, UK, and the US to compute and analyze the Wind Chill Index:

Twc(WCI) = 13.12 + 0.6215Ta – 11.37v+0.16 + 0.3965Tav+0.16 where Twc = Wind Chill Index (Based on Celsius temperature scale) Ta = Air Temperature (in degree Celsius) v = Wind Speed (in miles per hour)

Examples:

Input: 
Air Temperature = 28
Wind Speed = 80
Output: 30
Calculation done using the above formula:
WCI = 13.12 + 0.6215 * (28) - 
      11.37 * (80)**0.16 + 
      0.3965 * 28 * 80**0.16
Input: 
Air Temperature = 42
Wind Speed = 150
Output: 51
Calculation done using the above formula:
WCI = 13.12 + 0.6215 * (42) - 
      11.37 * (150)**0.16 + 
      0.3965 * 42 * 150**0.16

Python3




# Python program to calculate WCI
import math
  
# function to calculate WCI
def WC(temp, wi_sp):
      
    # Calculating Wind Chill Index (Twc)
    wci = 13.12+0.6215*temp- 11.37*math.pow(wi_sp, 0.16) + \
          0.3965*temp*math.pow(wi_sp, 0.16)
    return wci
      
# Taking the Air Temperature (Ta) 
temp = 42
  
# Taking the Wind Speed (v) 
wi_sp = 150
  
print("The Wind Chill Index is", int(round(WC(temp, wi_sp))))


Output:

The Wind Chill Index is 51

This article is contributed by Chinmoy Lenka. If you like Lazyroar and would like to contribute, you can also write an article using write.geeksforgeeks.org or mail your article to review-team@geeksforgeeks.org. See your article appearing on the Lazyroar main page and help other Geeks. Please write comments if you find anything incorrect, or you want to share more information about the topic discussed above.

Dominic Rubhabha-Wardslaus
Dominic Rubhabha-Wardslaushttp://wardslaus.com
infosec,malicious & dos attacks generator, boot rom exploit philanthropist , wild hacker , game developer,
RELATED ARTICLES

Most Popular

Recent Comments