Welcome to the Cumulus Support forum.

Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024

Cumulus MX V4 beta test release 4.0.0 (build 4019) - 03 April 2024

Legacy Cumulus 1 release 1.9.4 (build 1099) - 28 November 2014
(a patch is available for 1.9.4 build 1099 that extends the date range of drop-down menus to 2030)

Download the Software (Cumulus MX / Cumulus 1 and other related items) from the Wiki

WU Forecast showing km/h not mph?

Discussion of Ken True's web site templates

Moderator: saratogaWX

KevinF
Posts: 71
Joined: Sat 14 Apr 2012 5:01 pm
Weather Station: WMR200
Operating System: XP SP3
Location: Lancashire

Re: WU Forecast showing km/h not mph?

Post by KevinF »

Hi Will...You are asking for an unusual combination I would say, but I'm from another era. My formative years in education were in the 60's. An era when metrification was foisted on us by our so called honourable elected politicians against the majority will of the people. Although the metrification battle has been going on for 200 years it picked up again in the 60's. Hence, my preference is still imperial, but both systems of measurement, were taught. I'm not sure what the deal is now in our education establishments, but I have an inkling that they will be pushing even harder to acquire full re-education of students to think metric only! This after all is what the government want and part of the globalistic agenda - one world order and all that. I'm very pleased that our cousins in the USA have resisted the pressure....so far! They are one of only a few countries in the world to remain predominantly imperial.

Centigrade and MPH would upset the people in power, because as Ken says 'there is no mix and match'. Indeed, mixing and matching, would be construed as confusion by our masters and thus further their ultimate goal and justification for full metrification. They would say 'right! enough is enough! Words like fahrenheit, mph, inches, and ounces are dirty words and must not be used in any educational establishment!'.

You see, our masters like discord amongst the plebs - it gives them reason to push their agenda, which in future will not include imperial measures!

Having said all that, I hope you do find a script that you like. One thing for sure MPH will always remain! Let us know how you go on and always use your preferred combination of measurements regardless.....sorry for going on :lol:

Kevin

Merry Christmas :D
BCJKiwi
Posts: 1256
Joined: Mon 09 Jul 2012 8:40 pm
Weather Station: Davis VP2 Cabled
Operating System: Windows 10 Pro
Location: Auckland, New Zealand
Contact:

Re: WU Forecast showing km/h not mph?

Post by BCJKiwi »

So you are currently getting a Metric forecast and want to display MPH for the wind speed?
If so you could try working backward, i.e.
1. In settings.php - in the specific #WU-History settings section - change the units setup in to get an 'English' forecast. That should give you degF and MPH.
2. In WU-forecast.php - near the end of the settings section and in the following overrides section;
a. configure $showTempsAs to display temps in C.
b. you may need to rem out the site override for uomTemp as well.

I have not tried this so have no idea if it will actually do what you want, nor what other effects there may be.

Hope this helps.

Merry CHRISTmas
User avatar
William Grimsley
Posts: 833
Joined: Thu 22 Sep 2011 5:22 pm
Weather Station: Davis Vantage Vue
Operating System: Windows 7 Home Premium 64-bit
Location: Latitude: 50.70189285 Longitude: -3.30849957
Contact:

Re: WU Forecast showing km/h not mph?

Post by William Grimsley »

Hi BCJKiwi,

I can't find anything in Settings.php?

Will
BCJKiwi
Posts: 1256
Joined: Mon 09 Jul 2012 8:40 pm
Weather Station: Davis VP2 Cabled
Operating System: Windows 10 Pro
Location: Auckland, New Zealand
Contact:

Re: WU Forecast showing km/h not mph?

Post by BCJKiwi »

here?

Code: Select all

$SITE['fcstscript']	= 'WU-forecast.php';    // Non-USA, Non-Canada Wunderground Forecast Script
$SITE['fcstorg']		= 'WU';    // set to 'WU' for WeatherUnderground
// Uncomment the two lines below to use WXSIM as the ONLY forecast script to use
// $SITE['fcstscript']	= 'plaintext-parser.php';    // WXSIM forecast (if only forecast script)
// $SITE['fcstorg']		= 'WXSIM';    // set to 'WXSIM' for WXSIM forecast
// 
// For Europe only, use the meteoalarm.eu site for your area's watches/warnings on the wxadvisory page
// $SITE['EUwarningURL']	= 'http://www.meteoalarm.eu/index3.php?area=DK004&day=0&lang=en_UK';
// EUwarningURL is used by get-meteoalarm-warning-inc.php for EU countries
###########################################################################
# WU-History settings
$SITE['WUID']		= 'IAUCKLAN110'; // set to Wunderground ID (upper case)
//$SITE['WUunits']	= 'M';		// units to display 'E'=english, 'M'=metric, 'B'=both
//             comment $SITE['WUunits'] above out to use uomTemp to select English or Metric
$SITE['WUstationname'] = 'YOUR SITE NAME'; // for legend at bottom of page
$SITE['WUbirthday']	= '12-34-2012'; //Stations first day of operation format dd-mm-yyyy
###########################################################################
##########################################################################
# end of configurable settings
##########################################################################
User avatar
William Grimsley
Posts: 833
Joined: Thu 22 Sep 2011 5:22 pm
Weather Station: Davis Vantage Vue
Operating System: Windows 7 Home Premium 64-bit
Location: Latitude: 50.70189285 Longitude: -3.30849957
Contact:

Re: WU Forecast showing km/h not mph?

Post by William Grimsley »

Hi BCJKiwi,

I moved that code, but still I changed this code from:

Code: Select all

//$SITE['WUunits']   = 'M';      // units to display 'E'=english, 'M'=metric, 'B'=both
To

Code: Select all

//$SITE['WUunits']   = 'E';      // units to display 'E'=english, 'M'=metric, 'B'=both
and still no luck. This makes me think that this is the WU History page and nothing to do with the forecast itself? :bash:

Thanks

Will
BCJKiwi
Posts: 1256
Joined: Mon 09 Jul 2012 8:40 pm
Weather Station: Davis VP2 Cabled
Operating System: Windows 10 Pro
Location: Auckland, New Zealand
Contact:

Re: WU Forecast showing km/h not mph?

Post by BCJKiwi »

Yes you are right, sorry about that!

Well the only other way would be to modify the WU-forecast script itself to convert all the kph values to mph but that would be rather complicated. I have made mods to that script for layout of the icons and it was not easy.

I am not sure why you really want to do this.
'Joe Public' would surely expect to be reading all metric or all imperial redgardless of what the 'official' line might be.
If on the other hand your audience is weather aficionados, then surely they would understand also.

I suggest you learn to live with it and, if you feel it necessary, include an explanatory note on the page between the icon section and the forecast section.
User avatar
steve
Cumulus Author
Posts: 26701
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: WU Forecast showing km/h not mph?

Post by steve »

BCJKiwi wrote:'Joe Public' would surely expect to be reading all metric or all imperial redgardless of what the 'official' line might be.
Just to cloud the issue a little more, the official unit of wind speed in the UK is actually the knot.
Steve
BCJKiwi
Posts: 1256
Joined: Mon 09 Jul 2012 8:40 pm
Weather Station: Davis VP2 Cabled
Operating System: Windows 10 Pro
Location: Auckland, New Zealand
Contact:

Re: WU Forecast showing km/h not mph?

Post by BCJKiwi »

Well you'll not get knots out of WU ever! ;) .

Merry Christmas Steve and family. Thanks again for the great program and the support.
User avatar
William Grimsley
Posts: 833
Joined: Thu 22 Sep 2011 5:22 pm
Weather Station: Davis Vantage Vue
Operating System: Windows 7 Home Premium 64-bit
Location: Latitude: 50.70189285 Longitude: -3.30849957
Contact:

Re: WU Forecast showing km/h not mph?

Post by William Grimsley »

Well, I'll just have to live with it... :evil:
User avatar
William Grimsley
Posts: 833
Joined: Thu 22 Sep 2011 5:22 pm
Weather Station: Davis Vantage Vue
Operating System: Windows 7 Home Premium 64-bit
Location: Latitude: 50.70189285 Longitude: -3.30849957
Contact:

Re: WU Forecast showing km/h not mph?

Post by William Grimsley »

Don't know if this is getting somewhere?

Code: Select all

if (isset($SITE['WUunits']))	{$uomWind = $SITE['WUunits'];}
Trying my hardest... :lol:
User avatar
William Grimsley
Posts: 833
Joined: Thu 22 Sep 2011 5:22 pm
Weather Station: Davis Vantage Vue
Operating System: Windows 7 Home Premium 64-bit
Location: Latitude: 50.70189285 Longitude: -3.30849957
Contact:

Re: WU Forecast showing km/h not mph?

Post by William Grimsley »

I just had another ago. It looks like it's impossible to solve. :(

Also, how do you change the WU-forecast.php script from Metric to English? I want to try something... ;)
User avatar
saratogaWX
Posts: 1198
Joined: Wed 06 May 2009 5:02 am
Weather Station: Davis Vantage Pro Plus
Operating System: Windows 10 Professional
Location: Saratoga, CA, USA
Contact:

Re: WU Forecast showing km/h not mph?

Post by saratogaWX »

I fear you had forgotten my prior posts on this subject, and for some inexplicable reason, you continue to pursue this trivial issue.

To reprise:
1) WeatherUnderground offers forecasts in two unit systems - 'English' with F,mph and 'Metric' with C,km/h -- there is no 'British' option available.
2) my WU-forecast script presents what WU offers and I don't mess-about with the verbiage of the forecast as it is many times, not in English, so the parsing would be a horrendous task (and that is why I excluded adding that potential code).

Give it a rest William. I think most folks viewing your website would have no concern about winds forecast in km/h and would have much greater issue if your temperatures in the forecast were in Fahrenheit (which is your ONLY option to achieve mph winds).
User avatar
William Grimsley
Posts: 833
Joined: Thu 22 Sep 2011 5:22 pm
Weather Station: Davis Vantage Vue
Operating System: Windows 7 Home Premium 64-bit
Location: Latitude: 50.70189285 Longitude: -3.30849957
Contact:

Re: WU Forecast showing km/h not mph?

Post by William Grimsley »

saratogaWX wrote:I fear you had forgotten my prior posts on this subject, and for some inexplicable reason, you continue to pursue this trivial issue.

To reprise:
1) WeatherUnderground offers forecasts in two unit systems - 'English' with F,mph and 'Metric' with C,km/h -- there is no 'British' option available.
2) my WU-forecast script presents what WU offers and I don't mess-about with the verbiage of the forecast as it is many times, not in English, so the parsing would be a horrendous task (and that is why I excluded adding that potential code).

Give it a rest William. I think most folks viewing your website would have no concern about winds forecast in km/h and would have much greater issue if your temperatures in the forecast were in Fahrenheit (which is your ONLY option to achieve mph winds).
Hi Ken,

Yes, I did forget, sorry. :oops:

1) Ok, I see.

2) Yes, parsing would be a horrendous task, by the sound of things!

Ok, I will give it a rest and yes I think having Fahrenheit on my website would be much worse than having km/h on my website! :D

Thanks for your help,

William
Post Reply