WXSIM "EWN-style"

Perfect, working !!!

Thank you very much Wim !!! For all your patience and explanations, it has been of great help to me, if it had not been for you I would not have achieved it … =D>

http://meteohila2.esy.es/wxsim1/forecast.php

Thank you, I have it all working now.

Just curious. Has anyone actually put the short.php in a Meteotemplate block? I have been trying for a while now but can’t seem to get it to work.

Yes sure!
Take a look here: http://www.meteopistoia.it

Just put an iframe on default block page like this:

Thanks for the tip, works great

You’re welcome :slight_smile:

Hi Henkka,

Hope you are well.
I have had a NaN issue displaying Precip an the Overview page this week, rainfall forecast has changed daily per run from over 200 mm to now over 60 mm.
However Overview page continues to show NaN mm. https://southfranklinweather.com/wxsim/forecast.php

I’ve search the files for a culprit, though can’t find the cause. Would you have any ideas. ?

Below screenshots of old 3 in 1 workin fine and EWN-Style in NaN mm.
Also below is excerpt of same period in plaintext.txt

Tonight: Dense overcast. Rain likely. Breezy. Low 7, but temperatures rising after midnight. Wind south-southeast around 23 kph, gusting to 35 kph. Chance of precipitation 80 percent. Precipitation mostly over 60 mm. Minimum snow level 150 meters above sea level.

I feel it maybe something to do with the “over 60 mm”.

Kind regards,
Tony


Same thing here Tony.
I’ve sent an email to Henrik about this issue but without lucky :frowning:

Hi all,
I’ve downloaded the EWN-style script on to my website, read the “README.txt” file and configured the wxsim/config.php file to link to my folders as indicated.

But the forecast.php script is absolutely filled with errors, and doesn’t load any data. Setting error reporting off on my scripts results in an “internal server error” if I try to load any of the pages.

Forecast page is listed here:
http://aspgweather.com/townsville/wxsim/v5/forecast.php

As you can see, all I’m getting is all of this:
Notice: Use of undefined constant lang - assumed ‘lang’ in /home/aspgweat/public_html/townsville/wxsim/v5/wxsim/config.php on line 62

Notice: Use of undefined constant ewnwunit - assumed ‘ewnwunit’ in /home/aspgweat/public_html/townsville/wxsim/v5/wxsim/config.php on line 285

Notice: Undefined variable: uploadupdate in /home/aspgweat/public_html/townsville/wxsim/v5/wxsim/frc.php on line 24

Notice: Use of undefined constant lang - assumed ‘lang’ in /home/aspgweat/public_html/townsville/wxsim/v5/wxsim/frc.php on line 43

Notice: Use of undefined constant ewnwunit - assumed ‘ewnwunit’ in /home/aspgweat/public_html/townsville/wxsim/v5/wxsim/frc.php on line 56

Notice: Undefined variable: ewnfooter in /home/aspgweat/public_html/townsville/wxsim/v5/wxsim/frc.php on line 73

Notice: Use of undefined constant SNOB - assumed ‘SNOB’ in /home/aspgweat/public_html/townsville/wxsim/v5/wxsim/frc.php on line 90

Notice: Use of undefined constant RRATE - assumed ‘RRATE’ in /home/aspgweat/public_html/townsville/wxsim/v5/wxsim/frc.php on line 90

Notice: Undefined variable: alt in /home/aspgweat/public_html/townsville/wxsim/v5/wxsim/frc.php on line 99

Notice: Use of undefined constant COMPAREDESC - assumed ‘COMPAREDESC’ in /home/aspgweat/public_html/townsville/wxsim/v5/wxsim/frc.php on line 236

Not sure why the script is filled with so many errors straight out of the box! It looks great, but it seems poorly designed to have so many errors when you first download it.

@dwa128

But the forecast.php script is absolutely filled with errors, . . . Not sure why the script is filled with so many errors
First of all, I am not the script writer. Second these are not [b]errors[/b] but notices, they should be switched off in your webserver by default.

The wxsim script finished all init stuff. => OK
The javascript wxsim_frc_2017.js?2017.03 starts to load the data http://aspgweather.com/townsville/wxsim/v5/wxsim//data.php?wunit=kmh&lang=en => OK
data.php script loads your config.php => OK
Again a few notices, same as with the forecast.php script. => OK, but we should switch off the “notice” reporting also in data.php
The sunmoon.php is loaded and then there is a new error (at least to me):

<b>Parse error</b>:  syntax error, unexpected T_OBJECT_OPERATOR in 
<b>/home/aspgweat/public_html/townsville/wxsim/v5/wxsim/sunmoon.php</b> on line <b>32</b>

I can not check why this happens as I have no access to the contents of that config.php so please zip it and attach it to your post.
Also this error sometimes occurs when running a old version of PHP, what is your version?

===

Your http://aspgweather.com/townsville/wxsim/v5/forecast.php displays Updated: 14.03.2017 04:08
That lastret.txt which is used by the script is not yours, it is the test version in the wxsim downloaded folder.

Wim

Hi Wim,

Long speak no time, hope you are well.

Maybe :

The https://southfranklinweather.com/wxsim/forecast.php displays Updated: 14.03.2017 04:08 That lastret.txt which is used by the script is not yours, it is the test version in the wxsim downloaded folder.

Was meant to be :

The http://aspgweather.com/townsville/wxsim/v5/forecast.php displays Updated: 14.03.2017 04:08 That lastret.txt which is used by the script is not yours, it is the test version in the wxsim downloaded folder.

Kind regards,

@BeaumarisWX
Thank you =D>, I adapted the post for that error. I was looking for users in the same region to find the cause of the error. And I left your and mine forecast wide open to compare to the Burdell, QLD one. And then I copied the wrong URL. Must be a very good eyesight, to catch the DST WXSIM errors and this wrong link.

The error must be something with the user settings / location-specific settings as I tested with similar cities/timezones for the east of AU but the error did not occur.

Will wait to see if @dwa128 find time to post the settings.

Wim

Hi Wim,

:lol: The eyes are getting worse as the years drag on matey.

I sent @dwa128 a PM on Sunday thought not had a reply, I suspect he’s busy with work.

Yes the main issue is with the paths, they do that if they are not correct, took me a while ages ago to fix.

It becomes confusing if I post mine as they would differ greatly, so hopefully he gets back to you.

kind regards,

Spot on! Very hard to find any free time at the moment

Thank you all for the help!
I updated the version of my PHP, and disabled error reporting on the data.php file and everything is now working as I had hoped!

Hi all,
@Henkka thanks for the nice script :smiley:
The following occurs in the table see the column precipitation.
The precipitation value is in some lines with 14 digits after the point see photo. Can I solve it somewhere?

Link to the WXsim forecast: http://www.leudalweer.nl/wxsimnew/forecast.php

Thanks for your advice.

Peter.


I have problems with this script could you help?
Link forecast.php
www.meteostroncone.info/forecast.php
www.meteostroncone.info/short.php
www.meteostroncone.info/graph.php
Thanke you!!

Hi,
With regards the multiple decimals in ‘pre’ ((prec)precipitation) on some lines.
It bugged me for ages so found a fix : In “wxsim_frc_2017.js” around line (“198”).

Replace :


if(item.prec>0&&item.prec<1){pre=item.prec;}else{pre=Math.round(item.prec);}

With :


if(item.prec>0&&item.prec<1){pre=item.prec.toFixed(1);}else{pre=item.prec.toFixed(1);} 

And I do prefer to see the decimal point value rather than rounded to none.

Kind Regards,


Hi Tony,

It’s been a while since I have asked the question on this forum.
So you can see that there is ever an answer to your question. :lol:
Fine is it that I get an answer from someone who lives 16.832 km away from me.
Thanks for your help Tony. It works! :smiley:

Greetings from the Netherlands,

Peter.

Hi Peter,
:lol: I’m glad it worked for you.
Kind regards from the Apple Isle Tasmania.

Hi I realise this is an old thread, however just curious if anyone else has had this issue and if they may have found a cause or fix.
when “Chance of precipitation less than 20 percent. Precipitation mostly less than 2 mm.” the overview (precip) displays as 120% instead of 20%

below : Quote from my plaitext.txt :

Today: Partly cloudy in the morning, becoming mostly sunny in the afternoon. A slight chance of rain. Windy. High 17. UV index up to 7. Wind west-northwest around 27 kph, gusting to 51 kph. Chance of precipitation less than 20 percent. Precipitation mostly less than 2 mm.

Link to page : https://beaumaris-weather.com/wxsim/forecast.php

Also attached my lastret.txt

Kindest regards,
Tony


lastret.txt (130 KB)