WXforum.net
May 24, 2013, 02:34:58 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
Members: 6620  •  Posts: 178787  •  Topics: 18139
Please welcome moranbahweather, our newest member.
Welcome to the the new hosting for WXforum.net.
 
   Home   Help Search Login Register  
Pages: [1]   Go Down
  Print  
Author Topic: Temperature and appreciation  (Read 790 times)
0 Members and 1 Guest are viewing this topic.
druss67
Member
*
Offline Offline

Posts: 12



« on: May 29, 2012, 03:10:33 PM »

Hi,

I have noticed that temperature and appreciation are not aligned.
For example an external temperature 22,3°C (54,3°F) is tagged as cold.

Have you the same ?

Best regards,
Druss
Logged
saratogaWX
Administrator
Forecaster
*****
Online Online

Posts: 3748


Saratoga, CA, USA Weather - free PHP scripts


WWW
« Reply #1 on: May 29, 2012, 03:58:34 PM »

It would help to have the URL of your weather website .. hard to diagnose an issue from just a screen-capture image Sad
Logged

Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis Vantage Pro Plus - FARS, Boltek-PCI/NexStorm, GRLevel3, WD, WL, VWS, Cumulus, Meteohub
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP
druss67
Member
*
Offline Offline

Posts: 12



« Reply #2 on: May 30, 2012, 06:18:49 AM »

Hi,

I beg your pardon, herewith link to my site http://druss.alwaysdata.net/meteo/wxindex.php

Best regards,
Régis
Logged
DanS
Chiang Mai weather
Forecaster
*****
Offline Offline

Posts: 4305



WWW
« Reply #3 on: May 30, 2012, 06:34:09 AM »


For example an external temperature 22,3°C (54,3°F) is tagged as cold.


To me '54,3F' is cold. I believe you meant 72.1F.  Smile
Logged

Dan ThaiWx website
WS-2310/2810 WUHU WinXP 24/7
druss67
Member
*
Offline Offline

Posts: 12



« Reply #4 on: May 31, 2012, 06:24:24 AM »

Yes, you are right, 22,3°C = 72,1°F, and for me this is not cold...
Logged
saratogaWX
Administrator
Forecaster
*****
Online Online

Posts: 3748


Saratoga, CA, USA Weather - free PHP scripts


WWW
« Reply #5 on: June 01, 2012, 01:58:08 PM »

Looks like it's working correctly now.  I think that you just needed to run Meteohub for 24 hours so a yesterday.php file with your metric units could be captured.  The original display was showing the yesterday.php information from the template distribution (which had Imperial units and values from my station).

I've added your site to the list of template sites Smile

Best regards,
Ken
Logged

Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis Vantage Pro Plus - FARS, Boltek-PCI/NexStorm, GRLevel3, WD, WL, VWS, Cumulus, Meteohub
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP
druss67
Member
*
Offline Offline

Posts: 12



« Reply #6 on: June 02, 2012, 04:41:17 AM »

Hi SaratogaWX,

thanks you for adding my sites to the templates  Laughing

But, appreciation is linked to the actual temperature, I presume.
So, why for a temperature of 22.6°C (72.6°F) appreciation is cold (screen2).

For example if you look at this site, http://www.weerstation-wilsele.be/weather/index.php?p=10&lang=en
temperature 22.3°C (72.1°F) is tagged comfortable... (screen3)

And I am sure that's some month ago it was good...

Sorry if I have missed something but I can't understand why...    

Druss
« Last Edit: June 02, 2012, 04:49:47 AM by druss67 » Logged
saratogaWX
Administrator
Forecaster
*****
Online Online

Posts: 3748


Saratoga, CA, USA Weather - free PHP scripts


WWW
« Reply #7 on: June 02, 2012, 03:19:23 PM »

If you look at http://www.weerstation-wilsele.be/weather/index.php?p=84 for status, you'll see
Quote
Current status of the weather systems used in the operation of this website

This station uses Meteohub (4.9i b6662) software for weather conditions reporting
This software runs on a ALIX.1D (500 MHz) computer.
Component    Status    Age h:m:s   Latest update time as of 02-06-2012 21:15
Meteohub realtime    NOT Current    143:35:18    > 0:01:30 27-05-2012 21:40
Meteohub weatherfiles    NOT Current    143:35:18    > 0:02:30 27-05-2012 21:40
Meteohub graphs    NOT Current    143:45:18    > 1:00:30 27-05-2012 21:30
Meteohub weather data    NOT Current    143:36:55    > 0:02:30 27-05-2012 21:39
which indicates that the FTP upload of your files is not currently working, so you're really displaying data from  27-05-2012  21:39.  That is likely the cause of the incorrect displays.

Best regards,
Ken
Logged

Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis Vantage Pro Plus - FARS, Boltek-PCI/NexStorm, GRLevel3, WD, WL, VWS, Cumulus, Meteohub
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP
druss67
Member
*
Offline Offline

Posts: 12



« Reply #8 on: June 02, 2012, 05:07:12 PM »

Hi Ken,

previous site was an example, there is no FTP issue on my site, look at screen4 in attachment.

My problem is sensation is always tagged as "cold" even when the temperature is hot.

Sorry if I put you in a bad way...  Confused , my English is not very good.

How sensation is "calculate" it came from meteohub or from the script...

Best regards,
Druss
Logged
saratogaWX
Administrator
Forecaster
*****
Online Online

Posts: 3748


Saratoga, CA, USA Weather - free PHP scripts


WWW
« Reply #9 on: June 02, 2012, 06:02:55 PM »

No apologies for your English are necessary .. you are quite understandable Smile

Sorry that I'd assumed the example site in the post above was a link to your site at http://druss.alwaysdata.net/meteo/wxindex.php

The conditions color word is set by:

1) The PHP ajax-dashboard.php Version 1.21 - 01-Oct-2011 uses
Code:
<span class="ajax" id="ajaxheatcolorword">
                    <?php  langtrans($heatcolourword); ?></span>
to display the color word.

2) the PHP value for $heatcolourword comes from the MH-defs.php (for the Meteohub plugin) which has
Code:
list($feelslike,$heatcolourword) = MH_setFeelslike ($temperature,$windch,$heati,$uomtemp);
to set both the feelslike and heatcolorword based on the temperature, windchill, heatindex and units-for temp.

3) the MH-defs.php file has the following mappings for those items to your Meteohub tags data
Code:
$temperature = $WX['actual_th0_temp_c'];
$windch = $WX['actual_wind0_chill_c'];
$heati = $WX['actual_th0_heatindex_c'];
if(isset($WX['actual_system_temp_unit'])) { $uomtemp = $WX['actual_system_temp_unit']; }

4) your MHtags.php?sce=dump shows the following values
Code:
$WX['actual_th0_temp_c'] = '16.5';
$WX['actual_wind0_chill_c'] = '0.0';
$WX['actual_th0_heatindex_c'] = '16.5';
$WX['actual_system_temp_unit'] = 'c';

5) the MH_setFeelslike() function (which is in MH-defs.php) uses
Code:
#-------------------------------------------------------------------------------------
# MH support function - MH_setFeelslike
#-------------------------------------------------------------------------------------


function MH_setFeelslike ($temp,$windchill,$heatindex,$tempUOM) {
global $Debug;
// establish the feelslike temperature and return a word describing how it feels

$HeatWords = array(
 'Unknown', 'Extreme Heat Danger', 'Heat Danger', 'Extreme Heat Caution', 'Extremely Hot', 'Uncomfortably Hot',
 'Hot', 'Warm', 'Comfortable', 'Cool', 'Cold', 'Uncomfortably Cold', 'Very Cold', 'Extreme Cold' );

// first convert all temperatures to Centigrade if need be
  $TC = $temp;
  $WC = $windchill;
  $HC = $heatindex;
  
  if(strpos($TC,',') !== false) {
$TC = preg_replace('|,|','.',$temp);
$WC = preg_replace('|,|','.',$windchill);
$HC = preg_replace('|,|','.',$heatindex);
  }
  
  if (preg_match('|F|i',$tempUOM))  { // convert F to C if need be
$TC = sprintf("%01.1f",round(($TC-32.0) / 1.8,1));
$WC = sprintf("%01.1f",round(($WC-32.0) / 1.8,1));
$HC = sprintf("%01.1f",round(($HC-32.0) / 1.8,1));
  }
 
 // Feelslike
 
  if ($TC <= 16.0 ) {
$feelslike = $WC; //use WindChill
  } elseif ($TC >=27.0) {
$feelslike = $HC; //use HeatIndex
  } else {
$feelslike = $TC;   // use temperature
  }

  if (preg_match('|F|i',$tempUOM))  { // convert C back to F if need be
$feelslike = (1.8 * $feelslike) + 32.0;
  }
  $feelslike = round($feelslike,0);

// determine the 'heat color word' to use  
 $hcWord = $HeatWords[0];
 $hcFound = false;
 if ($TC > 32 and $HC > 29) {
if ($HC > 54 and ! $hcFound) { $hcWord = $HeatWords[1]; $hcFound = true;}
if ($HC > 45 and ! $hcFound) { $hcWord = $HeatWords[2]; $hcFound = true; }
if ($HC > 39 and ! $hcFound) { $hcWord = $HeatWords[4]; $hcFound = true; }
if ($HC > 29 and ! $hcFound) { $hcWord = $HeatWords[6]; $hcFound = true; }
 } elseif ($WC < 16 ) {
if ($WC < -18 and ! $hcFound) { $hcWord = $HeatWords[13]; $hcFound = true; }
if ($WC < -9 and ! $hcFound)  { $hcWord = $HeatWords[12]; $hcFound = true; }

if ($WC < -1 and ! $hcFound)  { $hcWord = $HeatWords[11]; $hcFound = true; }
if ($WC < 8 and ! $hcFound)   { $hcWord = $HeatWords[10]; $hcFound = true; }
if ($WC < 16 and ! $hcFound)  { $hcWord = $HeatWords[9]; $hcFound = true; }
 } elseif ($WC >= 16 and $TC <= 32) {
if ($TC <= 26 and ! $hcFound) { $hcWord = $HeatWords[8]; $hcFound = true; }
if ($TC <= 32 and ! $hcFound) { $hcWord = $HeatWords[7]; $hcFound = true; }
 }

 if(isset($_REQUEST['debug'])) {
  echo "<!-- MH_setFeelslike input T,WC,HI,U='$temp,$windchill,$heatindex,$tempUOM' cnvt T,WC,HI='$TC,$WC,$HC' feelslike=$feelslike hcWord=$hcWord -->\n";
 }

 return(array($feelslike,$hcWord));

} // end of MH_setFeelslike
to generate both the feelslike and colorword.

6) since your station's windchill is '0.0', that seems to determine why the word 'cold' (froid in French) is displaying.

7) a similar calculation is done by the AJAX routine ajaxMHwx.js on the temperature, wind-chill, heatindex values from the Meteohub clientraw.txt file.

So... the reading is likely caused by Meteohub (4.9i b1061 - SheevaPlug) not calculating the wind-chill in actual_wind0_chill_c correctly.
My older Meteohub (4.9g b1046 - SheevaPlug) is not showing this issue, so I'd suggest you report the problem to Boris on the Meteohub forum as a bug.

Hope this helps...

Best regards,
Ken


« Last Edit: June 02, 2012, 06:05:02 PM by saratogaWX » Logged

Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis Vantage Pro Plus - FARS, Boltek-PCI/NexStorm, GRLevel3, WD, WL, VWS, Cumulus, Meteohub
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP
druss67
Member
*
Offline Offline

Posts: 12



« Reply #10 on: June 04, 2012, 06:45:28 AM »

Hi Ken,

Many thanks for this clear explanation.

I try to forward this issue to the meteohub support.

Best regards,
Régis
Logged
Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.098 seconds with 18 queries.
anything