The plaintext-parser.php has the following
Code: Select all
$BeaufortText = array(
// NOTE: don't change these .. use LANGLOOKUP entries in the plaintext-parser-LL.txt
// translation file instead.
'Calm', 'Light air', 'Light breeze','Gentle breeze', 'Moderate breeze', 'Fresh breeze',
'Strong breeze', 'Near gale', 'Gale', 'Strong gale', 'Storm', 'Violent storm',
'Hurricane'
);
// wind speed < values below correspond to force 0 .. 11 . >= last value = force 12
$BeaufortKTS = array(
1,4,7,11,17,22,28,34,41,48,56,64,64
);
$BeaufortMPH = array(
1,4,8,13,19,25,32,39,47,55,64,73,73
);
$BeaufortKPH = array(
1,6,12,20,30,40,51,63,76,88,103,118,118
);
$BeaufortMS = array(
0.2,1.6,3.4,5.5,8.0,10.8,13.9,17.2,20.8,24.5,28.5,32.7,32.7
);
which sets the upper limits and word(s) to use for the Beaufort scale.
Later in the script is
Code: Select all
// determine Beaufort number based on wind speed and units
function PPgetBeaufort ( $wind, $units) {
global $showBeaufort,$BeaufortMPH,$BeaufortKPH,$BeaufortKTS,$BeaufortMS,$doDebug,$Status;
switch ($units) {
case 'mph': $winds = $BeaufortMPH; break;
case 'kph': $winds = $BeaufortKPH; break;
case 'km/h': $winds = $BeaufortKPH; break;
case 'm/s': $winds = $BeaufortMS; break;
case 'mps': $winds = $BeaufortMS; break;
case 'kts': $winds = $BeaufortKTS; break;
default: $winds = $BeaufortMPH;
} // end switch
$Bft = 0;
for ($i=0;$i<12;$i++) {
if ($wind < $winds[$i]) {
$Bft = $i;
break;
}
}
if ($i > 11 and ! $Bft) { $Bft = 12; };
if($doDebug) {
$Status .= "<!-- '$wind' '$units' bft=$Bft i=$i -->\n";
}
return($Bft);
}// end PPgetBeaufort
which finds the corresponding entry based on the windspeed forecast.
I'd use the NOAA NWS scale definitions (
https://www.weather.gov/mfl/beaufort) for the windspeeds and Beaufort text and that's why no settings entry for it.
Hope this helps...
Best regards,
Ken