Thanks again, Gary.
This is my result of the query

 echo "SELECT dateTime,usUnits,rainRate FROM archive WHERE (RainRate > 13);" 
| sqlite3 /home/pi/weewxcopy.sdb
1581284100|1|13.3385826805
1581284400|1|13.3385826805

I don't understand the dateTime 1581284100 which means 02-09-2020, 
22:35:00. But my "bad data" are from 4 July 2020 09:33. I can't see where 
the "bad data" come from.

Am Dienstag, 7. Juli 2020 03:14:09 UTC+2 schrieb gjr80:
>
> Probably easiest to limit the columns being returned (* returns all 
> columns). Try something like:
>
> echo "SELECT dateTime,rainRate FROM archive WHERE (RainRate > 13);" | 
> sqlite3 /home/pi/weewxcopy.sdb
>
> That should return two columns only; the first will be dateTime and the 
> second rainRate. Remember also that the number used in your query needs 
> to be in the rainRate units used in your database. If your database uses 
> US units (the default) it will be in inches, if METRIC it is cm, if 
> METRICWX it is mm. You can check what unit system your database uses by 
> looking at the target_unit setting under [StdConvert] in weewx.conf or 
> you can add the field usUnits to the above query:
>
> echo "SELECT dateTime,usUnits,rainRate FROM archive WHERE (RainRate > 
> 13);" | sqlite3 /home/pi/weewxcopy.sdb
>
> 1 = US, 16 = METRIC, 17 = METRICWX
>
> Any daily rainRate aggregate will be calculated or come directly from the 
> rainRate daily summary table, but for the purposes of fixing 'bad' data 
> that is largely irrelevant. The daily summaries are part of an optimization 
> strategy that improves performance when obtaining aggrgegates over 
> multiples of one day. The daily summary tables are derived from data in the 
> archive table. So what? Well when it comes to fixing 'bad' data it means 
> that you need to fix the 'bad' data in the archive table and then rebuild 
> the daily summaries once you have removed the 'bad' data from the archive 
> tale. If you work on fixing the bad data in the daily summary then it might 
> fix the symptom short term but underlying 'bad' data in the archive table 
> will remain and eventually there will be a daily sumamry rebuild which will 
> overwrite your corrected data with the 'bad'.
>
> Gary
>
> On Monday, 6 July 2020 23:49:39 UTC+10, Andre wrote:
>>
>> Thanks, Gary.
>>
>> I've tried this
>>
>> echo "SELECT * FROM archive WHERE (RainRate > 13);" | sqlite3 /home/pi/
>> weewxcopy.sdb
>> 1581284100|1|5|28.994532150147|||29.005||||||||||||4.72|43.3322839672562
>> ||0.0|||||||||||||||||||||46.1|||||||50.0|69.5||-88.0|-90.0|2.0|8.0
>> ||||||||||||90.0|46.1||||||28.8686683318007||0.11811023625||13.3385826805
>> ||99.9375|||||||||||||||2.0|8.0|2.0|8.0|-88.0|-90.0|-88.0|-90.0||0.0||||
>> 46.1|202.5|10.0|337.5||2.0
>> 1581284400|1|5|28.9915092022014|||29.002||||||||||||4.72|41.9497362666115
>> ||0.0|||||||||||||||||||||44.7|||||||50.0|69.5||-88.0|-90.0|2.0|8.0
>> ||||||||||||90.0|44.7||||||28.8656567623561||0.18110236225||13.3385826805
>> ||99.9375|||||||||||||||2.0|8.0|2.0|8.0|-88.0|-90.0|-88.0|-90.0||0.0||||
>> 44.7|45.0|14.0|112.5||3.0
>>
>> but I can't see which data is bad. Is it possible that *Highest Daily 
>> RainRate* is a calculated value? If so what will be the right way to fix 
>> my 13107 mm/hr highest daily rainrate on 4 July 2020 09:33?
>>
>> Am Montag, 6. Juli 2020 12:33:07 UTC+2 schrieb gjr80:
>>>
>>> Hi, 
>>>
>>> The wiki article “Cleaning up old ‘bad’ data” (
>>> https://github.com/weewx/weewx/wiki/Cleaning-up-old-'bad'-data) would 
>>> be a good starting point. 
>>>
>>> Gary
>>
>>

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/787c68a4-9c3f-4977-84bb-eb94fbb5c0e0o%40googlegroups.com.

Reply via email to