Welcome to the Cumulus Support forum.

Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024

Cumulus MX V4 beta test release 4.0.0 (build 4018) - 28 March 2024

Legacy Cumulus 1 release v1.9.4 (build 1099) - 28 November 2014 (a patch is available for 1.9.4 build 1099 that extends the date range of drop-down menus to 2030)

Download the Software (Cumulus MX / Cumulus 1 and other related items) from the Wiki

Yet Another Dayfile Reader (PHP)

Other discussion about creating web sites for Cumulus that doesn't have a specific subforum

Moderator: daj

User avatar
laulau
Posts: 678
Joined: Tue 13 Oct 2009 10:52 pm
Weather Station: WeatherDuino Pro2
Operating System: Win 7
Location: Meyenheim, Alsace, FR
Contact:

Re: Yet Another Dayfile Reader (PHP)

Post 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 ?
You do not have the required permissions to view the files attached to this post.
Laurent

Image
User avatar
nitrx
Posts: 1297
Joined: Sun 13 Dec 2009 1:21 pm
Weather Station: WH1080
Operating System: Windows 10
Location: Apeldoorn The Netherlands
Contact:

Re: Yet Another Dayfile Reader (PHP)

Post 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 :(
mikkimii
Posts: 42
Joined: Fri 23 Mar 2012 3:17 pm
Weather Station: Davis VP2
Operating System: Windows 7 x64 Pro
Location: Vilppula, Finland

Re: Yet Another Dayfile Reader (PHP)

Post 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.
Br,
Mika
Image
User avatar
KarlS
Posts: 135
Joined: Tue 30 Nov 2010 3:01 pm
Weather Station: Ecowitt GW1003 / WH32 / WH41
Operating System: Buster Lite on Pi4
Location: Bridge Lake, BC, Canada
Contact:

Re: Yet Another Dayfile Reader (PHP)

Post 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. :) :)
User avatar
beteljuice
Posts: 3292
Joined: Tue 09 Dec 2008 1:37 pm
Weather Station: None !
Operating System: W10 - Threadripper 16core, etc
Location: Dudley, West Midlands, UK

Re: Yet Another Dayfile Reader (PHP)

Post 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. ,'';
Image
......................Imagine, what you will KNOW tomorrow !
User avatar
nitrx
Posts: 1297
Joined: Sun 13 Dec 2009 1:21 pm
Weather Station: WH1080
Operating System: Windows 10
Location: Apeldoorn The Netherlands
Contact:

Re: Yet Another Dayfile Reader (PHP)

Post 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
User avatar
laulau
Posts: 678
Joined: Tue 13 Oct 2009 10:52 pm
Weather Station: WeatherDuino Pro2
Operating System: Win 7
Location: Meyenheim, Alsace, FR
Contact:

Re: Yet Another Dayfile Reader (PHP)

Post 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:
You do not have the required permissions to view the files attached to this post.
Laurent

Image
User avatar
PaulMy
Posts: 3777
Joined: Sun 28 Sep 2008 11:54 pm
Weather Station: Davis VP2 Plus 24-Hour FARS
Operating System: Windows8 and Windows10
Location: Komoka, ON Canada
Contact:

Re: Yet Another Dayfile Reader (PHP)

Post 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
Davis Vantage Pro2+
C1 www.komokaweather.com/komokaweather-ca
MX www.komokaweather.com/cumulusmx/index.htm /index.html /index.php
MX www.komokaweather.com/cumulusmxwll/index.htm /index.html /index.php
MX www. komokaweather.com/cumulusmx4/index.htm

Image
User avatar
beteljuice
Posts: 3292
Joined: Tue 09 Dec 2008 1:37 pm
Weather Station: None !
Operating System: W10 - Threadripper 16core, etc
Location: Dudley, West Midlands, UK

Re: Yet Another Dayfile Reader (PHP)

Post 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.
Image
......................Imagine, what you will KNOW tomorrow !
User avatar
beteljuice
Posts: 3292
Joined: Tue 09 Dec 2008 1:37 pm
Weather Station: None !
Operating System: W10 - Threadripper 16core, etc
Location: Dudley, West Midlands, UK

Re: Yet Another Dayfile Reader (PHP)

Post 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
Image
......................Imagine, what you will KNOW tomorrow !
User avatar
PaulMy
Posts: 3777
Joined: Sun 28 Sep 2008 11:54 pm
Weather Station: Davis VP2 Plus 24-Hour FARS
Operating System: Windows8 and Windows10
Location: Komoka, ON Canada
Contact:

Re: Yet Another Dayfile Reader (PHP)

Post by PaulMy »

@ beteljuice,
No problem at all, use it at your convenience...

Paul
Davis Vantage Pro2+
C1 www.komokaweather.com/komokaweather-ca
MX www.komokaweather.com/cumulusmx/index.htm /index.html /index.php
MX www.komokaweather.com/cumulusmxwll/index.htm /index.html /index.php
MX www. komokaweather.com/cumulusmx4/index.htm

Image
User avatar
nitrx
Posts: 1297
Joined: Sun 13 Dec 2009 1:21 pm
Weather Station: WH1080
Operating System: Windows 10
Location: Apeldoorn The Netherlands
Contact:

Re: Yet Another Dayfile Reader (PHP)

Post 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
User avatar
beteljuice
Posts: 3292
Joined: Tue 09 Dec 2008 1:37 pm
Weather Station: None !
Operating System: W10 - Threadripper 16core, etc
Location: Dudley, West Midlands, UK

Re: Yet Another Dayfile Reader (PHP)

Post 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' ?
Last edited by beteljuice on Tue 18 Feb 2014 4:27 am, edited 2 times in total.
Image
......................Imagine, what you will KNOW tomorrow !
water01
Posts: 3215
Joined: Sat 13 Aug 2011 9:33 am
Weather Station: Ecowitt HP2551
Operating System: Windows 10 64bit
Location: Burnham-on-Sea
Contact:

Re: Yet Another Dayfile Reader (PHP)

Post 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.
David
Image
User avatar
nitrx
Posts: 1297
Joined: Sun 13 Dec 2009 1:21 pm
Weather Station: WH1080
Operating System: Windows 10
Location: Apeldoorn The Netherlands
Contact:

Re: Yet Another Dayfile Reader (PHP)

Post 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
Post Reply