High Rain Rate Calculation

266 views
Skip to first unread message

Steve2Q

unread,
Aug 4, 2014, 11:01:55 PM8/4/14
to weewx...@googlegroups.com
Still trying to find the High Rain Rate bug. Could someone please tell we where and how the "Since Midnight High Rain Rate" is calculated. Whenever I have more than a light rain I either have 18 or 36 in/hr as the High Rain Rate. The instantaneous rate and today's rain are correct.

Thanks, Steve  N2QLQ

Andrew Milner

unread,
Aug 5, 2014, 12:13:41 AM8/5/14
to weewx...@googlegroups.com
The highest rainrate value from a LOOP or archive record which has been captured/created since midnight.

The rainrate in an archive record is derived from rainfall in archive period prorated to an hour.  eg 6mm in 5 minutes archive period would be 6 * 60/5 = 72 mm/hr

Steve2Q

unread,
Aug 5, 2014, 8:37:17 AM8/5/14
to weewx...@googlegroups.com
Ok .I understand that, but still have a few questions:

1. Is each individual LOOPs data stored anywhere AFTER the data  is processed? I would assume not because this would add a LOT of storage overhead.

2. Exactly where in the main program is the HighRainRate calculation done? I have found RainRate and Today'sRain, but not HighRainRate.

Thanks, Steve  N2QLQ


Andrew Milner

unread,
Aug 5, 2014, 10:04:28 AM8/5/14
to weewx...@googlegroups.com
Mesowx extension stores LOOP records, but weewx does not.

You will have to ask Matthew/Tom about where the high value is retained, but it wil be somewhere in the stats module I expect - and it will just store a max value if it is higher than value already held as the day progresses.  Each day a new stats record is being created - for rainrate the minimum will always be 0 of course!!



--
You received this message because you are subscribed to a topic in the Google Groups "Weewx user's group" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/weewx-user/Px4qKXgLOuE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to weewx-user+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Steve2Q

unread,
Aug 5, 2014, 2:25:53 PM8/5/14
to weewx...@googlegroups.com
Hi Andrew: Yes, I am hoping Matthew and/or Tom jumps in with some information. I know that a rain rate calculation is done within (in my case) ultimeter.py but I would like to see where the High Rain Rate is declared.

Steve  N2QLQ

 

Andrew Milner

unread,
Aug 5, 2014, 3:10:34 PM8/5/14
to weewx...@googlegroups.com
Just thinking about it ... max will be stored in the stats database in the same manner as all the other stats max and min entries in the stats database - using the values from the driver contained in either LOOP or archive records and it will just be retrieved by cheetah and plonked on the appropriate html page.  The chances are that the LOOP records have decent values and the archive values are higher than you would expect.  Just check the archive records rain rate values and you may see what I mean.

Steve Meltz

unread,
Aug 6, 2014, 2:18:52 PM8/6/14
to weewx...@googlegroups.com

Andrew: you are correct; the rain rates appear incorrectly in the archives. Now the question is what is causing the bad values. Would it be of any value if I post the two files for you to look at?
Thanks.

--

Andrew Milner

unread,
Aug 6, 2014, 10:39:53 PM8/6/14
to weewx...@googlegroups.com
It probably is not a 'bad' value - more a question of 'this is how it is calculated'.  In other words the rate per hour has nothing to do with the time period of an hour - it is a rainfall in archive period that is extrapolated to an hourly figure. So if 1 mm falls in 5 minutes the rain rate will be 12mm/hour.  In my case the rainrate is generated oer archive period - and I do not think it is in the LOOP records.  If you do have a rainrate in LOOP records then the chances are the Archive record contains an average of the rainrates from the LOOP records obtained during the archive period.
What exactly do you mean by bad values?  If your system measure in 0.3mm per tip then 1 tip in an archive period will yield a rate of 3.6 mm/hour, 2 tips will be 7.2, 3 tips will be 10.8 ... and so on.  The rain rates will always be a multiple and because the rain rate is only based on the rainfall from an archive period it will nearly always be higher than the actual hourly rainfall.
Hope that makes sense!!

If you want a rain rate that is based on the actual hourly rainfall then I think you are going to have to calculate that yourself as it is not done within weewx as far as I know.

If an hourly rainrate is actually received from the weather station then the driver should just include the latest rate within the archive record and not do any calculation and extrapolation from the rainfall which fell during the archive period.

Hope this helps.

Steve2Q

unread,
Aug 7, 2014, 8:48:13 AM8/7/14
to weewx...@googlegroups.com
Andrew: by "bad values" I mean the numbers I can read in the archive records that show either 18 or 36 in/hour (they are actually long decimals like 36.0000000000056). I find it interesting that; 1. The Current Conditions Rain Rate is correct, and 2. The Since Midnight High Rain is always 18 or 16 (if not 0).

My system registers 0.01 inch/"tip". It is not a tipping rain gauge but a purely electronic one; it counts the number of drops which flows through a calibrated funnel, and then sends a pulse to the console when a number of drops has been registered to equal 0.01 inch. It is supposed to be able to go up to 10in/hr before the gauge gets "swamped". My console sends about 2 full records/second to the Pi, which I have set within weewx.conf to polling_interval = 1.0. I found if I set the interval to <1 sec I get errors that weewx has not read the complete data set from the console. In a sense Weewx is not using every other data set from the console.


I wish there was a way I could record the LOOPS for 24 to 48 hours so if it rains when I am not here I could see if the odd rain rates are coming from the calculation within ultimeter.py. I know that would be a lot of data, but I have a hard drive running all of Weewx on the Pi.

Steve

Andrew Milner

unread,
Aug 7, 2014, 9:50:50 AM8/7/14
to weewx...@googlegroups.com
OK - your loop period is every second .... but what is your archive interval?

You CAN record loop records if you install mesowx - that will preserve them for you - if the RPi can process them fast enough and write them away fast enough!!  I suspect it may not be meaty enough for continual 24/7 input with no wait states though - especially if polling faster than 1 second gave you errors before ....

Does weewx just get the rainfall in the LOOP data - or does it also get a rain rate?  Out of curiosity what is the range of rain values in each archive interval ??  My suspicion is that you only have a couple of different rain values per archive interval which results in just a couple of extrapolated rain rates.

Of course it is always possible that your html pages are displaying the wrong value for 'since midnight'!!!



--

Steve2Q

unread,
Aug 7, 2014, 11:04:55 AM8/7/14
to weewx...@googlegroups.com
Andrew> My archive interval is default at 300 seconds. The Loop data does show rain rate which must be calculated by ultimeter.py, as the PeetBros console does not sent rain rate out as data.

Your comments gave me a few ideas; First I am going to install mesowx and see what I get. Now if the RPi cannot process the data fast enough, I am going to use a fast desktop running Weewx and see if that makes a difference. If it does, I will overclock the Rpi to speed up the processing time.

Now of course, if mesowx runs Ok on the RPi and shows data errors in the LOOPs, then I have to investigate a different path.

Thanks,  Steve   N2QLQ


Andrew Milner

unread,
Aug 7, 2014, 2:29:24 PM8/7/14
to weewx...@googlegroups.com
I can't help but think you are chasing an elusive target.
1.  What is your rainfall per archive period?
2.  What is the rain rate given for that period - is it prorated correctly?  If your archive interval is 5 minutes (300 secs) then the rain rate should be rainfall * 12.  Is it??  If it is then the archive data is correct.  If it is not then there is an area for investigation.
3.  Does the rain for the archive period = summation of loop records rainfall?
4.  If the loop data shows rainrate then maybe it is being incorrectly calculated - especially since your poll interval is so small I guess that the most you would usually get in one polling session is .01 inches.  Aha - .01 in 2 seconds = .3 in 1 minute - 18 inches in one hour.  There is your 'problem' - set weewx.conf to create stats from Archive records only - not the loop records.


Steve2Q

unread,
Aug 7, 2014, 3:45:27 PM8/7/14
to weewx...@googlegroups.com
Andrew...that's brilliant!! That may very well be the problem; I tried analyzing it the same way but since I am not very familiar at all with Python and how it handles the data in Weewx I kept hitting a wall.

Now I will try to carefully study weewx.conf and try to make the change (s) you suggest.

Thanks  Steve  N2QLQ


Steve2Q

unread,
Aug 7, 2014, 7:13:39 PM8/7/14
to weewx...@googlegroups.com
My experiment de jour is changing archive delay to 1 second and setting loop hi_lo to False. It should rain here soon, so I will see what (if anything) happens.

I have not changed the archive interval from 300 seconds; I understand changing this might screw up the archives. (?)

Steve


Steve2Q

unread,
Aug 9, 2014, 1:53:04 PM8/9/14
to weewx...@googlegroups.com
Andrew; so far, so good. We have not had a downpour in the last few days, but the rain that did get posted had a correct High Rain Rate. Now, what would happen if I changed the interval from 300 seconds to a lower number. Would this damage the existing archive files?

Steve. N2QLQ

Andrew Milner

unread,
Aug 9, 2014, 3:12:31 PM8/9/14
to weewx...@googlegroups.com
From other threads the answer is yes - there is an assumption in weewx that the archive interval is constant.  According to Tom V3 of weewx addresses this and the archive interval will actually be used in calculations - which it currently is not.  In practice - and Tom will no doubt shoot me down in flames - I don't think it makes much of a difference to anything if the archive intervals are not constant throughout the database - but of course that would have to be at your own risk - and do not blame me if it messes things up for you!!!!  I think in worst case there may be faulty graphs and faulty reported data for the periods where the interval changes.



On 9 August 2014 20:53, Steve2Q <ste...@gmail.com> wrote:
Andrew; so far, so good. We have not had a downpour in the last few days, but the rain that did get posted had a correct High Rain Rate. Now, what would happen if I changed the interval from 300 seconds to a lower number. Would this damage the existing archive files?

Steve. N2QLQ

giuseppe branciaroli

unread,
Aug 10, 2014, 3:05:11 PM8/10/14
to weewx...@googlegroups.com
ciao a tutti volevo  chiede a qualcuno se era in grado di  potermi configurare il mio raspberry con la crosse ws 2800  tramite team wievwr  contattarmi all'indirizzo email g.bran...@alice.it
 gr



Reply all
Reply to author
Forward
0 new messages