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
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 »

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: 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 »

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 »

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: 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: ... 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: 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 »

false post
Last edited by nitrx on Mon 03 Feb 2014 3:35 pm, edited 1 time in total.
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 »

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 »

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: 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 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.
David
Image
User avatar
mcrossley
Posts: 12692
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Yet Another Dayfile Reader (PHP)

Post by mcrossley »

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: 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 »

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: 26702
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 »

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: 12692
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Yet Another Dayfile Reader (PHP)

Post by mcrossley »

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: 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 »

@ 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: 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 »

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: 26702
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 »

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