Science projects with the Python MetPy library

How Do You Calculate Wind Chill?

The MetPy windchill function returns a "feels like" temperature according to wind speed and ambient temperature. For example, an outside ambient temperature of 40°F with a wind of 20mph feels like 28°F:

>>> import metpy.calc
>>>
>>> temp = [40] * units.degF
>>> wind = [20] * units.mph
>>> metpy.calc.windchill(temp, wind, face_level_winds=True)
<Quantity([28.42928573], 'degree_Fahrenheit')>

When the temperature starts going below -20°C, parents need to keep a close eye on their kids for frostbite.

Listing 5 calculates a wind chill curve (Figure 4) of -20°C by ambient temperature and wind. The code iterates between temperatures of 0°C and -45°C (line 12) and wind speeds of 1 to 60kph (line 14) and finds wind chills of -20°C (line 18).

Listing 5

A -20°C Wind Chill Curve

 

Figure 4: Wind chill at -20°C.

From the results, you can see that even if you have a nice ski day of -8°C, a high wind of 40kph will make the temperature feel like -20°C, a 12° drop.

Summary

MetPy didn't help me answer all of my kids' science questions, but it really helped with water and weather problems. If you have a budding meteorologist or chemical engineer in your house, take a look at the Python MetPy library.

The Author

You can investigate more neat projects by Pete Metcalfe and his daughters at https://funprojects.blog.

Buy this article as PDF

Express-Checkout as PDF
Price $2.95
(incl. VAT)

Buy Linux Magazine

SINGLE ISSUES
 
SUBSCRIPTIONS
 
TABLET & SMARTPHONE APPS
Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content

  • Instrumented Garden

    Place long-range wireless sensors in a garden and keep track of ambient conditions with gauges and time-based graphs.

  • Sensor Shootout

    Any application that collects a large number of measurements is bound to have some anomalous measurements, but good sensor breakouts should not output such values all the time. We tested eight temperature and humidity sensors for accuracy.

  • Monitoring Beehives

    Beekeepers can get to know their colonies better without continuously disturbing the industrious insects. Using a Raspberry Pi and various sensors, two hobby beekeepers monitor the temperature and humidity of their hives, with plans to monitor their weight.

  • Charly's Column: Weather Page

    To find out what the weather is like, sys admin columnist Charly Kühnast no longer needs to go outdoors get wet, blown away, frozen to death, or sunburned.

  • Adafruit IO API

    The Adafruit IO API offers a convenient means for network-ready sensors and other components.

comments powered by Disqus
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters

Support Our Work

Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.

Learn More

News