Page 1 of 1
Correct Rainfall Total For The Year
Posted: Sun 17 May 2020 9:21 pm
by Buford T. Justice
How do you correct the total rainfall for the year? In Cumulus MX, it says I am at 20.32". In May20log.txt, it is 20.30". The correct total needs to be 20.31".
When I started using Cumulus MX a few weeks ago, I entered the correct total for the year so far in Settings > Station Settings which was 16.01".
I did a search on the forum about this, but no real fixes.
Re: Correct Rainfall Total For The Year
Posted: Mon 18 May 2020 11:57 am
by mcrossley
Re: Correct Rainfall Total For The Year
Posted: Mon 18 May 2020 1:54 pm
by sfws
Buford T. Justice wrote: ↑Sun 17 May 2020 9:21 pm
it says I am at 20.32". In May20log.txt, it is 20.30". The correct total needs to be 20.31".
You are expecting 2 decimal point accuracy, and that is not possible with rounding from binary arithmetic. Manually you would sum the individual amounts of rain collected by your rain gauge. So that Cumulus would work with multiple stations, Steve Loft did not implement any dependency on how rainfall from rain gauge is provided by station; in all Cumulus flavours (1, 2, or MX), instead he uses subtraction of start of day rain counter from current rain counter (in binary arithmetic).
It is not how Cumulus works, but many systems are designed to maintain internally values at a higher accuracy than they require for any final output. Since Cumulus uses the daily log file to store past rain, and what is stored there is only as accurate as the figure you want for annual rain, so your annual rain includes a bit of calculating error for every day read from that log file, and it is a lot for this time close to half-way through the year! Have a look at your today.ini log file, if you did not have rain yesterday, you may see a very small number quoted for yesterday instead of zero that represents the inaccuracy of the calculation. Okay summing those up for the 137 days so far this year is not enough to affect your hundredth of an inch, but it gives an idea of the inaccuracy of the adding up all the individual readings from your station.
Just as Mark says the Wiki explains the different calculations, the differences in those calculations result in different numbers as you quote. Read up about associative law for mathematics, it makes a difference in which order some calculations and rounding are done, subtraction in particular is not associative. As I said above, Cumulus is using binary arithmetic, perhaps you need to try to convert the decimal number "0.01" into its binary equivalent to understand what I mean. You cannot do it with perfect accuracy, so this why the final number will move towards and away from the number you want depending on those individual numbers for the rain counter readings that are used in calculation.
The log you quote records each rainfall value (at your logging interval) from the value of the rain counter at that time, minus the value of rain counter at start of day, with a bit of conversion and rounding to get your 2 decimal places in each entry. That is a lot of individual subtractions that you are expecting to give a perfect addition at end of month.
You don't say where you got the MX figure from, if you are quoting the figure off the now page in the admin interface it is accessing the rain counter for current rainfall, subtracting the rain counter at start of day, adding the previous days (from the daily summary, not the monthly log) each of these has been rounded, before finally rounding from the binary sum.
Re: Correct Rainfall Total For The Year
Posted: Mon 18 May 2020 3:49 pm
by Buford T. Justice
It would be easier if Cumulus would just read the values supplied by the weather station. I can easily edit them using WS View on Android for the Ecowitt GW1000.
Maybe there needs to be a feature to edit yesterday, today, week, month, and year totals on the fly. Like maybe change Edit > Today's rain to Edit > Rain and allow for these fields to be shown and thus edited. Weather Display allows this other than week.
Re: Correct Rainfall Total For The Year
Posted: Tue 19 May 2020 10:16 am
by mcrossley
Zip up your MXdiags folder, and your data folder and attach them please.
Re: Correct Rainfall Total For The Year
Posted: Tue 19 May 2020 11:13 pm
by Buford T. Justice
mcrossley wrote: ↑Tue 19 May 2020 10:16 am
Zip up your MXdiags folder, and your data folder and attach them please.
Attached. Thanks.
Re: Correct Rainfall Total For The Year
Posted: Wed 20 May 2020 11:45 am
by mcrossley
OK, I need to see logs with data logging on please. Those logs show the rain counter at the start being 20.31, but then when it is reading the data from the station and converting it seemed to be getting 20.3031 = 20.30.
The data logs will show what the station is actually sending and if there is a rounding issue somewhere as the station works in mm and you use inches.
Please start CumulusMX using the -debug command line parameter so I have the full logs from the start.
Re: Correct Rainfall Total For The Year
Posted: Thu 21 May 2020 8:04 pm
by Buford T. Justice
Is there a certain amount of time you would like for me to run it with -debug? Also, should I upgrade from 3076?
Re: Correct Rainfall Total For The Year
Posted: Mon 25 May 2020 3:25 pm
by Buford T. Justice
A few minute run with latest version attached.
Re: Correct Rainfall Total For The Year
Posted: Tue 09 Jun 2020 2:03 pm
by mcrossley
Sorry, but I think we need to start again here.
Can you set out all the figures you have and think you should have. Along with another -debug that corresponds to those figures, and lasts long enough to write a log entry please?
I'll also need your today.ini, month.ini, and year.ini files.
It may just be a rounding error on the conversion from mm to inches to decimal value to storing the value in files (this was eliminated in v3.6.6) that I cannot do much about (and we are only talking about 0.01" of rain difference - tiny compared with the errors in actually measuring rainfall), but I need one period of time that I can relate all the numbers and log files together.
Re: Correct Rainfall Total For The Year
Posted: Wed 10 Jun 2020 9:17 am
by SUBYDAZZ
I'm also having dramas with monthly / yearly rainfall totals resetting to zero whenever I restart MX, I read the FAQ but I can't work out whats happening, the values all seem to be in the dayfile, it's like it's just not counting them, what should I do here?
The graphs also show no data from before the restart time for the daily graphs either.
Re: Correct Rainfall Total For The Year
Posted: Wed 10 Jun 2020 2:41 pm
by Buford T. Justice
Attached. Ran in debug for about 2 hours before power went out from a wind storm.
Re: Correct Rainfall Total For The Year
Posted: Thu 18 Jun 2020 2:09 pm
by mcrossley
Sorry, this one slipped off my radar.
You have a few issues with your data files...
Code: Select all
GetRainfallTotals: Error on line 34 of dayfile.txt: Input string was not in a correct format.
Error at line 863 of data\Jun20log.txt : Input string was not in a correct format.
But from the both the day file and today.ini file the rain count at the start of the day was 20.78in - with zero rain so far today.
It then read the station data and its year rain count was 527.7mm = 20.78in
So everything seems to agree.
What I don't have is what you were seeing and you thought was wrong?
Re: Correct Rainfall Total For The Year
Posted: Thu 23 Jul 2020 7:14 am
by Buford T. Justice
No worries. It fell off my radar, too. I restarted all data. So far so good these last few weeks.