Page 6 of 13

Re: CloudBase script for Cumulus Ver CU1.4

Posted: Tue 27 Aug 2013 2:42 pm
by joewith
Have upgraded to CU1.4 and everything seems to be working at least for me. :D

Thanks for your quick attention! :clap:

Re: CloudBase script for Cumulus Ver CU1.4

Posted: Tue 27 Aug 2013 5:54 pm
by mcrossley
Don't forget that the Cumulus forecast number is just that - a forecast of what will happen in 12-24 hours time, not the current conditions.

Re: CloudBase script for Cumulus Ver CU1.4

Posted: Tue 27 Aug 2013 7:15 pm
by gluepack
Now it is raining and neither metar (cloudbaseCUM.php Not Raining; Partly Cloudy, Scattered clouds) nor non-metar (cloudbaseCU.php clear,sunny & dry) are showing that. However, there is rainfall recorded.
the Cumulus forecast number is just that - a forecast of what will happen in 12-24 hours time, not the current conditions
...but the cloudbase graphic is, I assume, intended to be current, isn't it?

Re: CloudBase script for Cumulus Ver CU1.4

Posted: Tue 27 Aug 2013 8:25 pm
by BCJKiwi
Gluepack,
I would refer you back to this post of the 12th August where this issue and some options were discussed in some detail.
PaulMy wrote:

Hi BJCKiwi,
The cloudbaseCU has been showing very well yesterday, overnight and to this afternoon using the $useCUheight = true and the height changing whenever Cumulus recalculates the cloud height as per Cumulus Cloud Base Calculator :clap: . I periodically checked the local Metar and the Clouds and conditions where fairly close.

However this afternoon I noticed it was showing rain and displaying "Drizzle" when the sun was shining brightly. In some search I found that the uploaded cloudbaseCU.txt was 15 for <#forecastnumber> which according to the samplestrings.ini in my Cumulus folder is "Showery, becoming less settled" (I don't have a "strings.ini" in my Cumulus folder). The Davis station is showing "Increasing clouds with little temperature change. Precipitation possible within 24 to 48 hours." The Sun icon was/is shining on the Cumulus console.

Is this discrepancy of being quite clear with sun shining condition compared to the cloudbaseCU.php showing rain and displaying "Drizzle" just within the margin of error in the calculations or is there other settings I can experiment with?

I have now changed the settings back to use the local Metar CYXU which is 26 km away and that is currently presenting a more accurate display - no rain and displaying "Mostly cloudy". The Metar shows Clouds at 811 m but that was about 30 minutes ago and Cumulus console is showing between 750 to 900 m which is reasonably similar, but the rain and drizzle is the discrepancy.

Thanks,
Paul
Unfortunately this seems to be a common problem with the 'Zambretti' forecast (used in Cumulus).
I might add I have found the same thing with the Davis forecast. bt-Sager weathercaster is similar if the conditions are not manually entered as recommended.
The common element here is that these systems all use a 'best guess' based on current data and past trends - none of which indicates the actual cloud conditions which is what the script is about.
Metar however uses actual observations (manual and/or instrument based depending on the site).

Unless you have some local cloud sensing instrument, Metar is the best option provided it is relevant. This depends on how far you are from the metar source location and on how fast the weather is changing. Standard Metar updates are hourly on the hour. I got annoyed with the Metar saying it was raining when it wasn't which is why the overrides were added so raining was determined by local data. The overrides have been configured only to work with Metar as Metar provides separate cloud and rain data where there is only one data point from Zambretti.

If you don't want to use Metar, You could try changing the $curcond = $vars in the switch statement around line 380. These are used in place of the normal text strings and the ones used were my 'best guess' at the equivalents to the original Zambretti text. Note - you can only use the vars ($sunny, $scattered etc) shown as these are the only ones understood by the script. You can change/move them around but not create new ones.

If you want to experiment further, you could try the rain overrides with the zambretti by changing (just above the $curcond case statement);

Code: Select all

if ($getMetar && $useWXrain) {   // override non-rain Metar cloud type if station has rain
to
//if ($getMetar && $useWXrain) {   // override non-rain Metar cloud type if station has rain
if ($useWXrain) {   // override non-rain Metar cloud type if station has rain
Trust this helps.
Also, as mcrossley has reminded us, the cumulus forecast number is a forecast.

If neither the Cumulus forecast number nor metar work in your situation, then perhaps this script is not suitable for your location?
There are simpler forms of cloud height graphics that just use the standard calculation for cloud height and indicate only the cloud height and do not attempt to provide the extra information this script does.

Re: CloudBase script for Cumulus Ver CU1.4

Posted: Wed 28 Aug 2013 2:39 pm
by gluepack
OK, lol, I'll add the code myself to check wxrain. Seems like a sensible thing to do, to me.

Re: CloudBase script for Cumulus Ver CU1.4

Posted: Wed 28 Aug 2013 9:16 pm
by BCJKiwi
OK,

Please let me know how you get on.
Paul decided he was better off with Metar

This of course still won't deal will the lower accuracy of the Zambretti forecast, nor the fact that it is a 12-24 hour forecast, rather than a current situation report.

Re: CloudBase script for Cumulus Ver CU1.4

Posted: Fri 30 Aug 2013 5:03 pm
by PaulMy
Hi, back after a couple weeks away. I have updated to ver. CU1.4 and looks fine, thanks for your continued work.

I have all settings as 'true' therefore using local CYXU Metar for now.

Paul

Re: CloudBase script for Cumulus Ver CU1.4

Posted: Fri 30 Aug 2013 7:14 pm
by PaulMy
Have just noticed that the wind direction appears to be non-English - shows V, or VSV instead of W, or WSW. I have not edited these sections in cloudbaseCU.php:

// DO NOT CHANGE THESE ENGLISH WIND DIRECTION TEXTS!
// If you are NOT using Saratoga OR have $translate = false; then you may change the Wind Dir texts at lines 362 - 365 below
$langWindDir = array(
"N", "NNE", "NE", "ENE",
"E", "ESE", "SE", "SSE",
"S", "SSW", "SW", "WSW",
"W", "WNW", "NW", "NNW");

// NOT using Saratoga translations
// Wind direction Translation Default is English,
$langWindDir = array(
//VV Change this text VV // VV Leave this alone VV
"N", "NNO", "NO", "ONO", // "N", "NNE", "NE", "ENE",
"O", "OSO", "SO", "SSO", // "E", "ESE", "SE", "SSE",
"S", "SSV", "SV", "VSV", // "S", "SSW", "SW", "WSW",
"V", "VNV", "NV", "NNV"); // "W", "WNW", "NW", "NNW");
// Take care with the syntax:- " , ) and ; must be exact!

Any suggestion what/how I should edit?

Thanks,
Paul

Re: CloudBase script for Cumulus Ver CU1.4

Posted: Fri 30 Aug 2013 9:47 pm
by BCJKiwi
Mea Culpa,
This was fixed before but crept back into the ver 1.4 postings! - Have posted Ver1.4a files with English defaults re-instated - see post 1.
However you can just edit the script as noted in the header and as per;
//VV Change this text VV // VV Leave this alone VV
"N", "NNO", "NO", "ONO", // "N", "NNE", "NE", "ENE",

Just copy/paste the English after the // over the other language in each line, or, download ver 1.4a update.

Re: CloudBase script for Cumulus Ver CU1.4

Posted: Fri 30 Aug 2013 11:09 pm
by PaulMy
Got it sorted out, thanks

Paul

Re: CloudBase script for Cumulus Ver CU1.4

Posted: Sat 31 Aug 2013 7:55 am
by gluepack
While I was changing mine for the above fix, I noticed this just above it...
$partlycloudyCap = 'Partly cloudy'; // $partlycloudyCap = 'Partly cloudy';
$scatteredCap = 'Scattered'; // $scatteredCap = 'Scattered';
$mostlycloudyCap = 'Scattered'; // $mostlycloudyCap = 'Mostly cloudy';
$overcastCap = 'Overcast'; // $overcastCap = 'Overcast';
... I guess I'll change that too.

Re: CloudBase script for Cumulus Ver CU1.4

Posted: Sat 31 Aug 2013 12:35 pm
by BCJKiwi
Yes, Thanks for picking that up!
Must have been having a senior moment when I zipped up 1.4!
First post updated to 1.4b

For those of you following along just edit (or copy/paste) to change line 353 from;
$mostlycloudyCap = 'Scattered'; // $mostlycloudyCap = 'Mostly cloudy';
to
$mostlycloudyCap = 'Mostly cloudy'; // $mostlycloudyCap = 'Mostly cloudy';

Re: CloudBase script for Cumulus Ver CU1.4

Posted: Sun 08 Sep 2013 2:11 pm
by n9mfk
Hi BCJKiwi,

It rained here today and I looked at the cloudbase test pge why wood 10 min be 0 if it had rained 6 min ago ?
"useWXrain" results :-
Not Raining; 0 in rain in last 10 minutes
Last rained : 6 minutes ago

http://99.148.150.241/working
thanks Beau

Re: CloudBase script for Cumulus Ver CU1.4

Posted: Sun 08 Sep 2013 9:08 pm
by BCJKiwi
Hmm,
It seems the 'wxrain' test is out by 1 dec place.
'imperial' measure minimum tip is 0.01", metric 0.2mm.
wxrain is testing for < 0.1, this should be < 0.01

You can make this correction yourself at line 436 (ver 1.4b)

Will update first post to 1.4c to include this change

Thanks for picking this up.

Re: CloudBase script for Cumulus Ver CU1.4c

Posted: Mon 09 Sep 2013 4:04 am
by BCJKiwi
Ver CU1.4c posted (both full and update versions) in first post
Fixes minor bug found by Beau and discussed in the previous 2 posts.