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 3043 Jan 20 2017. See the Wiki for download

BT's Global Sager Weathercaster PHP Scripts For Cumulus

Other discussion about creating web sites for Cumulus that doesn't have a specific subforum

Moderators: daj, TNETWeather

Post Reply
User avatar
Buford T. Justice
Posts: 385
Joined: Fri Aug 17, 2012 9:21 pm
Weather Station: Ambient Weather WS-2902A
Operating System: Windows 10 Pro 64-bit
Location: USA

Re: BT's Global Sager Weathercaster JavaScripts For Cumulus

Post by Buford T. Justice » Sat Jun 01, 2013 1:18 am

uncle_bob wrote:Mine:
Sager
Showers and warmer; Probably increasing North or Northwest winds.

Zambretti
Fairly fine, showery later.

Current conditions are, drizzly slight wind from the northern quarter.
Glad you got it going. I am glad I was right about using trade wind directions to correct for the Coriolis Effect in the different parts of the globe. They seem to be accurate for your Southern Hemisphere location.

uncle_bob
Posts: 474
Joined: Wed Aug 17, 2011 2:58 pm
Weather Station: WeatherDuino Pro2
Operating System: 2008
Location: Canberra

Re: BT's Global Sager Weathercaster JavaScripts For Cumulus

Post by uncle_bob » Sat Jun 01, 2013 1:20 am

Buford T. Justice wrote: Glad you got it going. I am glad I was right about using trade wind directions to correct for the Coriolis Effect in the different parts of the globe. They seem to be accurate for your Southern Hemisphere location.
Yes, Well done BT :clap:
Interested in building your own Weather Station? Maybe check out the WeatherDuino Pro Project Here
Conder, Canberra Weather
Image

User avatar
Buford T. Justice
Posts: 385
Joined: Fri Aug 17, 2012 9:21 pm
Weather Station: Ambient Weather WS-2902A
Operating System: Windows 10 Pro 64-bit
Location: USA

Re: BT's Global Sager Weathercaster JavaScripts For Cumulus

Post by Buford T. Justice » Sat Jun 01, 2013 1:27 am

For anyone reading this thread and thinking I am picking on beteljuice's Zambretti Forecaster or my own version made with the Zambretti Weathercard Forecaster, I am not. The Sager Weathercaster simply has more possibilities than the Zambretti. I am just happy my JavaScripts to make The Sager Weathercaster book work as JavaScripts actually do work quite accurately and they keep getting better and better as I improve them thanks to new features in Cumulus becoming available. Thanks Steve!

I was talking earlier about using the trade winds to correct for the forecasts available in The Sager Weathercaster due to the Coriolis Effect at different points on the globe. There is more information on my hypothesis about that here:

http://sandaysoft.com/forum/viewtopic.php?f=10&t=9814

User avatar
steve
Cumulus Author
Posts: 26713
Joined: Mon Jun 02, 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: BT's Global Sager Weathercaster JavaScripts For Cumulus

Post by steve » Sat Jun 01, 2013 7:40 am

I did look at the Sager forecast for possible inclusion, but the Zambretti forecast is good in that it can be done completely automatically. I would just say that you seem to be comparing the forecast to the current conditions. It's a forecast, not a 'nowcast'.
Steve

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

Re: BT's Global Sager Weathercaster JavaScripts For Cumulus

Post by beteljuice » Sat Jun 01, 2013 9:37 am

@ BTJ

Not a problem for the beteljuice ...
Sometime ago I did look at trying to either improve the Zambretti forecaster or implement Sager style, but at that time and even now both require observational data as to 'wind change toward' etc.

Although Cumulus has more whistles and bells now those stumbling blocks remain. OK you could 'cheat' and pick up required data from other sources, but then it wouldn't work 'out-of-the-box'.

Alternatives are always interesting, and sometimes what doesn't work for one works for another.

Although there are always those who expect their cut price weather kit and free software to out perform all the satelites , air and sea sonds, and mega cloud computing - I have been pleasantly surprised by the acceptance and longevity of the 'in-house' Zambretti forecaster.

As I say BTJ - keep on truckin'
Image
......................Imagine, what you will KNOW tomorrow !

User avatar
Buford T. Justice
Posts: 385
Joined: Fri Aug 17, 2012 9:21 pm
Weather Station: Ambient Weather WS-2902A
Operating System: Windows 10 Pro 64-bit
Location: USA

Re: BT's Global Sager Weathercaster JavaScripts For Cumulus

Post by Buford T. Justice » Sat Jun 01, 2013 3:07 pm

@steve
Yes exactly. It is not a nowcast. Approximately 13 hours or so after my last comparison post, there were a few more showers then it stopped raining altogether. The wind was also correctly forecasted. Right now, it is mostly cloudy with 7-12 mph S and SW winds.

I'd like to get the Sager to where it updates the forecast once an hour or maybe four times per day. I believe the Davis version does it that way. I also need to work on diurnal variations.

There is a note on page 8 of The Sager Weathercaster which states the following:

"When it is difficult to distinguish between clear and partly cloudy or partly cloudy and mostly overcast, present weather should be considered partly cloudy."

It does seem leaving it on Partly Cloudy works well making it essentially automatic now thanks to the <#MinutesSinceLastRainTip> webtag which will update the forecasts to rain forecasts if needed.

@beteljuice
Thanks man. It is still quite fun predicting the weather forecast from data supplied by our Communist China weather stations. I have no idea where Davis weather stations are manufactured, but I still want to get one.

uncle_bob
Posts: 474
Joined: Wed Aug 17, 2011 2:58 pm
Weather Station: WeatherDuino Pro2
Operating System: 2008
Location: Canberra

Re: BT's Global Sager Weathercaster JavaScripts For Cumulus

Post by uncle_bob » Sun Jun 02, 2013 2:07 am

BT, sorry to be a pain, but is there any chance of having the forecaster use KM/h for wind speeds?
Interested in building your own Weather Station? Maybe check out the WeatherDuino Pro Project Here
Conder, Canberra Weather
Image

User avatar
Buford T. Justice
Posts: 385
Joined: Fri Aug 17, 2012 9:21 pm
Weather Station: Ambient Weather WS-2902A
Operating System: Windows 10 Pro 64-bit
Location: USA

Re: BT's Global Sager Weathercaster JavaScripts For Cumulus

Post by Buford T. Justice » Sun Jun 02, 2013 10:13 am

uncle_bob wrote:BT, sorry to be a pain, but is there any chance of having the forecaster use KM/h for wind speeds?
Sure. I would suggest you install Notepad++ which is a free text editor. It will make the following easier to do.

Open bt-sager.js with Notepad++.

Change Lines 43-51 from:

Code: Select all

	var velocities = new Array ()
	velocities[0] = "Probably increasing ";
	velocities[1] = "Moderate to fresh (13-24 mph) ";
	velocities[2] = "Strong (25-38 mph) ";
	velocities[3] = "Gale (39-54 mph) ";
	velocities[4] = "Dangerous gale (whole gale) (55-73 mph) ";
	velocities[5] = "Tornado/Hurricane/Typhoon (74+ mph) ";// Tornado & Typhoon added.
	velocities[6] = "Diminishing, or moderating somewhat if current winds are of fresh to strong velocity. ";
	velocities[7] = "No important change. Some tendency for slight increase in winds during day, diminishing in evening. ";
TO:

Code: Select all

	var velocities = new Array ()
	velocities[0] = "Probably increasing ";
	velocities[1] = "Moderate to fresh (20-38 km/h) ";
	velocities[2] = "Strong (39-61 km/h) ";
	velocities[3] = "Gale (62-88 km/h) ";
	velocities[4] = "Dangerous gale (whole gale) (89-117 km/h) ";
	velocities[5] = "Tornado/Hurricane/Typhoon (118+ km/h) ";// Tornado & Typhoon added.
	velocities[6] = "Diminishing, or moderating somewhat if current winds are of fresh to strong velocity. ";
	velocities[7] = "No important change. Some tendency for slight increase in winds during day, diminishing in evening. ";
Save and re-upload bt-sager.js to your website.

weatherfrog80
Posts: 70
Joined: Tue Mar 06, 2012 7:50 pm
Weather Station: WH 1080
Operating System: Windows XP SP 3
Location: Bremerhaven, NW Germany
Contact:

Re: BT's Global Sager Weathercaster JavaScripts For Cumulus

Post by weatherfrog80 » Sun Jun 02, 2013 12:07 pm

Hi,

I'm currently testing your script with the standard cumulus index.html file but i can't get it to work.
It always shows "Forecast offline"
http://weatherfrog80.bplaced.net/weather/index.htm

I've followed everything as stated in the manual but with no luck.
I also have to add that i am using a customized version of the "strings.ini" where the pressure names and Zambretti forecast names are translated in german, so maybe this might be an issue?

Also my Cumulus Directory is located at C:\All Users\Document and Settings\Cumulus, this does not cause any problems with my operating system (Windows XP) but maybe for the script?

Any ideas what i still could do?

Best Regards

Georg
Best Regards

Georg

Private weatherstation Bremerhaven-Twischkamp
Image

User avatar
Buford T. Justice
Posts: 385
Joined: Fri Aug 17, 2012 9:21 pm
Weather Station: Ambient Weather WS-2902A
Operating System: Windows 10 Pro 64-bit
Location: USA

Re: BT's Global Sager Weathercaster JavaScripts For Cumulus

Post by Buford T. Justice » Sun Jun 02, 2013 12:22 pm

@weatherfrog80
You are right. It is the pressure names being in German. That is easy to fix in my script though. As I mentioned in my last post above, get Notepad++ and open "bt-sager.js" (you might also want to do the km/h velocities I listed). Change Lines 511-519 to the pressure names you are using.

Does Germany use English-abbreviated wind directions N, NNE, NE, ENE, E, ESE, SE, SSE, S, SSW, SW, WSW, W, WNW, NW, and NNW?

weatherfrog80
Posts: 70
Joined: Tue Mar 06, 2012 7:50 pm
Weather Station: WH 1080
Operating System: Windows XP SP 3
Location: Bremerhaven, NW Germany
Contact:

Re: BT's Global Sager Weathercaster JavaScripts For Cumulus

Post by weatherfrog80 » Sun Jun 02, 2013 12:39 pm

Buford T. Justice wrote:@weatherfrog80
You are right. It is the pressure names being in German. That is easy to fix in my script though. As I mentioned in my last post above, get Notepad++ and open "bt-sager.js" (you might also want to do the km/h velocities I listed). Change Lines 511-519 to the pressure names you are using.

Does Germany use English-abbreviated wind directions N, NNE, NE, ENE, E, ESE, SE, SSE, S, SSW, SW, WSW, W, WNW, NW, and NNW?
Thanks for your quick help, will do that.

As for the abbreviations, some are different as the english equivalents. They are : N, NNO, NO, ONO, O, OSO, SO, SSO, S, SSW, SW, WSW, W, WNW, NW, NNW.
Best Regards

Georg

Private weatherstation Bremerhaven-Twischkamp
Image

User avatar
Buford T. Justice
Posts: 385
Joined: Fri Aug 17, 2012 9:21 pm
Weather Station: Ambient Weather WS-2902A
Operating System: Windows 10 Pro 64-bit
Location: USA

Re: BT's Global Sager Weathercaster JavaScripts For Cumulus

Post by Buford T. Justice » Sun Jun 02, 2013 12:56 pm

weatherfrog80 wrote:As for the abbreviations, some are different as the english equivalents. They are : N, NNO, NO, ONO, O, OSO, SO, SSO, S, SSW, SW, WSW, W, WNW, NW, NNW.
If they are shown that way in Cumulus, you will also need to change those to what you are using in "bt-sager.js":

NNE = NNO
NE = NO
ENE = ONO
E = O
ESE = OSO
SE = SO
SSE = SSO

The EASY WAY would be to use Notepad++, open bt-sager.js, and click on SEARCH>REPLACE. In FIND WHAT, enter with quotes "NNE". In REPLACE WITH, enter with quotes "NNO". Click REPLACE ALL. Repeat for the other ones. Save bt-sager.js and re-upload it to your website.

You can also translate Lines 21-51 and 65-73 to German just between the quote marks.

I see you have edited the pressure names, but you are missing "langsam steigend".

User avatar
Buford T. Justice
Posts: 385
Joined: Fri Aug 17, 2012 9:21 pm
Weather Station: Ambient Weather WS-2902A
Operating System: Windows 10 Pro 64-bit
Location: USA

Re: BT's Global Sager Weathercaster JavaScripts For Cumulus

Post by Buford T. Justice » Thu Jun 06, 2013 2:05 am

BT's Global Sager Weathercaster JavaScripts For Cumulus have been updated. You must be running Cumulus 1.9.4 beta build 1079 or newer. To update, simply save bt-sager-cu.js in your Cumulus web folder then upload bt-sager.js to your website. New features are:

The JavaScripts now assume it is Partly Cloudy if nothing is entered into the Current Condition Box.

Added km/h, kts (knot), and m/s wind speed readings to the forecast. These are determined by the wind unit selected in Cumulus.

Shortened the "bt-sager.js" file by using variables to determine certain arrays.

Localization directions added to the first post.

uncle_bob
Posts: 474
Joined: Wed Aug 17, 2011 2:58 pm
Weather Station: WeatherDuino Pro2
Operating System: 2008
Location: Canberra

Re: BT's Global Sager Weathercaster JavaScripts For Cumulus

Post by uncle_bob » Thu Jun 06, 2013 11:06 am

All working without issues.
*Tips hat to BT.
Interested in building your own Weather Station? Maybe check out the WeatherDuino Pro Project Here
Conder, Canberra Weather
Image

User avatar
Werk_AG
Posts: 182
Joined: Sun Jan 13, 2013 8:04 pm
Weather Station: WeatherDuino Pro2
Operating System: Windows 7
Location: Cercal CDV - Portugal

Re: BT's Global Sager Weathercaster JavaScripts For Cumulus

Post by Werk_AG » Thu Jun 06, 2013 9:33 pm

Translated as before, but can't manage new upgrade to work.

Edited: Think I found ... damn copy and paste! Working like a charme as before.
Image

Post Reply