Page 1 of 1

All-time records query

Posted: Sat 05 Mar 2011 10:02 pm
by GraemeT
Steve,
I've noticed a slight inconsistency with all-time records. The all time high minimum temperature <#TmintempH> and all time low maximum temperature <#TmaxtempL> tags return only the date at which the record occurred, whereas other all-time record tags return time as well as date.
I've been wondering, is it possible/feasible to bring these two tags in line with the rest?

For example:

Code: Select all

$tempH                = "46.5";  //  all time high temperature
$TtempH               = "at 2:35 PM on 07 February 2009";  //  time at which all time high temperature occured
$mintempH             = "25.4";  //  all time high minimum temperature
$TmintempH            = "on 11 January 2010";  //  time at which all time high minimum temperature occured

$tempL                = "2.6";  //  all time low temperature
$TtempL               = "at 7:00 AM on 20 July 2010";  //  time at which all time low temperature occured
$maxtempL             = "9.9";  //  all time low maximum temperature
$TmaxtempL            = "on 29 June 2010";  //  time at which all time low maximum temperature occured

$humH                 = "92"; // all time high humidity
$ThumH                 = "at 3:09 AM on 12 August 2010"; // time at which all time high humidity occured
$humL                 = "22"; // all time low humidity
$ThumL                 = "at 4:05 PM on 31 December 2010"; // time at which all time low humidity occured

Re: All-time records query

Posted: Sat 05 Mar 2011 10:38 pm
by steve
I've tried to explain in the past why I've done it this way, but I never seem to make a very good job of it. It's because the actual time at which the low temperature (for example) occurred on the day with the highest low isn't the significant point. It's the whole day which didn't get below that temperature, so it's the whole day which is significant.

Whenever I have seen highest min and lowest max quoted in reports (in the UK), I have never seen the time at which they occurred quoted, just the day.

Having said all that, it's easier for me to change the code to store the full timestamp so that people can use the web tag formatters to display the time as well if they so wish, rather than have this discussion every few months, so I'll probably do that :lol:

Re: All-time records query

Posted: Sat 05 Mar 2011 11:11 pm
by GraemeT
Thanks Steve.
I see now why you've done it that way, and don't have a problem with it.

Re: All-time records query

Posted: Sun 06 Mar 2011 9:15 am
by steve
The 'highest daily rainfall' is similarly an 'all day' event, but that does have a time associated with it; it's the time of the last recorded rain on that day. So I should at least be consistent, one way or the other!

Re: All-time records query

Posted: Sun 06 Mar 2011 12:08 pm
by GraemeT
On rainfall Steve, I do not necessarily agree.
As rainfall is an all-day event, we have say, 130mm of rain over the course of a day, but we don't have 15.2 deg. C over the course of a day, we have 15.2 deg. C at a given time within the day.
In my example, taken from cumuluswebtags.php, you'll see that the high and low temperatures, including apparent temperature, heat index and windchill, include the time, with the exception of lowest maximum and highest minimum, and that is why I made my original query - those two alone seem, to me, to be the odd ones out.

Re: All-time records query

Posted: Sun 06 Mar 2011 12:38 pm
by steve
I agree that the temperature listed in the lowest max record does have a time associated with it. What I am trying to get across is that the time isn't the time of the actual record, as it's an all-day event. You don't know that a record has occurred until the end of the day. With the other temperature records, you know as soon as they have occurred that you have a new record. I think that perhaps my argument is almost a philosophical one.

In my comment about the rainfall, I was trying to say that it's an all-day event but I have still chosen to associate a time with it, and this isn't consistent with what I've done with lowest max and highest min. The time quoted is the time of the last rainfall on that day, which is extra information which may or not be useful. Similarly, the time of the lowest max is, I would argue, extra information rather than the time that the record occurred.

But it should be consistent. So, rather than remove the time from the daily rain record, I'll add it to the lowest max and highest min records.

Re: All-time records query

Posted: Sun 06 Mar 2011 9:29 pm
by GraemeT
Ok. Sounds good to me.

Re: All-time records query

Posted: Tue 08 Mar 2011 12:13 pm
by steve
I was going to 'slip this in' as a quick change to 1.9.1, but I've realised that it's actually a large change, so I'm going to defer it for now as I really want to get 1.9.1 out of beta.

Re: All-time records query

Posted: Wed 09 Mar 2011 11:49 am
by steve
I've worked out a way to do this that doesn't involve too much new/changed code. It seems to work OK. I'll upload a new build shortly.

Re: All-time records query

Posted: Wed 09 Mar 2011 9:07 pm
by GraemeT
It's all good then.

Cheers.