WXSIM "EWN-style"

Based on requests did i made a version of the new EWN-forecast-style also for WXSIM. :wink:
The script is fully responsive.

Live demo: Weatherforecast [DWD,ECMWF,MET Norway]
Download: https://www.nordicweather.net/downloads/wxsim.zip

:slight_smile:

Henkka


wxs.jpg

WOW Henkka, that looks brill, love it and will have a look at it tomorrow, thank you

Up and running without any problem.
Thanks Henrik [emoji106] [emoji106]
Regards,

Alessandro

Great job, Henkka! Got it going but have a issues.

One issue I still have is when I first display forecast.php, the temperatures are in Centigrade and the Units in m/s and rain totals are in mm. I have changed the units array on line 46 of config.php to use the second array. Do I need to change something else so that is uses the correct settings when I first run forecast?

The second issue I noticed after I changed the Units and the forecast page is displayed, the temperature and wind changed. However, rain measurements were still in mm instead of inches. I was hoping everything would be in US units (’

WOW Henkka,
Absolutely Brilliant, Thank you so much greatly appreciated.
I no longer have a web presence to show a link, though attached a pic from my internal network wamp site. Displays my 9 Day forecast brilliantly and love the Daily Summary Slide Bar and that in Table and Graph it displays the selected Day. The iPads love it too.
Only one issue I have is with the Moon Phase and how to adjust it for Southern Hemisphere (The Moon Icons also in Northern).
Kind Regards,


Hi guys,

One issue I still have is when I first display forecast.php, the temperatures are in Centigrade and the Units in m/s and rain totals are in mm. I have changed the units array on line 46 of config.php to use the second array. Do I need to change something else so that is uses the correct settings when I first run forecast?

The script use c,m/s,mm as internal units. The scripts gives the choise to the user who can choose the units from the gear-icon and the script remember the choises.

[quote]
The second issue I noticed after I changed the Units and the forecast page is displayed, the temperature and wind changed. However, rain measurements were still in mm instead of inches. I was hoping everything would be in US units (’

Hennka,

Thanks very much for your response. I still have a couple of questions.

Regarding the units, since $uoms is a configurable option, I was just wondering why it isn’t used to display temp, wind, rain, etc. instead of having to manually change these values with the gear icon.

Also, in the carousel temps, you mentioned these are rounded values. Wouldn’t it make more sense to be consistent between the carousel and the table by either rounding in both places or not at all? It just doesn’t look correct to show 2 different forecasted temps for the same day and night.

Thanks very much.

Steve

Regarding the units, since $uoms is a configurable option, I was just wondering why it isn't used to display temp, wind, rain, etc. instead of having to manually change these values with the gear icon.

As the orginal script was made for Europe (EWN) and this script are just a quick port of it do it have the European units as “default”. But yes, i can give it a think if there are a easy way to change those default units.

Also, in the carousel temps, you mentioned these are rounded values. Wouldn't it make more sense to be consistent between the carousel and the table by either rounding in both places or not at all? It just doesn't look correct to show 2 different forecasted temps for the same day and night.

You maybe not understood how it works, lets clarify. Both table- and carousel-values are rounded when displayed as they do not show any decimals. Values in the table are just “shots” of the conditions at top of the hours, and do not show what happen the rest 59 minutes of that hour. Except the rain + some of its realted variables whats hourly values. The values in the carousel again are daily values and therefore do it use the lowest/highest values found in the data. Theese may differ with even just 0.1

One question: you can configure the “config.php” file and set the wind by default in “km/h”? I tried in every way but in “forecast.php” files always results in “m/s”.
Thank you

It displays m/s as default, yes. You can set your own units for temperature and wind from the unit-gear in top-right corner. The browser should remember the settings.

Hi!

Set line 45 in config.php like this:

$uoms = array('

Hi
I tried setting this up on my local server to test but all I get is the correct time for the lastret.txt and the white circle on the right
http://ballaugh.no-ip.biz:2082/wxsim/forecast.php

not sure what I have missed

Harold

It seems an incorrect path of plaintext. txt… please could you post all path in config.php here?

Hi

$wxsimlocation = “Ballaugh, Isle of Man”; # Your location
$latitude = 54.31;
$longitude = -4.54;
$tzabb = “Europe/Isle_of_Man”;
$datestyle = “d.m.Y”;
$timeFormat = “d.m.Y H:i”; # Timeformat
$updatehrs = array(6,11,15,21); # Hours when wxsim runs
$updateminute = 20; # minutes past full hour for upload time
$jqueryload = true; # Should we load JQuery? (Set to false if your site loads it by default)
$bootstrapload = true; # Should we load Bootstrap? (Set to false if your site loads it by default)
$mainwidth = “100%”; // Use 100% for responsivity

$path_to_langfiles = “/lang/”; This is the only option that allowed the button options to work
#$path_to_lastret = “/home/web3/subdomains/data/wd/lastret.txt”;
$path_to_lastret = “…/lastret.txt”; This points to my root web folder where the wxsim folder is
$path_to_js = “js/”;
$path_to_css = “css/”;

if($wxsimtype==“forecast”){
include DIR.‘/frc.php’;
}

These are all the paths I could find in the config file

Found these in plaintext.php
$pathtodata=str_replace(“lastret.txt”,“”,$path_to_lastret);
$pt = file($pathtodata.“…/…/plaintext.txt”);

not sure what I have missed

Harold

Okay, but if I close the browser and reopen it returns me to m/s, you could not configure it directly with km/h as you can do with the “short.php” file?
Thank you

For me do both Firefox and Chromium remember the settings OK.

Maybe because I when I close the browser deletes the cookie, it can be?
Thank you

Yes, sure!

Hi Harold,
try these:

$path_to_langfiles = "lang/";
$path_to_lastret = "/home/yourusername/yourrootfolder/lastret.txt";
$path_to_js = "js/";
$path_to_css = "css/";

Have you lastret.txt uploads on root folder?
You shouldn’t put lastret in wxsim folder…just simple to put it on root.

Same thing about lang folder.
Have you lang folder in wxsim folder?
If yes, try this setting:

$path_to_langfiles = "wxsim/lang/";

Hi folks, i notice its just me, but i cannot find were to turn on my than 4 days for the icons along the top?

http://www.suffolkweather.info/wxsim-new/forecast.php