poblabs/weewx-belchertown

Erroneous "Highest daily rain rate"

Closed this issue · 6 comments

Describe the bug

My station recently had a short period of data outage, where it wasn't sending data to the console. This means that there are gaps in the database. After the outage, I noticed that the record for the "Highest daily rain rate" had changed to 13107.0 mm/hr, which is clearly false. I think the time it gives is when the outage first started, so maybe some data got corrupted somewhere, but I've checked the database and the rain rate is zero at all timesteps around that time, even when other variables have no data. Where will the skin be getting this value from and how can I get rid of it?

Link to your website (IMPORTANT)
My website isn't currently publicly available as I haven't set up the necessary security yet, but hopefully this won't be needed here?

Version of the skin you're using
1.2

Screenshots
belchertown_rainrate_error

Hi,

It looks similar to #690

I don't think it's the same as that actually, that issue is likely because of rounding errors but this value is completely wrong - the actual highest rain rate is 93.6 mm/hr

I've tried to look into this a bit more. There are 7 days in a row where the maximum rain rate is 13107 mm/hr, and on each of those days there are some missing data - usually for a few hours in a row at most. However, in the database on those days the rain rate is always normal values (mostly zero) so I'm confused as to where Belchertown is getting that value from. How does it generate the values in the records table? I assumed that it would query the sql database, but I guess that it is doing something different.

If I understand correctly, you think there's a SQL error? The SQL queries can be found here. I don't know of others having an issue like this though. https://github.com/poblabs/weewx-belchertown/blob/master/bin/user/belchertown.py#L784-L810

I managed to find the erroneous values in the database - I didn't find them before because they didn't occur on one of the one minute timesteps. Removed them from the database manually and the correct value now shows on the records page!

If you haven't already check out the StdQC section in weewx. You can set expected ranges for values coming from your weather station including rainRate in an attempt to prevent these erroneous values.