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 4017) - 17 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

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 »

If you look at the headings Seasonal starts in December so the last group first column is December 2008.
David
Image
endfm
Posts: 17
Joined: Sat 25 Apr 2015 8:11 am
Weather Station: XC0348
Operating System: Jessie
Location: Newcastle, Australia
Contact:

Re: Yet Another Dayfile Reader (PHP)

Post by endfm »

cool, got mine working, however I'm not getting any data for rainfall?

As http://kotaraweather.com/monthlyrecord.htm advises there was 0.08in on the 26 April 2015, but for some reason it's not showing up on the day record, here http://kotaraweather.com/day/basic.php.

Once I work out the rain, I'll see if I can make the colours a little better for Australia lol

Any other software to automatically transfer the dayfile.txt over to ftp? The Cumulus Toolbox keeps crashing some .net error on windows 7

Cheers,

Matt
User avatar
PaulMy
Posts: 3775
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 »

Does your dayfile.txt for the 26th show the rainfall?
Any other software to automatically transfer the dayfile.txt over to ftp? The Cumulus Toolbox keeps crashing some .net error on windows 7
I have been using the Toolbox for years initially on Windows 7 and now on 8 and it has been flawless. However, sorry I can't give you any hints of where to look to overcome your issue.

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
duke

Re: Yet Another Dayfile Reader (PHP)

Post by duke »

endfm wrote:Any other software to automatically transfer the dayfile.txt over to ftp? The Cumulus Toolbox keeps crashing some .net error on windows 7

Cheers,

Matt
https://www.syncovery.com/
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 »

advises there was 0.08in on the 26 April 2015, but for some reason it's not showing up on the day record,
The program (ie. my coding !) assumes that a single 'tip' in a day is an error and ignores it :o
Image
......................Imagine, what you will KNOW tomorrow !
endfm
Posts: 17
Joined: Sat 25 Apr 2015 8:11 am
Weather Station: XC0348
Operating System: Jessie
Location: Newcastle, Australia
Contact:

Re: Yet Another Dayfile Reader (PHP)

Post by endfm »

Thanks for the link Duke! Will give that piece of software a go.

PaulMy, hmm weird, when I search in notepad (file is only 3 days long) I can't seem to find 0.4 or 1.1. Here's the dayfile.txt, http://kotaraweather.com/day/dayfile.txt
beteljuice wrote:The program (ie. my coding !) assumes that a single 'tip' in a day is an error and ignores it
I know :) I read the entire thread lol

Ok, in saying that would it be best entering my own data for rainfall? Not very difficult or is this error an easy fix?

Cheers,

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

Ok, in saying that would it be best entering my own data for rainfall? Not very difficult or is this error an easy fix?
What would you enter ????
... again it is not an error, it is a deliberate piece of coding. The philosophy is simply you don't know how much liquid was in the 'spoons' to start with, plus a single 'tip' in a day may be birds . wind or another non rain related event.

Here is one (of many) rain definitions:
// NOAA and Davis say a rain 'event' must be measurable at least every 15 min.
// however: one 'tip' could be an accident or the straw that broke the camels back
Image
......................Imagine, what you will KNOW tomorrow !
User avatar
PaulMy
Posts: 3775
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 »

That dayfile.txt does contain the 0.8 Rainfall for Apr 26th (field 15 - 26/04/15,35.6,90,13:49,10.5,05:40,17.5,12:37,1007.7,04:54,1016.5,21:15,0.36,01:43,0.08,)

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
endfm
Posts: 17
Joined: Sat 25 Apr 2015 8:11 am
Weather Station: XC0348
Operating System: Jessie
Location: Newcastle, Australia
Contact:

Re: Yet Another Dayfile Reader (PHP)

Post by endfm »

beteljuice wrote:What would you enter ????
... again it is not an error, it is a deliberate piece of coding. The philosophy is simply you don't know how much liquid was in the 'spoons' to start with, plus a single 'tip' in a day may be birds . wind or another non rain related event.

Here is one (of many) rain definitions:
// NOAA and Davis say a rain 'event' must be measurable at least every 15 min.
// however: one 'tip' could be an accident or the straw that broke the camels back
I think I understand you, but in all instances probably not. So it only reads rainfall more then 1mm? or.. please excuse my ignorance, actually not to sure what I'd enter now as the data is already there. I've seen on some day reports that people actually have 0.1mm of rain reported for a certain day?

Yes Paul, thankyou. I can see that now, just getting an excel doc with the right headings so i know what I'm looking at.

Cheers, great work beteljuice :)
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 »

Actually if that value is In it should be displaying that value ....

Code: Select all

function DoRain($value, $to){ // convert rain units
    global $displayUOM, $uom, $decimals;
    if($displayUOM['rain'] == 'mm'){
        $rain_dec = 1;
        if($value < 0.2) $value = 0; // 1 tip regarded as error
    } else {
        $rain_dec = 2;
        if($value < 0.05) $value = 0; // 1 tip regarded as error
    }
    $decimals = $rain_dec;
    if(!$to) $to = $displayUOM['rain'];
    if($uom['rain'] == "in" && $to == "mm"){ // in => mm
        return number_format(($value * 25.4), $rain_dec, '.' , '');
    } elseif($uom['rain'] == "mm" && $to == "in"){ // mm => in
        return number_format(($value / 25.4), $rain_dec, '.' , '');
    } else { // no change
        return number_format((float)$value, $rain_dec, '.' , '');
    }
} // END function DoRain()
BUT .....

You have set your 'base' reference to mm - is this correct ?

Code: Select all

$uom = array(
            'temp' => (isset($SITE['uomTemp']) ? substr($SITE['uomTemp'], -1) : 'C'),
            'rain' => (isset($SITE['uomRain']) ? substr($SITE['uomRain'], 1) : 'mm'),
            'wind' => (isset($SITE['uomWind']) ? substr($SITE['uomWind'], 1) : 'km/h'),
            'baro' => (isset($SITE['uomBaro']) ? substr($SITE['uomBaro'], 1) : 'hPa')
        );
Image
......................Imagine, what you will KNOW tomorrow !
User avatar
PaulMy
Posts: 3775
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 »

Yes Paul, thankyou. I can see that now, just getting an excel doc with the right headings so i know what I'm looking at.
The easiest is using the built-in Cumulus Dayfile editor.

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
endfm
Posts: 17
Joined: Sat 25 Apr 2015 8:11 am
Weather Station: XC0348
Operating System: Jessie
Location: Newcastle, Australia
Contact:

Re: Yet Another Dayfile Reader (PHP)

Post by endfm »

beteljuice, sorry for the delay. Yes that is correct

just wondering also *Incomplete dataset, my data has * right down the bottom? http://kotaraweather.com/day/basic.php

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

just wondering also *Incomplete dataset, ...
Er ... That's because April and May do NOT have data for every day of those months.
So you are given the * advisory by figures which will not be 'true' (because of missing data)
Image
......................Imagine, what you will KNOW tomorrow !
colinpb
Posts: 86
Joined: Thu 10 Nov 2011 8:14 pm
Weather Station: VP2+SHT31+DFars+Solar+AeroCone
Operating System: Windows 10
Location: Hemel Hempstead, Hertfordshire, UK

Re: Yet Another Dayfile Reader (PHP)

Post by colinpb »

Very impressed with Yet Another Dayfile Reader (PHP), which I’ve been running since Mid-January 2015. However I have noticed a couple of issues.
Firstly In daily sunshine values greater than 10 hours do not show in High for the month - see below
not greater than 10.PNG

However in seasonal view values over 10 hrs are shown - see below
greater than 10 seasonal.PNG

Secondly the solar hours and ET are not excluding months with zero data and therefor skew the average – see below
null dataset.PNG

However with solar w/m2 they are excluded and not affecting the average – see below
null dataset not inc.PNG


Finally I am using the code alteration as per BJCKiwi post of 17 December 2014 to show for example 1.0 not 1; though this only works for daily data not totals. Not sure if using this alteration is the cause of the first issue

Colin
You do not have the required permissions to view the files attached to this post.
BCJKiwi
Posts: 1255
Joined: Mon 09 Jul 2012 8:40 pm
Weather Station: Davis VP2 Cabled
Operating System: Windows 10 Pro
Location: Auckland, New Zealand
Contact:

Re: Yet Another Dayfile Reader (PHP)

Post by BCJKiwi »

Just checked the Daily sunshine and do not appear to have the issues you report.

Not yet checked Solar and ET.
Post Reply