If you use Cumulus, please donate Image

Please read this post before posting

Latest Cumulus release v1.9.4 (build 1099) - Nov 28 2014
Latest Cumulus MX release - v3.0.0 build 3043 Jan 20 2017. See this post for download

Cumulus ‘Current Conditions’ Alternative v3.0

Other discussion about creating web sites for Cumulus that doesn't have a specific subforum

Moderators: daj, TNETWeather

User avatar
beteljuice
Posts: 2455
Joined: Tue Dec 09, 2008 1:37 pm
Weather Station: None !
Operating System: XP SP3 - honest
Location: Dudley, West Midlands, UK

Re: Cumulus ‘Current Conditions’ Alternative v3.0

Postby beteljuice » Sun Feb 08, 2015 1:53 pm

@honestjohn

You've fixed your page, but now the wind direction is not being 'translated' !

Did you 'install' all the necessary language files for your template ?
Image
......................Imagine, what you will KNOW tomorrow !

User avatar
JennyLeez
Posts: 283
Joined: Wed Dec 16, 2009 2:32 am
Weather Station: La Crosse WS3083
Operating System: Windows XP, Win7 & Win 10
Location: Wairoa, Hawkes Bay. New Zealand.
Contact:

Re: Cumulus ‘Current Conditions’ Alternative v3.0

Postby JennyLeez » Sun Feb 08, 2015 7:44 pm

Hi honestjohn,

You need to copy each of the language files to your server since you are using multi Languages, then you will be right.

"Most of the Non english language files have been translated by our Cumulus Members.
If you wish to use these, copy the contents of each language-xx-local.txt to the matching language-xx-local.txt file on your Hard Drive and FTP to the SAME directory as curconditions.php. This should be your main directory where the base language are also held.
e.g. Copy the contents from language-el-local.txt to your language-el-local.txt.
If you do not have any of the language-xx-local.txt files then just FTP them all to your server."

Cheers
Wairoa, Hawkes Bay, New Zealand Weather Station:
http://wairoa.net/weather/index.htm
Cumulus Topsites:
http://cumulussites.net/
Image

honestjohn
Posts: 27
Joined: Fri Nov 18, 2011 2:00 pm
Weather Station: Davies Vantage Vue
Operating System: Windows 10 Pro 64bit
Location: Northants, UK
Contact:

Re: Cumulus ‘Current Conditions’ Alternative v3.0

Postby honestjohn » Sun Feb 08, 2015 8:01 pm

JennyLeez wrote:Hi honestjohn,

You need to copy each of the language files to your server since you are using multi Languages, then you will be right.

"Most of the Non english language files have been translated by our Cumulus Members.
If you wish to use these, copy the contents of each language-xx-local.txt to the matching language-xx-local.txt file on your Hard Drive and FTP to the SAME directory as curconditions.php. This should be your main directory where the base language are also held.
e.g. Copy the contents from language-el-local.txt to your language-el-local.txt.
If you do not have any of the language-xx-local.txt files then just FTP them all to your server."

Cheers


Thank you Jenny, I had copied the language files over, but had retained them within the Language folder. The .txt files are all now sitting in the web root directory, and all is well.

I appreciate your assistance.

Best regards

John

PS. Many thanks to Beteljuice for his asistance earlier.
Regards, John

www.rushden-weather.co.uk

Image

User avatar
JennyLeez
Posts: 283
Joined: Wed Dec 16, 2009 2:32 am
Weather Station: La Crosse WS3083
Operating System: Windows XP, Win7 & Win 10
Location: Wairoa, Hawkes Bay. New Zealand.
Contact:

Re: Cumulus ‘Current Conditions’ Alternative v3.0

Postby JennyLeez » Sun Feb 08, 2015 8:19 pm

Yep you got it now :)

btw congrats on your website. Neat tidy informative front page.

Cheers
Jenny
Wairoa, Hawkes Bay, New Zealand Weather Station:
http://wairoa.net/weather/index.htm
Cumulus Topsites:
http://cumulussites.net/
Image

Smithee
Posts: 74
Joined: Sun Oct 02, 2011 9:15 am
Weather Station: VP2
Operating System: Mac/win7
Location: United Kingdom

Re: Cumulus ‘Current Conditions’ Alternative v3.0

Postby Smithee » Thu Feb 12, 2015 5:43 pm

I do like the script - i have implemented it at:

http://weather.casa.ucl.ac.uk/index.htm

I was wondering if there is a way to auto refresh is on the page when the conditions change?

Andy

User avatar
beteljuice
Posts: 2455
Joined: Tue Dec 09, 2008 1:37 pm
Weather Station: None !
Operating System: XP SP3 - honest
Location: Dudley, West Midlands, UK

Re: Cumulus ‘Current Conditions’ Alternative v3.0

Postby beteljuice » Thu Feb 12, 2015 11:00 pm

I was wondering if there is a way to auto refresh
Unfortunately not at the moment ...

At the time (and indeed at the moment) the beteljuice was rather distracted and is guilty of legacy programming.
ie. Some philosphies that were begun and later modified are still important. Mainly in the way languages are handled accross different templates.

PHP is a server-side code, ie. all work is performed before delivery to the browser, and in it's initial concept the code needed to be contained within the template to work out whose variables and translation construct it was using. This is turn means it can't work as a 'stand alone' that can be run on-demand.

It's something that has been troubling the beteljuice in his spare moments.
It would mean everyone using it thus far replacing the main file and replacing / rebuilding ALL the different language files for one 'uniform' set.
Image
......................Imagine, what you will KNOW tomorrow !

Smithee
Posts: 74
Joined: Sun Oct 02, 2011 9:15 am
Weather Station: VP2
Operating System: Mac/win7
Location: United Kingdom

Re: Cumulus ‘Current Conditions’ Alternative v3.0

Postby Smithee » Fri Feb 13, 2015 4:33 pm

Thanks for the reply - it works if you wrap a refresh around the div and tweak the PHP a bit - mine now refreshes every 1min, so it can be left running and the latest conditions appear on the page.

http://weather.casa.ucl.ac.uk/index.htm

I think its working....

Andy

User avatar
beteljuice
Posts: 2455
Joined: Tue Dec 09, 2008 1:37 pm
Weather Station: None !
Operating System: XP SP3 - honest
Location: Dudley, West Midlands, UK

Re: Cumulus ‘Current Conditions’ Alternative v3.0

Postby beteljuice » Fri Feb 13, 2015 5:17 pm

You say "Tweaked the php" So have you put the echo $condOut in the php file (That's where it started) ?

Although as I understand (partly) JQuery, your code

Code: Select all

function getConditions(){
$('#conditions_div').load('curconditions.php');
}

setInterval(function() {
getConditions();
}, 60000); // the "3000"

getConditions();
});
Would 'execute' the JS option.

You are 'lucky' because you are using a single language and our 'own' language files - but hey, it works for you :clap:
Image
......................Imagine, what you will KNOW tomorrow !

Smithee
Posts: 74
Joined: Sun Oct 02, 2011 9:15 am
Weather Station: VP2
Operating System: Mac/win7
Location: United Kingdom

Re: Cumulus ‘Current Conditions’ Alternative v3.0

Postby Smithee » Fri Feb 13, 2015 10:44 pm

The Jquery simply refreshes the div at a set time - the original php script came back with document.write via the javascript when implementing the refresh. I asked a colleague from work to take a look and he made a few changes to ensure it returns just the text.

I will ask him for some more details, the updated php is in the root of the site if that helps in the on dropbox https://www.dropbox.com/s/rte41deerelrnn9/curconditions.php?dl=0 in the meantime.

Andy

User avatar
JennyLeez
Posts: 283
Joined: Wed Dec 16, 2009 2:32 am
Weather Station: La Crosse WS3083
Operating System: Windows XP, Win7 & Win 10
Location: Wairoa, Hawkes Bay. New Zealand.
Contact:

Re: Cumulus ‘Current Conditions’ Alternative v3.0

Postby JennyLeez » Thu Mar 12, 2015 6:08 am

Bumping this up for TD :)

Those last few posts address the refresh you are after.

Good Luck.

Cheers
Jenny
Wairoa, Hawkes Bay, New Zealand Weather Station:
http://wairoa.net/weather/index.htm
Cumulus Topsites:
http://cumulussites.net/
Image

User avatar
HRVistaWeather
Posts: 161
Joined: Mon Apr 09, 2012 2:38 pm
Weather Station: Davis VP2 Plus - 24hr FARS
Operating System: Windows 10 (64bit)
Location: Franklin, Huon Valley, Tasmania

Re: Cumulus ‘Current Conditions’ Alternative v3.0

Postby HRVistaWeather » Thu Mar 12, 2015 9:05 pm

Hi Jenny,

Greatly appreciated, I had a quick look and decided to;

1: Revert back to CCdata.php (in order to upload realtime).
2: Adopted smitthee's priciple, however did not modify the curconditions.php (left it as was) and utilised the CCInclude.php (though had to add include_once("common.php") in order to work correctly.

http://hrvistaweather.com/index.php

All I need know is a way to display the Current Conditions Icon.
You do not have the required permissions to view the files attached to this post.
Tony

Huon River Vista Weather - South Franklin - Tasmania
Davis Vantage Pro 2 Plus - FARS, Cumulus MX, 2 Soil Temp/Moist Solar/Rad.
Weather PC Died 2016/11/21 15:25 Cannot justify replacement (Website dead)

User avatar
beteljuice
Posts: 2455
Joined: Tue Dec 09, 2008 1:37 pm
Weather Station: None !
Operating System: XP SP3 - honest
Location: Dudley, West Midlands, UK

Re: Cumulus ‘Current Conditions’ Alternative v3.0

Postby beteljuice » Thu Mar 12, 2015 11:04 pm

All I need know is a way to display the Current Conditions Icon.
You have a webcam thumb - What more do you need :D
Image
......................Imagine, what you will KNOW tomorrow !

User avatar
HRVistaWeather
Posts: 161
Joined: Mon Apr 09, 2012 2:38 pm
Weather Station: Davis VP2 Plus - 24hr FARS
Operating System: Windows 10 (64bit)
Location: Franklin, Huon Valley, Tasmania

Re: Cumulus ‘Current Conditions’ Alternative v3.0

Postby HRVistaWeather » Mon Mar 23, 2015 12:51 am

Yes True Beteljuice,

Just during hours of darkness it becomes a tad difficult, but that's fine I'll work something out down the track.

Hi Jenny,

Thanks for the great conditions script - been running a while now.

Just have a query, the other day we where in thick pea soup fog all morning and the script has returned nil regards fog,
only sunny/partly cloudy etc.

I was just curious how the fog detection works in the script (ie. can't get my head around the fuzzy logic and wonder if I need to adjust it for my location).

Regards
Tony

Huon River Vista Weather - South Franklin - Tasmania
Davis Vantage Pro 2 Plus - FARS, Cumulus MX, 2 Soil Temp/Moist Solar/Rad.
Weather PC Died 2016/11/21 15:25 Cannot justify replacement (Website dead)

User avatar
beteljuice
Posts: 2455
Joined: Tue Dec 09, 2008 1:37 pm
Weather Station: None !
Operating System: XP SP3 - honest
Location: Dudley, West Midlands, UK

Re: Cumulus ‘Current Conditions’ Alternative v3.0

Postby beteljuice » Mon Mar 23, 2015 1:37 am

Basically it's saying if your cloudbase height is 'low' and it isn't raining (very wet cloud) it must be fog (not so wet cloud)

Code: Select all

        if(decCom($cloudbasevalue) < ($cloudbaseunit == "m" ? 10 : 29) && $MinutesSinceLastRainTip > 15){ // less than 10m - a rough figure and NO rain
check is for 10m / 29ft - Can you check what your cloudbase height was at the time ?
Image
......................Imagine, what you will KNOW tomorrow !

User avatar
HRVistaWeather
Posts: 161
Joined: Mon Apr 09, 2012 2:38 pm
Weather Station: Davis VP2 Plus - 24hr FARS
Operating System: Windows 10 (64bit)
Location: Franklin, Huon Valley, Tasmania

Re: Cumulus ‘Current Conditions’ Alternative v3.0

Postby HRVistaWeather » Mon Mar 23, 2015 2:32 am

Hi Beteljuice, that is obviously my issue then - we have a lot of Fog and cloudbase never seems to be much below 190 ft.

Oh and my Cloudbase Unit is set to ft in cumulus for other reasons and I assume that cumulus calculates the Cloudbase as best it can based on that I'm using C not F for my Temps.

How does Cumulus know the height of the cloud base?

It doesn't. It uses a calculation which gives the theoretical height above ground level at which Cumulus clouds might form, based on the current temperature and dew point. It assumes that the difference between temperature and dew point decreases by about 4.4 degrees Fahrenheit per 1000 feet increase in altitude. When the two values coincide, the air is saturated (relative humidity = 100%) and Cumulus clouds may form.
.

I found this question posed by Cashmere Weather on another post http://www.wxforum.net/index.php?PHPSESSID=70614a4164b0ed045aea8956f807a092&topic=11861.msg114276#msg114276

Fog can be considered a cloud at ground level. The processes forming it, however, are usually different from those that form clouds. Like clouds, fog is made up of condensed water droplets which is the result of the air being cooled to the point (actually, the dewpoint) where it can no longer hold all of the water vapor it contains.

Fog forms when the difference between temperature and dew point is generally less than 2.5 °C or 4 F.

The difference between Fog & Mist is that Fog reduces visibility to less than 1 km (5/8 statute mile) whereas Mist reduces visibilty to 1km or more.

How do we determine visibility?

I guess based on this as a starting point we could have:

function bool IsFoggy(double TemperatureInF, double DewPointInF)
{
if (TemperatureInF > DewPointInF)
if (TemperatureInF - DewPointInF <= 4)
return true;
else if (DewPointInF - TemperatureInF <= 4)
return true;
else
return false;
}

Is this just too simple or is it about right? should we also be looking at humidity?


And I get confused when I try to understand the following :

// betejuice fuzzy logic
$suppress = 0; // a flag which will influence skycond display
$fog = 0;
// Automatic FOG detection - normally starts in the dark before you get up ;-)
if($display['showFog']){
if(decCom($cloudbasevalue) < ($cloudbaseunit == "m" ? 10 : 29) && $MinutesSinceLastRainTip > 15){ // less than 10m - a rough figure and NO rain
if(decCom($temp) < ($tempunitnodeg == "C" ? 4 : 39)){ // 4 deg C - True temp
$condOut .= $langCurrWeather["freeze"] . " ";
}
$auto .= $langCurrWeather["fog"];
$hybrid .= $langCurrWeather["fog"];
$suppress = 1; // suppress skycond
$fog = 1;
}
} // END fog check


I am not questioning the logic - just purely trying to understand it, from a metric versus imperial point of view.

Data for Sunday just gone when we where fogged in all morning.

regards,
You do not have the required permissions to view the files attached to this post.
Tony

Huon River Vista Weather - South Franklin - Tasmania
Davis Vantage Pro 2 Plus - FARS, Cumulus MX, 2 Soil Temp/Moist Solar/Rad.
Weather PC Died 2016/11/21 15:25 Cannot justify replacement (Website dead)


Return to “Web site - General”

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 3 guests