WXforum.net
May 19, 2013, 03:36:11 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
Members: 6609  •  Posts: 178267  •  Topics: 18102
Please welcome TargY, our newest member.
Welcome to the the new hosting for WXforum.net.
 
   Home   Help Search Login Register  
Pages: [1]   Go Down
  Print  
Author Topic: "Days Since Last Rain" incorrect  (Read 348 times)
0 Members and 1 Guest are viewing this topic.
ingogliar
Member
*
Offline Offline

Posts: 15



« 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
Logged
saratogaWX
Administrator
Forecaster
*****
Offline Offline

Posts: 3729


Saratoga, CA, USA Weather - free PHP scripts


WWW
« 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:
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 Sad

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
ingogliar
Member
*
Offline Offline

Posts: 15



« 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)?
Logged
saratogaWX
Administrator
Forecaster
*****
Offline Offline

Posts: 3729


Saratoga, CA, USA Weather - free PHP scripts


WWW
« 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
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
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.093 seconds with 18 queries.
anything