Page 1 of 1

Total CumulusMX Raincounter

Posted: Sat 14 Aug 2021 10:22 pm
by zerog
Hi everyone,

first of all I hope that this hasn't been asked/discussed before and that it's not too specific. I'm currently working on storing rain data in an external database which is based on UTC time. Therefore I have to take care about daily rollover times, especially cause my stations (and therefore CMX installations) have a different timezone. Further, I want to avoid storing information twice (e.g. storing yearly rain counter and 24h counter).

Thinking about the problem, I came up with the following solutions:
  • Change CMX to rollover at UTC midnight and store corresponding value. Problematic if CMX runs in timezones with DST. And also quite complex, when querying the database for rainfall in specific periods and considering the timezone a user sits in.
  • Store the monthly/yearly counter. Same problem as above.
  • Store the value supplied under "Rainfall Counter" in monthly log files. I guess there exists no corresponding webtag. This is no option anyway, because for my Davis stations this is equal to the yearly value.
  • Have an alltime rainfall counter. To me, this would be the most logic way to store rainfall data. When someone, for instance, wants to know the rainfall of the last 48h from now this would be a simple subtraction of two values. And to avoid storing cumulative data one could also store this as relative value since the last data record and calculate a sum of records.
The alltime rainfall counter could be supplied natively by CMX as rainfall since CMX was installed (as webtag etc.). And users could be able to manually set/reset this value.

I really enjoy using CMX and I'm thankful towards everyone involved in development. Any opinion on the subject of storing cumulative (rain) data in a database and of course an implementation in CMX are highly appreciated.

Thanks,
Chris

Re: Total CumulusMX Raincounter

Posted: Wed 22 Dec 2021 12:30 pm
by zerog
Brief update: In the meantime I resolved this problem in a different way working with delta values per timestep. Feel free to close this or leave it open if someone else might need such functionality.
Thanks,
Chris

Re: Total CumulusMX Raincounter

Posted: Wed 22 Dec 2021 1:27 pm
by mcrossley
The rainfall counter is a bit of a nightmare to be honest. I know Steve thought about changing it, but finding something "simple" that works across all the different station types that all report rain in different ways and that you can easily edit out spurious rainfall is not so simple! :(