cloudy cloudy

Author Topic: WxSim Temperature Forecast Comparison Script  (Read 174061 times)

0 Members and 1 Guest are viewing this topic.

Offline broadstairs

  • Stuart
  • Posts: 6,945
  • Broadstairs, Kent, UK
    • Broadstairs
Re: WxSim Temperature Forecast Comparison Script
« Reply #30 on: February 13, 2009, 08:46:35 AM »
Henrik mine is the correct way round, however mine are all positive numbers so I wonder if the script is not correc tly checking the negative values?

On a slightly different thought, I have asked Brian (in suggestions) for a new %mintempovernight% tag which is from 6pm to 6am (the current one if for folks with 9am reset which runs from 9pm to 9am) so we can use it in the compare script. The reason for this is that I do have overall min temps which happen in daytime especially in winter and that's not a fair comparison with a forecast which is predicting an overnight low..

Stuart

Offline jmcmurry

  • Jim McMurry
  • Posts: 2,799
  • Mauston, WI, USA
    • Juneau County Weather
Re: WxSim Temperature Forecast Comparison Script
« Reply #31 on: February 13, 2009, 02:00:09 PM »
Hi Jim

Im not sure the script is working correct - it seems that WXSIM (SL) and Wunderground (WU) MAX and MIN are in the wrong place.

MAX should  be MIN and vice versa.

Would you take a look here and see if you agree with me:

http://www.silkeborg-vejret.dk/english/compare.php

Henrik,

I just looked at your data for today and it appears that the WU highs/lows are correct, but the WxSim ones are backwards.  Is that what you're seeing?  Is it possible that you're running this script before the new plaintext.txt has been uploaded to the server?  If that were the case, the first item found from plaintext-parser would be a low and things would be out of sync.  The differences from actual seem to be calculated correctly with the negative temps, so that is good.

That makes me realize something though, right now this is a "daytime forecast only" script.

Thanks.  - Jim
Forum Search and Google can be your best friends

 Home of NSLog NexStorm Lightning Data Manager

Offline jwwd

  • WML testers
  • Posts: 3,692
  • Silkeborg, Denmark (56:10:58 N-09:30:26 E) - Elevation 75,35 meters
    • Weather at Silkeborg, Denmark
Re: WxSim Temperature Forecast Comparison Script
« Reply #32 on: February 13, 2009, 03:33:50 PM »
Hi Jim

Thanks for your reply.

You are right - its my WXSIM that are backwards.

I upload plaintext.txt 6 times a day - and I have setup a cronjob to run the compare script every night at 23.11 (1 hour after last upload of plaintext.txt)

I upload plaintext.txt at 04,07,10,13,16,19 and 22 hour.

Am I doing something wrong?

Best regards,

Henrik

Offline jmcmurry

  • Jim McMurry
  • Posts: 2,799
  • Mauston, WI, USA
    • Juneau County Weather
Re: WxSim Temperature Forecast Comparison Script
« Reply #33 on: February 13, 2009, 03:39:23 PM »
Hi Jim,

One minor issue I'm trying to overcome, the ole validation problem. On your regular page your site validates, on the sample in the package you get the same errors I'm getting. It appears calling the script in the page twice screws things up. I've actually found a work around which validates but it involves uploading the forecast-compare-include script just with a different name, but I think this will be confusing to others as it changes the log call too! So anyway what is your trick on your page that allows it to validate?

Thanks,

Jack

Jack,

I figured out what this problem is, we can't use the selectors more than once on a page, so you'll have to turn them off in one of your configs.  That's ok because both of the scripts will react to the selector values anyway.  Another possibility might be to put each of them in a different iframe.  I haven't tried that, but then they should be discreet I would think.  The fixed size of the iframe might be a problem though unless you want scroll bars to show up.

- Jim
Forum Search and Google can be your best friends

 Home of NSLog NexStorm Lightning Data Manager

Offline BfdWx

  • Posts: 1,605
  • Branford Connecticut
    • Southern CT Weather
Re: WxSim Temperature Forecast Comparison Script
« Reply #34 on: February 13, 2009, 03:43:48 PM »
Hi Jim,

Ok, I might use my "other" solution which is to rename the forecast compare include and then I just changed the id on the selectors. I'll have to try your solution too. Thanks.

Jack

Offline jmcmurry

  • Jim McMurry
  • Posts: 2,799
  • Mauston, WI, USA
    • Juneau County Weather
Re: WxSim Temperature Forecast Comparison Script
« Reply #35 on: February 13, 2009, 03:45:52 PM »
Hi Jim

Thanks for your reply.

You are right - its my WXSIM that are backwards.

I upload plaintext.txt 6 times a day - and I have setup a cronjob to run the compare script every night at 23.11 (1 hour after last upload of plaintext.txt)

I upload plaintext.txt at 04,07,10,13,16,19 and 22 hour.

Am I doing something wrong?

Best regards,

Henrik

Henrik,

That won't work because this script will only look at the current forecasts that the two systems are showing at that partucular time.  You should set this logging to happen shortly after one of your plaintext.txt files has been uploaded.  You can, however, set up to track more than one of these forecasts and we're getting the bugs worked out of that.  I hope to have an update out soon after I review the changes that I've made which are mostly documentation.

- Jim
Forum Search and Google can be your best friends

 Home of NSLog NexStorm Lightning Data Manager

Offline pinto

  • Posts: 766
  • Belgium
    • weather station Kampenhout
Re: WxSim Temperature Forecast Comparison Script
« Reply #36 on: February 13, 2009, 03:48:17 PM »
Hi Henrik,
May I say, it is not correct to do so.
First thing you have to know is: When is the forecast made for your location by WU.
Then you know at what time you have to run WXSIM and after that make the log.
Otherwise you are comparing a forecast made at say 01:00 with one made at 13:00
You have to make sure the two are made around the same time, else your comparison is not correct.

Offline jwwd

  • WML testers
  • Posts: 3,692
  • Silkeborg, Denmark (56:10:58 N-09:30:26 E) - Elevation 75,35 meters
    • Weather at Silkeborg, Denmark
Re: WxSim Temperature Forecast Comparison Script
« Reply #37 on: February 13, 2009, 03:52:46 PM »
Hi Jim and Josef

Thanks for your replies - I will find a time that WU is updated and adjust my WXSIM to that time and then shortly after -I will run the cronjob.

In that way if should work - right?

Best regards,

Henrik

Offline pinto

  • Posts: 766
  • Belgium
    • weather station Kampenhout
Re: WxSim Temperature Forecast Comparison Script
« Reply #38 on: February 13, 2009, 04:06:03 PM »
in my opinion, yes
BTW I'm trying to find the correct time to do so myself.

I set up a second logfile that logs everything every hour, so I can see when WU changes, then I will run WXSIM at that time and make the logfile

And you can also see that if I pick the right time, I can easily cheat  8O
« Last Edit: February 14, 2009, 01:24:17 PM by pinto »

Offline broadstairs

  • Stuart
  • Posts: 6,945
  • Broadstairs, Kent, UK
    • Broadstairs
Re: WxSim Temperature Forecast Comparison Script
« Reply #39 on: February 13, 2009, 05:15:17 PM »
When I enter the URL I use in the script for WU and display the page in a browser it shows at the top of the forecast the last updated time so it should be easy to sort out. In my case right now at 17:15 GMT it says last updated at 12:00 PM GMT.

Stuart

Offline jmcmurry

  • Jim McMurry
  • Posts: 2,799
  • Mauston, WI, USA
    • Juneau County Weather
Re: WxSim Temperature Forecast Comparison Script
« Reply #40 on: February 13, 2009, 05:52:44 PM »
New version 1.2 has been posted to the .zip.  It mostly clarifies the documentation and examples, and gets rid of the "vanilla" forecast.log example which was confusing to us all.  That log is still supported in the script however.  It won't hurt to update your forecast-compare-include.php so we're sure we're all on the same sheet of music.  I don't think I made any changes to it other than a couple comments though.

Stuntman, can you give this a try when you get a chance?  You're really helping me debug the hardest part, the documentation.  The documentation didn't transition very well when I added the capability for multiple forecasts.

Two questions for those interested:

With multiple forecasts on a page, one selector set that changes all the forecasts on the page the same way (as it is now), or just change that particular forecast and leave the rest stay as they were?  I think I can code it so they each use unique id's so only that one would change, and also send a unique value so the page could return to a named anchor on the calling page if that were desired.

Is anyone going to want to track night forecasts?  If so, I could swap the High and Low headings at a certain time if we know when the various forecasts transition.

- Jim
« Last Edit: February 13, 2009, 07:17:28 PM by jmcmurry »
Forum Search and Google can be your best friends

 Home of NSLog NexStorm Lightning Data Manager

Offline Stuntman

  • Posts: 776
  • Hemet, California USA
    • Hemet Weather
Re: WxSim Temperature Forecast Comparison Script
« Reply #41 on: February 13, 2009, 06:06:21 PM »
Stuntman, can you give this a try when you get a chance?  You're really helping me debug the hardest part, the documentation.  The documentation didn't transition very well when I added the capability for multiple forecasts.
Thanks for the extra work!  Your extra notes and comments helped a LOT!!!  I believe I have it working now (Will run @ 10:55 and 14:55) today.. I'll need to consider what are the best times for "Morning" and "Afternoon"...  I'll let you know how it goes!

Thanks again!

Offline BfdWx

  • Posts: 1,605
  • Branford Connecticut
    • Southern CT Weather
Re: WxSim Temperature Forecast Comparison Script
« Reply #42 on: February 13, 2009, 06:09:15 PM »
Jim,

I would go/stay with the one selector for all. I'm not sure the average visitor will mess with that too much anyway, would think the page owner will be doing most of the digging so to speak. I think I am going to make an unpublished page that will show the entire chart any way. It seems most that use the templates will have issues with showing huge charts too! Just my opinion its such a cool script that I look forward to filling the charts and looking at the data myself. BTW I would think the author of wxsim (Tom) would be interested in this script and the sites using it too!

Regards,

Jack

Offline broadstairs

  • Stuart
  • Posts: 6,945
  • Broadstairs, Kent, UK
    • Broadstairs
Re: WxSim Temperature Forecast Comparison Script
« Reply #43 on: February 13, 2009, 07:10:28 PM »
Jim,

I would go/stay with the one selector for all. I'm not sure the average visitor will mess with that too much anyway, would think the page owner will be doing most of the digging so to speak. I think I am going to make an unpublished page that will show the entire chart any way. It seems most that use the templates will have issues with showing huge charts too! Just my opinion its such a cool script that I look forward to filling the charts and looking at the data myself. BTW I would think the author of wxsim (Tom) would be interested in this script and the sites using it too!

Regards,

Jack

I agree with Jack over public pages, I dont intend to have one. I'll be the one using the script to check on how my WXSim forecasts measure up, especially as I do have some WXSim forecast problems because of my location. I agree that this is something we should bring to Tom's attention and maybe those of us who dont have publicly linked pages could let him have details if he wishes to access it.

Stuart

Offline pinto

  • Posts: 766
  • Belgium
    • weather station Kampenhout
Re: WxSim Temperature Forecast Comparison Script
« Reply #44 on: February 13, 2009, 07:24:50 PM »
When I enter the URL I use in the script for WU and display the page in a browser it shows at the top of the forecast the last updated time so it should be easy to sort out. In my case right now at 17:15 GMT it says last updated at 12:00 PM GMT.

Stuart
mine says 01:00pm CET, but it is only at 07:00pm I can log something from the new forecast on my site, so it takes 6 hours  #-o
~~>run wxsim at 01:00pm and wait for 6 hours to make a log ?
And same thing for the morning forecast------

I'm thinking to much, I'm confused now.

 

cumulus