Author Topic: Feels like temps too high  (Read 1247 times)

0 Members and 1 Guest are viewing this topic.

Offline steviebaby59

  • Contributor
  • ***
  • Posts: 109
    • Empire Prairie Weather
Feels like temps too high
« on: May 25, 2018, 12:47:34 PM »
My Feels like temperatures run way too high in the peak afternoon. I've had this problem before, but forgot how I solved it. Is there any way I can have this just read the Heat Index from my meteobridge software? I've tried altering my scrips but have been unsuccessful.  :?

www.empireprairieweather.com

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9279
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Feels like temps too high
« Reply #1 on: May 25, 2018, 01:41:20 PM »
If it's the AJAX powered update to feelslike, there's a setting in ajaxMBwx.js
Code: [Select]
var useFeelslike = 1;        // =0 use HeatIndex, =1 use Humidex, =2 use apparent temperature
which defaults to using humidex.  Change it to
Code: [Select]
var useFeelslike = 0;        // =0 use HeatIndex, =1 use Humidex, =2 use apparent temperature
to use heat-index instead.

If it's not the AJAX update that is the issue, please indicate which page is showing the error (if not the index page).
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline steviebaby59

  • Contributor
  • ***
  • Posts: 109
    • Empire Prairie Weather
Re: Feels like temps too high
« Reply #2 on: May 25, 2018, 02:18:56 PM »
It was already set to 0. It is the index page that's showing the error. When you first load it, it shows the correct heat index, the it defaults to something much higher.

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9279
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Feels like temps too high
« Reply #3 on: May 25, 2018, 02:44:02 PM »
The script uses
Code: [Select]
        // FeelsLike
        temp = cTempToC(realtime[2]); // note.. temp in C
var HC = 0;
var HCraw = 0;
switch (useFeelslike) {
  case 0:
  HCraw = realtime[41]; //use HeatIndex
  break;
  case 1:
  HCraw = realtime[42]; //use Humidex
  break;
  case 2:
  HCraw = realtime[54]; //use Apparent Temperature
  break;
  default:
  HCraw = realtime[41]; //use HeatIndex (default)
  break;
}  
  var HC = cTempToC(HCraw);
        if (temp <= 16.0 ) {
  feelslike = cTempToC(realtime[24]); //use WindChill
} else if (temp >=27.0) {
  feelslike = HC; //use HeatIndex/Humidex/ApparentTemp
} else {
  feelslike = temp;   // use temperature
}
var feelslike  = Math.round(convertTempC(feelslike));
        set_ajax_obs("ajaxfeelslike",feelslike + uomTemp);
to set the feelslike.. It should be selecting realtime[41] value for the update.
Your realtime file (MBrealtime.txt) shows
Code: [Select]
25/05/2018 13:30:55 29.6 53 19.0 2.2 3.1 195.0 0.0 0.0 1008.8 SSW 2 m/s C hPa mm -- -0.8 70.6 164.1 0.0 27.7 38.0 29.6 1.7 29.6 13:29 19.7 03:24 4.5 08:11 9.4 11:48 1012.7 00:00 1008.8 13:26 3.2 11222 5.4 30.9 36.2 -- -- 1011.0 202.0 0.0 -- 1 -- SSW -- m -- 14:41 -- -- -- with realtime[41] value of 30.9C (87.62F rounded to 88F) and that's what was showing.  It is working correctly with the AJAX update.

The $heatidx is calculated by MB-defs.php via
Code: [Select]
$heatidx = MB_calcHeatIndex($temperature,$humidity,$uomtemp);
The ajax-dashboard.php displays the feelslike temperature in PHP using
Code: [Select]
<?php if(isset($feelslike)) { ?>
                  <?php langtrans('Feels like'); ?>: <span class="ajax" id="ajaxfeelslike">
    <?php echo $feelslike $uomTemp?>
</span>
  <br/><br/>
                  <?php // $feelslike ?>

and the $feelslike value comes from MB-tags.php line
Code: [Select]
list($feelslike,$heatcolourword) = MB_setFeelslike ($temperature,$windch,$heatidx,$uomtemp);

Looks like both PHP and AJAX are using the heatindex for the feelslike at this time.
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline steviebaby59

  • Contributor
  • ***
  • Posts: 109
    • Empire Prairie Weather
Re: Feels like temps too high
« Reply #4 on: May 26, 2018, 02:05:23 PM »
So are you saying everything is set right and it's working properly? My Feel like temps are still running about 10 degrees too high. Current heat index is : 100.2F. Website is showing 109F. It displays 100 when the page first loads, then shifts to 109 after fully loaded.

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9279
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Feels like temps too high
« Reply #5 on: May 26, 2018, 03:01:54 PM »
Running http://www.empireprairieweather.com/check-fetch-times.php?show=versions on your site shows some updates needed, including ajaxMBwx.js script to V4.03 - 2017-09-30.  Version 4.02 - 18-Jun-2014 -- fixed feelsLike=0 to use HeatIndex logic and you're at V4.01

Do the update and the issue should be fixed.
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline steviebaby59

  • Contributor
  • ***
  • Posts: 109
    • Empire Prairie Weather
Re: Feels like temps too high
« Reply #6 on: May 26, 2018, 11:56:28 PM »
Well, I'm sorry for being such a nuisance. I've done what you instructed and I still have the same issue.

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9279
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Feels like temps too high
« Reply #7 on: May 27, 2018, 12:13:05 AM »
Do a shift-reload of the home page.. you likely have the browser caching the old script.  I see 80 before and after the AJAX cuts in.
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline steviebaby59

  • Contributor
  • ***
  • Posts: 109
    • Empire Prairie Weather
Re: Feels like temps too high
« Reply #8 on: May 27, 2018, 11:59:07 AM »
Finally got it! Thank you so much for your help.

Offline steviebaby59

  • Contributor
  • ***
  • Posts: 109
    • Empire Prairie Weather
Re: Feels like temps too high
« Reply #9 on: May 31, 2018, 07:13:01 PM »
Well, something else weird has happened. Now it won't display any data until ajax is loaded. Then, there is no Feel like or High and Low temps.

I haven's changed anything since my last edit a few days ago.

www.empireprairieweather.com