Welcome to the Cumulus Support forum.

Latest Cumulus MX V4 release 4.4.2 (build 4085) - 12 March 2025

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

Legacy Cumulus 1 release 1.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

If you are posting a new Topic about an error or if you need help PLEASE read this first viewtopic.php?p=164080#p164080

Sunshine hours in minutes?

From build 3044 the development baton passed to Mark Crossley. Mark has been responsible for all the Builds since. He has made the code available on GitHub. It is Mark's hope that others will join in this development, but at the very least he welcomes your ideas for future developments (see Cumulus MX Development suggestions).

Moderator: mcrossley

Post Reply
NigelG
Posts: 15
Joined: Tue 24 Nov 2020 12:31 am
Weather Station: Froggit WH3000SE + DP1500
Operating System: Raspberry PI prebuilt image

Sunshine hours in minutes?

Post by NigelG »

Is it possible to extract sunshine hours in minutes from Cumulux MX somehow? The reason behind this apparently contradictory question is my use of the somewhat idiosyncratic WsWin software for long term weather analysis. This requires sunshine duration to be provided from Cumulus MX to WsWin as the number of minutes recorded in each logging interval. Cumulux MX only provides a resolution of 0.1 hours in the standard monthly log. I am currently using the standard logging interval of 10 minutes. Changing my logging interval to a multiple of 6 minutes may provide a solution but I don't really want to mess with a good working system.
NigelG
water01
Posts: 3670
Joined: Sat 13 Aug 2011 9:33 am
Weather Station: Ecowitt HP2551
Operating System: Windows 10/11 64bit Synology NAS
Location: Burnham-on-Sea
Contact:

Re: Sunshine hours in minutes?

Post by water01 »

You could use the webtag sunshinehours and multiply by 60.
David
Image
User avatar
HansR
Posts: 6926
Joined: Sat 20 Oct 2012 6:53 am
Weather Station: GW1100 (WS80/WH40)
Operating System: Raspberry OS/Bookworm
Location: Wagenborgen (NL)
Contact:

Re: Sunshine hours in minutes?

Post by HansR »

Well, David is just ahead of me and I think that is the only solution.

Nevertheless, if you really want the sunshine per interval in minutes you will have to do some arithmetic as the webtag #SunshineHours only gives hours so far, you will have to make the difference with the previous value and convert that from hrs to minutes.

That works if you want to use webtags. But from your post I understand you want to use the monthly log. In there you find the value of the webtag in field 24 (hrs of sunshine today so far) and you will have to do the same calculation as with the webtag. So it depends a bit on how you are calculating.

There is a problem however, when you start analyzing the monthly logfiles you will notice that the interval in longer series is not constant and apart from not being constant you will find there are gaps. That will lead to errors in hrs of sunshine. I assume (not sure, neither do I know how the webtag values vary with disturbances in the interval value).

In my CumulusUtils I took another approach (because I also needed to calculate the energy for the whole day it was not really additional work):
  1. Loop over all entries of a day and if the theoretical sunshine max > 0 use the row for calculation
  2. Detect the interval size by calculating the time difference to the next row
  3. Calculate if the sunshine is counted in that interval i.e. radiation > theoretical max radiation * SunThreshold (SunThreshold you find in settings)
  4. If sunshine is counted, assume it is valid for the detected interval period so set your SunshineHrs = SunshineHrs + IntervalDuration
  5. Goto the next interval
This will lead to a different figure than the number you find in the dayfile but it will be close. Errors will statistically even out. You will find that catch-up and start/stop isssues in the past (current CMX versions have this issue much less as it is much improved) may lead to gaps. If gaps are longer than 30 minutes I use to skip that period. Bad luck but that is life. No dat no value.

Well, many roads to Rome. Hope it helps a bit :)
Hans

https://meteo-wagenborgen.nl
CMX build 4070+ ● RPi 4B ● Linux 6.6.62+rpt-rpi-v8 aarch64 (bookworm) ● dotnet 8.0.1
BlueSky: https://bsky.app/profile/wagenborgenwx.bsky.social
NigelG
Posts: 15
Joined: Tue 24 Nov 2020 12:31 am
Weather Station: Froggit WH3000SE + DP1500
Operating System: Raspberry PI prebuilt image

Re: Sunshine hours in minutes?

Post by NigelG »

Thank you for your suggestions. I shall have to experiment with the theoretical and measured values on every sample to see how the result compares with the value derived by Cumulus MX. Hopefully, I can align the results on a sufficiently large sample.
NigelG
Post Reply