Page 1 of 1
BUG: Rainfall Last 24 Hours
Posted: Sun 10 Feb 2013 6:15 am
by Buford T. Justice
Cumulus 1.9.3 build 1059
It started raining here a little over an hour ago. I had Cumulus up and was watching it as the midnight reset was about to happen. About a second or two before the reset, the rain total went up another 0.01" but there was not enough time to add it to the 24 Hour Total. I thought maybe it would correct after uploading data but it did not. You can see this in the attached picture.
Re: BUG: Rainfall Last 24 Hours
Posted: Sun 10 Feb 2013 11:09 am
by steve
It's nothing to do with when it occurred or not having enough time to do something; rainfall is not calculated by addition, it's done by subtraction of the current rainfall counter from a rainfall counter stored previously. What you are seeing may be due to conversion from mm to inches and rounding; see the thread about this from yesterday. The figure may be correct anyway; your graph doesn't go back far enough to show that there's a problem - it was clearly raining just before midnight last night. Note that rain graphs will always look a little odd if you use inches, because the plotted values aren't rounded after conversion; perhaps they should be. And rain in the last minute before midnight won't get plotted, as in this case. You need to look at the numbers, not the graphs.
If you look at the numbers (i.e. the rainfall counter in the log file and the diags files) and you still think it's a bug and want me to look at it, please provide some evidence, i.e. the diags folder zipped up and your February log file.
Re: BUG: Rainfall Last 24 Hours
Posted: Sun 10 Feb 2013 5:25 pm
by Buford T. Justice
I don't know 100% for sure if it is a bug or not, but the totals for Today and Yesterday (being in less than 24 hours currently) should add up to the Last 24 Hours Total I would think.
Let me try to describe what I saw better. I had the main Cumulus window up. As memory serves, the Today Total went up to 0.04" a second or two from the midnight reset. The Last 24 Hours Total did not increase when the Today Total did. It was like either it didn't happen or it lagged out during the reset. I mean I would think the 24 Hour Total would instantaneously increase whenever the Today Total increases. The Today Total quickly became the Yesterday Total but nothing changed on the Last 24 Hours Total.
The files you requested and some additional ones are attached.
Re: BUG: Rainfall Last 24 Hours
Posted: Sun 10 Feb 2013 5:56 pm
by steve
It's the rounding issue that I described in the post yesterday, because you restarted Cumulus yesterday afternoon. Your end of day rain counter on the 9th was
1.57086622714996
Your start of day rain counter was stored as
1.53543305397034
The difference between those two is 0.03543317317, which rounds to 0.04, so that's the total recorded for the day for the 9th.
Because you had restarted Cumulus, the figures from 24 hours ago were taken from the log file so had already been rounded to 1.54, and 1.57086622714996 - 1.54 is 0.03086622714996, which rounds to 0.03 for the last 24 hours.
Ideally, the figures used for the last 24 hours comparison wouldn't have already been rounded, but that would require a separate set of storage for all of the rain counter figures for the last 24 hours.
Re: BUG: Rainfall Last 24 Hours
Posted: Sun 10 Feb 2013 6:20 pm
by Buford T. Justice
I turned Cumulus off yesterday to update to build 1059 then back on after the update completed. I think I did the update around 3:00 PM CST and it didn't start to rain until after 10:30 PM CST.
Are you saying it rounded after turning Cumulus off then back on before it started to rain? Why would it do that instead of preserving the number it had prior to restarting Cumulus?
I am looking for the other post and will read it.
Re: BUG: Rainfall Last 24 Hours
Posted: Sun 10 Feb 2013 6:32 pm
by steve
While it's running, it keeps the last 24 hours rainfall counter stored internally, as-is (i.e. not rounded, just converted from mm to inches). When it restarts, it re-initialises that set of readings from the data log. The values in the data log have been rounded. The end result is effectively a double rounding error, which will sometimes translate to a 0.01 inch discrepancy. But these are all approximations anyway, as the station works in millimetres.
As I said, ideally it would 'persist' the last 24 hours of readings when it shuts down.
Even more ideally, it would store everything in mm (and degrees Celsius etc), scaled up to integers, and only do rounding at the point of display. A long time ago, it used to do it that way, but when I started having to cater for more weather stations, and units other than the ones I use, I gave up doing it that way, purely for ease of implementation.
Re: BUG: Rainfall Last 24 Hours
Posted: Sun 10 Feb 2013 7:33 pm
by Buford T. Justice
I guess I'll just have to not restart Cumulus on a day it might rain. That's OK though. Thanks for explaining what is happening.
Re: BUG: Rainfall Last 24 Hours
Posted: Sun 10 Feb 2013 8:06 pm
by steve
Or, you could use the units that your station was designed for

Re: BUG: Rainfall Last 24 Hours
Posted: Sun 10 Feb 2013 8:22 pm
by Buford T. Justice
steve wrote:Or, you could use the units that your station was designed for

True that, but the metric system sucks mostly. Not enough variation of the numbers for temperature. I have trouble visualizing what 1 mm looks like. 0.28" of rain is easy for me to visualize. I have no idea what 7.1 mm looks like without converting to inches. I guess most of the American public does as well. I do like hPa though as the changes have more variance than inHg. I have heard even you English guys still use MPH on some roads.
Re: BUG: Rainfall Last 24 Hours
Posted: Sun 10 Feb 2013 9:22 pm
by tomcatuk
Buford T. Justice wrote:steve wrote:Or, you could use the units that your station was designed for

I have heard even you English guys still use MPH on some roads.
On ALL roads if you don't mind, don't want any of those kilometres here thank you
