Page 1 of 1

Determing Overnight Low between specific hours

Posted: Tue 25 Feb 2014 9:41 pm
by SteveFitz1
Does Cumulus have a tag (or even a way to calculate) the overnight low between 2 specific hours. For example, if I want to get the low temperature between 10PM and 8AM, is there a tag I could use or a methodology that might provide this data for me?

Thanks,

Steve

Re: Determing Overnight Low between specific hours

Posted: Tue 25 Feb 2014 10:29 pm
by steve
Not easily, that I can think of. There are the <#Recent...> tags, but it would take some clever code to use them in that way. An easier way would be to use an SQL database.

Re: Determing Overnight Low between specific hours

Posted: Tue 25 Feb 2014 10:33 pm
by beteljuice
I would have thought your lows would usually be pre-dawn ?

So doesn't today / yesterday lows cover most events ?

Re: Determing Overnight Low between specific hours

Posted: Tue 25 Feb 2014 11:31 pm
by SteveFitz1
beteljuice wrote:I would have thought your lows would usually be pre-dawn ?

So doesn't today / yesterday lows cover most events ?
Sometimes a warm front may come through during the night and it might be 45F at 10PM, but as the temps climb during the night, it could be 50F at 7AM. So, the "real" overnight low was 45F. Was hoping there might be an easy way to capture that value.

Thanks,

Steve

Re: Determing Overnight Low between specific hours

Posted: Thu 27 Feb 2014 6:44 am
by BCJKiwi
Here is a possible solution;

Create a tagfile that takes the temp? for every 1, 2mins or whatever interval that you want from now to 10 hrs ago (diff between 10pm and 8am) and process but not FTP it.
Use a non-Cumulus scheduler to run once per day at say 1 min after 8am.
Use this scheduler to run a batch file to FTP the Cumulus generated file to the website.

As you have given no link to a website nor indicated if this is the standard Cumulus html site or say the Saratoga PHP based site so am unable to offer a definitive suggestion without more information but here is a suggestion for a php file which would run in an html page.

This is a snippet of a similar process over a much shorter period from a different application;
file name in Cumulus/web say mintempT.txt with Cumulus creating mintemp.php

Code: Select all

<?php
$temp  = array(<#RecentOutsideTemp>,<#RecentOutsideTemp m=2>,<#RecentOutsideTemp m=4>,<#RecentOutsideTemp m=6>,<#RecentOutsideTemp m=8>,<#RecentOutsideTemp m=10>,<#RecentOutsideTemp m=12>,<#RecentOutsideTemp m=14>,<#RecentOutsideTemp m=16>,<#RecentOutsideTemp m=18>,<#RecentOutsideTemp m=20>,<#RecentOutsideTemp m=22>,<#RecentOutsideTemp m=24>,<#RecentOutsideTemp m=26>,<#RecentOutsideTemp m=28>,<#RecentOutsideTemp m=30>);
$tmin = min($temp);
echo $tmin;
?>
In your website at the location you want to display the min temp simply add

Code: Select all

<?php include_once("mintemp.php"); ?>
Note this is untested and only a suggestion!

Re: Determing Overnight Low between specific hours

Posted: Thu 27 Feb 2014 11:55 pm
by SteveFitz1
Thanks for the suggestion. I did a little playing around with your code and I believe it will work. I'll let it run overnight and see what result it gives me in the AM.

Steve