Hi,

Would you like the short or the long answer? Why not both!

Short answer.

This is expected behaviour when Meteotemplate is fed by the default 
Meteotemplate uploader. The default uploader behaviour is to upload archive 
records (ie records that are in your archive table) at the end of each 
archive period. In the cse of rainRate each record in the archive 
effectively records the average rainRate for the archive period concerned. 
So whilst there may have been an 'instantaneous' high of 53.6mm/hr at 4:44, 
that will almost certainly not have been the value sent to Meteotemplate. I 
cannot comment on the difference in the day's rainfall, those values should 
be very close bearing mind that Meteotemplate is only updated each archive 
period under a default uploader install.

Long answer. 

WeeWX uses the archive table to store archive records each covering an 
individual archive period. In most cases these are average values across 
the archive period, though some are 'sums' eg rain and some are 'last 
value'. WeeWX maintains a number of other tables in the data base, one for 
each observation recorded in the archive, and these tables hold summary 
data for each observation for a given day. Hence they are commonly known 
collectively as 'the daily summaries'. Each row in each daily summary holds 
aggregates like max/min, count, time of max, time of min etc for that 
particular observation for the day concerned. This is where you will find 
weeWX has stored the max rainRate of 53.6mm/hour at 4:44pm. WeeWX 
accumulates all of the loop packets over an archive period recording 
max/min and times etc. At the end of the archive period when the archive 
record is written to archive weeWX updates the daily summaries with the 
accumulated max/min values, times, counts etc. When weeWX displays the max 
rainRate for the day it goes to the rainRate daily summary, looks up todays 
record and gather the max or min or whatever is required. The uploader does 
not use the daily summaries.

The daily summaries are used as an optimisation to speed calculation of 
aggregates. Consider a station that submits loop packets every 2 seconds 
and has an archive interval of 5 minutes. To capture all of the highs and 
lows precisely with just an archive table you would need to store all of 
those loop packets, 43000 odd records per day. Searching for the max rainRate 
over a year would entail searching through some 15 odd million records. 
That will be slowish, multiply by the number of observation fields and it 
is painfully slow. By using the daily summaries to search for aggregates 
over a year period we now just search 365 rows, much quicker. The downside 
is that if you are solely using the archive you tend to miss most of the 
precise max/mins and there times

One thing you could do to improve the correlation between weeWX and 
Meteotemplate would be to have the uploader upload loop packets rather than 
archive records. This would mean that Meteotemplate sees all of the highs 
and lows in loop packets. I do not and have not used this uploader, but the 
uploader 
readme <https://github.com/matthewwall/weewx-meteotemplate> indicates the 
uploader can upload loop packets by adding a binding config option under 
[[Meteotemplate]] eg:

[[Meteotemplate]] 
    binding = loop

in weewx.conf. You will need to stop then start weeWX or do a weeWX config 
reload after making the change. I do not know if you will see a 100% 
correlation between weeWX and Meteotempalte after this but it should bring 
the two much closer.

You say you are new to weeWX, so not sure if you understand what loop 
packets and archive records are, if not they are explained here 
<http://weewx.com/docs/customizing.htm#_________LOOP_packets_vs._archive_records_______>
.

Gary

On Saturday, 24 June 2017 02:02:50 UTC+10, Gert Andersen wrote:
>
> Hi
>
> Hi
>
> I have a question about Rain Rate and what is being sent to Meteotemplate 
> via the API. 
>
> We have had rain today and from weeWX I have the following:
> Rain Today: 19.2 mm and Rain Rate 53.6 mm/hour(max) recorded at 4:44 PM 
>
> In Meteotemplate I have the following:
> Rain 9.6 mm (at this point) and Rain Rate 31.8 mm/hour(max) recorded at 
> 4:50. 
>
> Both systems will update every 5 minutes. So the question is why this 
> difference and is the Rain Rate not just sent to Meteotemplate that really 
> should use this value. I can see that Meteotemplate receives the Rain Rate 
> via the API.
>
> I would have expected that the record at 4:50 should have Rain Rate 53.6 
> mm/h, but maybe I'm wrong.
>
> I'm new to weeWX and I'm just trying to understand the mechanism.
>
> Rgds
> Gert
>

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

Reply via email to