Hi Gary, i performed the step you reported,dropping daily and rebuilding them. I have still the issue,below the queries after steps you reported. Thanks in advance.
sqlite> select sum(rain) from archive where dateTime > 1601157600 and dateTime <= 1601244000 and rain != 0; sum(rain) 1.13385826771654 sqlite> select * from archive_day_rain where dateTime=1601157600; dateTime|min|mintime|max|maxtime|sum|count|wsum|sumtime 1601157600|0.0|1601158071|0.165354330708661|1601218891|0.645669291338583|197|920.551181102362|47820 Il giorno domenica 23 ottobre 2022 alle 13:44:45 UTC+2 gjr80 ha scritto: > I'm sorry I am a bit confused. You just said 'as reported I already did > every step you suggested' but your original post made no mention of the > steps I mentioned. It's not clear to me what you have/have not done. > > Irrespective, can you please stop WeeWX, execute the wee_database > --drop-daily and --rebuild-daily commands. Please capture the console > output showing the exact commands entered and the exact output. No images > please, copy and paste as text. Then run your SQLite queries again and > again post the exact commands entered and the response. > > Gary > > On Sunday, 23 October 2022 at 19:27:59 UTC+10 Roberto Verrelli wrote: > >> Hi gary, >> As i reported,I already did every step you suggested,data on >> archive_daily_rain is still wrong.... >> >> Il dom 23 ott 2022, 10:42 gjr80 <[email protected]> ha scritto: >> >>> Hi, >>> >>> Just a couple of points on terminology so we are on the same sheet of >>> music. In a default install your WeeWX database has a table named >>> archive, this is commonly known as 'the archive'. There are numerous >>> other tables in the database whose name are in the format >>> archive_day_xxxxx, these tables are known as 'the daily summaries'. The >>> daily summaries are essentially an optimisation of data derived from the >>> archive so that certain aggregates can be calculated much more quickly. >>> >>> If you are confident the data in your archive is correct then all you >>> need do to correct the daily summaries is to drop then rebuild the daily >>> summaries. Do this by first stopping WeeWX then running wee_database >>> <http://weewx.com/docs/utilities.htm#wee_database_utility> with the >>> --drop-daily action. Once you have dropped the daily summaries you can >>> rebuild them from the data in your archive by again running wee_database >>> but this time with the --rebuild-daily action. Make sure you make a >>> backup of your database first. >>> >>> If you still find your data is incorrect/inconsistent post back here >>> with exact commands entered and the exact responses along with details of >>> the discrepancies. >>> >>> Once you have your database sorted you can fix the NOAA format report >>> problem by deleting all of the generated NOAA format reports from your >>> WeeWX machine to force WeeWX to regenerate them all on the next report >>> cycle. Where these files are located depends on your WeeWX install, for a >>> setup.py install they will likely be in /home/weewx/public_html/NOAA >>> and for a package install /var/www/html/weewx/NOAA. >>> >>> Gary >>> On Sunday, 23 October 2022 at 17:09:27 UTC+10 [email protected] wrote: >>> >>>> Hi, >>>> >>>> i have the following issue. >>>> I imported 2 years of data in weewx database but i noticed some issues >>>> on daily archive. >>>> The most important is with the rain. >>>> Taking data from archive table, i perform the following query on sql db >>>> for a specific day in order to have the total amount of rain for that >>>> specific day. >>>> The value i obtain is the correct i expect ,for that day i had 1.13385 >>>> inch of rain. >>>> >>>> select sum(rain) from archive where dateTime > 1601157600 and dateTime >>>> <= 1601244000 and rain != 0 >>>> >>>> In my NOAA report, and on daily archive for that day i have completely >>>> different values( 0.645669 inches). >>>> In particular for the same day as before but this time from the >>>> archive_daily_rain i have the following output >>>> >>>> sqlite> select * from archive_day_rain where dateTime=1601157600; >>>> dateTime|min|mintime|max|maxtime|sum|count|wsum|sumtime >>>> >>>> 1601157600|0.0|1601158071|0.165354330708661|1601218891|0.645669|197|920.551181102362|4782 >>>> in the sum field there is that 0.645669 inches that is the value i >>>> have in NOAA report that is wrong. >>>> Why is weewx doing this?i can i fix this for all day i had rain? >>>> I tried: >>>> wee_database --update >>>> wee_database --reweight >>>> dropped the daily record and regenerated >>>> >>>> No one of this action fixed this issue. >>>> Thanks in advance. >>>> Best regards. >>>> >>>> Roberto >>>> >>> -- >>> You received this message because you are subscribed to a topic in the >>> Google Groups "weewx-user" group. >>> To unsubscribe from this topic, visit >>> https://groups.google.com/d/topic/weewx-user/pQohXWFsEjk/unsubscribe. >>> To unsubscribe from this group and all its topics, send an email to >>> [email protected]. >>> To view this discussion on the web visit >>> https://groups.google.com/d/msgid/weewx-user/fab0df47-320b-478c-bed9-717ae22d2f68n%40googlegroups.com >>> >>> <https://groups.google.com/d/msgid/weewx-user/fab0df47-320b-478c-bed9-717ae22d2f68n%40googlegroups.com?utm_medium=email&utm_source=footer> >>> . >>> >> -- 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/fbaa2e74-6982-4a64-9825-1b1c0fb55b0dn%40googlegroups.com.
