Taking daysum from rain0total, when day is not 00-24

This section covers the Meteobridge PRO, PRO2, NANO SD, Raspberry Pi and VM platforms exclusively

Moderator: Mattk

Post Reply
RoostWeather
Junior Boarder
Junior Boarder
Posts: 37
Joined: Sat Dec 16, 2023 7:22 pm

Taking daysum from rain0total, when day is not 00-24

Post by RoostWeather »

Hi,

I want to output a running daily total of rainfall at minute resolution, for the period 00-24 I am assuming that [rain0total-daysum] does the trick.

However, what if I want the day to start at 09 UTC for example? Is it possible to calculate a 24 hour running total from a different basetime other than 00? I think using @YYYYMMDD09 will only give me 0900-0959 data, if I'm understanding the user guide correctly.

Thanks in advance

Dan
Mattk
Platinum Boarder
Platinum Boarder
Posts: 1386
Joined: Mon Sep 22, 2014 3:24 am

Re: Taking daysum from rain0total, when day is not 00-24

Post by Mattk »

Yes you can do that but keep in mind rain is cumulative values and only specific selectors can be defined. Cumulative values are quite distinct from say minute resolution data.

For the period 00-24 or more precisely "a day" as 00-24 actually defines 1 day plus a sliver of another day then sumday or daysum called [before each new day] or ydaysum called [after each new day] then that would return daily total typically for Yesterday (or Today in an instant time context). ydaysum could be used at any time throughout the current day to report total for yesterday etc

Now for a specific 24 hours ending at a specific time then at a specific time [rain0total-sum24h.1:---] mm would give the past 24 hour rain total to the time the routine was called. Something like the following triggered daily @ 3pm would provide the 24 hour rain total to 9am then the 6 hour total to 3pm. Quite a few combinations depending on exactly what and when the total is required

Rainfall 24 hours to 9am: {*[rain0total-sum30h]-[rain0total-sum6h]*1} mm
Rainfall 6 hours to 3pm: [rain0total-sum6h.1:---] mm
RoostWeather
Junior Boarder
Junior Boarder
Posts: 37
Joined: Sat Dec 16, 2023 7:22 pm

Re: Taking daysum from rain0total, when day is not 00-24

Post by RoostWeather »

Thanks for the reply.

I'm not sure it's quite what I'm after, so for example I'm happy that if you want some 24h values at 09Z, you could trigger a job at 09 UTC to gather values from the previous 24 hours.

But what if I wanted say, in real-time, the maximum temperature since 0900 UTC today (or yesterday, if the current time is before 0900)?

Currently the variable [th0temp-dmax] would return the max since 0000, but what is the equivalent for a max since 0900? This is the same rationale for wanting say the cumulative rain-total since 0900, rather than rain0total-daysum which gives the cumulative total since 0000.

Many thanks :)
Mattk
Platinum Boarder
Platinum Boarder
Posts: 1386
Joined: Mon Sep 22, 2014 3:24 am

Re: Taking daysum from rain0total, when day is not 00-24

Post by Mattk »

Once you start to get into specific adhoc on the fly type values then you are moving away from the template type of approach and more into specific scripts, SQL etc As good and as diverse as the templates are, they will never cover adhoc "what if" type requirements, simply way too may iterations and possibilities.

There may be some template work around using epoch (epochtime) back into the past to a fixed daily time point but if possible would get very complicated very quickly. This is more something that SQL is best at.
User avatar
admin
Platinum Boarder
Platinum Boarder
Posts: 7854
Joined: Mon Oct 01, 2007 10:51 pm

Re: Taking daysum from rain0total, when day is not 00-24

Post by admin »

RoostWeather wrote: Mon Dec 18, 2023 5:10 pm Currently the variable [th0temp-dmax] would return the max since 0000, but what is the equivalent for a max since 0900? This is the same rationale for wanting say the cumulative rain-total since 0900, rather than rain0total-daysum which gives the cumulative total since 0000.
You cannot express this via a template request, afaik.
RoostWeather
Junior Boarder
Junior Boarder
Posts: 37
Joined: Sat Dec 16, 2023 7:22 pm

Re: Taking daysum from rain0total, when day is not 00-24

Post by RoostWeather »

That would be a shame if not possible, and quite surprising actually, I thought it would be a fairly standard thing to do. For example, CumulusMX (and even older Cumulus I seem to remember) had a setting to start the day at 09Z. But perhaps I'm too UK biased. Maybe it can be included in a future update.

Thanks for all the replies and advice.
User avatar
admin
Platinum Boarder
Platinum Boarder
Posts: 7854
Joined: Mon Oct 01, 2007 10:51 pm

Re: Taking daysum from rain0total, when day is not 00-24

Post by admin »

Just out of curiosity, why should a day for a weather analysis start at 09:00? Never heard of that before.
User avatar
wvdkuil
Platinum Boarder
Platinum Boarder
Posts: 604
Joined: Sun Jul 24, 2011 8:00 pm
Location: Belgium
Contact:

Re: Taking daysum from rain0total, when day is not 00-24

Post by wvdkuil »

admin wrote: Wed Dec 20, 2023 8:05 pm Just out of curiosity, why should a day for a weather analysis start at 09:00? Never heard of that before.
As in the old days all measurements were done by hand and a day-time ran from 09:00 till 21:00 , nigght time 21:00 -> 09:00
The rain was measured and and the device emptied, the high low temps were noted and reset.

No computing device, just paper records.

09:00 -> 21:00 -> 09:00 is still used f.i. here https://www.metoffice.gov.uk/weather/ob ... r-extremes
And all times are always in UTC for the UK.

Regards,
Wim
Mattk
Platinum Boarder
Platinum Boarder
Posts: 1386
Joined: Mon Sep 22, 2014 3:24 am

Re: Taking daysum from rain0total, when day is not 00-24

Post by Mattk »

Different countries have similar but different observation times. The 9am (local time) rainfall observations are common as is the 3pm rainfall observations as rainfall observations are for the 24 hours to 9am, then for the 6 hours to 3pm and done that way so the human observer didn't have to go out in the rain in he middle of the night.

Temperature (and other similar observations) in the anologue/mechanical days generally fall into the Overnight minimum and daily Maximum and in many cases were read and indicators magnetically reset with the daily 9am & 3pm rain observations.

The nice thing about standards is there is so many of them and many of the old ways/methods if put together today imply would not exist, have no real purpose in the digital world
RoostWeather
Junior Boarder
Junior Boarder
Posts: 37
Joined: Sat Dec 16, 2023 7:22 pm

Re: Taking daysum from rain0total, when day is not 00-24

Post by RoostWeather »

As Wim kindly explained, it is standard practice in the UK and goes back to the days before automated weather stations.

It is correct to say now that, with modern technology, it's no longer an inconvenience to measure at 1 minute (or less!) intervals, and to have a day which runs from 00-24. But the main reason to do it today is more so that records can be directly compared with those in the past, for which there is a much longer period of record than in the more recent, automated era. Eg, we can measure and record air pressure at <1 minute intervals, but for "extreme value" purposes even today only the hourly values can officially be counted.

Thanks :)
User avatar
admin
Platinum Boarder
Platinum Boarder
Posts: 7854
Joined: Mon Oct 01, 2007 10:51 pm

Re: Taking daysum from rain0total, when day is not 00-24

Post by admin »

Thanks for the lecture, as a digital guy I really didn't know.
Post Reply