Page 1 of 2

Possible Beaufort Number Bug

Posted: Mon 10 Feb 2020 12:27 pm
by Mapantz
During yesterday's storm Ciara, my wind speed got up to 31mph. <#Tbeaufort> returned F7 and <#Tbeaudesc> returned Near Gale which is absolutely fine.

Looking at my 'yesterday' page, <#Ybeaufort> is returning F6. But <#Ybeaudesc> is returning the correct 'Near Gale' description.

Re: Possible Beaufort Number Bug

Posted: Mon 10 Feb 2020 12:42 pm
by mcrossley
What is your <#windYM> tag showing?

31 mph should be F6 - Strong breeze.

Re: Possible Beaufort Number Bug

Posted: Mon 10 Feb 2020 12:51 pm
by mcrossley
But I see why 31 mph is producing different values for the number and description - it falls right into a rounding error issue in the description function. I'll fix that.

Re: Possible Beaufort Number Bug

Posted: Mon 10 Feb 2020 12:52 pm
by Mapantz
31.0

I was looking at my website when the wind got to that speed and <#Tbeaufort> definitely said F7 with the description of near gale. <#Ybeaudesc> is saying near gale. :lol:

Edit: Ahh I see. Phew! It wasn't me going lala then?!

Re: Possible Beaufort Number Bug

Posted: Mon 10 Feb 2020 1:10 pm
by mcrossley
OK, there are three functions that calculate the Beaufort force, one outputs the number as string, one as a number, one as a description.

The number/string, and description both have rounding errors, the numeric one is correct. I have fixed it so that there is only a single function to do the conversion, and the others just call that one!

The calculation is done in m/s, and 31mph = 13.858 m/s. The cutoff for F7 is < 13.9, so 13.858 was being rounded to 13.9 and incorrectly interpreted as F7

Re: Possible Beaufort Number Bug

Posted: Mon 10 Feb 2020 1:29 pm
by richard_newberry
Tell me if i am wrong that beautfort is related to average wind speed not the wind guest?

https://www.spc.noaa.gov/faq/tornado/beaufort.html

Re: Possible Beaufort Number Bug

Posted: Mon 10 Feb 2020 1:39 pm
by mcrossley
Correct, it should be average speed not gust. I'm not sure why Cumulus has peak gust values as well.

I use the peak average windspeed for Beaufort values on my website.

Re: Possible Beaufort Number Bug

Posted: Mon 10 Feb 2020 1:53 pm
by richard_newberry
Beautfort according to the met office is related to wind gust then wind average?

Re: Possible Beaufort Number Bug

Posted: Mon 10 Feb 2020 2:27 pm
by mcrossley
Scratch that - deleted post!

All the Beaufort values current, today, yesterday - use average speeds.

Re: Possible Beaufort Number Bug

Posted: Mon 10 Feb 2020 2:32 pm
by Mapantz
mcrossley wrote: Mon 10 Feb 2020 2:27 pm
The Today and Yesterday tags <#T/Ybeaufort>,<#T/Ybeaufortnumber>, <#T/Ybeaudesc> all use the peak gust speed which in my opinion is incorrect.

What to do about it though?
If I recorded a peak gust of 54mph yesterday, wouldn't have that shown up as F9?

Re: Possible Beaufort Number Bug

Posted: Mon 10 Feb 2020 2:33 pm
by mcrossley
Sorry Tina, I deleted my previous post - I was talking through my backside, couldn't read properly. They all use average values, so as you were.

Re: Possible Beaufort Number Bug

Posted: Mon 10 Feb 2020 2:34 pm
by Mapantz
:lol:

No problems!

Re: Possible Beaufort Number Bug

Posted: Mon 10 Feb 2020 10:20 pm
by freddie
mcrossley wrote: Mon 10 Feb 2020 1:10 pm31mph = 31.858 m/s. The cutoff for F7 is < 31.9, so 31.858 was being rounded to 31.9 and incorrectly interpreted as F7
31 mph is 13.858 m/s. Just saying, like 😀 But I guess you mean the F7 cutoff is 13.9...

Re: Possible Beaufort Number Bug

Posted: Mon 10 Feb 2020 10:34 pm
by mcrossley
Doh! Number blindness :oops:

Re: Possible Beaufort Number Bug

Posted: Sat 15 Feb 2020 9:13 pm
by richard_newberry
I have worked out the wind average and its not correct.