Snow Probability Calculation

I’ve been working on an updated (for me) snow probability based on a research paper (found by another individual that I’ve been working with on the Home Assistant forums) utilizing only temperature and humidity. This is written in JavaScript for now and I am currently using in Node-Red all inputs come from the Tempest.

I encourage others to test this to see how well it works. I will also include my current snow probability calculation that is largely based off the work of The Scottish Borders Weather site: https://www.bordersweather.co.uk/wxsnow.php

// Experimental Snow Probability
// https://agupubs.onlinelibrary.wiley.com/doi/full/10.1029/2008GL033295
airTemperature = (msg.temperature - 32) * 5/9
relativeHumidity = msg.humidity

let pSnow = 1 / (1 + Math.exp(-10.04 + (1.41 * airTemperature) + (0.09 * relativeHumidity)));
pSnow = ((Math.round(pSnow * 1000))/1000*100)
msg.snow2= pSnow
return msg;

Current Snow Probability Calculation:

var temperature = msg.temperature
var dew_point = msg.dew_point
var snow_possible = msg.snow
var A = dew_point + temperature
var snow_prob

// Convert A from F to C
A = (A - 32) / 1.8

if (snow_possible == 'true') {
    snow_prob = 80 - 10 * A
} else {
    snow_prob = 0
}

msg.snow_probability = Math.round(snow_prob)
return msg

Any input is welcome.

2 Likes

If you could get a H.A. integration to build on the existing Tempest integration, that would be great :+1:

There is a simple Snow Probability is in the existing HA integration. Just looking at improvements.

Can I ask for a link or reference?
Thank you.

https://github.com/briis/hass-weatherflow2mqtt
and here on this forum:
https://community.tempest.earth/t/weatherflow2mqtt-for-home-assistant/13718
or on Home Assistant Community forum:
https://community.home-assistant.io/t/weatherflow-weather/368627

Directions are on the GitHub page. I run in Docker myself. I have added a few calculations to the repo myself, snow probability being one of them.