WxSim Temperature Forecast Comparison Script

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

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.

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

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

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

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

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!

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

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.

Yes well I’ve not yet checked this for my location against when I run WXSim, I need to monitor it for a while to see…

Stuart

That would be interesting to him, I’d imagine… I wonder if there is any way to database this rather than use log files? I know this would add a whole new level of complication… but it could also add flexibility in that the data could be retrieved in numerous ways and for numerous different projects related to this… perhaps a graph or something where we could see deviations visually…

Just thinkin’

I know… I just got it working and only have a single a.m. logged, and here I am thinking ‘what else’…
#-o

Based on all your remarks, I just sent Tom an EMail with a link to this thread so he can catch up when he gets a chance.

As for other uses of the data, you can set how many days it is kept and it’s in a comma delimited format that can easily be used elsewhere. I imagine someone sharp might be able to come up with a jpgraph or something.

  • Jim

Hi!

Having under work a mod to Jim’s compare-script so it uses Norwegian Meteo-instuitute’s (yr.no)* forecast instead of WU to comapre with. Its still in a early BETA-stage and first run will be done today, so not much yet but test runs seemed to work well. :smiley:

Its here: http://www.nordicweather.net/index.php?sivu=46&lang=en

For interested, it will be easily shared when I see it works.

  • yr.no provide free php-scripts, xml-feeds etc. for using on websites :smiley:

Cheers!
Henkka

First thank you for the great script…I have the script on my site here http://www.i40exit319weather.com/wxforecast-comparison.php. How can I reduce the size of the forecast comparison so it will fit on my page? I noticed other sites have accomplished this…just hoping someone can point me in the right direction.

I’m also having a validation issue and I’m sure it is the way I’m calling the script into my page. I have included what I’m currently using below. Any advice would be appreciated.

WxSim & NWS Forecast Comparison

National Weather Service (NW), Actual Observed (Act), WxSim Generated (WS)
	<?php 
		$_REQUEST['config'] = 'am';                       
		include("forecast-compare-include.php");          // will show forecastAM.log
	?>
		

	<?php	
		$_REQUEST['config'] = 'pm';
		include("forecast-compare-include.php");          // will show forecastPM.log		

/*
$_REQUEST[‘config’] = ‘pm’;
$_REQUEST[‘lang’] = ‘xx’; // optional language
include(“forecast-compare-include.php”);
*/
?>

Thanks
Ronnie

Ronnie,

In the fc-config file make this “3”;

$Danaldays   = "4";                      // Default number of days to display horizontally

Jack

Thank you Jack…fits the page now…now on to the valadation issue.

Ronnie

Ronnie,

Jack is right, that’s about the only way to make it smaller unless you want to add some css to the

that it’s in to use a smaller font size. Don’t worry about the validation, all of those errors are because you have the two tables on the same page and my next version will cure that. I’ve just got one stumbling block left that I’m working on.

  • Jim

Good afternoon Jim…thank you for the response and the info…

Ronnie

I’ve just uploaded version 1.3

1.3 - 02-14-09 - Fixed duplicate $showStats variable and changed selectors so that multiple instances will work independently and validate.
Added support for named anchors and added examples to test-fc.php.
Fixed displaying problem when intalled to a special folder.

Present users should change one line in their config file(s)


$showStats    = true;                     // Default whether to show the percent and standard deviation rows

to

$showComp    = true;                     // Default whether to show the percent and standard deviation rows

in the Storage/Display section, not the Selectors section.

Thanks. - Jim