here are the links to the incriminated graphs http://www.innovationengineering.it/meteo/yearrain_wrong.png
http://www.innovationengineering.it/meteo/monthrain_wrong.png Il giorno venerdì 11 novembre 2016 14:04:41 UTC+1, Maurizio Andreotti ha scritto: > > Help!! :-) > > I am using weewx since 3 years now and updated quite regularly - > > I am now facing an issue about fixing a wrong rain data collected at end > of october. > > I followed the wiki and I think I moved to NULL all lines where hte rain > was reported wrongly too high..... > > > but the yearly /monthly graphs still shows the wrong peak..... > > after fixing I did > wee_database --drop-daily and > wee_database --backfill-daily and > wee_reports > > several time, looker around the wiki and web,.. but it's but the yearly > /monthly graphs still shows the wrong peak..... > > > [image: rain] > [image: rain] > > > I tried also automating the fix creating this scrippt but.... no luck > > #!/bin/sh > > > usage() { > echo "usage: sudo weewx-db-fixer.sh [[[-f --force ] | [-h]]" > } > > #read options passed at launch time > while [ "$1" != "" ]; do > case $1 in > -f | --force) > b=1 > ;; > -h | --help ) usage > exit > ;; > * ) usage > exit 1 > esac > shift > done > > > > echo weewx db fixer > echo stop weewx daemon > /etc/init.d/weewx stop > echo creating a copy of the db in $dest > cp /var/lib/weewx/weewx.sdb /var/lib/weewx/weewx.sdb.$(date > +"%m-%d-%y-%T") > > echo looking for data to fix > echo > echo ---------- > echo looking for windGust \> 100 > a=$(echo "SELECT datetime(datetime, 'unixepoch'), windGust FROM archive > WHERE (windGust > 100);" | sqlite3 /var/lib/weewx/weewx.sdb) > if test -z "$a"; then > echo nothing to do, good! > else > echo found: $a values > echo "UPDATE archive SET windGust=NULL WHERE (windGust > 100);" | > sqlite3 /var/lib/weewx/weewx.sdb > b=1 > fi > echo found: $a values > echo ---------- > echo looking for windspeed \> 100 > a=$(echo "SELECT datetime(datetime, 'unixepoch'),windSpeed FROM archive > WHERE (windSpeed > 100);" | sqlite3 /var/lib/weewx/weewx.sdb) > if test -z "$a"; then > echo nothing to do, good! > else > echo found: $a values > echo "UPDATE archive SET windSpeed=NULL WHERE (windSpeed > 100);" | > sqlite3 /var/lib/weewx/weewx.sdb > b=1 > fi > echo found: $a values > echo ---------- > echo looking for rainrate \>5 inch per hour > a=$(echo "SELECT datetime(datetime, 'unixepoch'),rainRate FROM archive > WHERE (rainRate > 5);" | sqlite3 /var/lib/weewx/weewx.sdb) > if test -z "$a"; then > echo nothing to do, good! > else > echo found: $a values > echo "UPDATE archive SET rainRate=NULL WHERE (rainRate > 5);" | sqlite3 > /var/lib/weewx/weewx.sdb > b=1 > fi > echo found: $a values > > > echo ---------- > echo looking for archive-rain_day max rain \>5 inch per hour > a=$(echo "SELECT datetime(datetime, 'unixepoch'),max FROM archive_day_rain > where max > 5;" | sqlite3 /var/lib/weewx/weewx.sdb) > if test -z "$a"; then > echo nothing to do, good! > else > echo found: $a values > sudo echo "UPDATE archive_day_rain SET max=NULL WHERE (max > 5);" | > sqlite3 /var/lib/weewx/weewx.sdb > b=1 > fi > echo found: $a values > echo rebuild db stuff ---------- > echo $b > if test -z "$b"; then > echo nothing to do, good! > else > echo rebuild db > wee_database /etc/weewx/weewx.conf --fix --string-check > wee_database /etc/weewx/weewx.conf --drop-daily > wee_database /etc/weewx/weewx.conf --backfill-daily > wee_reports /etc/weewx/weewx.conf > fi > > > echo ---------- > echo restart weewx > /etc/init.d/weewx start > > > -- 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]. For more options, visit https://groups.google.com/d/optout.
