Page 24 of 55

Re: Yet Another Dayfile Reader (PHP)

Posted: Tue 28 Apr 2015 1:12 pm
by water01
If you look at the headings Seasonal starts in December so the last group first column is December 2008.

Re: Yet Another Dayfile Reader (PHP)

Posted: Tue 28 Apr 2015 4:56 pm
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

Re: Yet Another Dayfile Reader (PHP)

Posted: Tue 28 Apr 2015 5:18 pm
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

Re: Yet Another Dayfile Reader (PHP)

Posted: Tue 28 Apr 2015 5:46 pm
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/

Re: Yet Another Dayfile Reader (PHP)

Posted: Tue 28 Apr 2015 9:06 pm
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

Re: Yet Another Dayfile Reader (PHP)

Posted: Wed 29 Apr 2015 1:24 am
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

Re: Yet Another Dayfile Reader (PHP)

Posted: Wed 29 Apr 2015 1:52 am
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

Re: Yet Another Dayfile Reader (PHP)

Posted: Wed 29 Apr 2015 2:12 am
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

Re: Yet Another Dayfile Reader (PHP)

Posted: Wed 29 Apr 2015 5:47 am
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 :)

Re: Yet Another Dayfile Reader (PHP)

Posted: Wed 29 Apr 2015 9:36 am
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')
        );

Re: Yet Another Dayfile Reader (PHP)

Posted: Wed 29 Apr 2015 11:21 am
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

Re: Yet Another Dayfile Reader (PHP)

Posted: Mon 04 May 2015 11:21 am
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

Re: Yet Another Dayfile Reader (PHP)

Posted: Mon 04 May 2015 11:41 am
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)

Re: Yet Another Dayfile Reader (PHP)

Posted: Tue 09 Jun 2015 7:18 pm
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

Re: Yet Another Dayfile Reader (PHP)

Posted: Tue 09 Jun 2015 9:11 pm
by BCJKiwi
Just checked the Daily sunshine and do not appear to have the issues you report.

Not yet checked Solar and ET.