How to delete bad values ​​in weewx db with sqlite

103 views
Skip to first unread message

Francesco Fasano

unread,
Oct 25, 2024, 6:05:59 AM10/25/24
to weewx-user
Good morning everyone, today in my city there was a very strong climatic event with a water accumulation of 130 mm and a Rain Rate of 500 mm/hr. In all this there was a lot of thunder and lightning and exactly at 10.11am my Davis entered incorrect values ​​such as the minimum temperature at -22.9 °C
minimum apparent temperature -28.8 °C
Lowest wind chill -31.3 °C
Lowest dew point -23.6°C.
There is a sqllite query that clears these values ​​to zero.
Obviously these will have to be rebuilt.
Thanks for the help
wewwx 5.1.0

Warren Gill

unread,
Oct 25, 2024, 6:16:23 AM10/25/24
to weewx...@googlegroups.com
Ciao Francesco, There is a very good article in the weewx wiki on github that takes you through the process step-by-step. You can read it here: https://github.com/weewx/weewx/wiki/Cleaning-up-old-bad-data


--
You received this message because you are subscribed to the Google Groups "weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to weewx-user+...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/weewx-user/f352ef3e-8af3-43fb-8bb3-75204a50c800n%40googlegroups.com.

Francesco Fasano

unread,
Oct 25, 2024, 7:44:18 AM10/25/24
to weewx-user
Hi Warren thanks for the reply.
I saved the db first and then went to see the table names
archive_day_dewpoint I found the wrong string
1729807200   -23.637362385367       1729843980     19.482794091558   1729851864   2655.38888646456  149 796616.665939367  44700
I did the first step of the guide
echo "SELECT * FROM archive WHERE (dewpoint = -23.637362385367);" | sqlite3 /var/tmp/backup.sdb

but I didn't see anything on the video

Did I make a mistake with the query?

Francesco Fasano

unread,
Oct 25, 2024, 8:14:17 AM10/25/24
to weewx-user



devpoint.png


windchili

windchill.png



out temp min
outtempmin.png

minimum apparent temperature
aaptempmin.png



Francesco Fasano

unread,
Oct 25, 2024, 8:29:40 AM10/25/24
to weewx-user
I solved it by only performing today's daily reconstruction
sudo weectl database rebuild-daily --from=2024-10-25 --to=2024-10-25
Reply all
Reply to author
Forward
0 new messages