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.
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