Welcome to the new home of the Cumulus Support forum.

Latest Cumulus release v1.9.4 (build 1099) - Nov 28 2014
Latest Cumulus MX release - v3.0.0 build 3044 7 December 2018. See the Wiki for download

Yet Another Dayfile Reader (PHP)

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

Moderator: daj

User avatar
beteljuice
Posts: 2516
Joined: Tue 09 Dec 2008 1:37 pm
Weather Station: None !
Operating System: XP SP3 - honest
Location: Dudley, West Midlands, UK

Re: Yet Another Dayfile Reader (PHP)

Post by beteljuice » Mon 03 Feb 2014 1:39 pm

edit The KNMI (Dutch metoffice) calculates the monthly average from the sum of the temps divided by the past days
... but what about an incomplete season ?

I beginning to think that it should be the day-by-day method, but then again ......
Image
......................Imagine, what you will KNOW tomorrow !

User avatar
beteljuice
Posts: 2516
Joined: Tue 09 Dec 2008 1:37 pm
Weather Station: None !
Operating System: XP SP3 - honest
Location: Dudley, West Midlands, UK

Re: Yet Another Dayfile Reader (PHP)

Post by beteljuice » Mon 03 Feb 2014 2:35 pm

Yet Another Update :lol:

Method of Seasonal Daily averages changed - although it may yet be the 'wrong' way.
attempted logic problem fix.

@ David

I knew there would be at least one like this - It's a situation where a numeric value of zero is being mistaken for false or null.

I'm not sure yet if I've fixed it or made things worse :?
Image
......................Imagine, what you will KNOW tomorrow !

Graham64
Posts: 74
Joined: Mon 23 Aug 2010 5:04 pm
Weather Station: Davis Vantage Pro 2
Operating System: Windows XP
Location: Cornwall, England
Contact:

Re: Yet Another Dayfile Reader (PHP)

Post by Graham64 » Mon 03 Feb 2014 3:18 pm

I had the same problem with zero wind speed values as David.
The latest fix has solved the problem - thanks.

See http://poundstockpacket.org.uk/weather/basic.php, 2013 October and November

I have a problem with the data because my anemometer failed. Really the wind speed should be recorded as null. I'm not sure how to deal with that - Steve has said that Cumulus doesn't record null values. Any suggestions of how to deal with missing data?

Really love the new program, thank you.

User avatar
nitrx
Posts: 1292
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 » Mon 03 Feb 2014 3:18 pm

beteljuice wrote: ... but what about an incomplete season ?

I beginning to think that it should be the day-by-day method, but then again ......
Me too :roll: Anyway it's an indication ,averages over a day are officially calculated over 24 hours with a measurement each hour by the Dutch Met Office, all other averages are calculated from these hourly measurements. Cumulus has two averages the minute average and the max/min average ... I choose for the daily minute by minute.

I don't know what average is used in the dayfile.txt ? Perhaps Steve can give a clue ?(I haven't searched in the wiki btw)

User avatar
nitrx
Posts: 1292
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 » Mon 03 Feb 2014 3:29 pm

false post
Last edited by nitrx on Mon 03 Feb 2014 3:35 pm, edited 1 time in total.

User avatar
nitrx
Posts: 1292
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 » Mon 03 Feb 2014 3:34 pm

nitrx wrote:
beteljuice wrote:Yet Another Update :lol:
Uhhh its broken ? http://apeldoorn.tk/weer/basic.php

Please ignore ! have to validate , later.

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 » Mon 03 Feb 2014 4:02 pm

nitrx wrote:
beteljuice wrote: ... but what about an incomplete season ?

I beginning to think that it should be the day-by-day method, but then again ......
Me too :roll: Anyway it's an indication ,averages over a day are officially calculated over 24 hours with a measurement each hour by the Dutch Met Office, all other averages are calculated from these hourly measurements. Cumulus has two averages the minute average and the max/min average ... I choose for the daily minute by minute.

I don't know what average is used in the dayfile.txt ? Perhaps Steve can give a clue ?(I haven't searched in the wiki btw)
http://wiki.sandaysoft.com/a/Average_temperature ;)

Wind run is ok now in m/s units, but I still don't like rounding wind speeds when using m/s wind units...

http://www.phpoint.fi/leka446/weather2/inc/basic.php
Br,
Mika
Image

water01
Posts: 1487
Joined: Sat 13 Aug 2011 9:33 am
Weather Station: WH1081
Operating System: Windows 7 64bit HP SP1
Location: Somewhere in the USA
Contact:

Re: Yet Another Dayfile Reader (PHP)

Post by water01 » Mon 03 Feb 2014 4:20 pm

I had the same problem with zero wind speed values as David.
The latest fix has solved the problem - thanks.
I can also confirm that the latest version fixed the zero value problem in the Wind Gust etc.

Many thanks.

User avatar
mcrossley
Posts: 5234
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2
Operating System: Stretch Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Yet Another Dayfile Reader (PHP)

Post by mcrossley » Mon 03 Feb 2014 5:36 pm

beteljuice, I notice on your demo that the mouseover on the 'average table' cells highlight the row/column headers on the main 'data table'.

User avatar
beteljuice
Posts: 2516
Joined: Tue 09 Dec 2008 1:37 pm
Weather Station: None !
Operating System: XP SP3 - honest
Location: Dudley, West Midlands, UK

Re: Yet Another Dayfile Reader (PHP)

Post by beteljuice » Mon 03 Feb 2014 7:59 pm

Gentlmen (and ladies)

I have a problem that is both logical and philosophical ...........

Wind Speed and Gust are NOT fixed.
I am having to assume that a value of 0 (zero) is valid, but it may not be !
On the occasions that it has been 'injected' by Cumulus as a 'null' value (because of eg. anemometer malfunction) it makes a nonsense of the averages.

I could insist that whatafter all is a day value MUST be more than 1 'native' unit, but there ARE places and times that 0 (zero) WOULD be valid data and should be taken into account with the averages.

Ideally users who know they have invalid wind zero data would simply remove it from the dayfile.txt - but this could be a difficult task for some.

I don't know if the Cumulus editor will allow 'null' or if a rebuild is done, will it reinstate 0 or 0.0 ?

Thought please ...

@ Mark OK, OK - I was going to wait to do that - Edit: old link removed
Last edited by beteljuice on Tue 18 Feb 2014 4:29 am, edited 1 time in total.
Image
......................Imagine, what you will KNOW tomorrow !

User avatar
steve
Cumulus Author
Posts: 26714
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: Yet Another Dayfile Reader (PHP)

Post by steve » Mon 03 Feb 2014 10:35 pm

beteljuice wrote:I don't know if the Cumulus editor will allow 'null' or if a rebuild is done, will it reinstate 0 or 0.0 ?
What do mean by a 'null' value - an empty field in the dayfile.txt? Cumulus shouldn't be doing that. Cumulus in general doesn't do 'nulls'.
Steve

User avatar
mcrossley
Posts: 5234
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2
Operating System: Stretch Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Yet Another Dayfile Reader (PHP)

Post by mcrossley » Mon 03 Feb 2014 10:37 pm

This has come up before, Cumulus doesn't have a concept of 'null' values, which does cause the problems you are wrestling with. This is one of the reasons I have moved to a database, I can easily null out values/days I know are not valid for whatever reason.

Edit: Cross posted with Steve!

User avatar
beteljuice
Posts: 2516
Joined: Tue 09 Dec 2008 1:37 pm
Weather Station: None !
Operating System: XP SP3 - honest
Location: Dudley, West Midlands, UK

Re: Yet Another Dayfile Reader (PHP)

Post by beteljuice » Mon 03 Feb 2014 10:52 pm

@ Steve

Yes Boss,

1/ Will the editor allow edit to empty fields ?

2/ On a rebuild would empty fields be populated with zero ?

1 - I don't know
2 - I suspect not, as I haven't (yet) seen any 'old' records that have been padded out. (AFAIK)
Image
......................Imagine, what you will KNOW tomorrow !

User avatar
laulau
Posts: 521
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 » Mon 03 Feb 2014 10:54 pm

Hi,
I had to modify line 509 of your code like this

Code: Select all

        return number_format($value * 1.0, $wind_dec, '.' , '');
to have it working here :o
Then i try to add a decimal point (

Code: Select all

$wind_dec = 1;
the value comes out with the decimal point but no more "background coloring" :o :o
Laurent

Image

User avatar
steve
Cumulus Author
Posts: 26714
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: Yet Another Dayfile Reader (PHP)

Post by steve » Mon 03 Feb 2014 10:57 pm

beteljuice wrote:1/ Will the editor allow edit to empty fields ?
It appears that it does. That's probably not good, as it's probably going to cause a problem somewhere.
2/ On a rebuild would empty fields be populated with zero ?
What do you mean by a 'rebuild'?
Steve

Post Reply