Welcome to the Cumulus Support forum.

Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024

Cumulus MX V4 beta test release 4.0.0 (build 4018) - 28 March 2024

Legacy Cumulus 1 release v1.9.4 (build 1099) - 28 November 2014 (a patch is available for 1.9.4 build 1099 that extends the date range of drop-down menus to 2030)

Download the Software (Cumulus MX / Cumulus 1 and other related items) from the Wiki

Yet Another Forecaster

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

Yet Another Forecaster

Post by GraemeT »

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.
User avatar
beteljuice
Posts: 3292
Joined: Tue 09 Dec 2008 1:37 pm
Weather Station: None !
Operating System: W10 - Threadripper 16core, etc
Location: Dudley, West Midlands, UK

Re: Yet Another Forecaster

Post by beteljuice »

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: 312
Joined: Wed 21 Oct 2009 11:19 am
Weather Station: La Crosse WS-2355 & WS-2306
Operating System: Windoze 7, 10, 11
Location: Bayswater, Australia
Contact:

Re: Yet Another Forecaster

Post by GraemeT »

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.
Post Reply