Page 3 of 55

Re: Yet Another Dayfile Reader (PHP)

Posted: Sun 02 Feb 2014 4:12 pm
by laulau
This is what happens with the basic code:
Capture.JPG
With my code modification i have no more Warning messages but you're right it affects the average value.
Could you try with my dayfile ?

Re: Yet Another Dayfile Reader (PHP)

Posted: Sun 02 Feb 2014 4:59 pm
by nitrx
Aha found it for windspeed / gust it seems the m/s and km/h are reverted (don't know about the knots and miles) The easiest way should be the change the descriptions I think, but I'm not sure if others have this problem too.

edit found it canged km/h over here to m/s 'wind' => (isset($SITE['uomWind']) ? substr($SITE['uomWind'], 1) : 'm/s'), dumbo me sorry for the inconvenience should read better :mrgreen: Windrun is broken now :(

Re: Yet Another Dayfile Reader (PHP)

Posted: Sun 02 Feb 2014 5:27 pm
by mikkimii
nitrx wrote:Aha found it for windspeed / gust it seems the m/s and km/h are reverted (don't know about the knots and miles) The easiest way should be the change the descriptions I think, but I'm not sure if others have this problem too.

edit found it canged km/h over here to m/s 'wind' => (isset($SITE['uomWind']) ? substr($SITE['uomWind'], 1) : 'm/s'), dumbo me sorry for the inconvenience should read better :mrgreen: Windrun is broken now :(
Yes, I changed same line same way yesterday and had same issue, windrun went broken.

In Scandinavia we use m/s for wind speed.

Re: Yet Another Dayfile Reader (PHP)

Posted: Sun 02 Feb 2014 6:50 pm
by KarlS
I changed the CSS a bit to accommodate it to my page layout (cell width, background colors) and did some minor modifications to the script (no Sunshine hours, UV index) … and had it running within an hour. I plan to make some additional changes (add apparent temperature and/or windchill), so it is not yet selectable from my menu, but for now here it is.

Thank you Beteljuice et al. for this useful scrpt. :) :)

Re: Yet Another Dayfile Reader (PHP)

Posted: Sun 02 Feb 2014 7:25 pm
by beteljuice
@ laulau - that link IS using YOUR dayfile !

Guys, It's all getting a bit grey.

Please can we determine what is working and what isn't - AND can you please check if your data is valid !
eg. a wind value of 0 is valid - if you didn't record a value it should be null eg. ,'';

Re: Yet Another Dayfile Reader (PHP)

Posted: Sun 02 Feb 2014 7:35 pm
by nitrx
Values are valid exept windrun isn't calculated I think this happens due my default windmeasures are in m/s and the windrun is in km by default.

Ron http://apeldoorn.tk/weer/basic.php

Re: Yet Another Dayfile Reader (PHP)

Posted: Sun 02 Feb 2014 10:00 pm
by laulau
Your original code give me some warnings in "Wind Speed" before the data table
I suppose due to empty cells in dayfile for older data.
Capture.JPG
--
beteljuice wrote:@ laulau - that link IS using YOUR dayfile !
Ok when i go to the link http://beteljuice.co.uk/daytest/lau.php
These are my datas (2002->2014)
Capture1.JPG
But after i've clicked on "Temp Max"
The text button are in English and the datas are from someone else(oct 2008 to jan 2014)
Capture2.JPG
I Really don't understand what happens:o :shock:

Re: Yet Another Dayfile Reader (PHP)

Posted: Sun 02 Feb 2014 10:18 pm
by PaulMy
But after i've clicked on "Temp Max"
The text button are in English and the datas are from someone else(oct 2008 to jan 2014)
I think that is my data that I rented out to beteljuice when he was helping me a while ago.

I hope you get it all worked out so that I can jump in as well.

Paul

Re: Yet Another Dayfile Reader (PHP)

Posted: Mon 03 Feb 2014 12:11 am
by beteljuice
@ Laurent

Sorry - I forgot to change something on line #1235 :lol:

Subsequent calls should now properly refer to your data.
ATM I'm confused why some font sizes seem to be ignored when combined with weatherstyles.css - an 'inspector' says they are still enforced, but obviously they are not ?
I hate css ........

@ Paul

Yes, I still haven't got anyone with years of entries and a 'clean' (no errors) database :shock:

If it's a problem please say - the 'release' code does not show your url.

Re: Yet Another Dayfile Reader (PHP)

Posted: Mon 03 Feb 2014 2:57 am
by beteljuice
'native' m/s windrun fixed ... my oops !
rain conversion corrected - thanks jdc

@ Ron

Averages:
The sum of 'valid' data / number of valid data entries in a month.
The 'overall' averages (bottom line of main table) are the averages of the (counted) month averages.
The seasonal works in a similar way but using 3 months valid data / valid entries

Re: Yet Another Dayfile Reader (PHP)

Posted: Mon 03 Feb 2014 5:13 am
by PaulMy
@ beteljuice,
No problem at all, use it at your convenience...

Paul

Re: Yet Another Dayfile Reader (PHP)

Posted: Mon 03 Feb 2014 8:57 am
by nitrx
beteljuice wrote:'native' m/s windrun fixed ... my oops !
rain conversion corrected - thanks jdc

@ Ron

Averages:
The sum of 'valid' data / number of valid data entries in a month.
The 'overall' averages (bottom line of main table) are the averages of the (counted) month averages.
The seasonal works in a similar way but using 3 months valid data / valid entries
Thanks Beteljuice evrything is up and running fine now.

What do you mean with
@ Paul

Yes, I still haven't got anyone with years of entries and a 'clean' (no errors) database :shock:


About the seasons
The seasonal works in a similar way but using 3 months valid data / valid entries
I've looked at this winter , february isn't completed yet so the average is dec+jan+(incomplete-feb) divided by 3 as far I can see , there is an * that indicates it's not complete but... it would be nice to have the trending season to be the sum of days divided by the days in the season, or am I asking too much :lol:

Anyway thanks for this great script !
Ron

Re: Yet Another Dayfile Reader (PHP)

Posted: Mon 03 Feb 2014 10:27 am
by beteljuice
Ron wrote:it would be nice to have the trending season to be the sum of days divided by the days in the season, or am I asking too much :lol:
Quite straight forward, and yes with incomplete months there is a difference ! - with completed months there is sometimes 0.1 difference (due to rounding)

(temporarily on my test page) Edit: link no longer valid
Today 2014 Winter season Average Max Temp was -1.2C, day-by-day method now -1.9C

But .... I am not sure which is the "correct" method to use.

Anyone got a 'source' ?

Re: Yet Another Dayfile Reader (PHP)

Posted: Mon 03 Feb 2014 10:32 am
by water01
I have just noticed that in the wind data pages (i.e. Wind Speed, Wind Gust, Wind Run) I am getting 0"> instead of zero.

Tried to find where this occurring, I can see what is happening in the table data generated by the php

Code: Select all

<td class="datacell" style="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" datamon=".Feb">0"> </td>
but cannot find the problem in the code, obviously not conversant enough with it yet!!

If you want to check it out see here http://www.dmjsystems.co.uk/weather/basic.php and choose Wind Run year 2012.

Re: Yet Another Dayfile Reader (PHP)

Posted: Mon 03 Feb 2014 11:56 am
by nitrx
beteljuice wrote:Quite straight forward, and yes with incomplete months there is a difference ! - with completed months there is sometimes 0.1 difference (due to rounding)

(temporarily on my test page basic
Today 2014 Winter season Max Temp was -1.2C, day-by-day method now -1.9C

But .... I am not sure which is the "correct" method to use.

Anyone got a 'source' ?
I've not a direct source but this is a Dutch site (unfortenally) that calculates averages over a given period when I look up the perod 1 dec 2012 to 28 feb 2013 it gives an average of 2.9 C and for the period 1 dec to 2 febr 2013 3.6 C . (not sure how it should be handled according the WMO). I'm aware of the 0.1 rounding

edit The KNMI (Dutch metoffice) calculates the monthly average from the sum of the temps divided by the past days