Highest daily rainfall issue

61 views
Skip to first unread message

JohnP

unread,
Dec 9, 2025, 4:04:09 PM (8 days ago) Dec 9
to weewx-user
Hi,

I'm hoping for some pointers to eradicate an erroneous 'Highest Daily Rainfall' value (see attached image).

I have 19.79cm of rain registered on 22/April/2025 - a day where there was no rain at all.

I've tried to follow some of the steps from other threads, querying the database for erroneous looking data both from the CLI and by searching with DB Browser, however I conclude that I am probably looking for the wrong value in the wrong place!

Here's what I returned from the database:

sqlite> select datetime(dateTime,'unixepoch','localtime'),dateTime,rain,rainRate from archive where dateTime > 1745276400 and dateTime <= 1745366400;

2025-04-22 00:05:00|1745276700|0.0|0.0

2025-04-22 00:10:00|1745277000|0.0|0.0

2025-04-22 00:15:00|1745277300|0.0|0.0

<---snip - all zero data for every 5 minute interval --->

2025-04-23 00:45:00|1745365500|0.0|0.0

2025-04-23 00:50:00|1745365800|0.0|0.0

2025-04-23 00:55:00|1745366100|0.0|0.0

2025-04-23 01:00:00|1745366400|0.0|0.0


I can't find a '19.79' in the database (or 1978 in case of a round up), and the sum of the values above would clearly be zero.


Which talks about dropping the daily database and rebuilding it - however /etc/weewx/scripts/wee_database (and all scripts in that folder) are not executable, so I am a little concerned they are orphans from an older version and are superseded by newer utilities in a different location.

Any pointers would be much appreciated, thanks in advance.

J

Screenshot 2025-12-09 at 20.18.46.png

michael.k...@gmx.at

unread,
Dec 9, 2025, 11:17:44 PM (8 days ago) Dec 9
to weewx-user
There are several reasons why you mayy not find a 19.79 value in the database:
  •  You are searching the wrong table: you won't find the highest daily rainfall in the archive table. (Unless all the rain was recorded in a single interval). Look for the table archive_day_rain and in there you should find a row with that value (in which unit it may be, I don't know)
  • Units: the database doesn't necessarily contain metric values. Especially if you haven't actively changed the default unit_system for the database. So the value you are looking for might be stored in inch
A complete rebuild of your whole history might not be necessary, if such values aren't a repeating pattern. Which version are you on? wee_database is from before v5.0. So if you are on a newer version you should use weectl database - and refer to the docs for the version you use.

JohnP

unread,
Dec 10, 2025, 4:46:46 AM (7 days ago) Dec 10
to weewx-user
Thank you Michael - that was the tip I needed.

I did already try searching in inches, to no avail - but as you say, I was looking in the wrong table entirely.

The offending row is attached. Epoch time 1745362800, which equates to the correct end of day with my DST offset.

There are 3 values in the row:

max - I guess this is the max per daily 5 minute segment (though obviously unrealistic given the contents of the other table all being zero)
sum - This is the value in inches which converts neatly to 19.79cm
wsum - not sure what this relates to as it doesn't look like a sum of anything, nor does it look like a metric view of the imperial values (too big).

I'm thinking, based on looking at adjacent rows, that I should zero out all of these fields - is that what you'd recommend?


From etc/weewx/weewx.conf, it looks like I am on version 4.10.2 - so weectl is the right tool.

What would you suggest I rebuild? Should I delete the NOAA report for April 2025 also to have that regenerated?

Thank you again for all the pointers,

John
Screenshot 2025-12-10 at 09.35.38.png

michael.k...@gmx.at

unread,
Dec 10, 2025, 5:14:22 AM (7 days ago) Dec 10
to weewx-user
With 4.10.2 wee_database ist the tool. Run wee_database --rebuild-daily --date=YYYY-mm-dd where YYYY-mm-dd is whatever local date 1745362800 translates to (my best guess 2025-04-23). Then delete the NOAA file for April 2025. You may need a "sudo" before the command.

If such values are not a repeating pattern, you should be done.

JohnP

unread,
Dec 10, 2025, 5:39:33 AM (7 days ago) Dec 10
to weewx-user
Thanks again Michael,

There might be some lint from older versions, because all the old scripts have had their execute attribs removed. 

weectl is definitely there and when I query -v, I get 5.20.

When starting the daemon, it also calls out 5.20: weewxd[4170681]: INFO __main__: Starting up weewx version 5.2.0

It looks like the syntax is the same for wee_database vs weectl database too.

I'll give it a go - thank you again.

michael.k...@gmx.at

unread,
Dec 10, 2025, 5:53:53 AM (7 days ago) Dec 10
to weewx-user
The version in the config file should be the version the original config was created with, during install. The version in the logs (5.2.0) is the right version.

JohnP

unread,
Dec 10, 2025, 9:04:30 AM (7 days ago) Dec 10
to weewx-user
Thank you so much Michael - this worked perfectly.
Reply all
Reply to author
Forward
0 new messages