Page 1 of 1

"So far" day rainfall out of step with hourly totals

Posted: Fri 01 Jun 2018 9:53 am
by freddie
Since changing my twitter.txt to report both hourly rainfall and day total so far, I noticed a discrepancy last night. Tweet for 2100 UTC:

Code: Select all

2100 UTC: Wind N 0.0 kts. Temp 17.1 C (max 09-09 21.8 C at 13:54, min 09-09 16.4 C at 09:00), Dew pt 15.7 C. Bar 1015.31 hPa, Rising slowly. Rain last hour 0.0 mm (rain 09-09 1.4 mm) #ukweather
Tweet for 2200 UTC last night:

Code: Select all

2200 UTC: Wind N 0.0 kts. Temp 17.0 C (max 09-09 21.8 C at 13:54, min 09-09 16.4 C at 09:00), Dew pt 15.9 C. Bar 1015.41 hPa, Rising slowly. Rain last hour 1.2 mm (rain 09-09 2.8 mm) #ukweather
You can see that there was 1.2 mm of rain (rain last hour 2100-2200) but the daily total changed from 1.4 mm to 2.8 mm. Looking at the rainfall graph, there was a "tip" between 2100 and 2101. It looks as if the tip was not attributed to the hourly total at 2200 UTC, and was in effect lost. Daily total was correct at both 2100 UTC and 2200 UTC.

Re: "So far" day rainfall out of step with hourly totals

Posted: Fri 01 Jun 2018 12:03 pm
by steve
I’ll have a look at the code when I next have my laptop out.

Re: "So far" day rainfall out of step with hourly totals

Posted: Fri 01 Jun 2018 6:08 pm
by steve
I think this is similar to your other recent query. Cumulus maintains a list of readings for the last hour, adding a new one each minute and deleting those which are older than an hour ago. It determines the rainfall in the last hour from the difference between the rain counter in the first entry in the list and the last entry. So depending on the timing of when a rain tip occurs and when the the actual comparison is done, it is possible that the tip occurred slightly more than one hour ago, but at the previous comparison it hadn't occurred yet. Bear in mind that all of this happens in separate threads, so sometimes actions can occur in a different order.

I'll admit that I haven't totally convinced myself that the explanation is as above, but without seeing the data readings and the timing of exactly when Cumulus received the reading readings relative to when it updated the list and when it actioned the web tag in your twitter.txt file, it I can't come up with anything better.

Re: "So far" day rainfall out of step with hourly totals

Posted: Fri 01 Jun 2018 7:46 pm
by freddie
That was my first thought too - a question of timing. But the tip didn't register in the previous hour's total either, so it was effectively lost from the hourly totals from the day. That was the bit that caught my attention as I couldn't account for the tip at all. I'm happy, though, as it wasn't lost from the daily total - but thought you'd like to be made aware of the anomoly.