Welcome to the new home of the Cumulus Support forum.

Latest Cumulus release v1.9.4 (build 1099) - Nov 28 2014
Latest Cumulus MX release - v3.0.0 build 3044 7 December 2018. See the Wiki for download

Yet Another Forecaster

Discussion and support for 3rd-party (non-Sandaysoft) tools for Cumulus
Post Reply
User avatar
GraemeT
Posts: 308
Joined: Wed 21 Oct 2009 11:19 am
Weather Station: La Crosse WS-2355 & WS-2306
Operating System: Windoze 7
Location: Bayswater, Australia
Contact:

Yet Another Forecaster

Post by GraemeT » Sat 08 Sep 2012 12:17 am

For a few weeks now I've been testing an alternative method of calculating a 'local' forecast.

I feel it's now at the stage for others to evaluate/use/bag or whatever.
I've put the code in a .zip file here: http://weather.gktnet.com/public/weathe ... cripts.zip

This method uses a php version of Beteljuice's Zambretti Forecaster to do the work.
The forecaster is called at 12-hour intervals as a Windows scheduled task and produces a small text file, which can be easily imported for display in a web page.

My variant of the Zambretti code returns an array to the calling php containing a forecast number (0-26) followed by the forecast description.
The forecast number can then be used to display a graphic, such as Jacques' day/night forecast set, with the description being used as a caption etc.

Here is how the scripts work:
The task scheduler task runs forecast.vbs, which calls FCast.php, which in turn calls Zambretti.php
FCast.php then writes a file called FC.txt to disk.

The only critical part is setting up a scheduled task and setting paths in the files.

I would welcome any comments, criticisms, etc.
Cheers,
Graeme.

Image

User avatar
beteljuice
Posts: 2516
Joined: Tue 09 Dec 2008 1:37 pm
Weather Station: None !
Operating System: XP SP3 - honest
Location: Dudley, West Midlands, UK

Re: Yet Another Forecaster

Post by beteljuice » Sat 08 Sep 2012 12:48 am

You forgot to mention required 'environment' eg. require_once("../cumuluswebtags.php"); ;)
and why a seperate 'flag' for forecast and number ?

As you are using php why not call once to create an array (two entries), then echo the part(s) you want ?

... but ... surely you are duplicating the Cumulus forecast, or have I missed something :?
Last edited by beteljuice on Sat 08 Sep 2012 12:54 am, edited 1 time in total.
Image
......................Imagine, what you will KNOW tomorrow !

User avatar
GraemeT
Posts: 308
Joined: Wed 21 Oct 2009 11:19 am
Weather Station: La Crosse WS-2355 & WS-2306
Operating System: Windoze 7
Location: Bayswater, Australia
Contact:

Re: Yet Another Forecaster

Post by GraemeT » Sat 08 Sep 2012 1:27 am

beteljuice wrote:You forgot to mention required 'environment'
cumuluswebtags.php is referenced in FCast.php and can be assumed to be already used in the user's webpage.
beteljuice wrote:and why a seperate 'flag' for forecast and number ?
I still have need for just the forecast number in another function I'm playing with, so setting the fcst flag signals the function to just return that value.
beteljuice wrote:call once to create an array (two entries)
(Edited out my dumbest answer ever) :oops: Yes, that might be done in the future.
beteljuice wrote:... surely you are duplicating the Cumulus forecast
The cumulus forecast changes almost every time cumulus updates and it really should be stable, so a 12-hour schedule seems the way to go, and (so far) it's been relatively close to what I'd expect for my location. (within the limits of the crystal ball)
Cheers,
Graeme.

Image

Post Reply