cloudy cloudy

Author Topic: 3in1 no rainfall on graph  (Read 1647 times)

0 Members and 1 Guest are viewing this topic.

Offline ardsar

  • Posts: 127
    • Plymouth, Devon Weather, including Lightning
3in1 no rainfall on graph
« on: October 12, 2015, 10:01:39 PM »
I've finally got this script "working" apart from getting the rainfall bars to show on the graph.

I've checked the WRET settings, PTOT is being included in the lastret.txt and on the hour data is included.

Any ideas?

www.bearsbythesea.co.uk/wxsimforecast2.php



Sent from my iPhone using Tapatalk
« Last Edit: October 12, 2015, 10:04:54 PM by ardsar »
Plymouth Weather UK, including Lightning data

www.bearsbythesea.co.uk

Offline ardsar

  • Posts: 127
  • OS/Browser:
  • Win 7/Srvr 2008R2
  • Chrome 45.0.2454.101
    • Plymouth, Devon Weather, including Lightning
Re: 3in1 no rainfall on graph
« Reply #1 on: October 13, 2015, 08:35:27 AM »
Solved.

I missed changing line 344 from 74 to 120 as detailed below.

I had made the change to line 414 only which resulted in the 5 days in the graph but only 3 days for the rain.

Hope this helps others.


In "wxall.lastret.php"

Line: 344 and 347 From;
Code: [Select]
    if(date("i",$line[time])=="00"&&$hr1<74){
      $jst = (($line[time]+$utcdiff)*1000);
      $precjson[]= array($jst,round($line[prectot],1));
      $prectip[(string)$jst-7400000]= round($line[prectot],1);
      $prectip[(string)$jst-360000]= round($line[prectot],1);
      $prectip[(string)$jst]= round($line[prectot],1);

To whatever you want; Below 222 does 9 Days (WXSIM has to be changed to 9 Days - although it only optimises 144hrs)
Code: [Select]
    if(date("i",$line[time])=="00"&&$hr1<222){
      $jst = (($line[time]+$utcdiff)*1000);
      $precjson[]= array($jst,round($line[prectot],1));
      $prectip[(string)$jst-22200000]= round($line[prectot],1);
      $prectip[(string)$jst-360000]= round($line[prectot],1);
      $prectip[(string)$jst]= round($line[prectot],1);

and Line 414 From;
Code: [Select]
  if(date("i",$line[time])=="00"&&$hr1<74){

« Last Edit: October 13, 2015, 08:38:03 AM by ardsar »
Plymouth Weather UK, including Lightning data

www.bearsbythesea.co.uk