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

gemini06720
Posts: 1700
Joined: Mon 10 Aug 2009 10:16 pm
Weather Station: No weather station
Operating System: No operating system
Location: World...

Re: Apparent Temperature

Post by gemini06720 »

steve wrote:Does your calculated value agree with the Cumulus <#apptemp> web tag? Hopefully!
Steve, I just created a PHP function with the information provided by 'fracto' and I have added the apparent temperature on my [link removed] (both, the calculated one and the one provided by Cumulus) - at the time of writing this message, both temperatures were equal.
Last edited by gemini06720 on Thu 30 May 2013 6:40 am, edited 1 time in total.
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 »

Interesting to see slight differences. This can probably be explained by the computation processes used by the different languages. Since this is an empirical index, small differences are not important. I checked them in parallel for several hours, at higher dry bulb temperatures (summer here in Oz), and there were no differences that I noticed.

BTW, Ray, nice looking, comprehensive web page.

DN
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 »

Currently showing 0.9 and 1.6; I'm surprised there's such a difference.
Steve
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 »

I think the difference is because I'm using a slightly different formula for vapour pressure (there are quite a few).
Steve
User avatar
MickinMoulden
Posts: 499
Joined: Mon 20 Dec 2010 12:12 pm
Weather Station: WS-1081 with rain gauge mod
Operating System: Windows 7 & 1.9.3 b1059
Location: Palmerston, NT, Australia
Contact:

Re: Apparent Temperature

Post by MickinMoulden »

beteljuice wrote: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 * 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, 1).toFixed(1); // rounds up to one decimal with trailing .0 if required


document.write(my_AT);
</script>

Your code looks great Beatle Juice. I have tested it, and just a few adjustments:
replace the my_e with:

Code: Select all

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

and:

Code: Select all

precedence is my_Ta + (0.33 * my_e) - (0.7 * my_ws) - 4
I used this. The original equation didn't work at the time, but may have been atributed to the following problem:

Code: Select all

my_AT = ( Math.round(100* my_AT)/100, 1).toFixed(1); // rounds up to one decimal with trailing .0 if required
should take out the ",1". I put:

Code: Select all

var AT = (Math.round(10 * AT)/10) .toFixed(1); 
. Of course you can times by 100 then divide by 100. Makes no difference.
then change to this:

Code: Select all

document.write(my_AT + "<#tempunit>");
just to tidy it up.
I've tested it and compared it with the chart supplied here: http://www.bom.gov.au/info/thermal_stress/ and works well (spot on).
Thanks for all the hard work Beetle Juice. I was going to do it after finding the equation on the BOM.gov.au site, but once again, why re-invent the wheel when you have Sandaysoft.com!
Michael, Palmerston, NT Australia www.Palmerston-WeatherImageNo image? I'm offline!
ImageImage
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 »

Your code looks great Beatle Juice. I have tested it, and just a few adjustments:
replace the my_e with:

Code: Select all

my_e = <#hum> / 100 * 6.105 * Math.exp( 17.27 * my_Ta / ( 237.7 + my_Ta));
That and the extra ", 1"
My bad :oops: - good job I put the "English" formula so you found it
Image
......................Imagine, what you will KNOW tomorrow !
Post Reply