Cumulative rainfall using Meteohub on an iconnect

Discussion of the Meteohub software package

Moderator: Mattk

Post Reply
JohnR
Fresh Boarder
Fresh Boarder
Posts: 15
Joined: Fri Dec 23, 2011 11:01 pm

Cumulative rainfall using Meteohub on an iconnect

Post by JohnR »

Earlier today, I had 0.3mm rain recorded and the total show up in my Trends page using the Saratoga templates (it was actually melting frost but that's not relevant here). However, there is no sequential total in the page to 'reach' the current totoal of 0.3mm - they are all zero.

Image

If this page used Weather Display then in the same situation, when rain fell more than 120 minutes ago and nothing since, all the time periods would show 0.3mm up to Current - in other words a cumulative total for the day. If another 0.30mm of rain were to fall 60 minutes ago then all values from 60 minutes to Current would be 0.60mm

The Saratoga page uses calculations based on the total figure for a particular time, such as for 30mins: MH_seqval('seqmin1_rain0_total_mm',30,$uomrain). When I look at MHtags.php, this will only show a value if rain falls precisely 30 mins ago. Any similar calculation for rain at 31 minutes or later or 29 minutes and earlier will show zero (see below). It will not show the total for the day up to 30 minutes ago. This seems to be why all the values from 120 minutes onwards are zero for me today.

So far this is a Saratoga template problem but when I look at how to fix it, there is a both a solution and a problem in MHtags.php. MHtags has a cumulative version of seqmin1_rain0_total_mm and other time intervals. So as well as a seqmin1_rain0_total_mm there is a seqmin1_rain0_totalcumul_mm value as well. It is the same for other time groups.

Great! If I were to edit the file to use the cumul values, I should be able to fix it. However, the problem is that the total and totalcumul figures in MHtags.php are exactly the same, so at the moment i have:

seqmin15_rain0_total_mm|0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.30 0.00 0.00 0.00 0.00 more zeros deleted :|:

and

seqmin15_rain0_totalcumul_mm|0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.30 0.00 0.00 0.00 more zeros deleted :|:

If it were genuinely cumulative then shouldn't the second one be?:

seqmin15_rain0_totalcumul_mm|0.30 0.30 0.30 0.30 0.30 0.30 0.30 0.30 0.30 0.30 0.30 0.30 0.30 0.30 0.30 0.30 0.30 0.30 0.30 0.30 0.30 0.30 0.30 0.30 0.30 0.30 0.30 0.30 0.30 0.30 0.30 0.30 0.30 0.30 0.00 0.00 0.00 more zeros deleted :|:

The MHtags.php file is defined by the template setup and uses an MHtags.html file in the Meteohub graphs folder, which generates it. In there, as an example are:

seqmin15_rain0_total_mm|[seqmin15_rain0_total_mm]:|:

and

seqmin15_rain0_totalcumul_mm|[seqmin15_rain0_totalcumul_mm]:|:

so they seem to be set to generate different sets of values even if the output is the same. Is meteohub behaving incorrectly here on my iconnect, or is the Saratoga html just trying to create values that Meteohub can't provide or have I got this all wrong?

Thanks

John
JohnR
Fresh Boarder
Fresh Boarder
Posts: 15
Joined: Fri Dec 23, 2011 11:01 pm

Re: Cumulative rainfall using Meteohub on an iconnect

Post by JohnR »

I have done some kludge calculations in MHdefs.php which seem to give the effect I'm after. Just watching an artificial 0.6mm rain go through the time periods (threw some water at the collector) at http://rainer.me.uk/weather/wxtrends.php

John
JohnR
Fresh Boarder
Fresh Boarder
Posts: 15
Joined: Fri Dec 23, 2011 11:01 pm

Re: Cumulative rainfall using Meteohub on an iconnect

Post by JohnR »

Any news on getting the cumul values to be cumulative?

I'v been working with Ken to try and get a running cumulative rain total for 5 mins ago, 10 minutes ago etc etc. and at first it all looked promising. Take the day's rain total and subtract from it seqval values that add up to that for the period concerned.

However, there is a problem. To do this for periods of more than an hour from the current time involve mixing 1 minute and 15 minute seqval values, as there are only 60 one minute values. This can give contradictory figures (rising and falling totals) because the 1 minute and 15 minute values are generated by Meteohub a few minutes out of synch with each other.

Rain can fall at 61 minutes ago, and disappear from the 1 minute values but, instead of immediately being in the 15 minute value for 60 to 75 minutes, it is still in the value for 45 to 60 minutes.

What would be great would be a set of five minute cumulative values (no need for any mixing of different value sets) or failing that, a set of standard 'seqmin5_rain0_total_mm' with enough of them to cover a two hour period. [edit] for day0, that is, so a running interval total can be shown for the current day]

John
Post Reply