Page 1 of 1

current conditions block wet bulb temp

Posted: Thu Mar 03, 2022 3:53 pm
by alexvanuxem
Hi,

A question about the wet bulb reading in the current conditions block (detail view):
the wet bulb temp seems to be always above the actual outside tempearture.
I think that's not correct ;) , it should be way less.

Also the windchill tempearture isn't always showing: maybe it's calculated only every 10 minutes????
the heatindex is never showing.

I transfer data through my meteobridge coming from my weatherlink live davis station, maybe the settings there aren't correct?

Re: current conditions block wet bulb temp

Posted: Thu Mar 03, 2022 9:00 pm
by davidefa
Wind chill is calculated only for T<=10°C and W>4.8km/h
Heat index is calculated only for T>=26.7°C (corrected, I had previously written the opposite )
This is the function calculating wet-bulb:

Code: Select all

	// Wet-bulb - https://en.wikipedia.org/wiki/Wet-bulb_temperature
	function getWB($WB_T,$WB_H){
		global $displayTempUnits;
		$e = $WB_H / 100 * 6.105 * exp(17.27 * $WB_T / (237.7 + $WB_T));
		$WB = 0.567 * $WB_T + 0.393 * $e + 3.94;
		$WB = convertor($WB,"C",$displayTempUnits);
		return number_format($WB,1,".","");
	}
Another widespread formula is this ( don't know the precision of the formula ):

Code: Select all

Tw = T * arctan[0.151977 * (rh% + 8.313659)^(1/2)] + arctan(T + rh%) - arctan(rh% - 1.676331) + 0.00391838 *(rh%)^(3/2) * arctan(0.023101 * rh%) - 4.686035

$Tw = $T * atan(0.151977 * pow($H + 8.313659,1/2)) + atan($T + $H) - atan($H - 1.676331) + 0.00391838 * pow($H,3/2) * atan(0.023101 * $H) - 4.686035;

Re: current conditions block wet bulb temp

Posted: Fri Mar 04, 2022 5:39 pm
by alexvanuxem
Hi,

The formula in the block isn't correct, there's some part missing it should be more like this:
Convert Tdry from ºF to ºC: tdry = (ºF-32)·5/9
Convert RH% from percent to decimal value: rh = (RH%/100%)
Calculate dry-bulb vapor pressure: e(dry) = 6.112*EXP[17.62·tdry/(243.12+tdry)]
Approximate wet-bulb vapor pressure, e(wet), as square-root of rh times e(dry): e(wet) ≈ e(dry)·√(rh)
Calculate approximate wet-bulb temperature, twet, from approximated wet-bulb vapor pressure: twet ≈ (237.7×Log[e(wet)/6.108])/(7.5 - Log[e(wet)/6.108])
Convert twet from ºC to ºF: Tdry = 1.8*ºC+32
https://cr4.globalspec.com/thread/60813 ... -Bulb-Temp

when I do this with my current conditions I find 2.4C

When I do the artan formula I find 4.4C

My weatherlink says : 1.7C

I edited my updater.php to the arctan formula, already much better.

But I don't know how to php the above more correct formula.

PS: wet bulb can never be above the outside temp otherwise we humans could not cool ourselves.

ok for the heatindex and the windchill, although I would like to see it always

I attached some screenshots before adjust updater, and after , and a aplication note from davis instruments about their calculated measurements.

cheers

Alex
after.PNG
after.PNG (70.5 KiB) Viewed 11441 times
before.PNG
before.PNG (56.3 KiB) Viewed 11441 times
https://support.davisinstruments.com/ar ... r-products

Re: current conditions block wet bulb temp

Posted: Sat Mar 05, 2022 9:01 pm
by davidefa
ver 24.4
- added approximate formula for wet bulb temperature calculation ( Roland Stull https://journals.ametsoc.org/view/journ ... xt-display ) error +/-0.65°C according to authors evaluation ( calculated at 1013hPa )
- added accurate ( and iterative ) formula for wet bulb temperature calculation ( Roland Stull https://www.eoas.ubc.ca/books/Practical ... kColor.pdf ) error +/-0.1°C ( personal evaluation ) and corrected for absolute local pressure ( disabled by default )

Re: current conditions block wet bulb temp

Posted: Sat Mar 05, 2022 9:07 pm
by davidefa
I have tried to convert the Davis formula but there is something I did wrong: here the formula in php sandbox

Re: current conditions block wet bulb temp

Posted: Sat Mar 05, 2022 10:14 pm
by alexvanuxem
THANK YOU MAN!

You are my hero!

:shock: :o

Re: current conditions block wet bulb temp

Posted: Mon Mar 07, 2022 7:53 pm
by alexvanuxem
I chedked yr calculations in the sandbox php

the only 'fault' I couild find is the calculaction of es

es = 6.112 * exp [(17.62*TC)/(TC + 243.12)] (also used in our dewpoint calculation) (my remark: probably in Kelvin
= davis explanation)

you wrote in your sandbox php
$es = 0.6113 * exp((17.2694 * $T)/($Tk - 35.86));

Could it possibly mean that '26' means '62' :-)

If I was possibly wrong, please accept my excuses, I'm only learning.

PS: in your accurate wetbulb calc, how should I determine my offset of pressure?
PS: can you advise a free php program? without a free trial? and if posibly a 'web' learning cource about php?

PS: Thank you.

Grace milo.
:)

Re: current conditions block wet bulb temp

Posted: Wed Mar 09, 2022 5:21 pm
by Meteofabro
Hi Davidefa.

The item "Relative Pressure Offset (in hPa, used in the accurate calculation of the wet bulb temperature)" which must contain precisely. How do I know what offset to put !.

Re: current conditions block wet bulb temp

Posted: Wed Mar 09, 2022 5:49 pm
by davidefa
The 'absolute to relative offset' is the same offset to convert your weather station absolute to relative pressure .
If you don't have to input it in your weather station/weather software you can calculate it with the keisan calculator ( or something like that )
The offset is the difference between the sea level pressure and the absolute pressure ( a positive number )

pofs.png
pofs.png (164.89 KiB) Viewed 11339 times

Re: current conditions block wet bulb temp

Posted: Wed Mar 09, 2022 5:56 pm
by davidefa
@alexvanuxem

You can use, for example, xampp which include an http server, a mysql server, php... you can install for example a local copy of meteotemplate and run it locally ( I do it for testing purposes ).
I use the portable version and start it manually.

P.S. For a php course don't know what to recommend..

Re: current conditions block wet bulb temp

Posted: Wed Mar 09, 2022 8:18 pm
by alexvanuxem
thx,

i tried your sandbox php again, with the values I see on my weatherlink live.

the first Tw value seems to match the value on the weather link live app.

so I don't know where you think you have gone wrong.
the davis calculation seems to be correct.

Now the discussion starts which calculation is the moste correct. interesting stuff.

Thanks again, learning day per day.

Re: current conditions block wet bulb temp

Posted: Wed Mar 09, 2022 10:13 pm
by Meteofabro
davidefa wrote: Wed Mar 09, 2022 5:49 pm The 'absolute to relative offset' is the same offset to convert your weather station absolute to relative pressure .
If you don't have to input it in your weather station/weather software you can calculate it with the keisan calculator ( or something like that )
The offset is the difference between the sea level pressure and the absolute pressure ( a positive number )


pofs.png
Thank you