Will it Snow
Will it snow?¶
This is an exercise for an advanced analytics task, involving multiple steps. The goal is to identify points in time when the formation of snow was possible and look for indicators of actual snowfall.
Disclaimer: The actual weather physics is a bit more complicated than displayed here; But it will be a good enough estimation.
Hints
This task contains a lot of formulas. Consider defining separate functions for them to get the implementation details out of the way of your actual solution.
Consider first how you want to apply these functions to the dataset, since this influences the parameter- and return data types of the functions. Which possible approaches does pandas offer for this kind of problem?
While in physics many quantities are labelled with shorthand notations, it is recommended to choose meaningful variable names in your code to aid understanding and debugging efforts.
Given¶
The following columns are given in the dataset:
- Actual (Air) Temperature \(T\) in °C
- Dew Point Temperature \(T_d\) in °C
Derive¶
To determine whether snow can form, the wet bulb temperature is a very good indicator. There are a few intermediate steps needed to get there though. Add all derivations as columns to your data set and make sure they are properly labelled.
Vapor Pressure¶
First, we need to derive two different vapor pressures. For this you can use the transfer formula from temperature \(t\) to vapor pressure \(e\):
Using this formula, derive
- Actual vapor pressure \(e\) in hPa (from \(T\))
- Saturated vapor pressure \(e_s\) in hPa (from \(T_d\))
Relative Humidity¶
Based on the vapor pressure you can now calculate the Relative Humidity \(rh\) in percent as follows
Wet Bulb Temperature¶
Finally calculate the Wet bulb temperature \(T_w\) in °C by using
Evaluate¶
Since snow quality is a bit subjective, here is a rough guideline which kind of snow will be possible under which circumstances.
\(T_w\) in °F | Snow Quality |
---|---|
x > 28 | no snow possible |
28 ≥ x ≥ 27 | wet snow, snowy rain |
27 > x ≥ 23 | marginal snow |
23 > x ≥ 20 | decent snow |
20 > x ≥ 18 | good snow |
18 > x | great snow |
Caution: the wet bulb temperature in the table is given in °F!
On a daily basis¶
Print all the days on which snow was possible and the overall quality on that day. Use the average wet bulb temperature during the day to determine the overall quality of the possible snow.
Was it real?¶
Combine the possible snow quality of a day with the precipitation data to find likely days where some actual snowfall could be observed.
Plot¶
Plot \(T_w\) over time. Mark the thresholds for snow in the plot and highlight sections in which snow was possible, select stronger highlights for better quality. Put a timeline below the plot marking full days in which snow was possible and precipitation happened.
Sources¶
If you are interested, here are the sources for the formulas and how to use them:
- Online Calculator and Explanation for Relative Humidity
- Online Calculator and Explanation for Vapor Pressure
- Paper: Improved Magnus Form Approximation of Saturation Vapor Pressure
- Paper: The Relationship between Relative Humidity and the Dewpoint Temperature in Moist Air: A Simple Conversion and Applications
- Paper: Wet-Bulb Temperature from Relative Humidity and Air Temperature