cloudy cloudy

Author Topic: Forecast Compare script Help  (Read 1832 times)

0 Members and 1 Guest are viewing this topic.

Offline PernicketyPete

  • Posts: 53
  • Chilthorne Domer, Somerset, UK
  • OS/Browser:
  • Win 7/Srvr 2008R2
  • Chrome 44.0.2403.107
    • Chilthorne Weather
Forecast Compare script Help
« on: July 26, 2015, 12:57:03 PM »
Hello All
I need a little help and guidance with Jims Forecast Compare script. Hoping someone can point me in the right direction.
I have the script up and running - everything looks fine?
I am running wxsim at 02:00, 05:00, 08:00, 11:00, 14:00, 17:00, 20:00, and 23:00. My "plaintext.txt" is uploaded on the half hour after wxsim is run. I would like to compare the 05:00 and 17:00 wxsim forecasts.

So here's the question. At what time should I run "fc-LogTemps.php", also if comparing these two forecasts when would be the best time to run "forecast-compare-include.php?log&config=am" and "pm"? 

At present, I'm running "forecast-compare-include.php?log&config=am" manually at anytime between the 05:30 and 08:00, and "pm" at any time between 17:30 and 20:00 (but not always as Sometimes I forget). I have setup cronjobs for the "fc-LogTemps.php" and these run at 07:00 23:55. I can't get cronjobs to work with the "forecast-compare-include.php?log&config=am" and "pm". (Any ideas? I have looked at the links in the read me but no joy :(

Despite all this indecision things look pretty good, with plenty of green boxes :) The page can be seen here "http://www.chilthorneweather.co.uk/WD/ForecastCompare/test-fc.php?lang=xx"

One more question. I am using "yrfcst.php" to do the compare bit, that works fine. I have changed the text in the "fc-language.php" file and can reference this in the url with this "?lang=xx". But is there a way to reference this change within the script?

Many thanks Pete
Weather data supplied by Chilthorne Weather.
Visit www.chilthorneweather.co.uk for live weather information from Chilthorne Domer, Somerset.

Offline jmcmurry

  • Jim McMurry
  • Posts: 2,799
  • Mauston, WI, USA
  • OS/Browser:
  • Win XP
  • Firefox 39.0
    • Juneau County Weather
Re: Forecast Compare script Help
« Reply #1 on: July 26, 2015, 02:39:06 PM »
Pete,

I'm glad to see that you have the script running so well. 

Normally you would want to run "forecast-compare-include.php?log&config=am" and "pm" shortly after plaintext.txt is available so that you're comparing with the current yrno forecast.  In this case though, I think you should delay until after you've run fc-LogTemps.php.  "fc-LogTemps.php" should be run in the morning at a time when you've experienced the night's low, and again in the evening after you've experienced the day's high temp.  This is explained probably a little bit better in the comments at the beginning of fc-LogTemps.php.

I use System Scheduler, so I can't help with your cron question.  Perhaps someone else will have an answer to that.

Quote
But is there a way to reference this change within the script?

There shouldn't be any need to change within the script.  What are you wishing to see different?  Oh, if you're talking the text at the top of your test page, that is just a change to that html code.

- Jim
Forum Search and Google can be your best friends

 Home of NSLog NexStorm Lightning Data Manager

Offline PernicketyPete

  • Posts: 53
  • Chilthorne Domer, Somerset, UK
  • OS/Browser:
  • iOS 8.3
  • Safari 8.0
    • Chilthorne Weather
Re: Forecast Compare script Help
« Reply #2 on: July 28, 2015, 05:23:09 PM »
Hi Jim
Thanks for the reply.
Following your advice I am now going to compare the 08:00 & 20:00 forecasts as I think by 08:00 I will have experienced the overnight low.
So I will be running fc-LogTemps.php at 08:45 & 23:55, and forecast-compare-include.php "am" at 09:00 & "pm" at 21:00. Does this sound ok?

I have had another look at the links in the readme about cron jobs, and think I now have it sorted. A fresh look is always worth a go.!  :)

My question about referencing the language file was just to see if there was a way of achieving the same thing without appending the url.

Thanks for time. Cheers Pete
Weather data supplied by Chilthorne Weather.
Visit www.chilthorneweather.co.uk for live weather information from Chilthorne Domer, Somerset.

Offline jmcmurry

  • Jim McMurry
  • Posts: 2,799
  • Mauston, WI, USA
  • OS/Browser:
  • Win XP
  • Firefox 39.0
    • Juneau County Weather
Re: Forecast Compare script Help
« Reply #3 on: July 28, 2015, 06:00:10 PM »
Pete,

I'd move your second fc-LogTemps to a time prior to your 21:00 comparison.  That day's high temp needs to be available to be filled in for the prior day's forecast when that comparison is run.

- Jim
Forum Search and Google can be your best friends

 Home of NSLog NexStorm Lightning Data Manager

Offline PernicketyPete

  • Posts: 53
  • Chilthorne Domer, Somerset, UK
  • OS/Browser:
  • Win 7/Srvr 2008R2
  • Chrome 44.0.2403.107
    • Chilthorne Weather
Re: Forecast Compare script Help
« Reply #4 on: July 28, 2015, 09:36:27 PM »
Jim
Have made the change as advised.

Many thanks Pete
Weather data supplied by Chilthorne Weather.
Visit www.chilthorneweather.co.uk for live weather information from Chilthorne Domer, Somerset.

Offline jmcmurry

  • Jim McMurry
  • Posts: 2,799
  • Mauston, WI, USA
  • OS/Browser:
  • Win XP
  • Firefox 39.0
    • Juneau County Weather
Re: Forecast Compare script Help
« Reply #5 on: July 28, 2015, 10:19:57 PM »
Great, let me know if you have any problems.

- Jim
Forum Search and Google can be your best friends

 Home of NSLog NexStorm Lightning Data Manager

 

cumulus