Welcome to the Cumulus Support forum.

Latest Cumulus MX V4 release 4.4.2 (build 4085) - 12 March 2025

Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024

Legacy Cumulus 1 release 1.9.4 (build 1099) - 28 November 2014
(a patch is available for 1.9.4 build 1099 that extends the date range of drop-down menus to 2030)

Download the Software (Cumulus MX / Cumulus 1 and other related items) from the Wiki

If you are posting a new Topic about an error or if you need help PLEASE read this first viewtopic.php?p=164080#p164080

Apparent Temperature

Other discussion about creating web sites for Cumulus that doesn't have a specific subforum

Moderator: daj

captzero
Posts: 363
Joined: Wed 03 Mar 2010 10:20 am
Weather Station: Vantage Pro2 w/ daytime FARS
Operating System: Windows 10
Location: Brisbane, Australia
Contact:

Apparent Temperature

Post by captzero »

Hi all,

The Australian BOM website gives the following information for Apparent Temp:

The formula for the AT used by the Bureau of Meteorology is an approximations of the value provided by a mathematical model of heat balance in the human body. It can include the effects of temperature, humidity, wind-speed and radiation. Two forms are given, one including radiation and one without. On this site we use the non-radiation version.

Version including the effects of temperature, humidity, and wind: AT = Ta + 0.33×e − 0.70×ws − 4.00

Ta = Dry bulb temperature (°C)

e = Water vapour pressure (hPa) [humidity]

ws = Wind speed (m/s) at an elevation of 10 meters

The vapour pressure can be calculated from the temperature and relative humidity using the equation:

e = rh / 100 × 6.105 × exp ( 17.27 × Ta / ( 237.7 + Ta ) )

where:

rh = Relative Humidity [%]


So with all that in mind, I was able to come up with the following javascript to formulate the AT. Entering the BOM data, it faithfully matches their official AT figures.

<script type="text/javascript">
var temp =<#temp> + 0.33;
var hum = <#hum>/100*6.105*(17.27*temp/(237.7+temp));
var wind = <#wlatest>*0.27777777;
var apptemp = Math.abs (temp+ hum)-(0.70) * (wind)-4;
document.write(apptemp.toFixed(1));
</script>

I think the BOM formula is used in the latest build but using the Cumulus webtag for AT gives me a value several (about 9C) degrees higher.

Can someone more knowledgeable than me run their eye my script and see where I have erred?

Thanks
Dan

http://www.brisbaneliveweather.com




A man with a thermometer always knows the temperature. A man with two thermometers, not so sure.
User avatar
steve
Cumulus Author
Posts: 26672
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: Apparent Temperature

Post by steve »

It's quite likely that I have the calculation wrong in Cumulus! I was hoping someone would check it, as they did for Cumulus 2.

One thing to note; I don't use 'latest' wind speed (which is effectively a short-term gust), I use the average.
Steve
captzero
Posts: 363
Joined: Wed 03 Mar 2010 10:20 am
Weather Station: Vantage Pro2 w/ daytime FARS
Operating System: Windows 10
Location: Brisbane, Australia
Contact:

Re: Apparent Temperature

Post by captzero »

Thanks Steve,
Avg speed would work too. It would be your average AT over the last 10 mins, I guess. Certainly a little closer to the BOM calc.
Dan

http://www.brisbaneliveweather.com




A man with a thermometer always knows the temperature. A man with two thermometers, not so sure.
User avatar
beteljuice
Posts: 3292
Joined: Tue 09 Dec 2008 1:37 pm
Weather Station: None !
Operating System: W10 - Threadripper 16core, etc
Location: Dudley, West Midlands, UK

Re: Apparent Temperature

Post by beteljuice »

e = rh / 100 × 6.105 × exp ( 17.27 × Ta / ( 237.7 + Ta ) )

should be 'coded' as:

var hum = <#hum>/100*6.105*Math.exp(17.27*temp/(237.7+temp));
Image
......................Imagine, what you will KNOW tomorrow !
User avatar
steve
Cumulus Author
Posts: 26672
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: Apparent Temperature

Post by steve »

captzero wrote:Avg speed would work too. It would be your average AT over the last 10 mins, I guess. Certainly a little closer to the BOM calc.
As with wind chill, it seems to me that it doesn't make sense to use a gust in the calculation, but a sustained speed. Using a gust speed potentially results in a rapidly changing apparent temperature or wind chill, which doesn't seem right to me, given what the figures are supposed to represent. Temperatures don't change that rapidly.
Steve
captzero
Posts: 363
Joined: Wed 03 Mar 2010 10:20 am
Weather Station: Vantage Pro2 w/ daytime FARS
Operating System: Windows 10
Location: Brisbane, Australia
Contact:

Re: Apparent Temperature

Post by captzero »

Thank Steve, I agree. Latest is not the greatest .

Bj,
JS is still new to me and I'm still learning. I’m not sure I follow the 'Math.exp.' component of the equation.

Current AT in Brisbane is 25.8 C

Temp- 22.3 C
Hum – 83 %
Wind- 2 kph


If I use
<script type="text/javascript">
var temp =22.3 + 0.33;
var hum = 83/100*6.105*(17.27*temp/(237.7+temp));
var wind = 2*0.27777777;
var apptemp = Math.abs (temp+ hum)-(0.70) * (wind)-4;
document.write(apptemp.toFixed(1));
</script>

I get 25.8 C (same as BOM)

If I use

var hum = 82/100*6.105*Math.exp(17.27*temp/(237.7+temp));

I get 40.7 C
Dan

http://www.brisbaneliveweather.com




A man with a thermometer always knows the temperature. A man with two thermometers, not so sure.
User avatar
steve
Cumulus Author
Posts: 26672
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: Apparent Temperature

Post by steve »

'Exp' is "e to the power" where e is the mathematical constant approximately equal to 2.718.

In your calculation, you're adding 0.33 to the temperature, when in fact it should be used as a multiplier for the saturation vapour pressure. You need to apply the rules of precedence and do multiply before addition.

And looking at this has made me realise that I've got the calculation wrong in Cumulus; I think I've omitted the part where 4 gets subtracted!
Steve
captzero
Posts: 363
Joined: Wed 03 Mar 2010 10:20 am
Weather Station: Vantage Pro2 w/ daytime FARS
Operating System: Windows 10
Location: Brisbane, Australia
Contact:

Re: Apparent Temperature

Post by captzero »

Ah.. all good.
As a young bloke at school, I never thought I'd ever have a use for any of that useless algebra stuff. I should have listened more closely to old Mr Bovey (Nosy Bovey to most of us) . Thanks Steve.
Dan

http://www.brisbaneliveweather.com




A man with a thermometer always knows the temperature. A man with two thermometers, not so sure.
User avatar
beteljuice
Posts: 3292
Joined: Tue 09 Dec 2008 1:37 pm
Weather Station: None !
Operating System: W10 - Threadripper 16core, etc
Location: Dudley, West Midlands, UK

Re: Apparent Temperature

Post by beteljuice »

If the original precedence is correct, then I think this is the way it should look (untested !!!)

Code: Select all

<script type="text/javascript">

/* Apparent Temperature

Version including the effects of temperature, humidity, and wind: AT = Ta + 0.33×e − 0.70×ws − 4.00

Ta = Dry bulb temperature (°C)

e = Water vapour pressure (hPa) [humidity]

ws = Wind speed (m/s) at an elevation of 10 meters

The vapour pressure can be calculated from the temperature and relative humidity using the equation: 

e = rh / 100 × 6.105 × exp ( 17.27 × Ta / ( 237.7 + Ta ) )

where: 

rh = Relative Humidity [%]

*/


my_Ta = <#temp>; // degrees C

my_e = <#hum> / 100 * 6.105 * Math.exp( 17.27 * my_Ta / ( 237.7 + my_Ta));

my_ws = <#wlatest> * 0.27777; // windspeed converted from km/h to m/s

my_AT = my_Ta + 0.33 * my_e - 0.7 * my_ws - 4; // precedence is my_Ta + (0.33 * my_e) - (0.7 * my_ws) - 4


// tidy up

my_AT = ( Math.round(100* my_AT)/100).toFixed(1); // rounds up to one decimal with trailing .0 if required


document.write(my_AT);
</script>

Edit: Two coding errors fixed :oops:
Last edited by beteljuice on Sat 18 Jun 2011 2:40 pm, edited 1 time in total.
Image
......................Imagine, what you will KNOW tomorrow !
User avatar
daj
Posts: 2041
Joined: Tue 29 Jul 2008 8:00 pm
Weather Station: WH1081
Operating System: Pi & MX
Location: SW Scotland
Contact:

Re: Apparent Temperature

Post by daj »

Can I ask a dumb question please? What is "apparent temperature" ? What is it telling me?
David
kippfordweather.uk
Cumulus MX & Raspberry Pi
Gina
Posts: 1885
Joined: Sat 21 Feb 2009 12:41 pm
Weather Station: Nothing working ATM - making one
Operating System: OS X, Linux Mint, Win7 & XP
Location: Devon UK

Re: Apparent Temperature

Post by Gina »

That Australian BOM site formula is what I'm using for apparent temperature. This gives what it would "feel like" outdoors to a human being. Like another version of "wind chill" but takes more into account. I'll let someone else explain the details - I just though it seemed better than the simple "wind chill" formula.
Gina

Sorry, no banner - weather station out of action. Hoping to be up and running with a new home-made one soon.
User avatar
daj
Posts: 2041
Joined: Tue 29 Jul 2008 8:00 pm
Weather Station: WH1081
Operating System: Pi & MX
Location: SW Scotland
Contact:

Re: Apparent Temperature

Post by daj »

Thanks Gina

I guessed it was something similar to wind chill but was curious if there was a difference as it has appeared in cumulus 1.9.1.

So just more accurate than Windchill.
David
kippfordweather.uk
Cumulus MX & Raspberry Pi
User avatar
steve
Cumulus Author
Posts: 26672
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: Apparent Temperature

Post by steve »

It attempts to combine wind chill and heat index to give one single 'feels like' temperature over the full range of conditions.
Steve
fractonimbus
Posts: 159
Joined: Thu 03 Feb 2011 1:15 am
Weather Station: WH1091
Operating System: Windows 7 on a Dell Vostro
Location: Canberra

Re: Apparent Temperature

Post by fractonimbus »

I've just coded the apparent temperature for PHP, which as a single equation is as follows:

$apptemp = round(($temp + 0.33*($hum/100)*6.105*exp(17.27*$temp/(237.7+$temp))- 0.70*$wspeed - 4.00),1);

I always use brackets (...) around anything where I don't trust the order of compuation (or don't know the language).
The round(x,1) command trims it back to one decimal place.

Here, $apptemp is the apparent temperature variable, $temp is the (dry bulb) temperature, $hum is the relative humidity, and $wspeed is the average windspeed. Seems to work OK.

I checked the BOM page at http://www.bom.gov.au/info/thermal_stress/ which explains what it's all about, and the original paper at http://www.bom.gov.au/amm/docs/1994/steadman.pdf (it uses hectoPascals instead of kiloPascals for the water vapour pressure, so the constants are x10) and all seems good.

fracto
Image
User avatar
steve
Cumulus Author
Posts: 26672
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: Apparent Temperature

Post by steve »

Does your calculated value agree with the Cumulus <#apptemp> web tag? Hopefully!
Steve
Post Reply