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 4017) - 17 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

CloudBase script for Cumulus Ver CU1.5

Discussion of Ken True's web site templates

Moderator: saratogaWX

Post Reply
n9mfk
Posts: 845
Joined: Sun 10 May 2009 8:52 pm
Weather Station: davis vp2 Serial datalogger
Operating System: Windows 7 64-bit
Location: Springfield, IL

Re: CloudBase script for Cumulus Ver CU1.4c

Post by n9mfk »

Hi BCJKiwi,
looks like there is still a bug
it rained today
this with the update

"useWXrain" results :-
Not Raining; 0 in rain in last 10 minutes
Last rained : 1 minutes ago
Beau
BCJKiwi
Posts: 1255
Joined: Mon 09 Jul 2012 8:40 pm
Weather Station: Davis VP2 Cabled
Operating System: Windows 10 Pro
Location: Auckland, New Zealand
Contact:

Re: CloudBase script for Cumulus Ver CU1.4c

Post by BCJKiwi »

If you want more assistance then you will need to give me access. You provide no data, no link, and your old links don't work anymore.

I really need to see ALL of the ?html=1 page.
You can PM me a txt file of the data if you prefer but I really need to se it when the issue is happening!
n9mfk
Posts: 845
Joined: Sun 10 May 2009 8:52 pm
Weather Station: davis vp2 Serial datalogger
Operating System: Windows 7 64-bit
Location: Springfield, IL

Re: CloudBase script for Cumulus Ver CU1.4c

Post by n9mfk »

Hi BCJKiwi,
there call for ran this weekend so I will get the data you need
Beau
n9mfk
Posts: 845
Joined: Sun 10 May 2009 8:52 pm
Weather Station: davis vp2 Serial datalogger
Operating System: Windows 7 64-bit
Location: Springfield, IL

Re: CloudBase script for Cumulus Ver CU1.4c

Post by n9mfk »

Hi BCJKiwi,
it rained today but "useWXrain" results :-
Not Raining; 0 in rain in last 10 minutes 0 but it was raining when this was pulled
http://99.37.51.20/working/cloudbaseCU.php?html=1

Code: Select all



cloudbaseCU.php : Version 1.4c
Date/Time	: Fri, 20 Sep 2013 12:25:57 (day)
Time Zone : America/Chicago (GMT-5 hours)
INPUT DATA
    Current temp	: 72.3 °F
    Dewpoint	 : 69.2 °F
    Rain Fall	 : 0.16 in
    Barometer	 : 30 in
    Humidity	 : 90 %
    Wind Speed	 : 3.4 mph
    Wind Dir	 : 298 degrees
    Wind Dir	 : 
    Cloud Altitude	: 1285ft (ASL)
    Latitude	 : N
    Season	 : Summer
    Moon Age	 : 16 days
    Is daylight	 : Yes
CUMULUS CONDITIONS 
    Cumulus conditions not in use 
    Zambretti #	 : 5
METAR CONDITONS 
    $pathToMetFile	 : ./cache/
    Weather conditions (Metar)	: KSPI 201652Z 28006KT 3SM RA BR BKN010 BKN038 OVC046 21/20 A2990 RMK AO2 RAE1553B40 SLP121 P0002 T02060200 
    Trimmed conditions (Metar)	: 201652Z 28006KT 3SM RA BR BKN010 BKN038 OVC046 21/20 A2990 RMK AO2 RAE1553B40 SLP121 P0002 T02060200 
    Metar condition used : Is Raining; Misty, Mostly cloudy, Mostly cloudy, Overcast
    Now : 1379697957 seconds / Time 12:25:57
    Metar Report TimeStamp : 1379695920 seconds 
    Age of File	 : 33.95 minutes
    Reload Time (Report TimeStamp plus 69 mins refresh time) : 1379700060 seconds / Time 13:01:00
    Next Download in	 : 35.05 Minutes (if  '-'  then download overdue!)
    Metar file	 : Existing file used
    Note:- Metar updates are Hourly unless AUTO when they may update every 30 minutes
OUTPUT DATA
Cloud Temp : 69 °F
Background image file name : ../images/cb/cb-bg-00sumd.png
"useWXrain" results :- 
    Not Raining; 0 in rain in last 10 minutes
    Last rained : 2 minutes ago
SETTINGS
    $realtime	 : ../cloudbaseCU.txt
    $metarICAO	 : KSPI
    $pathToMetFile	: ./cache/
    $tz	 : America/Chicago
    $pathToImages	 : ../images/cb/
    $pathToMoonImages : ../images/cb/moon/
    $translate	 : 1
    $switchSeasons	: 1
    $showCloudTemp	: 1
    $showCaption	 : 1
    $showMoon	 : 1
    $showScale	 : 1
    $showWinsock	 : 1
    $showWindDir	 : 
    $showWindSpd	 : 
    $showTemp	 : 
    $showHumidity	 : 
    $showBaro	 : 
    $alwaysShowCloud	: 
    $useCUHeight	 : 1
    $getMetar	 : 1
    $metarRefresh	 : 69
    $useMetarAtNight	: 1
    $onlyUseMetar	 : 1
    $useWXrain	 : 1
    $reportMistAt	 : 25
    $stationAltitude	: 581
data

Code: Select all

72.3 69.2 0.16 5 29.836 90 3.4 298 704 F in in mph ft 40 16 1 2 0.16 0.15

Beau
BCJKiwi
Posts: 1255
Joined: Mon 09 Jul 2012 8:40 pm
Weather Station: Davis VP2 Cabled
Operating System: Windows 10 Pro
Location: Auckland, New Zealand
Contact:

Re: CloudBase script for Cumulus Ver CU1.4c

Post by BCJKiwi »

Apologies for not replying earlier.

For rain to show on the image there are a three sets of combinations required.
The metar in your post meets those conditions
The wxrain does not.
For $wxrain to be true

Code: Select all

 $wxrain = true;
 if ($getMetar && $useWXrain) {	// override non-rain Metar cloud type if station has rain
    if ($lastrain > 10 || ($rain - $dayrn10) < 0.01) {
       $wxrain = false;
    }
 }
incorrect calculation and data fields - see update ver CU1.4d
there must have been 1 bucket tip registered in the last 10 minutes as reported to the website.

Unfortunately I cannot tell if this was the case or not - your post suggests not as $wxrain is false.
It takes a surprising amount of rain as viewed out the window to produce a bucket tip.

All I can suggest is that the next time you see this situation, you open the cloudbaseCU.txt file on the server and/or in c:\cumulus\web and see if the second to last field <#RecentRainToday m=0> is greater than the last field <#RecentRainToday m=10>.

We have suggested the data file be uploaded at 'tagtime' not at 'realtime' intervals.
So depending on the update frequency this data may be a bit old.
Also, the script is all php so there is no javascript or ajax updating the image - a page refresh is required to update the image.
Accordingly most of the time what is seen on the website will not to reflect a bucket tip in the last 10 mins unless the page is refreshed in the 10 mins there was a bucket tip.
Last edited by BCJKiwi on Mon 23 Sep 2013 6:26 am, edited 2 times in total.
n9mfk
Posts: 845
Joined: Sun 10 May 2009 8:52 pm
Weather Station: davis vp2 Serial datalogger
Operating System: Windows 7 64-bit
Location: Springfield, IL

Re: CloudBase script for Cumulus Ver CU1.4c

Post by n9mfk »

so using my numbers i had 0.01 an i need 0.02
because it < not <=
beau
BCJKiwi
Posts: 1255
Joined: Mon 09 Jul 2012 8:40 pm
Weather Station: Davis VP2 Cabled
Operating System: Windows 10 Pro
Location: Auckland, New Zealand
Contact:

Re: CloudBase script for Cumulus Ver CU1.4c

Post by BCJKiwi »

I realise in looking at the code again to further explain the answer that there is a problem with that section of code. I had been experimenting with different options for it in response to other queries and now realise the wrong code was distributed.

My apologies, and thank you for persisting with bringing this to my attention.

Will update the file(s) in the first post shortly.
BCJKiwi
Posts: 1255
Joined: Mon 09 Jul 2012 8:40 pm
Weather Station: Davis VP2 Cabled
Operating System: Windows 10 Pro
Location: Auckland, New Zealand
Contact:

Re: CloudBase script for Cumulus Ver CU1.4d

Post by BCJKiwi »

Revised version CU1.4d available in first post of this thread.
Fixes $wxrain calculation discussed in previous 5 posts.

Beau,
$wxrain is set to true first.
So the calculation is correct at < 0.01 to make $wxrain false
User avatar
PaulMy
Posts: 3775
Joined: Sun 28 Sep 2008 11:54 pm
Weather Station: Davis VP2 Plus 24-Hour FARS
Operating System: Windows8 and Windows10
Location: Komoka, ON Canada
Contact:

Re: CloudBase script for Cumulus Ver CU1.4d

Post by PaulMy »

Thanks, and I have updated to current version CU1.4d

Paul
Davis Vantage Pro2+
C1 www.komokaweather.com/komokaweather-ca
MX www.komokaweather.com/cumulusmx/index.htm /index.html /index.php
MX www.komokaweather.com/cumulusmxwll/index.htm /index.html /index.php
MX www. komokaweather.com/cumulusmx4/index.htm

Image
n9mfk
Posts: 845
Joined: Sun 10 May 2009 8:52 pm
Weather Station: davis vp2 Serial datalogger
Operating System: Windows 7 64-bit
Location: Springfield, IL

Re: CloudBase script for Cumulus Ver CU1.4d

Post by n9mfk »

hi BCJKiwi,
this still seems wrong

http://99.37.51.93working/cloudbaseCU.php?html=1
It rained hard but Not Raining; 0 in rain in last 10 minutes
data

Code: Select all

67.7 65.3 0.35 3 29.889 92 4.5 136 545 F in in mph ft 40 28 0 1 0.35 0.12

Code: Select all

cloudbaseCU.php : Version 1.4d
Date/Time : Thu, 03 Oct 2013 19:46:58 (night)
Time Zone : America/Chicago (GMT-5 hours)
INPUT DATA
    Current temp : 66.3 °F
    Dewpoint : 62.6 °F
    Rain Fall : 0.38 in
    Barometer : 30 in
    Humidity : 88 %
    Wind Speed : 1.1 mph
    Wind Dir : 198 degrees
    Wind Dir :
    Cloud Altitude : 1421ft (ASL)
    Latitude : N
    Season : Autumn
    Moon Age : 28 days
    Is daylight : No
CUMULUS CONDITIONS
    Cumulus conditions not in use
    Zambretti # : 3
METAR CONDITONS
    $pathToMetFile : ./cache/
    Weather conditions (Metar) : KSPI 032352Z 23013G24KT 4SM +TSRA BR BKN034 BKN070 OVC090 19/17 A2993 RMK AO2 PK WND 28031/2328 WSHFT 2252 TSB2255RAB12 SLP131 OCNL LTGICCCCG W TS W MOV E P0045 60045 T01890172 10311 20183 53023
    Trimmed conditions (Metar) : 032352Z 23013G24KT 4SM +TSRA BR BKN034 BKN070 OVC090 19/17 A2993 RMK AO2 PK WND 28031/2328 WSHFT 2252 TSB2255RAB12 SLP131 OCNL LTGICCCCG W TS W MOV E P0045 60045 T01890172 10311 20183 53023
    Metar condition used : Is Raining; Thunderstorm, Misty, Mostly cloudy, Mostly cloudy, Overcast, Thunderstorm, Thunderstorm
    Now : 1380847617 seconds / Time 19:46:58
    Metar Report TimeStamp : 1380844320 seconds
    Age of File : 54.95 minutes
    Reload Time (Report TimeStamp plus 69 mins refresh time) : 1380847200 seconds / Time 19:40:00
    Next Download in : -6.95 Minutes (if  '-'  then download overdue!)
    Metar file : New File downloaded
    Note:- Metar updates are Hourly unless AUTO when they may update every 30 minutes
OUTPUT DATA
Cloud Temp : 62 °F
Background image file name : ../images/cb/cb-bg-00autn.png
"useWXrain" results :-
    Not Raining 0 in rain in last 10 minutes
SETTINGS
    $realtime : ../cloudbaseCU.txt
    $metarICAO : KSPI
    $pathToMetFile : ./cache/
    $tz : America/Chicago
    $pathToImages : ../images/cb/
    $pathToMoonImages : ../images/cb/moon/
    $translate : 1
    $switchSeasons : 1
    $showCloudTemp : 1
    $showCaption : 1
    $showMoon : 1
    $showScale : 1
    $showWinsock : 1
    $showWindDir :
    $showWindSpd :
    $showTemp :
    $showHumidity :
    $showBaro :
    $alwaysShowCloud :
    $useCUHeight : 1
    $getMetar : 1
    $metarRefresh : 69
    $useMetarAtNight : 1
    $onlyUseMetar : 1
    $useWXrain : 1
    $reportMistAt : 25
    $stationAltitude : 581
BCJKiwi
Posts: 1255
Joined: Mon 09 Jul 2012 8:40 pm
Weather Station: Davis VP2 Cabled
Operating System: Windows 10 Pro
Location: Auckland, New Zealand
Contact:

Re: CloudBase script for Cumulus Ver CU1.4d

Post by BCJKiwi »

Well I don't know why I can't get this tiny bit of code right!
Each time I look at it and test it, it seems correct but then it is found to not be right after all :oops: It looks like the $nowrain-$dayrn10 math is back to front.
On reflection the nowrain, dayrn10 calculation is not actually required, all we really need to know is the first part - if $lastrain is > 10.
So if you could change line No 444 from;

Code: Select all

   if ($lastrain > 10 || ($nowrain - $dayrn10) < 0.01) { 
to:

Code: Select all

   if ($lastrain > 10) {
the issue should finally be resolved.

Please let me know if this works for you - it tests OK for me but I've been there before ;)
Thanks again for persisting with this and bringing the issue to my attention.
n9mfk
Posts: 845
Joined: Sun 10 May 2009 8:52 pm
Weather Station: davis vp2 Serial datalogger
Operating System: Windows 7 64-bit
Location: Springfield, IL

Re: CloudBase script for Cumulus Ver CU1.4d

Post by n9mfk »

looks like you may have it

Code: Select all

cloudbaseCU.php : Version 1.4d
Date/Time	: Sat, 05 Oct 2013 10:51:48 (day)
Time Zone : America/Chicago (GMT-5 hours)
INPUT DATA
    Current temp	: 75.4 °F
    Dewpoint	 : 71.6 °F
    Rain Fall	 : 0.15 in
    Barometer	 : 30 in
    Humidity	 : 88 %
    Wind Speed	 : 2.3 mph
    Wind Dir	 : 227 degrees
    Wind Dir	 : 
    Cloud Altitude	: 1444ft (ASL)
    Latitude	 : N
    Season	 : Autumn
    Moon Age	 : 0 days
    Is daylight	 : Yes
CUMULUS CONDITIONS 
    Cumulus conditions not in use 
    Zambretti #	 : 7
METAR CONDITONS 
    $pathToMetFile	 : ./cache/
    Weather conditions (Metar)	: KSPI 051452Z 23007KT 10SM SCT014 BKN020 24/21 A2993 RMK AO2 SLP132 T02440211 53004 
    Trimmed conditions (Metar)	: 051452Z 23007KT 10SM SCT014 BKN020 24/21 A2993 RMK AO2 SLP132 T02440211 53004 
    Metar condition used : Not Raining; Scattered clouds, Mostly cloudy
    Now : 1380988308 seconds / Time 10:51:48
    Metar Report TimeStamp : 1380984720 seconds 
    Age of File	 : 59.8 minutes
    Reload Time (Report TimeStamp plus 69 mins refresh time) : 1380988860 seconds / Time 11:01:00
    Next Download in	 : 9.2 Minutes (if  '-'  then download overdue!)
    Metar file	 : Existing file used
    Note:- Metar updates are Hourly unless AUTO when they may update every 30 minutes
OUTPUT DATA
Cloud Temp : 71 °F
Background image file name : ../images/cb/cb-bg-00autd.png
"useWXrain" results :- 
    Is Raining 0.12 in rain in last 10 minutes
SETTINGS
    $realtime	 : ../cloudbaseCU.txt
    $metarICAO	 : KSPI
    $pathToMetFile	: ./cache/
    $tz	 : America/Chicago
    $pathToImages	 : ../images/cb/
    $pathToMoonImages : ../images/cb/moon/
    $translate	 : 1
    $switchSeasons	: 1
    $showCloudTemp	: 1
    $showCaption	 : 1
    $showMoon	 : 1
    $showScale	 : 1
    $showWinsock	 : 1
    $showWindDir	 : 
    $showWindSpd	 : 
    $showTemp	 : 
    $showHumidity	 : 
    $showBaro	 : 
    $alwaysShowCloud	: 
    $useCUHeight	 : 1
    $getMetar	 : 1
    $metarRefresh	 : 69
    $useMetarAtNight	: 1
    $onlyUseMetar	 : 1
    $useWXrain	 : 1
    $reportMistAt	 : 25
    $stationAltitude	: 581
I do have one question is there a setting that needs to be set that wood show rain on the image if raining at the station but not at the metar?
thanks beau
You do not have the required permissions to view the files attached to this post.
BCJKiwi
Posts: 1255
Joined: Mon 09 Jul 2012 8:40 pm
Weather Station: Davis VP2 Cabled
Operating System: Windows 10 Pro
Location: Auckland, New Zealand
Contact:

Re: CloudBase script for Cumulus Ver CU1.4d

Post by BCJKiwi »

My first reaction was that the new feature would be rather difficult.
However I decided to have a look to see what was involved.

I have now it working via the useWXrain option.
This option, when set to true, will now apply a rain/no rain override to both Zambretti and Metar cloud options.

I have also revised the Zambretti decoding so it is hopefully a bit more representative of current conditions, however using this forecast is inherently unreliable as a forecast and even more so as a current conditions tool.
The Zambretti has been predicting showers/rain for almost 2 days now and the sky has been no worse than scattered cloud in that time, with a clear cloudless sky most of the time including all day today (now 3:45 pm).

I have made a few other minor improvements and will release a new version incorporating these changes soon.
BCJKiwi
Posts: 1255
Joined: Mon 09 Jul 2012 8:40 pm
Weather Station: Davis VP2 Cabled
Operating System: Windows 10 Pro
Location: Auckland, New Zealand
Contact:

Re: CloudBase script for Cumulus Ver CU1.5

Post by BCJKiwi »

Version 1.5 now available, see details in first post.

Enjoy
User avatar
N0BGS
Posts: 205
Joined: Sat 10 Nov 2012 2:26 am
Weather Station: Davis Vantage Pro 2
Operating System: Win10vm,VMWare ESXi 7.0
Location: Hermon, Maine USA
Contact:

Re: CloudBase script for Cumulus Ver CU1.5

Post by N0BGS »

Nice work! :clap:

Up and running on my site: http://www.kpw3.com

Thanks for making your scripts available to all.

--Kurt
Blitzortung Station 1809
Post Reply