Open djgagne opened 9 months ago
Here is some pseudocode of what I want to happen. The logic may not be entirely correct but this is the rough idea of what should work:
probs_5min = sparse array of probabilities
accumulated = {index: [], probs: []}
time = 30
for f in range(time - 30, time, 5):
for i in probs_5min[index]:
if i in accumulated[index]:
accumulated[index] *= 1- probs_5min[values][i]
else:
accumulated[index] = 1 - probs_5min[values][i]
accumulated = 1 - accumulated
There was a feature request from SPC to have probabilities that look as close to Monte Flora's ML wofs model as possible. One way to do this is accumulating the 5 minute tornado probabilities over a 30 minute window with the following formula.
It is the probability of at least one 5 min period in that 30 minute period having a tornado.
It is possible to do this in JavaScript with our sparse arrays while keeping them sparse. If there are multiple nonzero values across time at a given point, then you just multiply their 1-prob values together and assume the 0 values would then be 1, resulting in identity for those values.
The first forecast time would be F30min, which is consistent with the cbwofs website.