WXSIM "EWN-style"

@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)

All of the other scripts treat ‘Less than 20%’ as ‘10%’

The new EWN style attempts to do this, but keeps the number ‘2’ within the value, making it ‘120%’

I have found the line that the issue resides in…

In the plaintext.php

if ($wxallpop == ‘<20’) {$wxallpop[$i] = 10;}

I’m not an expert, but removing [$i] fixes the problem, and doesn’t cause any issues.

if ($wxallpop == ‘<20’) {$wxallpop = 10;}

I even changed every single day to Chance of precipitation less than 20 percent. Precipitation mostly less than 2 mm. and it still works.

Hi Mapantz,
Greatly appreciated.
I agree not sure it is the ultimate fix, but yes I confirm it works.
Thankyou,
kind Regards,

Hi there,

I tried to get the Wxsim Ewn Style script to work, but it doesn´t work. It only loads one circle all time.
I tried a few solutions from here, but to no avail. I hope someone can help me?

My files: https://fil.email/K4REIYR7

forecast.php: www.bßchelbergwetter.de/WxsimSkripts/Skript1/forecast.php
data.php: www.bßchelbergwetter.de/WxsimSkripts/Skript1/wxsim/data.php
lastret.txt: www.bßchelbergwetter.de/wxsim/lastret.txt

Greetings,
Manuel

Hi Wetter-Bu
I looked at your config file
$path_to_langfiles = “/WxsimSkripts/Skript1/wxsim/lang”; should work with= “lang/”;
$path_to_lastret = “/wxsim/lastret.txt”; the path has to be exact but try= “https://www.büchelbergwetter.de/wxsim/lastret.txt”;
but you may need to check the path with your host
mine is “E:/Domains/h/hc-iom.co.uk-10digit number/user/my root folder/weather/lastret.txt”; this is an internal path
mine did not work with http://www.hc-iom.co.uk/weather/lastret.txt

$path_to_dataphp = “/WxsimSkripts/Skript1/wxsim/”; should work with= “wxsim/”;
$path_to_js = “/WxsimSkripts/Skript1/js/”; should work with= “js/”;
$path_to_css = “/WxsimSkripts/Skript1/css/”; should work with= “css/”;

hope this is of some help

Your script is started from www.bßchelbergwetter.de/WxsimSkripts/Skript1/forecast.php
but that results in => https://bĂźchelbergwetter.de/WxsimSkripts/Skript1/forecast.php
The lastret-file location is https://bĂźchelbergwetter.de/wxsim/lastret.txt
But you haver to find the real path, similar to something like “”/Users/xyz/http_doscs/wxsim/lastret.txt".

Use the attached script

  1. put the unzipped hardpath.php in the wxsim folder
  2. run it as https://bĂźchelbergwetter.de/wxsim/hardpath.php
    and it will display the internal path to your wxsim files

===
The lastret file is not synchronised.
This script only displays the lines of lastret.txt which are ‘exactly’ on the hour, your files does not contain any of those lines

 2:19p DNS.OVCS CHNC. DRZ  11,4  10,3   9,0  11,4   8,5  212   14    6  100   93    4  5511       4,9   0,3  12,0  11,1                        0,0  1,0  0,0   53   25  1011 -0,7 -2,0  0,3  SSW  100    9          0 2020-02-02_12:19_UTC
 2:49p DNS.OVCS            11,6  10,3   9,2  11,6   8,7  212   17    6  100   92    4  5512       5,0   0,2  12,2  11,4                        0,0  1,0  0,0   59   25  1011 -0,6 -1,9  0,3  SSW  100    9          0 2020-02-02_12:49_UTC

Try to adjust the run-times of wxsim to be on-the-hour, not 19 minutes after the hour.

===
The data from the https://www.bĂźchelbergwetter.de/wxsim/plaintext.txt is not displayed as the same path is used as for lastret.txt

The link ANONYMOUS - Filemail link does not work.


hardpath.php.zip (578 Bytes)

Hello everybody,
thank you for your help. I have already adapted some of the paths. The lastret path is right. But I will check it again next weekend with the hardpath.php. The problem with the times in the lastret was also known to me. This is because my meteohub updates the file 22020lg.txt with the data imported from Wxsimate to: 24 and: 53 and therefore only data up to: 21 or 53 is available. This ultimately creates the timestamps in the lastret, which sometimes vary 1-2 minutes. I saw earlier in this topic that I can adjust the timestamps in the script. Problem: the timestamps sometimes vary by 1-2 minutes. Is it possible to adapt the script so that it automatically takes the timestamps that are in the lastret?
And yes the link no longer works, it was only valid for 1 week.

The correct path is essential.
The current path is invalid as the scripts use the same lastret setting for the plaintext.txt file as that should be in the same folder.
And the plaintext data is not displayed either

The problem with the times in the lastret was also known to me. This is because my meteohub updates the file 22020lg.txt with the data imported from Wxsimate to: 24 and: 53 and therefore only data up to: 21 or 53 is available. This ultimately creates the timestamps in the lastret, which sometimes vary 1-2 minutes. I saw earlier in this topic that I can adjust the timestamps in the script. Problem: the timestamps sometimes vary by 1-2 minutes. Is it possible to adapt the script so that it automatically takes the timestamps that are in the lastret?
I attach a version which can cope with all minutes from :50 to :59

Succes next weekend.

Wim


data.php.zip (6.06 KB)

Hi,

here is the result. But there are some problems.

  1. It shows only the next Tuesday at the Top
  2. at the graphic ° C is not shown on the left
  3. at the Overview the description ist not german

Update:
Since Wxsim’s calculation this morning, it has not worked at all and the circle is spinning all the time. The timestamp in lastret has increased by 1 minute. However, I used the modified data.php. Is there still a mistake in it? @Wim


I copied your lastret and plaintext to my MAMP-server.
I used the data php from the previous post which accepts the 50 - 59 minutes
I added your station name to config php
And set the path right
It then works as in the attached screenshot. No problems at all.

As I can not post code anymore on this forum (get a 403 forbidden) i attach a textfile with my settings in config php

When it works with the least amount of changes, then you can start to change other things,

Wim


config.txt (824 Bytes)