This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
THW and THSW index
#1
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?
Best Regards
Zdenek

[Image: banner.php]
My outdoor AQM-I: here
Reply
#2
Hi Zdenek,
If I remember correctly, there were discussions on this topic in the Cumulus forum.
Perhaps something to be learned from there.
Laurent

Reply
#3
(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.
Best Regards
Zdenek

[Image: banner.php]
My outdoor AQM-I: here
Reply
#4
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 />";
?>
Best Regards
Zdenek

[Image: banner.php]
My outdoor AQM-I: here
Reply
#5
neat!
Reply
#6
Great stuff, Zdenek. Thanks for sharing.
Reply




Users browsing this thread: 1 Guest(s)