Issue #117 <https://github.com/weewx/weewx/issues/117> is a request to
allow selective rebuilding of the daily summaries, but it has not been
implemented yet.

rainRate is not used in weewx except for reporting purposes. If you don't
care about a graph of rain rate, it can be ignored.

Unfortunately, you can't just remove individual records from
archive_day_rain and expect it to rebuild.

You could just redo the sums using an update sql statement. Assuming TTTT
is the unix epoch time of the start of the day you wish to edit, It would
be something like (NOT TESTED)

update archive_day_rain set sum=1.0 where dateTime = TTTT;


alternatively, if you wanted the actual sum:

update archive_day_rain set sum=(select sum(rain) from archive where
dateTime>TTTT and dateTime <=(TTTT+86400)) where dateTime=TTTT;


Hope this helps.

-tk




On Thu, Oct 13, 2016 at 3:06 PM, vince <vinceska...@gmail.com> wrote:

> We have a bunch of storms approaching and I noticed that I was measuring
> zero rain.  Got home from work and got the ladder out and found the VP2
> rain weep hole plugged with some debris. Sigh.
>
> Three neighboring stations each measure about 1.00 inches of rain today
> for 00:00-14:00 so I'd like to add rain info to match into my archive, and
> rebuild the various tables and reports. I'd like to not have to drop all
> the tables and rebuild 10 years of summaries.  I have 910,000 archive
> records, that would take forever to run.  Is there a clean way to just
> rebuild:
>
>    - the archive_day_rain table
>    - the archive_day_rainRate table
>    - the NOAA reports for this month and year
>    - whatever else I forgot
>
> I updated the last 100 records in my archive table, setting rain=0.01 inch
> values to try to line up with the 1.00 inches of rain today that
> neighboring stations have measured:
>
>    - I did not add any 'sum' values to those records (should I have ?)
>    - I did not add any 'rainRate' values to those records (I'm ok with
>    not doing so unless it affects other calculations somehow)
>    - Should I just 'remove' today's record from archive_day_rain and
>    archive_day_rainRate and expect/hope weewx to calculate them ?  Edit them ?
>
>
>
> I could probably do an offline drop+rebuild if absolutely forced to, but
> this question seems to come up often, so I'm looking to see if there's a
> quicker way for more focused edits like this....
>
>
>
> --
> 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.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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.
For more options, visit https://groups.google.com/d/optout.

Reply via email to