Author Topic: Support of the "Leuven" Forecast scripts  (Read 16872 times)

0 Members and 1 Guest are viewing this topic.

Online wvdkuil

  • Wim van der kuil
  • Forecaster
  • *****
  • Posts: 1986
    • My PWS at Leuven Belgium Europe
Support of the "Leuven" Forecast scripts
« on: March 28, 2019, 04:27:01 PM »
All the "Leuven" weather-forecast scripts are in 1 folder and in 1 download. Currently the following forecasts are available :
  • WXSIM-plaintext, WXSIM-lastret/latest.csv
  • Met.no
  • UV from KNMI/Temnis
  • Environment Canada + weather warnings
  • NOAA/NWS plaintext type + weather warnings
  • NOAA/NWS SOAP detailed data
Download and demo of all forecasts: https://pwswd.be/wsfct4/
Demo inside Saratoga template: https://www.weerstation-herent.be/saratoga/wx_lvn_wxsimPP.php
Readme: https://pwswd.be/wsfct4/readme.html
Known issues: link will be added when needed

Remarks:
Positive: "A lot of settings" To adjust what contents you want, what colours a.s.o.
Negative: "A lot of settings" The output is cached, so you have to learn to clear the cache when testing a change in your settings.
 
These scripts can be used Stand-Alone and in the Saratoga-template.
They could be used in the Leuven-Template also, but they are not supported there! Use at your own risk.

These are very extensive and complex scripts, do not change the scripts themselves.
Change only the settings and the startpages. All as described in the readme.


Support:
When you post questions about the scripts
  • Always include the URL (=correct link)  to the script on your website
  • Check the demo scripts to see if the problem exist there also. Sometimes the forecast servers are the cause of the problem
  • Also states all other actions you already did to pinpoint the cause of your problems.
Checking those things also helps to reduce the time for answering your questions.

Wim
Leuven script supporters
« Last Edit: May 01, 2023, 04:59:50 AM by wvdkuil »

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9257
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Support of the "Leuven" Forecast scripts
« Reply #1 on: March 28, 2019, 05:12:22 PM »
 =D>  =D> Outstanding, Wim -- thanks for sharing these!
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline Alter49

  • Member
  • *
  • Posts: 1
    • Die Bittkau' aus Magdeburg Ottersleben
Re: Support of the "Leuven" Forecast scripts
« Reply #2 on: April 02, 2019, 06:45:04 AM »
Danke Wim Super [tup]

Offline philipgm

  • Member
  • *
  • Posts: 1
    • Picton Weather
Re: Support of the "Leuven" Forecast scripts
« Reply #3 on: April 23, 2019, 09:26:11 PM »
Wow! What a great script. Excellent. [tup]

Offline meteosa

  • Member
  • *
  • Posts: 18
Re: Support of the "Leuven" Forecast scripts
« Reply #4 on: May 17, 2019, 02:12:12 PM »
Hello,
I installed your Forecast scripts, but how do I set the Italian language? I put the file in the "lang" folder, set in the php file: lang: "it" but it doesn't translate it for me, why?
Thank you

Online wvdkuil

  • Wim van der kuil
  • Forecaster
  • *****
  • Posts: 1986
    • My PWS at Leuven Belgium Europe
Re: Support of the "Leuven" Forecast scripts
« Reply #5 on: May 17, 2019, 02:49:31 PM »
Hello,
I installed your Forecast scripts, but how do I set the Italian language? I put the file in the "lang" folder, set in the php file: lang: "it" but it doesn't translate it for me, why?
Thank you

@ALL  PLEASE ALWAYS INCLUDE THE URL TO YOUR WEBSITE / SCRIPT
As from now, no answers if you do not include the links.

@metosa
I will use the Italian language as example, but it works the same for most western languages
To install 1 extra language, follow these steps
  • In the wsfct4/lang/ folder copy one of the current language files f.i. fctlanguage-en.txt and change the name to  fctlanguage-it.txt
  • DO NOT COPY any other language file you may have, use only a copy of an existing file in the lang folder
  • Carefully change all texts at the right to Italian
  • Change the allowed languages around line 250 in your settings file , in this case _metric_settings.php to contain your new language
That array to change is below the warnings about knowing what you are doing. Be careful.
Code: [Select]
# ----------------------------------------------
#                              language settings
#-----------------------------------------------
$ws_langs_supported = array ('en', 'nl', 'fr', 'de');
Change to
Code: [Select]
# ----------------------------------------------
#                              language settings
#-----------------------------------------------
$ws_langs_supported = array ('en', 'nl', 'fr', 'de','it');

Wim

Offline ugo71

  • Member
  • *
  • Posts: 12
Re: Support of the "Leuven" Forecast scripts
« Reply #6 on: June 15, 2019, 10:15:48 AM »
Hi, Wim excellent script thanks.  [tup]
It could be an idea to make a yr.no script (which in my opinion is one of the most reliable) for mobile devices by putting only 3 forecasts on one line then on the line under other 3 forecasts.

Online wvdkuil

  • Wim van der kuil
  • Forecaster
  • *****
  • Posts: 1986
    • My PWS at Leuven Belgium Europe
Re: Support of the "Leuven" Forecast scripts
« Reply #7 on: June 15, 2019, 10:38:13 AM »
Hi, Wim excellent script thanks.  [tup]
It could be an idea to make a yr.no script (which in my opinion is one of the most reliable) for mobile devices by putting only 3 forecasts on one line then on the line under other 3 forecasts.
Thanks for the compliment.
I use the scripts myself also for the mobile devices.
The forecast is in a separate page with a normal forecast so users can scroll / move through all info.

Maybe next year i will have time to make a new 'responsive' version also.

Wim

Offline weatherola

  • Member
  • *
  • Posts: 19
Re: Support of the "Leuven" Forecast scripts
« Reply #8 on: January 27, 2020, 12:45:22 PM »
Wonderful work on this Wim. And, thanks for your support on the Weather34 templates, too.

The one question I have is related to the DarkSky forecasts when used within Ken's Saratoga templates. I've followed your setup instructions and it seems to be working fine, with the exception of template width issue (looking forward to responsive templates for everything) but under the forecast header appears..."Forecast data created at Monday Jan 27 2020 - 9:26am For Station Xetc, etc." I get my Lat/Long location added  on. I really don't want the GPS location of my station shown. Is there something wrong with the way I've set this up, or is there a simple way to turn this off or comment it out?

Thanks

Tim


Online wvdkuil

  • Wim van der kuil
  • Forecaster
  • *****
  • Posts: 1986
    • My PWS at Leuven Belgium Europe
Re: Support of the "Leuven" Forecast scripts
« Reply #9 on: January 27, 2020, 01:14:20 PM »
Wonderful work on this Wim. And, thanks for your support on the Weather34 templates, too.

The one question I have is related to the DarkSky forecasts when used within Ken's Saratoga templates. I've followed your setup instructions and it seems to be working fine, with the exception of template width issue (looking forward to responsive templates for everything) but under the forecast header appears..."Forecast data created at Monday Jan 27 2020 - 9:26am For Station Xetc, etc." I get my Lat/Long location added  on. I really don't want the GPS location of my station shown. Is there something wrong with the way I've set this up, or is there a simple way to turn this off or comment it out?

Thanks

Tim
i am on vacation with insufficient internet. There is a setting to switch off  testing/debug and that will also remove the lat-Lon numerals.

I will be back Feb 1 and will check this out

Wim

Offline weatherola

  • Member
  • *
  • Posts: 19
Re: Support of the "Leuven" Forecast scripts
« Reply #10 on: January 29, 2020, 01:24:59 PM »
Thanks Wim. I might be looking in the wrong place. Haven't managed to turn off the testing switch, so still seeing lat/lon.

Tim

weatherola.com

Online wvdkuil

  • Wim van der kuil
  • Forecaster
  • *****
  • Posts: 1986
    • My PWS at Leuven Belgium Europe
Re: Support of the "Leuven" Forecast scripts
« Reply #11 on: February 01, 2020, 12:03:31 PM »
Thanks Wim. I might be looking in the wrong place. Haven't managed to turn off the testing switch, so still seeing lat/lon.
Tim
weatherola.com
The settings files,  such  as _metric_settings.php contain the setting to switch all errors (and other debug code) off when you are finished testing.
Set $ws_errors to false and the string such as "Forecast data created at Saturday 01 February 2020 - 17:55 For: 51.904,5.69" will not be shown.
If you later on doubt if there is "a problem / error" simply add ?debug or &debug to your URL and the date/time/lat/lon will be shown with  all other "messages"

Succes, Wim
Code: [Select]
#-----------------------------------------------
#            for ALL websites using metric units

#-----------------------------------------------
# # #  Here you have to make the changes   # # #
# # #       for stand-alone use            # # #
#-----------------------------------------------
#                       error messages on or off
#    always set to false for production versions
#
$ws_errors      = false; # false when ready testing     
#-----------------------------------------------

Offline weatherola

  • Member
  • *
  • Posts: 19
Re: Support of the "Leuven" Forecast scripts
« Reply #12 on: February 01, 2020, 02:13:16 PM »
Thanks Wim for clarifying the location for the switch. Unfortunately, setting the switch to "false" still leaves me with the string showing. I am using the _us settings and changed it there as you suggested. I would think that would have removed it, but alas, no. All is the same. If you'd like to have a look, feel free to visit weatherola.com. Sorry to be such a pest.

Tim

Offline weatherola

  • Member
  • *
  • Posts: 19
Re: Support of the "Leuven" Forecast scripts
« Reply #13 on: February 02, 2020, 12:05:07 AM »
Wim,

The switch seems to be working, now. Though I tried it on a couple of computers earlier, the debug code is no longer visible and switched off. Caching, I assume. All better now.

Thanks again for your help, Wim.

« Last Edit: February 02, 2020, 12:07:32 AM by weatherola »

Offline ctccbc

  • Senior Contributor
  • ****
  • Posts: 276
  • Acurite 01035, Weather Display
    • Chris Collins Morehead City, NC Weather
Re: Support of the "Leuven" Forecast scripts
« Reply #14 on: February 13, 2020, 11:38:56 AM »
I posted this question to the wrong forum earlier.

I'm trying to run the Wunderground colored table history script. When I run the script, I get this error:

ERROR: no data for http://change_to_your-site_in_wsReports1part.php/WXDailyHistory.php?ID=KNCMOREH2&month=01&day=01&year=2016&format=1&graphspan=year

I have been running Weather Underground for my site KNCMOREH2 for several years now.

Any help is appreciated,
Chris

Online wvdkuil

  • Wim van der kuil
  • Forecaster
  • *****
  • Posts: 1986
    • My PWS at Leuven Belgium Europe
Re: Support of the "Leuven" Forecast scripts
« Reply #15 on: February 13, 2020, 12:27:46 PM »
I posted this question to the wrong forum earlier.

I'm trying to run the Wunderground colored table history script. When I run the script, I get this error:

ERROR: no data for http://change_to_your-site_in_wsReports1part.php/WXDailyHistory.php?ID=KNCMOREH2&month=01&day=01&year=2016&format=1&graphspan=year

I have been running Weather Underground for my site KNCMOREH2 for several years now.

Any help is appreciated,
Chris

Please be specific.
Your last post https://www.weather-watch.com/smf/index.php/topic,68752.msg555633.html#msg555633
=> is about a version 4 forecast script wsfct4/wsIncWuCreate.php 

Now you are posting in the forecast topic about  the coloured table script

The general support page with all links for all Leuven scripts  is at: https://support.leuven-template.eu/
For the script you are now talking about the support topic is:
https://www.wxforum.net/index.php?topic=36473.msg374472#msg374472

This readme describing how to install the MITM scripts is included in the download and should be in the wsreports folder on your server also.  https://www.weerstation-herent.be/wsreports/WU_CSV_problems_readme.pdf

But if you post in the forum without a link to the start-page of the script,  nobody can help you as, AFAIK, none of the visitors on this forum is clairvoyant.

Wim

Offline plex

  • Contributor
  • ***
  • Posts: 102
Re: Support of the "Leuven" Forecast scripts
« Reply #16 on: February 16, 2020, 01:37:49 AM »
Hello weather enthusiasts and Leuven users

After spending time with other templates, I decided to do a fresh Leuven installation, because it’s still a fantastic template - I really like how customizable it is. So thanks to Wim for keeping it alive.

However I need some help, because I’m struggling with some errors while debugging.

Notice: Undefined index: iconDtl in /var/www/vejrstationen.dk/public_html/weather28/wsmetno3/metnoGenerateHtml.php on line 186

Notice: Undefined index: iconDtl in /var/www/vejrstationen.dk/public_html/weather28/wsmetno3/metnoGenerateHtml.php on line 186

Notice: Undefined index: weatherDescDtl in /var/www/vejrstationen.dk/public_html/weather28/wsmetno3/metnoGenerateHtml.php on line 189

Thanks in advance and happy windy Sunday




Sent from my iPad using Tapatalk
« Last Edit: February 16, 2020, 03:28:00 AM by plex »

Online wvdkuil

  • Wim van der kuil
  • Forecaster
  • *****
  • Posts: 1986
    • My PWS at Leuven Belgium Europe
Re: Support of the "Leuven" Forecast scripts
« Reply #17 on: February 16, 2020, 03:10:28 AM »
Hello weather enthusiasts and Leuven users
After spending time with other templates, I decided to do a fresh Leuven installation, because it’s still a fantastic template - I really like how customizable it is. So thanks to Win for keeping it alive.
However I need some help, because I’m struggling with some errors while debugging.
Notice: Undefined index: iconDtl in /var/www/vejrstationen.dk/public_html/weather28/wsmetno3/metnoGenerateHtml.php on line 186
Notice: Undefined index: iconDtl in /var/www/vejrstationen.dk/public_html/weather28/wsmetno3/metnoGenerateHtml.php on line 186
Notice: Undefined index: weatherDescDtl in /var/www/vejrstationen.dk/public_html/weather28/wsmetno3/metnoGenerateHtml.php on line 189
Thanks in advance and happy windy Sunday
Sent from my iPad using Tapatalk

The link to the page: https://www.vejrstationen.dk/weather28/index.php?p=ws_metno_page&lang=en

Thanks for bringing these "notices", not "errors"  to my attention. I knew there were some changes scheduled in the 1.9 API.
I do not get these notices myself, but it seems that the time is right to start debugging.
I will use your settings for that "Data for latitude=55.899269 - longitude= 8.516578"

@ALL When switching debug to false in your settings, the notices will not be shown, nor appear in in the logs.
These are not "errors", it are "notices" to the script author that the scripts need to be enhanced.
When in  debug mode the scripts print all possible messages "notice", "strict",  "deprecated",  "warning", "error" and "fatal"

Wim
« Last Edit: February 16, 2020, 03:25:46 AM by wvdkuil »

Offline plex

  • Contributor
  • ***
  • Posts: 102
Re: Support of the "Leuven" Forecast scripts
« Reply #18 on: February 16, 2020, 03:24:21 AM »
Hello weather enthusiasts and Leuven users
After spending time with other templates, I decided to do a fresh Leuven installation, because it’s still a fantastic template - I really like how customizable it is. So thanks to Win for keeping it alive.
However I need some help, because I’m struggling with some errors while debugging.
Notice: Undefined index: iconDtl in /var/www/vejrstationen.dk/public_html/weather28/wsmetno3/metnoGenerateHtml.php on line 186
Notice: Undefined index: iconDtl in /var/www/vejrstationen.dk/public_html/weather28/wsmetno3/metnoGenerateHtml.php on line 186
Notice: Undefined index: weatherDescDtl in /var/www/vejrstationen.dk/public_html/weather28/wsmetno3/metnoGenerateHtml.php on line 189
Thanks in advance and happy windy Sunday
Sent from my iPad using Tapatalk

The link to the page: https://www.vejrstationen.dk/weather28/index.php?p=ws_metno_page&lang=en

Thanks for bringing these "notices", not "errors"  to my attention. I knew there were some changes scheduled in the 1.9 API.
I do not get these notices myself, but it seems that the time is right to start debugging.
I will use your settings for that "Data for latitude=55.899269 - longitude= 8.516578"

@ALL When switching debug to false in your settings, the notices will not be shown, nor appear in in the logs.
These are not "errors", it are "notices" to the script author that the scripts need to be enhanced.
When in  debug mode the scripts print all possible messages "notice", 'warning", "error" and "fatal"

Wim

Thanks for clearing this out Wim [tup]

I’m ignoring the message then, and moving on to production.






Online wvdkuil

  • Wim van der kuil
  • Forecaster
  • *****
  • Posts: 1986
    • My PWS at Leuven Belgium Europe
Re: Support of the "Leuven" Forecast scripts
« Reply #19 on: February 16, 2020, 04:55:02 AM »
@ALL When switching debug to false in your settings, the notices will not be shown, nor appear in in the logs.
. . . shortened . . .
Wim
Thanks for clearing this out Wim [tup]
I’m ignoring the message then, and moving on to production.

The last hourly forecast seems "incomplete", but not in all cases.
I added some code to use the icon and description from the 6-hour forecast when there is no corresponding hourly data.

Could you ,please use this version for a few days?
You can always check if there are errors by adding &debug to the url

Wim

Online wvdkuil

  • Wim van der kuil
  • Forecaster
  • *****
  • Posts: 1986
    • My PWS at Leuven Belgium Europe
Re: Support of the "Leuven" Forecast scripts
« Reply #20 on: August 01, 2020, 06:01:11 AM »
Looks like Yrno forecast is also changed.
Not sure if there is already a topic about.
The Leuven support forum is not readable for me anymore.
The xml has changed.
Well something to do I guess.

The yr.no forecasts contain a hidden warning to the script-programmers.
Quote
NB!!! Since we have no other options to contact our users of forecast.xml, we have decided to use this method to get your attention to some major changes with our API
In the first quarter next year, forecast.xml and forecast_hour_by_hour.xml will be discontinued in favour of a newer JSON API.
Vi encourage you already now to switch to the new API.
There are a lot of changes, and you can read all the technical details in our new developer portal https://developer.yr.no

They also show a message to read that warning in the data-fields on some forecasts during the day.
That is their only way to bring this to the script-authors attention, but it looks not nice for the visitors of the websites.

The yr.no script will not be adapted as yr.no data will be replaced with data identical to met.no.
The yrno and metno forecast  will be identical.  You should remove the Yr.no forecast from the menu early 2021.
It is not clear yet, if we can continue to use the yr.no meteogram-image and the full page .pdf.

The met.no script needs will need   
* 1 minor change, the version number in the URL should be changed from 1.9 to 2.0
and
* will remain identical when we add a new "classic" keyword.  Clarification added 2020-08-11 11:40 CEST
I am testing it and the resulting xml seems identical, but I will follow closely if that will change.

DO NOT change to version 2.0 yourself without checking the API documentation. You are on your own with that.
Let me test it first.  The 1.9 version is still the current production metno version.

Wim
« Last Edit: August 11, 2020, 05:44:35 AM by wvdkuil »

Offline kyomar

  • Member
  • *
  • Posts: 13
Re: Support of the "Leuven" Forecast scripts
« Reply #21 on: August 11, 2020, 01:56:05 AM »
Hi Wim,

thanks for the info about the warning concerning the yr.no script - much appreciated. I have just noticed this myself and are now trying to change the script to metno. The scripts have changed quite a bit but managed - thanks to the readme file -  to set it up. Nevertheless I must have made a mistake somewhere as I am not able to get it working ("invalid forecast data retrieved, check the html for errors"). Any ideas what I might have missed? I am a bit confused with point 7. in the stand-alone tab.

Thanks for your time (and this awesome scripts) and best regards,
Markus

Online wvdkuil

  • Wim van der kuil
  • Forecaster
  • *****
  • Posts: 1986
    • My PWS at Leuven Belgium Europe
Re: Support of the "Leuven" Forecast scripts
« Reply #22 on: August 11, 2020, 02:26:11 AM »
Hi Wim,

thanks for the info about the warning concerning the yr.no script - much appreciated. I have just noticed this myself and are now trying to change the script to metno. The scripts have changed quite a bit but managed - thanks to the readme file -  to set it up. Nevertheless I must have made a mistake somewhere as I am not able to get it working ("invalid forecast data retrieved, check the html for errors"). Any ideas what I might have missed? I am a bit confused with point 7. in the stand-alone tab.

Thanks for your time (and this awesome scripts) and best regards,
Markus

And I am a bit confused also as i am not clairvoyant.
I even checked your previous posts but i can not find a working link to a leuven-metno script.

Without a link to the script there is nothing i or anyoneelse can do.

Wim

Offline kyomar

  • Member
  • *
  • Posts: 13
Re: Support of the "Leuven" Forecast scripts
« Reply #23 on: August 11, 2020, 03:02:23 AM »
Thanks a lot Wim for your prompt reply. Clairvoyant, I have learned something new :grin: - English is not my mother tongue.

I haven't uploaded the new scripts to my online page, I am just testing locally (xampp). I have attached the three files I have edited: (sorry didn't work with the attachments). How can I attach txt files without cluttering the whole page?
Edit: weird it seems to have worked after all (attachments).
« Last Edit: August 11, 2020, 04:54:10 AM by kyomar »

Online wvdkuil

  • Wim van der kuil
  • Forecaster
  • *****
  • Posts: 1986
    • My PWS at Leuven Belgium Europe
Re: Support of the "Leuven" Forecast scripts
« Reply #24 on: August 11, 2020, 05:13:22 AM »
. . .Nevertheless I must have made a mistake somewhere as I am not able to get it working ("invalid forecast data retrieved, check the html for errors").
. . .
Well, next time I will not even look and invest my precious spare time if you do not include an accessible link  with your post.

You should have  posted the complete message which appeared before the complete forecast. You gave me the impression that there was no forecast at all.
I copied your two files to the original download and the weather-forecast appeared correctly. See attached screenshot.
But also a clear message, first line with the link, second line to check the html
Code: [Select]
No data was retrieved for http://www.temis.nl/uvradiation/nrt/uvindex.php?lon=137.86&lat=36.7

no forecast data can be retrieved, check the html for errors

The UV part does not come from met.no but from temis.nl
You could have done a lot of  yourself by copying that link that displayed link to your browser yourself and notice it takes about a minute before the website answers.
That is too long for your visitors to wait.  We wait only 4-10 seconds and then try to use the cache, which can be to old to use also.
In that case there is a one-time message every new ( 1/hour approx.) generating of the cached files.
Only if "error messages" is switched on, of course, which you can switched off in line 12 of the settings.

For missing data there is also always a setting
=> line 76 in wsMetnoPage.php, set to false and there will be no error for to old UV cache and a stalled UV-server even with "error messages on".

You also mentioned:
Quote
thanks for the info about the warning concerning the yr.no script - much appreciated.
...
The scripts have changed quite a bit but managed  - thanks to the readme file 

Good work, fine that you "managed", fine that you "appreciate" all the hard work

By the way, the fact that those scripts are donation-ware never changed in the past 6 years.

succes, Wim