Clear anomalous rain rate reading from database

60 views
Skip to first unread message

Muireadach O Connor

unread,
Mar 27, 2020, 4:41:01 AM3/27/20
to weewx-user
I followed the guide ( http://www.weewx.com/docs/usersguide.htm - Spikes in the graph section) on  to clear an anomalous reading after I cleaned my weather station which resulted in a huge rainfall rate reading spike.

However this morning I see the reading is still there (https://www.loughlinstown.ie/records.html - rainfall rate records table - February 2020).

I'm running WeeWX on a Raspberry Pi 2.

Steps taken as per the guide:

Stop WeeWX

sudo service weewx stop


Make a copy of the archive database

cp weewx.sdb weewx-YYMMDD.sdb

Verify the bad data exist where you think they exist
sudo sqlite3 weewx.sdb
sqlite> select dateTime,rainRate from archive where rainRate > 200; 

sqlite> (nothing displayed after doing previous command, just sqlite prompt)


Remove the bad data by setting to NULL
sqlite> update archive set rainRate=NULL where rainRate > 200;


Delete the aggregate statistics so that WeeWX can regenerate them without the anomalies
sudo wee_database --drop-daily

Start WeeWX

sudo service weewx start


I figured that the records would be updated daily so waited until this morning, the day after, to check to see if the records page had updated, did a force refresh to make sure (shift+f5) but still the value reads "Highest Rain Rate 460.8 mm/h 01/02/20 14:20:00"


Can anyone advise please?


P.S. what is the correct nomenclature WeeWX or weeWX ?


Many thanks,


Muireadach.

Muireadach O Connor

unread,
Mar 27, 2020, 7:53:14 AM3/27/20
to weewx-user
Fixed it, posting here for future reference,

I downloaded the free tool "DB Browser for SQLite from https://sqlitebrowser.org/ and had alook at a copy of my databse. It was then I realised that the values are stored in imperial, so my rainfall, though displaying in mm is reorded in inches.

So reran the below but changed :

update archive set rainRate=NULL where rainRate > 200 (mm) to update archive set rainRate=NULL where rainRate > 14 (in)

All worked great, tables already updated.

Cheers,

Muireadach.
Reply all
Reply to author
Forward
0 new messages