Author Topic: "Days Since Last Rain" incorrect  (Read 1712 times)

0 Members and 1 Guest are viewing this topic.

Offline ingogliar

  • Senior Member
  • **
  • Posts: 60
"Days Since Last Rain" incorrect
« on: July 13, 2012, 09:23:45 AM »
Would anyone have suggestions as to why my "Days since Last Rain" [wxtrends.php] data is incorrect (it is stuck in May). I am using the Meteohub (SheevaPlug) with the Saratoga USA Base Template.

Everything else is fine - it is driving me crazy!

Many thanks for any suggestions.

http://heightsweather.info/wxtrends.php

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9257
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: "Days Since Last Rain" incorrect
« Reply #1 on: July 13, 2012, 11:08:58 AM »
Sadly, it's an issue with the data that Meteohub doesn't provide.  I'd tried to calculate it using (in MH-defs.php)
Code: [Select]
if(substr($WX['year1_rain0_ratemax_time'],0,4) > '2010') { // got a last rain valid date
 $dateoflastrainalways = MHdateOnly($WX['year1_rain0_ratemax_time'],$SITE['WDdateMDY']);
 $timeoflastrainalways = MHtimeOnly($WX['year1_rain0_ratemax_time']);

 //$dayswithnorain = intval((strtotime(date('Y-m-d'))-strtotime(MHISOdateOnly($WX['year1_rain0_ratemax_time']))-1)/86400);
}
but the $WX['year1_rain0_ratemax_time'] only changes when the maximum rate for a storm is larger than the prior one, and not the actual date of the last rain -- there is no Meteohub tag with that data, so the line computing $dayswithnorain is commented out.

If Meteohub provided the data reliably, it would have been presented :(

Best regards,
Ken
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 ingogliar

  • Senior Member
  • **
  • Posts: 60
Re: "Days Since Last Rain" incorrect
« Reply #2 on: July 13, 2012, 12:07:13 PM »
Ken,

Thank you very much, anyway! You are always so "right on top" of everything. Again, thanks! (maybe someday).

Is there a way to suggest this to them (nobody seems to respond on their forum)?

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9257
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: "Days Since Last Rain" incorrect
« Reply #3 on: July 13, 2012, 12:31:51 PM »
I do wish there was a reliable way to have Boris respond on the Meteohub forum .. so far, I've not found an effective alternative, so I recommend you post it on the Meteohub forum under feature requests.

Best regards,
Ken
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