It never rains, but apparently it pours .....

70 views
Skip to first unread message

colin....@gmail.com

unread,
Mar 31, 2021, 12:44:49 AM3/31/21
to weewx-user
It's not my week lol!

Now that I've rebuilt Weewx my weather station decided to go rogue and tell me it rained about 500mm in the last hour. I've stopped it thinking it's raining but now how do I get rid of the rogue data from the database in Weewx? I did a search for all kinds of database issues here but my search fu is failing me.

Cheers for any help (and yes I have no doubt it's easy!)

Colin

Colin Larsen

unread,
Mar 31, 2021, 1:06:08 AM3/31/21
to weewx-user
I'm thinking that the easiest road here is to delete (or null??) all of todays rain data. So that would be 'rain' and 'rainRate'?

Thanks
Colin

--
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 on the web visit https://groups.google.com/d/msgid/weewx-user/ce3e4ec1-e936-487e-8df8-ebd96d376619n%40googlegroups.com.

Colin Larsen

unread,
Mar 31, 2021, 1:25:09 AM3/31/21
to weewx-user
OK, so used epoch time to find the records I want to delete (with rain and rainRate), now do I just delete them or do they need to be replaced by null (or 0.0?). I may need a hand with the correct syntax for that please

pi@wduino:~ $ echo "SELECT rainRate FROM archive WHERE (dateTime > 1617159600);" | sudo sqlite3 /var/lib/weewx/weewx.sdb

0.0419816511200587

0.0

0.0

0.0

0.0

0.0

0.0

0.0

279.980998292116

247.545269518011

19.3118544276522

13.7807155122679

5.58392519958292

0.957907401564173

4.75823850308484

5.67484207064662

0.84798164620346

0.0

0.0

0.0

0.0

0.0

0.0

0.0

0.0

0.0

0.0

0.0

pi@wduino:~ $ 

gjr80

unread,
Mar 31, 2021, 2:20:27 AM3/31/21
to weewx-user
If you know it definitely didn't rain in the archive periods concerned then use 0.0, if it did rain but you don't know how much then you could use None to indicate no rainfall data for those periods. Or you could just use 0.0 for the lot, not really going to make too much difference at the end of the day. None values may show a gap in your day rain plot, zeros will not.

Also, don't forget to rebuild your daily summaries for the day concerned once you have fixed the data. Assuming it is today there will be no need to rebuild any NOAA reports, if it was an earlier month/year you would need to delete from that month/year onwards to force regeneration.

Gary

Colin Larsen

unread,
Mar 31, 2021, 2:27:23 AM3/31/21
to weewx-user
Thanks Gary, much appreciated. I just found the wiki https://github.com/weewx/weewx/wiki/Cleaning-up-old-'bad'-data and used that to delete the data, yes it was today. Will rebuild the daily summaries now.

I used 'null' so there is just nothing in those parts of the table (rather than 0.0 in the rest) - does that matter?

Colin


Reply all
Reply to author
Forward
0 new messages