Welcome to the Cumulus Support forum.

Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024

Cumulus MX V4 beta test release 4.0.0 (build 4018) - 28 March 2024

Legacy Cumulus 1 release v1.9.4 (build 1099) - 28 November 2014 (a patch is available for 1.9.4 build 1099 that extends the date range of drop-down menus to 2030)

Download the Software (Cumulus MX / Cumulus 1 and other related items) from the Wiki

Rain conversion from inches to mm

From build 3044 the development baton passed to Mark Crossley. Mark has been responsible for all the Builds since. He has made the code available on GitHub. It is Mark's hope that others will join in this development, but at the very least he welcomes your ideas for future developments (see Cumulus MX Development suggestions).

Moderator: mcrossley

Post Reply
david3
Posts: 63
Joined: Sat 28 Jan 2012 4:03 pm
Weather Station: Davis Vantage Vue
Operating System: Debian 12 64bit for rpi

Rain conversion from inches to mm

Post by david3 »

I have a US version davis vantage vue that measures rain in inches, and I have cumulusmx set to metric/mm.

I just checked the daily rain up until now, and it's at 7.25 inches, but cumulusmx reads 145mm (should be 184mm).

I recall there is some conversion error that is introduced, but is it that much? Is there any work-around to get it closer? Thanks.
Mapantz
Posts: 1775
Joined: Sat 17 Dec 2011 11:55 am
Weather Station: Davis Vantage Pro2
Operating System: Windows 11 x64
Location: Dorset - UK
Contact:

Re: Rain conversion from inches to mm

Post by Mapantz »

Why not change the setting in CumulusMX to inches?

Station settings -> General settings -> Units
Image
sfws
Posts: 1183
Joined: Fri 27 Jul 2012 11:29 am
Weather Station: Chas O, Maplin N96FY, N25FR
Operating System: rPi 3B+ with Buster (full)

Re: Rain conversion from inches to mm

Post by sfws »

Unlike previous answer, I assume you do want metric output from Cumulus despite having an imperial gauge.

Is Station settings -> Davis VP/VP2/Vue -> Davis Advanced Options -> Rain gauge Type set to Imperial (0.01 in) ?

Is Station settings -> General settings -> Units -> Advanced options -> Rainfall decimals set to 2?

Your conversion from imperial to metric calculations will need both of those advanced options set correctly.
RayProudfoot
Posts: 3372
Joined: Wed 06 May 2009 6:29 pm
Weather Station: Davis VP2 with Daytime FARS
Operating System: Windows XP SP3
Location: Cheadle Hulme, Cheshire, England
Contact:

Re: Rain conversion from inches to mm

Post by RayProudfoot »

I can’t speak for Cumulus MX but with Cumulus Steve posted a warning that changing the setting from imperial to metric or vice-versa would mess up every entry in dayfile.txt and the monthly and all-time records.

Be careful!
Cheers,
Ray, Cheshire.

Image
User avatar
mcrossley
Posts: 12694
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Rain conversion from inches to mm

Post by mcrossley »

The previous two post are both correct.

If you configure Cumulus to use mm for rain it assumes you have a metric (0.2mm) rain gauge. If you have an imperial gauge then you have to override that behaviour as @sfw posted.

But as Ray posted, if you change the gauge type then that will mess up some entries you already have in the day file which record the number of bucket tips as well as rainfall in your chosen units.
david3
Posts: 63
Joined: Sat 28 Jan 2012 4:03 pm
Weather Station: Davis Vantage Vue
Operating System: Debian 12 64bit for rpi

Re: Rain conversion from inches to mm

Post by david3 »

sfws wrote: Fri 23 Jul 2021 7:55 pm Unlike previous answer, I assume you do want metric output from Cumulus despite having an imperial gauge.

Is Station settings -> Davis VP/VP2/Vue -> Davis Advanced Options -> Rain gauge Type set to Imperial (0.01 in) ?

Is Station settings -> General settings -> Units -> Advanced options -> Rainfall decimals set to 2?

Your conversion from imperial to metric calculations will need both of those advanced options set correctly.
I'm looking in the Cumulus MX admin web page/dashboard, but I don't see those entries under Station settings. The closest thing I see is Station settings -> Units -> Rain = mm.
mcrossley wrote: Fri 23 Jul 2021 10:40 pm The previous two post are both correct.

If you configure Cumulus to use mm for rain it assumes you have a metric (0.2mm) rain gauge. If you have an imperial gauge then you have to override that behaviour as @sfw posted.

But as Ray posted, if you change the gauge type then that will mess up some entries you already have in the day file which record the number of bucket tips as well as rainfall in your chosen units.
I thought for sure I'd gone through this before and it checked out, reasonably close (not perfect). But that was with the old windows version. I can't find the settings for Rain gauge type and rainfall decimals in cumulusmx.

(that's when I was checking it out before, with the old windows version)
viewtopic.php?f=6&t=9555&p=78809
User avatar
mcrossley
Posts: 12694
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Rain conversion from inches to mm

Post by mcrossley »

VP Advanced settings...
davis-advanced.jpg
Units Advanced settings...
units-advanced.jpg
Unless you are running quite an old version of MX for course?
You do not have the required permissions to view the files attached to this post.
david3
Posts: 63
Joined: Sat 28 Jan 2012 4:03 pm
Weather Station: Davis Vantage Vue
Operating System: Debian 12 64bit for rpi

Re: Rain conversion from inches to mm

Post by david3 »

I'm running cumulusmx b3043. I had tried to upgrade before but ran into too many problems getting the ftp transfer to work, so went back to that since the ftp transfer worked well with that version.
cumulusmx_2021_07_24.png
You do not have the required permissions to view the files attached to this post.
david3
Posts: 63
Joined: Sat 28 Jan 2012 4:03 pm
Weather Station: Davis Vantage Vue
Operating System: Debian 12 64bit for rpi

Re: Rain conversion from inches to mm

Post by david3 »

OK, I updated to the latest version, 3133. The ftp transfer is working, and I made the changes.

Before:
cumulusmx_update_2021_07_25_before_1.png
cumulusmx_update_2021_07_25_before_2.png
After:
cumulusmx_update_2021_07_25_after_1.png
cumulusmx_update_2021_07_25_after_2.png
It looks like that "Rain Gauge Type" was just not there in the older cumulusmx version, though I'm pretty certain there was something like that in the old windows version. I'd guess the last 3 years I've been running mx the rain data has been off. You'd think I would have noticed earlier.

I'll see if the change helps or makes it worse, and then try to figure out how to correct the old data.
You do not have the required permissions to view the files attached to this post.
User avatar
mcrossley
Posts: 12694
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Rain conversion from inches to mm

Post by mcrossley »

The rain gauge setting was there in old versions of MX, but you had to set it via the Cumulus.ini file (the same with C1 I think). Newer version expose it via the settings, I've been trying to expose all the settings so people no longer need to edit the .ini file manually.
david3
Posts: 63
Joined: Sat 28 Jan 2012 4:03 pm
Weather Station: Davis Vantage Vue
Operating System: Debian 12 64bit for rpi

Re: Rain conversion from inches to mm

Post by david3 »

Thanks. The new version seems to be working properly, and doing the conversion correctly with the 2 setting changes.

Now I'll try to figure out how to correct the old data. I think I can write a script to do it, but I need to read up on the purposes for the different data files.
david3
Posts: 63
Joined: Sat 28 Jan 2012 4:03 pm
Weather Station: Davis Vantage Vue
Operating System: Debian 12 64bit for rpi

Re: Rain conversion from inches to mm

Post by david3 »

I corrected the rain data from the old version of CumulusMX, in the dayfile.txt and the month files (MonYYlog.txt).

Do you know if the month*.ini and year*.ini files will get regenerated by the software, maybe at midnight? Or is there a process I can run to regenerate them? Or do I need to correct those manually?

For future reference, the fields affected in the dayfile.txt were:
field 13 = Maximum rainfall rate
field 15 = Total rainfall for the day
field 32 = High hourly rain

And for the month files:
field 9 = current rainfall rate
field 10 = today rainfall so far
field 27 = total rainfall since midnight

I used awk to correct the field data. As an example, $9 (referenced twice) is the field number. The second reference does the correction ($9*1.27).

Code: Select all

awk 'BEGIN {FS=",";OFS=","} {$9=sprintf("%.2f",$9*1.27);print}' copy-of-logfile.txt > copy-of-logfile-2.txt
sfws
Posts: 1183
Joined: Fri 27 Jul 2012 11:29 am
Weather Station: Chas O, Maplin N96FY, N25FR
Operating System: rPi 3B+ with Buster (full)

Re: Rain conversion from inches to mm

Post by sfws »

david3 wrote: Mon 26 Jul 2021 8:52 am Do you know if the month*.ini and year*.ini files will get regenerated by the software, maybe at midnight?
NO!
david3 wrote: Mon 26 Jul 2021 8:52 am Or is there a process I can run to regenerate them
NO! (Although Mark has mentioned plans for a "CreateRecords" utility)
david3 wrote: Mon 26 Jul 2021 8:52 am I need to correct those manually?
For future reference, the fields affected in the dayfile.txt were:
field 13 = Maximum rainfall rate
field 15 = Total rainfall for the day
field 32 = High hourly rain
No need to use that multiplier to edit the few rainfall values within extreme record files.

It will not take you long to work through the rainfall values using Edit menu -> This Year's records to see if the rainfall values (the times/dates are not affected) shown on left (in year.ini) need editing because values on right (your corrected dayfile.txt) are now different,

There are other extreme files, look for those extremes in edit menu, or read https://cumuluswiki.org/a/Correcting_Extremes for the full instructions.
david3
Posts: 63
Joined: Sat 28 Jan 2012 4:03 pm
Weather Station: Davis Vantage Vue
Operating System: Debian 12 64bit for rpi

Re: Rain conversion from inches to mm

Post by david3 »

sfws wrote: Mon 26 Jul 2021 9:41 am It will not take you long to work through the rainfall values using Edit menu -> This Year's records to see if the rainfall values (the times/dates are not affected) shown on left (in year.ini) need editing because values on right (your corrected dayfile.txt) are now different,

There are other extreme files, look for those extremes in edit menu, or read https://cumuluswiki.org/a/Correcting_Extremes for the full instructions.
Thanks.
david3
Posts: 63
Joined: Sat 28 Jan 2012 4:03 pm
Weather Station: Davis Vantage Vue
Operating System: Debian 12 64bit for rpi

Re: Rain conversion from inches to mm

Post by david3 »

I looked at the data some more, and I think the problem started in April 2020, not in June 2018 (when I converted from windows to CumulusMX).

In April 2020 my Cumulus.ini file got corrupted; I think due to rebooting without stopping the process cleanly, but I'm not sure. In any case, I had to redo the setup. I suspect the original Cumulus.ini file brought over from windows had the appropriate rain gauge setting. And when I had to redo the setup, it was no longer there and not possible to set it from the CumulusMX admin web interface.

Looking at field 10 & 12 from the monthly log files:

field 10 = today rainfall so far
field 12 = total rainfall counter

Prior to the Cumulus.ini re-setup, I saw the values increase in odd increments often, suggesting it was doing the imperial to metric conversion (like going from *.2 to *.5). Afterwards, it was even increments, multiples of 0.2.
Post Reply