Author Topic: Leuven - snow heights  (Read 4263 times)

0 Members and 1 Guest are viewing this topic.

Offline wvdkuil

  • Wim van der kuil
  • Forecaster
  • *****
  • Posts: 1986
    • My PWS at Leuven Belgium Europe
Leuven - snow heights
« on: February 15, 2016, 09:07:59 AM »
I promised a snow-height component for the start-page and I expected to have some snow this year to test the scripts.
But there is no winter this year overhere.

So to test the snow-heights component I hand it over to those with real snow.

You need to protect your settings with a password as otherwise others could change the values also.

All questions and improvements are, as always,  welcome

Wim

EDIT: 2016-02-15 17:30 CET replaced script as latitude and longitude were mixed up  :oops:
« Last Edit: February 15, 2016, 11:36:30 AM by wvdkuil »

Offline PaulMy

  • Forecaster
  • *****
  • Posts: 5519
    • KomokaWeather
Re: Leuven - snow heights
« Reply #1 on: February 15, 2016, 12:32:33 PM »
I have it working and added on the Menu www.komokaweather.com/weather28
 
Only the February snow amounts are correct and still need to enter the prior months for our snow season.
 
p.s. to self - another thing to add to my daily weather recordkeeping #-o
 
Thanks Wim,
Enjoying,
Paul

Offline wvdkuil

  • Wim van der kuil
  • Forecaster
  • *****
  • Posts: 1986
    • My PWS at Leuven Belgium Europe
Re: Leuven - snow heights
« Reply #2 on: February 15, 2016, 12:59:36 PM »
I have it working and added on the Menu www.komokaweather.com/weather28
 
Only the February snow amounts are correct and still need to enter the prior months for our snow season.
 
p.s. to self - another thing to add to my daily weather recordkeeping #-o
 
Thanks Wim,
Enjoying,
Paul
Hello Paul,
I did not expect that anyone would add zero values. There is  in the "low-lands of Belgium/Netherlands"  so few snow-fall  and it melts so fast that I did test with just a few lines.

I will make an optional  more condensed view when lines are equal: Three days or more => same heights => the rows collapse to two rows,

Wim

Offline PaulMy

  • Forecaster
  • *****
  • Posts: 5519
    • KomokaWeather
Re: Leuven - snow heights
« Reply #3 on: February 15, 2016, 01:44:53 PM »
Quote
There is  in the "low-lands of Belgium/Netherlands"  so few snow-fall  and it melts so fast
Yes I remember, what there was was fun to slide on it though with our wooden shoes ;)

I only had a very few days of snow on the ground in October, November and December and only once where it was more than just a Trace so not going back to any further zero additions.
 
Paul

Offline PaulMy

  • Forecaster
  • *****
  • Posts: 5519
    • KomokaWeather
Re: Leuven - snow heights
« Reply #4 on: April 02, 2016, 10:35:55 AM »
We are now in April and had hoped the snow season would have ended, but it didn't.  www.komokaweather.com/weather28/
I tried entering the snow data for April but it is not taking it - nothing happens when click [Submit].  Possibly the snow season has been set in the script to end in March?
 
Also, and off topic in this script but see an error on the page -
Notice:  Undefined index:  in /home/content/96/5379896/html/weather28/wsIconUrl.php on line 132
I am presuming this is a Yahoo issue?
 
Paul

Offline wvdkuil

  • Wim van der kuil
  • Forecaster
  • *****
  • Posts: 1986
    • My PWS at Leuven Belgium Europe
Re: Leuven - snow heights
« Reply #5 on: April 02, 2016, 10:39:56 AM »
We are now in April and had hoped the snow season would have ended, but it didn't.  www.komokaweather.com/weather28/
I tried entering the snow data for April but it is not taking it - nothing happens when click [Submit].  Possibly the snow season has been set in the script to end in March?
Living in a moderate climate and opening the swimming pool on March 31, it is probably a default setting in the script.  I will check when i am home.
Quote

Also, and off topic in this script but see an error on the page -
Notice:  Undefined index:  in /home/content/96/5379896/html/weather28/wsIconUrl.php on line 132
I am presuming this is a Yahoo issue?

Paul
Yes it is. There is no Yahoo data returned. you can modify one setting to get the CurrentConditions from your metar. Change in _my_texts/wsUserSettings.php from
Code: [Select]
# Where to load the current conditions from
$SITE["curCondFrom"]    = "yahoo";   
to
Code: [Select]
# Where to load the current conditions from
$SITE["curCondFrom"]    = "metar";   

Updated scripts at: http://support.leuven-template.eu/problems28.php?lang=en

Wim

Offline wvdkuil

  • Wim van der kuil
  • Forecaster
  • *****
  • Posts: 1986
    • My PWS at Leuven Belgium Europe
Re: Leuven - snow heights
« Reply #6 on: April 02, 2016, 10:48:19 AM »
To add april to the snow months modify one line in ws_snow/ws_snow.php:

Line approx. 284-286
Code: [Select]
#                                  J F M A M J J A S O N D     
        $arr_snow_months= array (0,0,0,0,4,5,6,7,8,9,0,0,0);
        $arr_snow_nh    = array (0,7,8,9,0,0,0,0,0,0,4,5,6);       
to
Code: [Select]
#                                  J F M A M J J A S O N D     
        $arr_snow_months= array (0,0,0,0,4,5,6,7,8,9,0,0,0);
        $arr_snow_nh    = array (0,7,8,9,10,0,0,0,0,0,4,5,6);       
So the only change is in the NH line, the 0 for april goes to 10.

Wim

Offline PaulMy

  • Forecaster
  • *****
  • Posts: 5519
    • KomokaWeather
Re: Leuven - snow heights
« Reply #7 on: April 02, 2016, 11:52:05 AM »
Thanks Wim,

Updated both snow and wsUserSettings.

The snow is now recorded in April, and the error message gone.

Regards,
Paul
www.komokaweather.com/weather28/

Offline marko30

  • Member
  • *
  • Posts: 12
Re: Leuven - snow heights
« Reply #8 on: September 08, 2016, 08:43:56 AM »
Hello.
Very good script, I am searching something similar for Saratoga template for Years!
Anyone could help?

Thanks

Offline PaulMy

  • Forecaster
  • *****
  • Posts: 5519
    • KomokaWeather
Re: Leuven - snow heights
« Reply #9 on: November 20, 2016, 11:13:20 AM »
Hi Wim,
Too soon but snow has come.  Unfortunately I am not able to get the snow input to take today's entry http://www.komokaweather.com/weather28/index.php?p=ws_snow&lang=en#data-area

It maintains my April table and just jumps back to the entry form for today.  Screenshot attached.

I've looked at the array lines but can't understand what I should change here, if anything?
Any suggestion?

Thanks,
Paul

Offline PaulMy

  • Forecaster
  • *****
  • Posts: 5519
    • KomokaWeather
Re: Leuven - snow heights
« Reply #10 on: January 01, 2017, 11:10:16 AM »
Hi Wim,
I have been maintaining the snow log this winter and all worked fine until this morning when there is nothing shown before today, Jan 1, 2017 http://www.komokaweather.com/weather28/index.php?p=ws_snow

Checking the contents of ws-snow.txt all the entries from November 20, 2016 to today are included so possibly a display setting in the script?

I have checked the Leuven Support and no issues or update is listed.  Any suggestion or if I can edit something?

Thanks, and Gelukkig Nieuwjaar!
Paul

Offline wvdkuil

  • Wim van der kuil
  • Forecaster
  • *****
  • Posts: 1986
    • My PWS at Leuven Belgium Europe
Re: Leuven - snow heights
« Reply #11 on: January 01, 2017, 12:25:38 PM »
Hi Wim,
I have been maintaining the snow log this winter and all worked fine until this morning when there is nothing shown before today, Jan 1, 2017 http://www.komokaweather.com/weather28/index.php?p=ws_snow

Checking the contents of ws-snow.txt all the entries from November 20, 2016 to today are included so possibly a display setting in the script?

I have checked the Leuven Support and no issues or update is listed.  Any suggestion or if I can edit something?

Thanks, and Gelukkig Nieuwjaar!
Paul
Also the best wishes for this certainly interesting year 2017.

The snow is missing from your site, but no clue why.
I copied your file and used it on my test server, all lines appear correctly. I will test tomorrow to find the issue.

Found the offending line, line 287 in ws-snow/ws_snow.php should be changed from
Code: [Select]
        if ($SITE['longitude'] > 0) { $snow_nh = true; } else { $snow_nh = false; }
to
Code: [Select]
        if ($SITE['latitude'] > 0) { $snow_nh = true; } else { $snow_nh = false; }
Wim
« Last Edit: January 01, 2017, 12:45:28 PM by wvdkuil »

Offline Aardvark

  • Forecaster
  • *****
  • Posts: 2305
  • Tonto to Lone Ranger : "never take off mask.
    • turned off
Re: Leuven - snow heights
« Reply #12 on: January 01, 2017, 02:52:18 PM »
I  am curious, how are you inputting the data.  Right now I have weatherlink.com  where my IP data is , updating my site. what do I need to change to make that happen for Des Moines, IA.  (Not that we have any snow, but the season is early).

Offline PaulMy

  • Forecaster
  • *****
  • Posts: 5519
    • KomokaWeather
Re: Leuven - snow heights
« Reply #13 on: January 01, 2017, 03:42:14 PM »
Thanks Wim, that fixed it quickly.

@Aardvark, I input it manually by calling the update script http://www.komokaweather.com/weather28/?p=ws_snow&snow&pw=xxxxat about the same time I update snow in Meteotemplate and in my own snow index sheet.  Part of my daily chores after doing the CoCoRaHS upload.

Enjoy,
Paul


Offline Aardvark

  • Forecaster
  • *****
  • Posts: 2305
  • Tonto to Lone Ranger : "never take off mask.
    • turned off
Re: Leuven - snow heights
« Reply #14 on: January 01, 2017, 03:56:54 PM »
Thanks Wim, that fixed it quickly.

@Aardvark, I input it manually by calling the update script http://www.komokaweather.com/weather28/?p=ws_snow&snow&pw=xxxxat about the same time I update snow in Meteotemplate and in my own snow index sheet.  Part of my daily chores after doing the CoCoRaHS upload.

Enjoy,
Paul

I also have CoCoRaHS and would love to be able to update the snow.   I found the txt and the script error.  Do I then have to go in and manually edit the snow txt?

http://www.desmoinesweather.org/weather28/index.php?p=ws_snow&lang=en#data-area

Offline PaulMy

  • Forecaster
  • *****
  • Posts: 5519
    • KomokaWeather
Re: Leuven - snow heights
« Reply #15 on: January 01, 2017, 04:15:27 PM »
Just running that input script on your site with the appropriate password brings up the Snow Measurement Input screen and it only takes a few seconds to enter the current snow height and new snow amount.
http://www.komokaweather.com/weather28/?p=ws_snow&snow&pw=PASSWORD

As you can see by clicking on the info :!: icon I use it every day whether there is snow or not.  I am not aware that the past season's historical data can be displayed.  I made sure though that I saved a copy of last season's ws-snow.txt before this season started.

Enjoy,
Paul


Offline Aardvark

  • Forecaster
  • *****
  • Posts: 2305
  • Tonto to Lone Ranger : "never take off mask.
    • turned off
Re: Leuven - snow heights
« Reply #16 on: January 01, 2017, 04:39:07 PM »
ok,  input script is it in the package that contains the Leuven folder for snow?

Offline PaulMy

  • Forecaster
  • *****
  • Posts: 5519
    • KomokaWeather
Re: Leuven - snow heights
« Reply #17 on: January 01, 2017, 04:56:42 PM »
I don't see a specific input script in my unzip folder, but there are a couple of 'snow data entry JPEG' files and can't recall exactly what I did but I have a shortcut on my computer with my full URL to the ws_snow along with my password (see my link below) so presume that additional "?p=ws_snow&snow&pw=PASSWORD" does its thing...

Enjoy,
Paul

EDIT, this is the ReadMe in the package:
Quote
Snow script for leuven template

To show on the dashboard the current snow-height and by using the (i) dropdown, all previous measurements.

Copy the folder ws_snow to your weather??/ folder, AT THE SAME height as all other folders / scripts.

===
To use the test-file in the ws_snow folder leave the one setting as is.
To use a file in the cache folder set line 7 in ws_snow/ws_snow.php to comment (add a # on the first position).

===

Separate page to add the measurements, using the hide ="yes' will make the page accessible without showing it on the menu:

<item    nr      = "ws_snow"
    hide    = "yes"       
    caption = "snow test"
    link    = "ws_snow/ws_snow.php"           
/>

===
IMPORTANT
To edit your snow-heights on-line:
=> You have to protect your wsUserSettings.php with a password.
=> You have to call the data-entry mode with  added to the URL  &snow&pw=xxxxx

You can also use your FTP program to edit the snow file.
===

To display the  "snow-height" component on the dashboard:

Add in wsStartPage.php at the location you want it to appear a line with:

$dashboard[]    = 'ws_snow';

AND add at the end before the last }

    if ($dashboard[$iDash] == 'ws_snow') {
        $script = 'ws_snow/ws_snow.php';
        ws_message (  '<!-- module wsStartPage.php ('.__LINE__.'): loading '.$script.' -->');
        include $script;
        continue;
    }

===
For now there are only two language files, Dutch and English.

   
« Last Edit: January 01, 2017, 04:59:16 PM by PaulMy »

Offline wvdkuil

  • Wim van der kuil
  • Forecaster
  • *****
  • Posts: 1986
    • My PWS at Leuven Belgium Europe
Re: Leuven - snow heights
« Reply #18 on: January 02, 2017, 02:40:33 AM »
I don't see a specific input script in my unzip folder, but there are a couple of 'snow data entry JPEG' files and can't recall exactly what I did but I have a shortcut on my computer with my full URL to the ws_snow along with my password (see my link below) so presume that additional "?p=ws_snow&snow&pw=PASSWORD" does its thing...

Enjoy,
Paul
@Aardvark
The snow scripts are installed in the template, no need to do anything else.

1. To show the snow heights in a separate page => modify wsMenuData.xml and remove hide=yes if it is present ==> OK
2. Use the menu or this link:  http://www.desmoinesweather.org/weather28/index.php?p=ws_snow  ==>  OK
3. To enter new snow heights:
3.1 Your settings should be protected with a "password"  ==>  OK
3.2 Use the link http://www.desmoinesweather.org/weather28/index.php?p=ws_snow&snow&pw=???????
The ???? should be replaced with the password of your settings.
The same page as from step 2 now displays a data-entry form to enter any days snow-data.
The melt in the table is calculated, so you only have to enter new snow since last measurement and current height.
Wim
« Last Edit: January 02, 2017, 02:49:59 AM by wvdkuil »

Offline Aardvark

  • Forecaster
  • *****
  • Posts: 2305
  • Tonto to Lone Ranger : "never take off mask.
    • turned off
Re: Leuven - snow heights
« Reply #19 on: January 02, 2017, 01:46:31 PM »
Wim
   Thank you so much for the information. It works . is there a setting so that when "snow" is selected the page is open rather than having to "i" press?

I did edit in the txt file the dates and amounts for 2016.  had to hunt some, but found the date. 

Again, Thank you.

Offline wvdkuil

  • Wim van der kuil
  • Forecaster
  • *****
  • Posts: 1986
    • My PWS at Leuven Belgium Europe
Re: Leuven - snow heights
« Reply #20 on: January 02, 2017, 01:51:28 PM »
Wim
   Thank you so much for the information. It works . is there a setting so that when "snow" is selected the page is open rather than having to "i" press?

I did edit in the txt file the dates and amounts for 2016.  had to hunt some, but found the date. 

Again, Thank you.
The snow height part is normally displayed on the  wsStartPage.php as one of the components. 
That is why it is collapsed by default. Not that much info for other visitors either.

I will put it on the todo list to expand it when it is on a separate page as the station owner will use that page with all available info.

Wim

Offline Aardvark

  • Forecaster
  • *****
  • Posts: 2305
  • Tonto to Lone Ranger : "never take off mask.
    • turned off
Re: Leuven - snow heights
« Reply #21 on: January 02, 2017, 07:17:56 PM »

I will put it on the todo list to expand it when it is on a separate page as the station owner will use that page with all available info.

Wim

I do appreciate the labor of love you have done with your templates.   No snow here yet, cold,  bitter coming.  However, it is 3 months until spring. March and April have been known for dumping a lot of that snow. However, the cold coming in from the Arctic is not a lot of fun.  the upside is that I am retired and the downside is I am retired, so the weather station is very important to me.

Again, thank you.

Offline tstorm

  • Contributor
  • ***
  • Posts: 141
    • Harpers Ferry Weather
Re: Leuven - snow heights
« Reply #22 on: January 08, 2017, 12:06:39 PM »
  Not sure what I'm doing wrong, but I can't get to the edit page for adding snowfall to come up.  I've doubled checked the $SITE["password"] in cache/wsUserSettings.txt.  I've tried to call up the page as follows:

http://www.harpersferry-weather.com/weather28/index.php?p=ws_snow&snow&pw=XXXX  but when I do so it goes to wsStartPage.

Offline PaulMy

  • Forecaster
  • *****
  • Posts: 5519
    • KomokaWeather
Re: Leuven - snow heights
« Reply #23 on: January 08, 2017, 12:20:08 PM »
It likely won't make any difference but I don't use the /index.php in my URL to open my Snow Edit:
http://www.komokaweather.com/weather28/?p=ws_snow&snow&pw=xxxx
http://www.harpersferry-weather.com/weather28/index.php?p=ws_snow&snow&pw=XXXX

Re you sure you have the script in the correct location?

Enjoy,
Paul

Offline tstorm

  • Contributor
  • ***
  • Posts: 141
    • Harpers Ferry Weather
Re: Leuven - snow heights
« Reply #24 on: January 08, 2017, 12:35:44 PM »
Didn't make any difference in removing index.php.

Scripts are located in http://www.harpersferry-weather.com/weather28/ws_snow/

Home page says "No snow file found and no input mode for snow-data selected". 
« Last Edit: January 08, 2017, 12:40:13 PM by tstorm »

 

anything