Please read the posts in the Announcements section about the current status of Cumulus development now that I have retired

Please read this post before posting

Latest Cumulus release v1.9.4 (build 1099) - Nov 28 2014
Latest Cumulus MX release - v3.0.0 build 3043 Jan 20 2017. See this post for download

Yet Another Dayfile Reader (PHP)

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

Moderators: daj, TNETWeather

water01
Posts: 1401
Joined: Sat Aug 13, 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)

Postby water01 » Tue Apr 28, 2015 1:12 pm

If you look at the headings Seasonal starts in December so the last group first column is December 2008.

endfm
Posts: 31
Joined: Sat Apr 25, 2015 8:11 am
Weather Station: XC0348
Operating System: Jessie
Location: Newcastle, Australia
Contact:

Re: Yet Another Dayfile Reader (PHP)

Postby endfm » Tue Apr 28, 2015 4:56 pm

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: 1548
Joined: Sun Sep 28, 2008 11:54 pm
Weather Station: Davis Vantage Pro 2 w/Envoy USB
Operating System: Windows-8
Location: Komoka, ON Canada
Contact:

Re: Yet Another Dayfile Reader (PHP)

Postby PaulMy » Tue Apr 28, 2015 5:18 pm

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

User avatar
duke
Posts: 845
Joined: Sun Jul 03, 2011 6:23 pm
Weather Station: Davis VP2 Plus - 24hr FARS
Operating System: Windows 10 - 64 bit
Location: Eastleigh, Hampshire, UK
Contact:

Re: Yet Another Dayfile Reader (PHP)

Postby duke » Tue Apr 28, 2015 5:46 pm

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/
Duke

Nightingale Weather
Eastleigh, Hampshire, UK
------------------------------------------------------
Validate your pages - often!

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

Re: Yet Another Dayfile Reader (PHP)

Postby beteljuice » Tue Apr 28, 2015 9:06 pm

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

Re: Yet Another Dayfile Reader (PHP)

Postby endfm » Wed Apr 29, 2015 1:24 am

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: 2455
Joined: Tue Dec 09, 2008 1:37 pm
Weather Station: None !
Operating System: XP SP3 - honest
Location: Dudley, West Midlands, UK

Re: Yet Another Dayfile Reader (PHP)

Postby beteljuice » Wed Apr 29, 2015 1:52 am

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: 1548
Joined: Sun Sep 28, 2008 11:54 pm
Weather Station: Davis Vantage Pro 2 w/Envoy USB
Operating System: Windows-8
Location: Komoka, ON Canada
Contact:

Re: Yet Another Dayfile Reader (PHP)

Postby PaulMy » Wed Apr 29, 2015 2:12 am

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

endfm
Posts: 31
Joined: Sat Apr 25, 2015 8:11 am
Weather Station: XC0348
Operating System: Jessie
Location: Newcastle, Australia
Contact:

Re: Yet Another Dayfile Reader (PHP)

Postby endfm » Wed Apr 29, 2015 5:47 am

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: 2455
Joined: Tue Dec 09, 2008 1:37 pm
Weather Station: None !
Operating System: XP SP3 - honest
Location: Dudley, West Midlands, UK

Re: Yet Another Dayfile Reader (PHP)

Postby beteljuice » Wed Apr 29, 2015 9:36 am

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: 1548
Joined: Sun Sep 28, 2008 11:54 pm
Weather Station: Davis Vantage Pro 2 w/Envoy USB
Operating System: Windows-8
Location: Komoka, ON Canada
Contact:

Re: Yet Another Dayfile Reader (PHP)

Postby PaulMy » Wed Apr 29, 2015 11:21 am

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

endfm
Posts: 31
Joined: Sat Apr 25, 2015 8:11 am
Weather Station: XC0348
Operating System: Jessie
Location: Newcastle, Australia
Contact:

Re: Yet Another Dayfile Reader (PHP)

Postby endfm » Mon May 04, 2015 11:21 am

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: 2455
Joined: Tue Dec 09, 2008 1:37 pm
Weather Station: None !
Operating System: XP SP3 - honest
Location: Dudley, West Midlands, UK

Re: Yet Another Dayfile Reader (PHP)

Postby beteljuice » Mon May 04, 2015 11:41 am

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 Nov 10, 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)

Postby colinpb » Tue Jun 09, 2015 7:18 pm

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: 845
Joined: Mon Jul 09, 2012 8:40 pm
Weather Station: Davis VP2 Cabled with Solar
Operating System: Windows 10 Pro
Location: Auckland, New Zealand
Contact:

Re: Yet Another Dayfile Reader (PHP)

Postby BCJKiwi » Tue Jun 09, 2015 9:11 pm

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

Not yet checked Solar and ET.


Return to “Web site - General”

Who is online

Users browsing this forum: No registered users and 3 guests