Skip to content

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\):

\[ e = 6.11 \times 10^{\frac{7.5 t}{237.3 + t}} \]

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

\[ rh = \frac{e}{e_s} \times 100 \]

Wet Bulb Temperature

Finally calculate the Wet bulb temperature \(T_w\) in °C by using

\[ \begin{align} T_w = & T \times \arctan(0.151977 \sqrt{rh + 8.313659}) \\ & + 0.00391838 \sqrt{rh^3} \arctan(0.023101 rh) \\ & - \arctan(rh - 1.676331) \\ & + \arctan(T + rh) - 4.686035 \\ \end{align} \]

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: