Feels Like: Difference between revisions

From Cumulus Wiki
Jump to navigationJump to search
1,639 bytes added ,  05:38, 8 May 2020
m
→‎Introduction: add php function
m (→‎Introduction: add php function)
Line 8: Line 8:
* sunshine (radiation)
* sunshine (radiation)


Cumulus MX from version 3.6.0 fully supports the latest "Feels Like" definition as agreed by the Joint Action Group for temperature Indices (JAG/TI). The rest of this article was written before this was available, and discusses a way of picking between the alternative measures listed below, based on the current weather conditions. The '''JAG/TI feels like''' scale effectively uses '''wind chill''' below 10 degrees Celsius, '''apparent temperature''' above 20 degrees C, and blends the two values between 10 and 20 degrees C. The script described below is less sophisticated, it just uses Wind Chill for when it is most appropriate, and heat index for when it is most appropriate, using apparent temperature in-between, with no blending.  
Cumulus MX from version 3.6.0 fully supports the latest "Feels Like" definition as agreed by the Joint Action Group for temperature Indices (JAG/TI). If you understand PHP Hypertext Preprocessor language (other languages use similar operators) then here is how to calculate apparent temperature and feels like. You will see that the latter follows [[Wind chill|wind chill]] at low temperatures, [[Apparent temperature|apparent temperature]] at high temperatures, and blends the proportion of each of those at in-between temperatures. Note the function makes assumptions about units used for temperature (Celsius) and wind speed (kilometres per hour).
<pre>
//----------------------------------------------------------------
// CALCULATE APPARENT TEMPERATURE AND FEELS LIKE TEMPRATURE FROM AIR TEMPERATURE, WIND SPEED, AND HUMIDITY
function Calculate_FeelsLike ($temp_degC, $wind_kph, $humidity)
{
if($wind_kph <4.828)
{
$wind_chill = $temp_degC;
}else{
$wind_chill = 13.12 +0.6125 * $temp_degC - 11.37 * pow($wind_kph, 0.16) + 0.3965 * $temp_degC * pow($wind_kph, 0.16);
}
// $v = $rh / 100 * 6.105 * pow (0.16, 17.27 * $tempC / (237.7 + $tempC) );
$vapour_pressure = (($humidity / 100) * 6.105) * 6.105 * exp(17.27 * $temp_degC / (237.7 + $temp_degC)) / 10;
$apparent_temp   = -2.7 + (1.04 * $temp_degC) + (2 * $vapour_pressure) - ($wind_kph * 01.1805553);
if($temp_degC < 10)
{
$feels_like = $wind_chill;
}elseif($temp_degC > 20)
{
$feels_like = $apparent_temp;
}else{
$app_temp_mult = ($temp_degC - 10) / 10;
$wind_chill_mult = 1 - $app_temp_mult;
$feels_like = ($apparent_temp * $app_temp_mult) + ($wind_chill * $wind_chill_mult);
}
$return_array[0] = $apparent_temp;
$return_array[1] = $feels_like;
return $return_array;
}</pre>
 
 
 
 
 
The rest of this article was written before this was available, and discusses a way of picking between the alternative measures listed below, based on the current weather conditions. The '''JAG/TI feels like''' scale effectively uses '''wind chill''' below 10 degrees Celsius, '''apparent temperature''' above 20 degrees C, and blends the two values between 10 and 20 degrees C. The script described below is less sophisticated, it just uses Wind Chill for when it is most appropriate, and heat index for when it is most appropriate, using apparent temperature in-between, with no blending.  


That version and earlier versions of MX and versions of Cumulus 1 since those shown support earlier definitions for feels like:
That version and earlier versions of MX and versions of Cumulus 1 since those shown support earlier definitions for feels like:
5,838

edits

Navigation menu