Problem SOLVED! I will describe the course of action, should anyone encounter a similar incident in the future and come across this thread.
I assumed that the wrong value in the ‘rain’ column is given in inches: 4.984 inches = 126.6 mm I know from the PWS panel records that 15.0 mm of rain fell that day: 15 mm = 0.590551181102 inch I subtracted the false value of 4.984 from the total value of 5.294 from the ‘rain’ column for the entire day: 5.294 - 4.984 = 0.31 inches Now I convert this difference into millimeters: 0.31 inch = 7.874 mm >From the known precipitation value of the whole day (15 mm) I subtract the precipitation value from all observations (records) except one false one: 15 mm - 7.784 mm = 7.126 mm The result of the above subtraction to the true (or close to true) rainfall value, which falsified the daily results. I convert it to inches: 7.126 mm = 0.280551181102 inch I substitute the latter value in the database in the appropriate row and column: echo “UPDATE archive SET rain=0.280551181102 WHERE dateTime = 1746259200;” | sqlite3 /var/lib/weewx/weewx.sdb (I didn't back up the database because I run all the time on a local copy of the database on my laptop, not on a Raspberry Pi that supports PWS). Now rebuilding the daily statistics: weectl database rebuild-daily --date=2025-05-03 And everything looks as it should :) Thank you for your help and hints - although they did not solve the problem by themselves, they guided me to the right solution. poniedziałek, 5 maja 2025 o 11:53:32 UTC+2 [email protected] napisał(a): > Yes, as described above: correct the values in archive table and then > rebuild the affected days. > > Tomasz Lewicki schrieb am Montag, 5. Mai 2025 um 11:32:37 UTC+2: > >> I took another peek into the database and noticed something strange. I >> sorted all the records in the ‘rain’ column from smallest to largest. >> Excluding those with a value of 0.0, all the records have a value much >> smaller than 1; the largest has a value of 0.4. However, there is one that >> has a value of 4.984 - and that's the one from May 3, 2025, 10:00 a.m. >> local time. If I understand correctly, 4.984 is the value in inches - this >> would explain the false precipitation value (126.6 mm plus the rest from >> that day). I will do some modification soon and write about the results. >> >> poniedziałek, 5 maja 2025 o 11:12:19 UTC+2 Tomasz Lewicki napisał(a): >> >>> For testing purposes, I installed Weewx on my laptop and transferred the >>> database to it from the Raspberry Pi running my PWS. Weewx runs in >>> simulator mode, but I'm interested in data from yesterday and earlier, so I >>> don't pay attention to the current readings. I've done everything, >>> including rebuilding the database described here: >>> https://weewx.com/docs/5.1/utilities/weectl-database/?h=derived#recalculate-daily-summary-weights >>> >>> Unfortunately, nothing changes - the false value is still visible in daily, >>> weekly and monthly data. I don't understand what the issue is :| >>> >>> poniedziałek, 5 maja 2025 o 09:36:12 UTC+2 [email protected] >>> napisał(a): >>> >>>> When the archive table is ok, just rebuild the affected days. If the >>>> archive really is OK, then everything should be correct. >>>> >>>> [email protected] schrieb am Montag, 5. Mai 2025 um 09:35:06 UTC+2: >>>> >>>>> sum is the sum, wsum is the weighted sum, needed to calculate >>>>> averages, etc. >>>>> >>>>> Tomasz Lewicki schrieb am Montag, 5. Mai 2025 um 08:59:36 UTC+2: >>>>> >>>>>> Thank you for the reply. But as I wrote in othe thread ( >>>>>> https://groups.google.com/g/weewx-user/c/aPjmvWN9Kss), values in >>>>>> 'archive' table looks normal. So I don't know what is correlation >>>>>> between >>>>>> 'sum' and 'wsum' and what is the reason that in the current data I have >>>>>> the correct values, and the daily summary shows something strongly >>>>>> deviating from reality. I would like to fix this, because it spoils the >>>>>> statistics a lot, and I would not like to zero out the rain from the >>>>>> whole >>>>>> day. >>>>>> >>>>>> niedziela, 4 maja 2025 o 11:55:34 UTC+2 [email protected] >>>>>> napisał(a): >>>>>> >>>>>>> To correct your rain values modify the column in the archive table, >>>>>>> then let weewx build the daily values for the affected dates. I can't >>>>>>> remember if the rainRate is a derived value or not (or if it depends on >>>>>>> the >>>>>>> hardware), if so, you might want to (delete and) recalculate this >>>>>>> derived >>>>>>> value also. There shouldn't be any need to modify die archive_day table. >>>>>>> >>>>>>> See: >>>>>>> >>>>>>> https://weewx.com/docs/5.1/custom/database/?h=reb#rebuilding-the-daily-summaries >>>>>>> >>>>>>> https://weewx.com/docs/5.1/utilities/weectl-database/?h=derived#calculate-missing-derived-variables >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> Tomasz Lewicki schrieb am Samstag, 3. Mai 2025 um 18:44:31 UTC+2: >>>>>>> >>>>>>>> I would like to ask which columna in the archive_day_rain array >>>>>>>> stores the daily rainfall. The problem is that Weewx has treated >>>>>>>> today's >>>>>>>> rainfall at my place in a very strange way - the daily summary in the >>>>>>>> HTML >>>>>>>> files shows more than 130 mm. The station panel (logger) recorded 12 >>>>>>>> mm and >>>>>>>> this is the correct value, because another station located about 1 km >>>>>>>> from >>>>>>>> me recorded a similar value. I would like to manually correct the >>>>>>>> daily >>>>>>>> precipitation in the weewx.sdb file, but I don't know which column I >>>>>>>> should >>>>>>>> edit - sum or wsum. In what units is the precipitation value >>>>>>>> expressed? In >>>>>>>> the wsum column I have 1515 - but what? >>>>>>> >>>>>>> -- 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 visit https://groups.google.com/d/msgid/weewx-user/a8526106-5bb1-4c39-93fd-e7babdb4a08cn%40googlegroups.com.
