Member-only story
Calculate Dangerous Wet Bulb Temperatures With Python
People are dying from the heat; knowing the wet bulb temperature just might help save a life. A short Python program lets you easily calculate this number.
The news recently has been full of stories about wet bulb temperature, and how this measurement is important when it comes to keeping humans alive. (Do a news search on “wet bulb” to see a huge number of stories.) Simply put, hot air with high relative humidity is more dangerous to health than drier hot air. Slower evaporation of sweat means a person can more easily die from the heat, a horrible result that is happening daily to an increasing number of people as our global climate changes.
A Complex Formula Python Handles With Ease
If you know the relative humidity and the actual air temperature, it’s easy to calculate the wet-bulb temperature. The mathematical formula is complex, derived by fascinating but complex AI analysis algorithms to come up with the various conversion factors. Fortunately, Python is really good at computing complicated equations, so we don’t need to understand how it works, we can just let Python do the math.
Wet Bulb Function
Here’s the core function that does the math we need. Inputs are the air temperature in degrees Celsius, and…