Author Topic: Leuven Template - Snow  (Read 1359 times)

0 Members and 1 Guest are viewing this topic.

Offline Aardvark

  • Forecaster
  • *****
  • Posts: 2305
  • Tonto to Lone Ranger : "never take off mask.
    • turned off
Leuven Template - Snow
« on: November 09, 2018, 11:48:23 AM »
The snow data entry into my leuven template 2.8  doesn't stick.  I do the manual entry and it stays blank.   I am not understanding why it doesn't work as it did last yearhttps://www.desmoinesweather.org/weather28/index.php?p=ws_snow&lang=en#data-area

We are going into winter and  I need a solution  does anyone use this script?

Online PaulMy

  • Forecaster
  • *****
  • Posts: 5509
    • KomokaWeather
Re: Leuven Template - Snow
« Reply #1 on: November 09, 2018, 12:42:17 PM »
I have been using this scripts.

We had a trace of snow coming down in October and also earlier today.  Both of these days are showing http://www.komokaweather.com/weather28/

I did not have to do any settings, just run and enter the date and amounts (I use 0.1 for Trace)  http://www.komokaweather.com/weather28/?p=ws_snow&snow&pw=xpasswordx


Enjoy,
Paul

Offline Aardvark

  • Forecaster
  • *****
  • Posts: 2305
  • Tonto to Lone Ranger : "never take off mask.
    • turned off
Re: Leuven Template - Snow
« Reply #2 on: November 09, 2018, 02:34:42 PM »
I had been doing that and nothing shows when I enter data.   I too entered a trace today  and no data or anything.. grrrrr

Online PaulMy

  • Forecaster
  • *****
  • Posts: 5509
    • KomokaWeather
Re: Leuven Template - Snow
« Reply #3 on: November 09, 2018, 02:58:56 PM »
Have you checked the content of ws-snow.txt in your webserver's Leuven folder?
My previous year entries, and the 2 entries of this season are shown there as can be seen from the snow tab.


Enjoy,Paul

Offline Aardvark

  • Forecaster
  • *****
  • Posts: 2305
  • Tonto to Lone Ranger : "never take off mask.
    • turned off
Re: Leuven Template - Snow
« Reply #4 on: November 09, 2018, 05:27:07 PM »
I have those, the data from today is there, but it isn't showing on the snow page.   I wonder if the script is off.

Online wvdkuil

  • Wim van der kuil
  • Forecaster
  • *****
  • Posts: 1986
    • My PWS at Leuven Belgium Europe
Re: Leuven Template - Snow
« Reply #5 on: November 10, 2018, 06:34:20 AM »
I have those, the data from today is there, but it isn't showing on the snow page.   I wonder if the script is off.
This is your snow-measurements file you have checked with 2016 and 2018 measurements, but no 2017 snow?
https://www.desmoinesweather.org/weather28/ws_snow/ws_snow.txt
I copied a few lines below to explain what is happening.
Code: [Select]
#YYYY|MM|DD|UNIT|HEIGHT|PLUS |
|2016|01|20|deft|10|15| // these are in inches (or cm in ISO countries)
|2016|01|20|deft|11|20|
|2016|01|20|deft|15|0|  // in that file there is no 2017 snow
|2018|11|09|deft|1.0|1.0|  // these are this years aardvark measurements
|2018|11|09|deft|0|t|
|2018|11|09|deft|0.|0.1|
|2018|11|09|deft|0.1|0.1|
|2018|11|09|deft|1.0|1.0|
It seems that you bought a new type of snow measurement device this year as you switched from  "inches of snow" to "tens of inches" of snow.   As the script rejects those detailed measurements (assuming it is a typing error) you end up with  no valid measurements at all.
All those rejections are visible in the generated html when using the debug option in the url.

If you enter the snow-height snowfall in inches it should display your measurements as it shows them on my  test site.

If it becomes a normal practice to measure snow-height, snowfall  and snowmelt in 0.1 inches I can adapt the script. But AFAIK you're the first.

Wim



Offline Aardvark

  • Forecaster
  • *****
  • Posts: 2305
  • Tonto to Lone Ranger : "never take off mask.
    • turned off
Re: Leuven Template - Snow
« Reply #6 on: November 10, 2018, 09:16:19 AM »
I have those, the data from today is there, but it isn't showing on the snow page.   I wonder if the script is off.
This is your snow-measurements file you have checked with 2016 and 2018 measurements, but no 2017 snow?
https://www.desmoinesweather.org/weather28/ws_snow/ws_snow.txt
I copied a few lines below to explain what is happening.
Code: [Select]
#YYYY|MM|DD|UNIT|HEIGHT|PLUS |
|2016|01|20|deft|10|15| // these are in inches (or cm in ISO countries)
|2016|01|20|deft|11|20|
|2016|01|20|deft|15|0|  // in that file there is no 2017 snow
|2018|11|09|deft|1.0|1.0|  // these are this years aardvark measurements
|2018|11|09|deft|0|t|
|2018|11|09|deft|0.|0.1|
|2018|11|09|deft|0.1|0.1|
|2018|11|09|deft|1.0|1.0|
It seems that you bought a new type of snow measurement device this year as you switched from  "inches of snow" to "tens of inches" of snow.   As the script rejects those detailed measurements (assuming it is a typing error) you end up with  no valid measurements at all.
All those rejections are visible in the generated html when using the debug option in the url.

If you enter the snow-height snowfall in inches it should display your measurements as it shows them on my  test site.

If it becomes a normal practice to measure snow-height, snowfall  and snowmelt in 0.1 inches I can adapt the script. But AFAIK you're the first.

Wim

Should I go into that file and eliminate all those in 0.1 inch values?   I tried today with a test value of 1.0 inches  and it enters data into that file, but the  value is not showing up on the page

I have attached the page image

Online PaulMy

  • Forecaster
  • *****
  • Posts: 5509
    • KomokaWeather
Re: Leuven Template - Snow
« Reply #7 on: November 10, 2018, 09:45:15 AM »
Hi Wim,
I do measure snow in decimal.x cm for CoCoRaHS reporting (well a best guess as .1 cm snow is hard to really tell).  Environment Canada also shows it in decimal.x

From CoCoRaHS unput:
Quote
Accumulation of new snow in centimeters to the nearest 0.1 cm
Melted value from core to the nearest 0.1 mm

I had just accepted your script output in full cm but have always entered as decimal.
If it can be shown in .x that would be great.
http://www.komokaweather.com/weather/snowindex.html


Enjoy,
Paul

Offline Aardvark

  • Forecaster
  • *****
  • Posts: 2305
  • Tonto to Lone Ranger : "never take off mask.
    • turned off
Re: Leuven Template - Snow
« Reply #8 on: November 10, 2018, 09:59:12 AM »
I can go into the data file and change some of the dates to last year with no problem.  I am just not seeing anything on the the snow page as far as data values.   I am wondering if the script I am using , I have put in an error with some tweak I might have done last year.   

Online wvdkuil

  • Wim van der kuil
  • Forecaster
  • *****
  • Posts: 1986
    • My PWS at Leuven Belgium Europe
Re: Leuven Template - Snow
« Reply #9 on: November 10, 2018, 10:05:22 AM »
Should I go into that file and eliminate all those in 0.1 inch values?   I tried today with a test value of 1.0 inches  and it enters data into that file, but the  value is not showing up on the page

I have attached the page image
I have no idea.
Did you restore the folder from an old backup?
In your first post you said
Code: [Select]
I am not understanding why it doesn't work as it did last yearThere are no 2017 values so this folder certainly did not get used last year.
It is running everywhere but not at your place, strange.

I have attached a test-script.
  • Rename  the current weather28/ws_snow/ws_snow.php  to another name
  • unzip attachment
  • move the ws_snow.php to your weather28/ws_snow/  folder.

@paulmy
This script is/was already adapted to your request for decimals but I did not test it extensively with decimals.
Please add a few "fake" measurements one-at-a-time for today and see if it works as it should.

Important the script uses the setting $SITE["decSnow"] fron your _my_texts/wsUserSettings.
Check if that one is set as
Code: [Select]
$SITE["decSnow"]        = "1";                  # 0 = No decimals 22 cm  |  1 = One decimal 22.4 cm
Wim

Online PaulMy

  • Forecaster
  • *****
  • Posts: 5509
    • KomokaWeather
Re: Leuven Template - Snow
« Reply #10 on: November 10, 2018, 10:46:55 AM »
Thanks Wim, and for the reminder.
Line 359 was still at 0 and now changed to 1 and decimal is showing \:D/
In reviewing that settings page I also found I had not updated to my newer VP2 Plus so now include UV and solar

Enjoy,
Paul

Offline Aardvark

  • Forecaster
  • *****
  • Posts: 2305
  • Tonto to Lone Ranger : "never take off mask.
    • turned off
Re: Leuven Template - Snow
« Reply #11 on: November 10, 2018, 11:24:47 AM »


That script works,  I have data.    Now should I go into the data text file and remove everything except this year?  I located my data text file and I have data in 2017 and I will do a manual update to the text file and upload it if it works.    I do appreciate the help
« Last Edit: November 10, 2018, 02:10:49 PM by Aardvark »

 

anything