Page 5 of 22

Re: BT's Global Sager Weathercaster JavaScripts For Cumulus

Posted: Sat 01 Jun 2013 1:18 am
by Buford T. Justice
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.

Re: BT's Global Sager Weathercaster JavaScripts For Cumulus

Posted: Sat 01 Jun 2013 1:20 am
by uncle_bob
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:

Re: BT's Global Sager Weathercaster JavaScripts For Cumulus

Posted: Sat 01 Jun 2013 1:27 am
by Buford T. Justice
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:

https://cumulus.hosiene.co.uk/viewtopic.php?f=10&t=9814

Re: BT's Global Sager Weathercaster JavaScripts For Cumulus

Posted: Sat 01 Jun 2013 7:40 am
by steve
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'.

Re: BT's Global Sager Weathercaster JavaScripts For Cumulus

Posted: Sat 01 Jun 2013 9:37 am
by beteljuice
@ 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'

Re: BT's Global Sager Weathercaster JavaScripts For Cumulus

Posted: Sat 01 Jun 2013 3:07 pm
by Buford T. Justice
@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.

Re: BT's Global Sager Weathercaster JavaScripts For Cumulus

Posted: Sun 02 Jun 2013 2:07 am
by uncle_bob
BT, sorry to be a pain, but is there any chance of having the forecaster use KM/h for wind speeds?

Re: BT's Global Sager Weathercaster JavaScripts For Cumulus

Posted: Sun 02 Jun 2013 10:13 am
by Buford T. Justice
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.

Re: BT's Global Sager Weathercaster JavaScripts For Cumulus

Posted: Sun 02 Jun 2013 12:07 pm
by weatherfrog80
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

Re: BT's Global Sager Weathercaster JavaScripts For Cumulus

Posted: Sun 02 Jun 2013 12:22 pm
by Buford T. Justice
@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?

Re: BT's Global Sager Weathercaster JavaScripts For Cumulus

Posted: Sun 02 Jun 2013 12:39 pm
by weatherfrog80
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.

Re: BT's Global Sager Weathercaster JavaScripts For Cumulus

Posted: Sun 02 Jun 2013 12:56 pm
by Buford T. Justice
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".

Re: BT's Global Sager Weathercaster JavaScripts For Cumulus

Posted: Thu 06 Jun 2013 2:05 am
by Buford T. Justice
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.

Re: BT's Global Sager Weathercaster JavaScripts For Cumulus

Posted: Thu 06 Jun 2013 11:06 am
by uncle_bob
All working without issues.
*Tips hat to BT.

Re: BT's Global Sager Weathercaster JavaScripts For Cumulus

Posted: Thu 06 Jun 2013 9:33 pm
by Werk_AG
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.