Problem with Rain in Weewx.

61 views
Skip to first unread message

Steve Harris

unread,
Aug 18, 2019, 3:23:15 PM8/18/19
to weewx-user
Hi All,

Hope you're all well.

My weather station is at http://www.raynesparkweather.co.uk

The station is custom built from an Arduino and some weather sensors that you got with the Fine Offset W1080.

I made a new circuit board and simplified everything this year to get reliable output from the arduino.

I now have that.

My station spits out data every second and monitors rain tips. This data is collected by a raspberry pi, which in turn spits out a data string every minute and creats a weewx.txt file for the FileParse driver.

My file looks like this.


rain=0.0
outTemp=60.8552000001
barometer=29.8096146482
outHumidity=84.4431666667
dewpoint=56.13
windSpeed=4.22716666667
windDir=252
UV=0.0
radiation=0.2218873
extraTemp1=1.88
extraTemp2=1.58
soilTemp1=136.4
extraTemp3=1
inTemp=69.95

Don't worry too much about the contents as I'm only having a problem at the moment with rain calculations.

When it rains, the bucket tips and the rain value above will be 0.011 (for a single tip) or 0.022 for two tips, or 0.033 for 3 tips.

This is calculated every minute by my station and a new weewx file is read.


My problem is this.

Say for example, I have three weewx files over three minutes.


In file 1 I have

rain=0.011


In file 2 I have
rain = 0.022

In file 3 I have

rain = 0.011


So, the total rain over the three minutes will be 0.044 inches or 1.1176mm


I have been having a problem with weewx double reading the fileparse file so I added a line in the fileparse driver to delete the weewx file once it has been read. This works a treat.


However, I'm still seeing weewx sometimes double reading the data.

I know it's only getting the three weewx files and it should sum up to 0.044inches, but this evening it summed to 1.76 mm which is 2 more of 0.011 inches than it should be.

I have the "poll interval" set to 60 seconds and the archive interval set to 60 seconds.


I have also watched the weewx file disappear once it's been read and I'm seeing no errors on syslog saying the weewx.file doesn't exist. In other words, weewx is being given 100% correct data, but still seems to be screwing up the rain value.

Any help would be appreciated.

Thank you


gjr80

unread,
Aug 18, 2019, 5:10:35 PM8/18/19
to weewx-user
Hi,

Suggest you put some logging into the modified driver you are using so you can see what is being read when.

Likely unrelated but I get uneasy when loop interval == archive interval. Sooner or later you are likely to have an archive interval with no loop data. Shouldn’t really cause any catastrophic failures, just a personal preference.

Gary

Steve Harris

unread,
Aug 18, 2019, 5:18:33 PM8/18/19
to weewx...@googlegroups.com
Hi Gary

Thanks for the reply.

I've just changed the archive interval back to 300 (5 minutes). and I'm going to do some more testing.

I'm manually just adding some rain into the weewx file to see if I can work out what is going on.

I'll keep you posted

Thanks for your help

--
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/7ccd9cec-d3af-4e13-9efd-68a4e9b4e053%40googlegroups.com.

Steve Harris

unread,
Aug 18, 2019, 5:59:58 PM8/18/19
to weewx...@googlegroups.com
So I've now changed the archive period to 300 seconds.

How blimming odd!

It "Seems" to have fixed it.

I fired weewx rain at it at 22:46, 0.011 in the first weewx file.

I then fired a 0.022 in the next minute

and then another 0.022 in the next minute

So total rain was 0.055 .

That calculated correctly in weewx !!!!


So it DOES appear that a 5 minute archive interval seems to make things correct!

How strange!

Ok, well thanks to gjr80 because you must just be right!!
I will keep an eye on this!

Reply all
Reply to author
Forward
0 new messages