WDL and iWDL 24 hour rain plots are not cumulative

Issue #39 resolved
Gary Roderick created an issue

WDL and iWDL 24 hour rain plots should display a cumulative rainall plot rather than the discrete hour by hour plot than at present.

Whilst clientraw.txt contains the confusingly named Hr Rain 01, Hr Rain 02 ..Hr Rain 10 these represent the last hours rainfall in 6 minute intervals and are actually not used to generate the 24 hour plot. Clientrawextra.txt fields Rain Hour 01, Rain Hour 02.. Rain Hour 24 hold the 24 data points used to generate the 24 hour rainfall plot in WDL and iWDL. At resent the Rain Hour xx fields hold discrete rainfall values for the hour concerned. To corectly produce the cumulative plots these 24 points should contain cumulative values.

One solution is to modify the clientrawextra.txt.tmpl template to calculate a running sum of existing hour rainfalls and use this running sum as the Rain Hour xx fields. Another solution is to modify the taggedstats code to produce a cumualtive result rather than discrete values. This solution whilst not impossible will reuire some additional python code to generate the running sum. The clientrawextra.txt.tmpl solution would use similar code, would avoid the need to change a SLE that may be used elsewhere, would avoid the need to restart Weewx and woul dmean the update is a simple drop in replacement of clientrawextra.txt.tmpl. Accordingly, will implement the clientrawextra.txt.tmpl solution.

Note. Will also need to check other rainfall plots to see if they should be cumulative as well (suggest it will likely only apply to 1 hour plot)

Comments (2)

  1. Gary Roderick reporter

    Commit bb14ad4 fixes the issue for 24 hour plots. Fix is implemented through replacing clientrawextra.txt.tmpl, no need for other changes or restarts.

  2. Log in to comment