WeatherDuino Forum
THW and THSW index - Printable Version

+- WeatherDuino Forum (https://www.meteocercal.info/forum)
+-- Forum: Weather Stations - WeatherDuino Pro2 Line (https://www.meteocercal.info/forum/forum-4.html)
+--- Forum: General Talking (https://www.meteocercal.info/forum/forum-23.html)
+--- Thread: THW and THSW index (/thread-1277.html)



THW and THSW index - hornychz - 24-10-2017

Hello,

I'd like to ask if somebody has THW or/and THSW index value on his web page?

Maybe Cumulus can count THW index and CumulusMX  should be able to count THSW index.
But I'm convinced he can not do it. Probably does not help that WeatherDuino knows LOOP2.
But maybe I'm wrong?

In particular, the calculation for the THW index is not complicated, but it's about whether someone already
has a php script. Input variables might be obtained using webtags.

I can hardly program programming (even in php), so I wonder if anyone has something similar already done?


RE: THW and THSW index - laulau - 24-10-2017

Hi Zdenek,
If I remember correctly, there were discussions on this topic in the Cumulus forum.
Perhaps something to be learned from there.


RE: THW and THSW index - hornychz - 25-10-2017

(24-10-2017, 22:39)laulau Wrote:  Hi Zdenek,
If I remember correctly, there were discussions on this topic in the Cumulus forum.
Perhaps something to be learned from there.

Hi laulau,

I just tried to study the discussion - I worked for a few days - but totally unsuccessful ...
And I repeat - I am convinced that CumulusMX does not know.


RE: THW and THSW index - hornychz - 31-10-2017

Hi,

So I had to write a php script myself. And it seems that it even works (he's so terribly simple).  Smile

[Image: THWandTHSWindex.jpg]

If anyone would be sitting on this "piece", I attach the code. I just remind you that it's for CumulusMX
to place it into html code on your local server (Raspbian???). From the script, it's possible to throw away
many things (definition of empty variables, calculation of what I do not need, comments, etc.).
 
Code:
<?php
//
/* THW and THSW calculation*/
//
$Ta = <#temp>;          /* Dry bulb temperature [°C] */
$e = 0;                 /* Watter vapour pressure [hPa] (humidity) */
$ws = <#wspeed>;        /* Wind speed [m/s] at an elevation of 10 meters */
$rh = <#hum>;           /* Relative humidity [%] */
$Q = <#SolarRad>;       /* Net radiation absorbed per unit area of body surface [w/m2] */
$ATthw = 0;             /* Temperature - humidity - wind index */
$ATthsw = 0;            /* Temperature - humidity - solar - wind index */
//
$e = ($rh / 100) * 6.105 * exp (17.27 * $Ta / (237.7 + $Ta));
//
$ATthw = $Ta + 0.33 * $e - 0.70 * $ws - 4.00;
$ATthwr = round($ATthw, 1);
//
$ATthsw = $Ta + 0.348 * $e - 0.70 * $ws + 0.70 * $Q / ($ws + 10) - 4.25;
$ATthswr = round($ATthsw, 1);
//
echo "$ATthwr"."<br />";
echo "$ATthswr"."<br />";
?>



RE: THW and THSW index - danner - 02-11-2017

neat!


RE: THW and THSW index - Segall - 02-11-2017

Great stuff, Zdenek. Thanks for sharing.


RE: THW and THSW index - hornychz - 11-12-2021

Hello,

After discussing with our new user, I'm adding a test spreadsheet for self-validation of the formula.

   

.xlsx Vypocet_THWaTHSW.xlsx Size: 10,77 KB  Downloads: 111