Good to know. I can't remember how I recalculated the rainRate some years ago, when I switched from an 1h-interval to a 15-min interval. Obviously not with --calc-missing, because it worked :)
gjr80 schrieb am Dienstag, 14. Mai 2024 um 23:55:01 UTC+2: > Whilst rainRate may be a value calculated by WeeWX, the current > StdWXCalculate service is limited in that it can only calculate rainRate > from loop packet data. In the case of a backfill/recalculate (as with an > import) the only rain data available is from archive records and hence > rainRate is not calculated. In these cases rainRate must be manually > calculated. > > Issue #787 <https://github.com/weewx/weewx/issues/787> was raised to > address this behaviour for imports. Any resolution to issue #787 would > likely fix the rainRate re-calculate behaviour as well, but I have no > timeframe for when issue #787 might be addressed. > > Gary > > On Tuesday 14 May 2024 at 23:39:19 UTC+10 michael.k...@gmx.at wrote: > >> rainRate is a calculated value: >> https://weewx.com/docs/5.0/reference/weewx-options/stdwxcalculate/ >> >> So first you correct all the rain values and may want to delete rainRate >> values from your database >> Second recalculate them: >> https://weewx.com/docs/5.0/utilities/weectl-database/#calculate-missing-derived-variables >> Third drop the daily summaries >> https://weewx.com/docs/5.0/utilities/weectl-database/#drop-the-daily-summaries >> Fourth rebuild the daily summaries >> https://weewx.com/docs/5.0/utilities/weectl-database/#rebuild-the-daily-summaries >> >> If your archive values are sane, your totals will be sane then. >> Consider only dropping/rebuilding the daily summaries for days with bad >> data, this will be faster and you won't lose the exact timestamps/value for >> min/max records on all the other days. See these switches in the docs: >> [[--date=YYYY-mm-dd] >> | [--from=YYYY-mm-dd] [--to=YYYY-mm-dd]] >> >> Kevin Crivelli schrieb am Dienstag, 14. Mai 2024 um 14:48:16 UTC+2: >> >>> I did everything here. It is how I was able to remove the bad rainrate >>> data. The problem now is that while the bad rainrate data is gone, the >>> resulting rain total data is not. I need to get the rain totals to reflect >>> the rainrate data now. The totals are still considering the bad rainrate >>> data that has been removed. >>> >>> On Tue, May 7, 2024, 2:22 PM vince <vince...@gmail.com> wrote: >>> >>>> You might want to consult the wiki. That's why hundreds of hours have >>>> been spent creating it. >>>> >>>> https://github.com/weewx/weewx/wiki/Cleaning-up-old-'bad'-data >>>> >>>> On Tuesday, May 7, 2024 at 9:19:04 AM UTC-7 Kevin Crivelli wrote: >>>> >>>>> or perhaps there is a way to rebuild the raintotals fields from the >>>>> current rainrate data >>>>> >>>>> On Tuesday, May 7, 2024 at 12:17:20 PM UTC-4 Kevin Crivelli wrote: >>>>> >>>>>> I removed bad rainrate data but it did not effect the raintotals >>>>>> field. I was able to determine the epoch date-time for the bad rainrate >>>>>> data. Having those I was going to delete the rain_total values for those >>>>>> entries but how would I have that then reflect in the following >>>>>> rain_total >>>>>> fields? >>>>>> >>>>>> chatgpt gave me this which I feel is a start but I'm not quite there >>>>>> yet. anyone able to help me with this? >>>>>> >>>>>> -- Store the rain total of the specific datetime in a variable >>>>>> SET @deleted_rain_total = (SELECT rain_total FROM your_table WHERE >>>>>> datetime = specific_datetime); >>>>>> >>>>>> -- Delete the rain total at the specific datetime >>>>>> DELETE FROM your_table WHERE datetime = specific_datetime; >>>>>> >>>>>> -- Decrease the rain totals for the following datetimes >>>>>> UPDATE your_table >>>>>> SET rain_total = rain_total - @deleted_rain_total >>>>>> WHERE datetime > specific_datetime; >>>>>> >>>>>> These are the date and times of the entries that need their raintotal >>>>>> nulled and then the proceeding raintotals to reflect the change >>>>>> >>>>>> 1699559700: 2024-05-10 01:55:00 >>>>>> 1699560000: 2024-05-10 01:56:40 >>>>>> 1709221800: 2024-05-26 06:50:00 >>>>>> 1709222100: 2024-05-26 06:55:00 >>>>>> 1713436800: 2024-06-16 10:00:00 >>>>>> 1713437100: 2024-06-16 10:05:00 >>>>>> 1713780900: 2024-06-20 03:35:00 >>>>>> 1713781200: 2024-06-20 03:40:00 >>>>>> 1714771200: 2024-06-25 18:40:00 >>>>>> 1714771500: 2024-06-25 18:45:00 >>>>>> 1699559400: 2024-05-10 01:50:00 >>>>>> 1699560300: 2024-05-10 01:51:40 >>>>>> 1709221500: 2024-05-26 06:45:00 >>>>>> 1713437400: 2024-06-16 10:10:00 >>>>>> 1713781500: 2024-06-20 03:05:00 >>>>>> 1714771800: 2024-06-25 18:10:00 >>>>>> >>>>>> -- >>>> 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 weewx-user+...@googlegroups.com. >>>> To view this discussion on the web visit >>>> https://groups.google.com/d/msgid/weewx-user/b687da34-99af-42a8-a84b-490f6c902d91n%40googlegroups.com >>>> >>>> <https://groups.google.com/d/msgid/weewx-user/b687da34-99af-42a8-a84b-490f6c902d91n%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 weewx-user+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/71d1760a-9557-43aa-a3ab-da54f9e10a9an%40googlegroups.com.