Author Topic: Weather Template and scripts from Leuven/Belgium/Europe  (Read 194379 times)

0 Members and 1 Guest are viewing this topic.

Offline kyomar

  • Member
  • *
  • Posts: 13
Re: Weather Template and scripts form Leuven/Belgium/Europe
« Reply #500 on: February 18, 2015, 07:04:20 AM »
Awesome, thank you so much Wim. I have changed everything as you described - I love this script! The other errors I found here: http://www.weerstation-leuven.be/wsMetNoSA/printDemo.php?lang=en.
Have a nice day,
Markus

Online wvdkuil

  • Wim van der kuil
  • Forecaster
  • *****
  • Posts: 1986
    • My PWS at Leuven Belgium Europe
Re: Weather Template and scripts form Leuven/Belgium/Europe
« Reply #501 on: February 18, 2015, 07:12:00 AM »
Awesome, thank you so much Wim. I have changed everything as you described - I love this script! The other errors I found here: http://www.weerstation-leuven.be/wsMetNoSA/printDemo.php?lang=en
Have a nice day,
Markus
And the explanation lines are important on that page:
Quote
This is the previous version of the script, not good enough for version 1.9 of the YrNo / MetNo API
Please visit www.weerstation-leuven.be
tab "Leuven PHP scripts for use on your own website:" to find the recent versions of all scripts
The demo / download of the 1.9 version with a lot of improvements for the MetNo API can be found at:
www.weerstation-leuven.be/wsmetno3/demo.php

Explanations for errors you are encountering can be found at:
http://www.weather-watch.com/smf/index.php/topic,61546.msg489736.html "
There are (should be) no links to this page., only a user of the old version could have saved that URL. And for those users  I left that page as is, and included the explanations where to look for a new version.

Wim

Offline mickopla

  • Forecaster
  • *****
  • Posts: 358
    • Waterford City Weather
Re: Weather Template and scripts form Leuven/Belgium/Europe
« Reply #502 on: March 05, 2015, 05:21:21 PM »
Hi Wim

I have been running the script a few months now without errors but as of today i'm getting the following error
Parse error: syntax error, unexpected T_STRING in /var/www/vhosts/jackinsonphotography.com/waterfordcityweather.com/testtags2.php on line 414

I changed nothing so can't understand why i'm getting this error. My website address is www.waterfordcityweather.com/weather2/index.php. Can you help?

Mike

Online wvdkuil

  • Wim van der kuil
  • Forecaster
  • *****
  • Posts: 1986
    • My PWS at Leuven Belgium Europe
Re: Weather Template and scripts form Leuven/Belgium/Europe
« Reply #503 on: March 06, 2015, 12:33:52 PM »
Hi Wim

I have been running the script a few months now without errors but as of today i'm getting the following error
Parse error: syntax error, unexpected T_STRING in /var/www/vhosts/jackinsonphotography.com/waterfordcityweather.com/testtags2.php on line 414

I changed nothing so can't understand why i'm getting this error. My website address is www.waterfordcityweather.com/weather2/index.php. Can you help?

Mike
I am abroad without decent internet until monday march 9.
Please post a copy of your testags2.php as testtags.php.txt

Probably there is an inavalid string online 414 inserted by a new? Version of WD.
Something has to be changed but I can only help if I can see your copy of testags.

Wim

Offline mickopla

  • Forecaster
  • *****
  • Posts: 358
    • Waterford City Weather
Re: Weather Template and scripts form Leuven/Belgium/Europe
« Reply #504 on: March 06, 2015, 01:44:23 PM »
Hi Wim

I did update to the latest beta version of WD so this must be the cause. Find attached a copy of my testtags.php file

Cheers

Mike

Online wvdkuil

  • Wim van der kuil
  • Forecaster
  • *****
  • Posts: 1986
    • My PWS at Leuven Belgium Europe
Re: Weather Template and scripts form Leuven/Belgium/Europe
« Reply #505 on: March 08, 2015, 08:47:00 AM »
Hi Wim

I did update to the latest beta version of WD so this must be the cause. Find attached a copy of my testtags.php file

Cheers

Mike
http://www.weather-watch.com/smf/index.php/topic,62862.msg502257/topicseen.html#msg502257

Please check this post. The problem is the incorrect translation of some soil tags. Should be solved in the latest beta version. I will check this when i am home on monday.
Wim

Offline mickopla

  • Forecaster
  • *****
  • Posts: 358
    • Waterford City Weather
Re: Weather Template and scripts form Leuven/Belgium/Europe
« Reply #506 on: March 08, 2015, 03:36:57 PM »
thanks Wim

Updated to latest beta and the site is working again.

By the way could you add me to the list of users?

Cheers

Mick

Online wvdkuil

  • Wim van der kuil
  • Forecaster
  • *****
  • Posts: 1986
    • My PWS at Leuven Belgium Europe
Re: Weather Template and scripts form Leuven/Belgium/Europe
« Reply #507 on: March 08, 2015, 04:22:09 PM »
thanks Wim

Updated to latest beta and the site is working again.

By the way could you add me to the list of users?

Cheers

Mick
Tomorrow I will be back home (missing some sleep) but I will be more than happy to add you to the list of users.

And I am glad the problem is solved.

Wim

Offline Maumelle Weather

  • Forecaster
  • *****
  • Posts: 1824
    • Maumelle Weather
Re: Weather Template and scripts form Leuven/Belgium/Europe
« Reply #508 on: March 09, 2015, 07:36:35 AM »
Hi Wim,

Hope you a good time abroad, Sir.  Have had an issue come up, and I have no idea why.  Please check here.  The only thing that changed was the on the weather computer side to daylight savings time, that's it.

Thanks,

John
GR2AE, GR3, Cumulus

Offline jmcmurry

  • Jim McMurry
  • Forecaster
  • *****
  • Posts: 528
  • Davis Vantage Pro 2 Plus Wireless.
    • Juneau County Weather
Re: Weather Template and scripts form Leuven/Belgium/Europe
« Reply #509 on: March 09, 2015, 07:42:08 AM »
John,

Did you remember to change WxSim to DST?

- Jim

Forum Search and Google Can be Your Best Friends

Offline Maumelle Weather

  • Forecaster
  • *****
  • Posts: 1824
    • Maumelle Weather
Re: Weather Template and scripts form Leuven/Belgium/Europe
« Reply #510 on: March 09, 2015, 07:55:40 AM »
Hi Jim,

Yes, I did change those settings. I thought that was the issue, but this is like the 6th forecast that has been run with the DST boxes checked. That's what has me confused.
GR2AE, GR3, Cumulus

Online wvdkuil

  • Wim van der kuil
  • Forecaster
  • *****
  • Posts: 1986
    • My PWS at Leuven Belgium Europe
Re: Weather Template and scripts form Leuven/Belgium/Europe
« Reply #511 on: March 09, 2015, 07:58:01 AM »
Hi Wim,

Hope you a good time abroad, Sir.  Have had an issue come up, and I have no idea why.  Please check here.  The only thing that changed was the on the weather computer side to daylight savings time, that's it.

Thanks,

John
The csv file contains errors in the data fields, below the first part of a few lines.
Code: [Select]
Year ,Month ,Day ,Time ,WX Type 1 ,
 2015  , 3  , 9  , 22.417  ,DNS.OVCST  ,HEAVY RAIN ,
 2015  , 3  , 9  , 22.917  ,DNS.OVCST  ,HEAVY RAIN ,
 2015  , 3  , 10  , 23.417  ,DNS.OVCST  ,LIGHT FOG ,
 2015  , 3  , 10  , 23.917  ,DNS.OVCST  ,CHNC. DRZL ,
 2015  , 3  , 10  , 0.417  ,DNS.OVCST  ,CHNC. DRZL ,
So the dates go from
March 9  10:55 pm  (coded as 22.917)
to
March 10 11:25 pm  (23.417)
March 10 11:55 pm  (23.917)
to
March 10 00:25 am (0.417)

The scripts solve numerous situations like this, so I will have to look why your situation now is different compared to last years data files.

===
lastret.txt  has the same type of date errors:
Code: [Select]
11:25p DNS.OVCS HEAVY RAI  46.6  44.0 
11:55p DNS.OVCS HEAVY RAI  46.3  43.5
                                                                                                     
Mar 10 ---------------------------------------------------------------------------------------       
                                          Tuesday                                                                                                                                                     
12:25a DNS.OVCS LIGHT FOG  46.3  43.4   
12:55a DNS.OVCS CHNC. DRZ  46.3  43.3
 1:25a DNS.OVCS CHNC. DRZ  46.3  43.2   

===

I copied your files and will take a look.

===
REMEMBER: when changing settings in wxsim scripts ALWAYS wait for a new upload to see the difference as the calculated script data-files are cached. Or remove the cache files.

Wim
« Last Edit: March 09, 2015, 08:01:24 AM by wvdkuil »

Online wvdkuil

  • Wim van der kuil
  • Forecaster
  • *****
  • Posts: 1986
    • My PWS at Leuven Belgium Europe
Re: Weather Template and scripts form Leuven/Belgium/Europe
« Reply #512 on: March 09, 2015, 09:06:20 AM »
Hi Wim,

Hope you a good time abroad, Sir.  Have had an issue come up, and I have no idea why.  Please check here.  The only thing that changed was the on the weather computer side to daylight savings time, that's it.

Thanks,

John
I enclose a version which should cope with latest.csv and these date-errors:
1. make a backup copy of weather2/wsWxsim/wsWxsimGetFile.php
2. unzip attachement
3. replace script wsWxsimGetFile.php

Be aware that the new script only works after the cache invalidates when a new upload becomes available.

Tested with your current version of latest.csv. The incomplete lastret.txt works also.

QUESTION:
Do you use the latest version of wxsim or an old version, maybe year old?   If you use an old version,  you could try to upgrade as this could remove date-errors also.

Wim

Offline Maumelle Weather

  • Forecaster
  • *****
  • Posts: 1824
    • Maumelle Weather
Re: Weather Template and scripts form Leuven/Belgium/Europe
« Reply #513 on: March 09, 2015, 09:41:23 AM »
Hi Wim,

Thanks for looking into this.  Very strange. It is the new version of WxSim I downloaded from Tom's site. I had installed 3 new SSD hard drives about 3 weeks ago and have not had any issues.  I'll tried the file when I get home from work.

Thank you again,

John
GR2AE, GR3, Cumulus

Online wvdkuil

  • Wim van der kuil
  • Forecaster
  • *****
  • Posts: 1986
    • My PWS at Leuven Belgium Europe
Re: Weather Template and scripts form Leuven/Belgium/Europe
« Reply #514 on: March 09, 2015, 11:00:17 AM »
Hi Wim,

Thanks for looking into this.  Very strange. It is the new version of WxSim I downloaded from Tom's site. I had installed 3 new SSD hard drives about 3 weeks ago and have not had any issues.  I'll tried the file when I get home from work.

Thank you again,

John
Indeed very strange but even worse then I thought as this could point to a new error in wxsim.

Wim

Offline weatherbee

  • Senior Contributor
  • ****
  • Posts: 210
    • Sherman Ct. Weather
Re: Weather Template and scripts form Leuven/Belgium/Europe
« Reply #515 on: March 09, 2015, 11:53:36 AM »
I'm using the latest Wxsim programs but I'm not having any problems with my graphs.
Tom

Offline Maumelle Weather

  • Forecaster
  • *****
  • Posts: 1824
    • Maumelle Weather
Re: Weather Template and scripts form Leuven/Belgium/Europe-SOLVED
« Reply #516 on: March 09, 2015, 08:21:24 PM »
Hi Wim,

Thank you, Sir!!!!  That took care of the issue.

John
GR2AE, GR3, Cumulus

Offline weatherbee

  • Senior Contributor
  • ****
  • Posts: 210
    • Sherman Ct. Weather
Re: Weather Template and scripts form Leuven/Belgium/Europe
« Reply #517 on: March 11, 2015, 08:26:55 PM »
Wim,
I was wondering if a we could choose to use the WxSim forecast for UV page instead?
Tom
Edit: I was able to pull the UV Forecast page from my WxSim Forecast.  It accounts better for cloudy and rainy days.
« Last Edit: March 15, 2015, 10:09:17 AM by weatherbee »

Offline Breezy

  • Indian Trail Weather
  • Forecaster
  • *****
  • Posts: 325
    • Indian Trail Weather
Re: Weather Template and scripts form Leuven/Belgium/Europe
« Reply #518 on: April 01, 2015, 12:07:45 PM »
Hello, Wim,

I've been having an issue with the WxSim graphs. It might have something to do with the WxSim updates that I did last month. http://indiantrailweather.com/weather2/index.php?p=55&lang=en#data-area

Could you please take a look at this when you have a moment? Thanks much.

Cheers,

Jeff

Jeff

W7-64, Intel Z170A 16 GB RAM
Davis VP2 Plus, Davis Soil Moisture/Temp Sensors, Laser Snow Depth Sensor LR4/Fluke 414D

Online wvdkuil

  • Wim van der kuil
  • Forecaster
  • *****
  • Posts: 1986
    • My PWS at Leuven Belgium Europe
Re: Weather Template and scripts form Leuven/Belgium/Europe
« Reply #519 on: April 01, 2015, 12:24:42 PM »
Hello, Wim,

I've been having an issue with the WxSim graphs. It might have something to do with the WxSim updates that I did last month. http://indiantrailweather.com/weather2/index.php?p=55&lang=en#data-area
Could you please take a look at this when you have a moment? Thanks much.
Cheers,
Jeff
Hello jeff,
This is a known error in WXSIM. Check your latest.csv, every day at 23:00 (11:00 PM) the date advances 1 day already. So the times of 23:00 => 23:59 are 1 day ahead of the correct date/time.  Here the leftmost part of the lines in error in your http://indiantrailweather.com/latest.csv  file. This happens every day.
Code: [Select]
2015  , 4  , 1  , 22  ,FAIR       , , 23  ,
 2015  , 4  , 1  , 22.5  ,FAIR-P.C.  , , 22.5  ,
 2015  , 4  , 2  , 23  ,FAIR-P.C.  , , 22.3  ,
 2015  , 4  , 2  , 23.5  ,P.CLOUDY   , , 22.3  ,
 2015  , 4  , 2  , 0  ,P.CLOUDY   , , 22.5  ,
 2015  , 4  , 2  , 0.5  ,P.CLOUDY   , , 23.1  ,
 2015  , 4  , 2  , 1  ,P.-M.CLDY  , , 23.6  ,
I changed the generation script to cope with it, please check this post:
http://www.wxforum.net/index.php?topic=18819.msg244819#msg244819

Be aware that when you cahnge the script you have to wait for a fresh upload as the intermediate data is cached.

Wim

Offline Breezy

  • Indian Trail Weather
  • Forecaster
  • *****
  • Posts: 325
    • Indian Trail Weather
Re: Weather Template and scripts form Leuven/Belgium/Europe
« Reply #520 on: April 01, 2015, 12:46:08 PM »
Hello Wim,

Looking at the earlier post it appears that perhaps this started occurring when DST started in the "states" on March 8th. Tom also had WxSim updates at about the same time. I'll apply your fix. Do you think that this will be an issue when DST goes back to EST in November?

Thanks much ...

Cheers,

Jeff

UPDATE: Corrections uploaded and all OK ... Thanks much ...
 
« Last Edit: April 01, 2015, 01:34:41 PM by Breezy »
Jeff

W7-64, Intel Z170A 16 GB RAM
Davis VP2 Plus, Davis Soil Moisture/Temp Sensors, Laser Snow Depth Sensor LR4/Fluke 414D

Offline assenzuid

  • Member
  • *
  • Posts: 7
    • Weather Station Assen Zuid-West
Re: Weather Template and scripts form Leuven/Belgium/Europe
« Reply #521 on: April 09, 2015, 04:32:13 PM »
Hi Wim,

My WU forecast script generates an error. (When selected language is Dutch or Deutsch)
http://www.assenzuidwest.nl/weather2/index.php?p=52-1&wp=MB&lang=nl

Notice: Undefined index: Oost in /assenzuidwest.nl/public_html/weather2/wuforecast/wuweather3.php on line 260
Notice: Undefined offset: -1 in /assenzuidwest.nl/public_html/weather2/wuforecast/wuforecast3.php on line 325

Line 325 is:

$graphsData   = '';
for ($graphLines = 0; $graphLines < $end; $graphLines++){
   $graphsData   .= 'tsv['.$graphLines.'] ="';
   $graphsData   .= $arrTimeGraph[$graphLines].'|';
   $graphsData   .= $arrTempGraph[$graphLines].'|';
   if (!isset ($arrHumGraph[$graphLines]) ){
      $graphsData   .=  $arrHumGraph[$graphLines-1].'|';
   } else {
      $graphsData   .= $arrHumGraph[$graphLines].'|';
   }
   if (!isset ($arrWindGraph[$graphLines]) ){
      $graphsData   .= $arrWindGraph[$graphLines-1].'|';
   } else {
      $graphsData   .=  $arrWindGraph[$graphLines].'|';
   }
   if (!isset ($arrWdirGraph[$graphLines]) ){
      $graphsData   .= $arrWdirGraph[$graphLines-1].'|';
   } else {
      $graphsData   .= $arrWdirGraph[$graphLines].'|';
   }
   if (!isset ($arrRainGraph[$graphLines]) ){
      $graphsData   .= '|';
   } else {
      $graphsData   .= $arrRainGraph[$graphLines].'|';
   }
   $graphsData   .= $arrIconGraph[$graphLines].'|";'.PHP_EOL;         
}

Kind regards,
Weather Station Assen Zuid-West

Offline assenzuid

  • Member
  • *
  • Posts: 7
    • Weather Station Assen Zuid-West
Re: Weather Template and scripts form Leuven/Belgium/Europe
« Reply #522 on: April 10, 2015, 03:31:02 AM »
For some reason it's working now without any issues....


Hi Wim,

My WU forecast script generates an error. (When selected language is Dutch or Deutsch)
http://www.assenzuidwest.nl/weather2/index.php?p=52-1&wp=MB&lang=nl

Notice: Undefined index: Oost in /assenzuidwest.nl/public_html/weather2/wuforecast/wuweather3.php on line 260
Notice: Undefined offset: -1 in /assenzuidwest.nl/public_html/weather2/wuforecast/wuforecast3.php on line 325

Line 325 is:

$graphsData   = '';
for ($graphLines = 0; $graphLines < $end; $graphLines++){
   $graphsData   .= 'tsv['.$graphLines.'] ="';
   $graphsData   .= $arrTimeGraph[$graphLines].'|';
   $graphsData   .= $arrTempGraph[$graphLines].'|';
   if (!isset ($arrHumGraph[$graphLines]) ){
      $graphsData   .=  $arrHumGraph[$graphLines-1].'|';
   } else {
      $graphsData   .= $arrHumGraph[$graphLines].'|';
   }
   if (!isset ($arrWindGraph[$graphLines]) ){
      $graphsData   .= $arrWindGraph[$graphLines-1].'|';
   } else {
      $graphsData   .=  $arrWindGraph[$graphLines].'|';
   }
   if (!isset ($arrWdirGraph[$graphLines]) ){
      $graphsData   .= $arrWdirGraph[$graphLines-1].'|';
   } else {
      $graphsData   .= $arrWdirGraph[$graphLines].'|';
   }
   if (!isset ($arrRainGraph[$graphLines]) ){
      $graphsData   .= '|';
   } else {
      $graphsData   .= $arrRainGraph[$graphLines].'|';
   }
   $graphsData   .= $arrIconGraph[$graphLines].'|";'.PHP_EOL;         
}

Kind regards,
Weather Station Assen Zuid-West

Online wvdkuil

  • Wim van der kuil
  • Forecaster
  • *****
  • Posts: 1986
    • My PWS at Leuven Belgium Europe
Re: Weather Template and scripts form Leuven/Belgium/Europe
« Reply #523 on: April 10, 2015, 04:12:57 AM »
For some reason it's working now without any issues....

Hi Wim,

My WU forecast script generates an error. (When selected language is Dutch or Deutsch)
http://www.assenzuidwest.nl/weather2/index.php?p=52-1&wp=MB&lang=nl

Notice: Undefined index: Oost in /assenzuidwest.nl/public_html/weather2/wuforecast/wuweather3.php on line 260
Notice: Undefined offset: -1 in /assenzuidwest.nl/public_html/weather2/wuforecast/wuforecast3.php on line 325

. . . shortened . . .
 
Kind regards,
Weather Station Assen Zuid-West
The notice (not an error) is in wuweather3.php on line 260 which signals a no entry Undefined index: for the winddirection Oost

I need to get the xml file from WU myself to see what the problem is, as the offending array in statement 260 correctly contains the entry Oost
Code: [Select]
     {  $returnArray['forecast'][$i]['windDirEn'] = $winddirstoenglish[$string];} 
There is no wind from the Oost at the moment. So I have to wait and see.  It can be an extra space before or after the word Oost.

But all retrieved data, especialy those datasets retrieved for forecasts are not entirely troublefree (WU for German switched form Süden to Süd a few weeks ago). It is therefor better to run your production website with debugging switched off. Then only important messages which invalidates the output will be displayed.
When you see a problem you can for that page or moment switch debugging on with an extra parameter in the browser
http://www.assenzuidwest.nl/weather2/index.php?p=52-1&wp=MB&lang=nl&debug

Important: When running a production environment always change line 6 in weather2/index.php from
Code: [Select]
$wsDebug = true; // ##### make comment after testingto a comment by adding a # as the first position
Code: [Select]
#$wsDebug = true; // ##### make comment after testing
The WiKi also explains that with leaving debug on, a lot of extra (normaly unnneeded) information is sent from the server to the browser.

Wim

Offline Météo Québec

  • Member
  • *
  • Posts: 44
  • Forecaster
    • Météo Québec
Re: Weather Template and scripts form Leuven/Belgium/Europe
« Reply #524 on: April 17, 2015, 11:01:12 PM »
Hi folks,

i would like to know if this is the right script for Leuven Template?

I have an issue regarding the record all time from my station and i thing it might not be the right script for it


<tr><td style="font-weight: bold; "><?php echo langtransstr('Rcrd since'); ?><br />
            <sup> Jan 2014</sup></td>

                <td style="border: 1px solid; border-radius:5px; border-color: #FF0000; background-color: #F3E5E5"><?php echo wsNumber($ws['myRecordDayMaxTemp']).$uomTemp;?><br/><?php echo $ws['maxtempyearfromdata'];?></td>


                <td style="border: 1px solid; border-radius:5px; border-color: #0000FF; background-color: #D0E2FF"><?php echo wsNumber($ws['myRecordDayMinTemp']).$uomTemp;?><br/><?php echo $ws['mintempyearfromdata'];?></td>

                </tr>

Thank you for helping me!

Steven
« Last Edit: April 17, 2015, 11:07:48 PM by IQUEBECS58 »
Steve Villeneuve

Météo Québec
(Weather Quebec)
CoCoRaHS:CAN-QC-39
WU-IQUEBECC61