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 4019) - 03 April 2024

Legacy Cumulus 1 release 1.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
steve
Cumulus Author
Posts: 26701
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 »

Graham64 wrote:However the wind direction for the period is shown as E. I think this is the default value set by Cumulus when the anemometer was down. I can't see what can be done about this because E is a frequent valid value.
This was a bug, fixed only recently.
Steve
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 »

Steve
Thanks for the reminder, obviously a sensible change. However, I think that my point about dealing with wind direction if the measurement isn't taken is still valid. In such cases the best 'value' is surely null. I can't see how any algorithm can work out if a zero (North) is valid or exists because the instrument is not working.
By the way, this isn't a criticism of Cumulus, I can see the points you have already made about the issue.
User avatar
steve
Cumulus Author
Posts: 26701
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 »

Zero for wind direction is normally used for 'no reading'. North is 360.
Steve
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 »

Steve
Ah!
I had missed that and it makes a big difference - mainly in showing that a lot of what I said earlier is rubbish!
I'll manually alter the 90 to 0 and see what happens.
Thanks
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 »

Graham64 wrote:Beteljuice
Experiment:
The number_format problem has returned for apparent temps and DP. ...
Rather worryingly I've modified a slightly older version than I should have done :o

The next 'experiment' will have that reinstated together the correct solar irradiance data and contrasting text (I hope - I'm starting to lose the plot with all the different copies I have :bash: )
... However the wind direction for the period is shown as ...
Next experiment windir cannot exist without a windspeed ;)
You included sun hours in the sanitize routine but zero is a frequent valid value for sun hours and so I have removed it from the $zero_as_null array.

Thanks for the excellent work on the experiment to deal with zeroes/nulls but I don't think it provides a fool-proof solution...
... I suppose that the only way will be to either alter the DayFile values to null Using Cumulus or use a database.
That is exactly the thing to do as stated all over the place !
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 »

Experiment take #2
Language file now contains extra entry in ['note']
Hopefully I've put the missing tweaks back !
An interesting css problem resolved that no one else seems to have noticed.
Wind Direction will only be taken into account if there is a wind speed !
Edit: old download link removed.
Last edited by beteljuice on Tue 18 Feb 2014 4:38 am, edited 1 time in total.
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 »

Beteljuice
Following Steve's point about 360=North and 0=missing value I have altered the Oct 2013 values for wind direction from 90 to 0.
The results are at http://poundstockpacket.org.uk/weather/basic700.php and are as they should be. Values not shown and ignored in the averages, so your wind direction routine works for build 1087 onwards.
I'm very happy as long as I remember to change all the missing values pre build 1087 from 90 to 0.
Thanks
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 »

... so your wind direction routine works for build 1087 onwards.
But ... anyone with data gathered prior to that build will still encounter the same problem.

Thank you for bringing it to my attention, my work around is still 'valid' for users with older data.

As I keep saying .. If you have the confidence to edit your dayfile.txt that is the 'best' option, then you can set $SANITIZE to false, and all data should be true.

Doing all this by virtuality (because I no longer have a weather station), means some of the bugs have taken longer to resolve than normal - but we are getting there ;)
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 »

Final Experiment - before 'Release'
(I hope)

For completeness Evapotranspiration, Heating Days, and Cooling Days have been added >Edit: old link removed[/url]<

These have been 'turned off' in the file as only Davis owners have EVT, and has anybody actually set their thresholds fot heatcooling days, and if they have, without comment it means nothing to other 'viewers' !

Translators - this should be the final conflict, thank you for your time and patience :clap:
Edit: download removed - no longer relevant
Last edited by beteljuice on Tue 18 Feb 2014 4:39 am, edited 2 times in total.
Image
......................Imagine, what you will KNOW tomorrow !
water01
Posts: 3253
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 »

Silly question, should we be installing the "Experiment" or the .zip file on page 1 of the Topic?
David
Image
nossis
Posts: 89
Joined: Wed 28 Nov 2012 6:12 am
Weather Station: Davis Vantage Pro 2
Operating System: Win 10
Location: Perth AU
Contact:

Re: Yet Another Dayfile Reader (PHP)

Post by nossis »

Ah (a very contented ah)
Using the "Version: EXPERIMENT - 10 Feb 2014" file and separate language file

My 2 cents worth....
Every time there is a new update I eagerly install and find more wonders. This is like a candy jar that never ends!

I still haven't fully figured out how to mesh this into my existing pages, but am happy to wait till the dust settles on this project.
Test page here http://members.iinet.net.au/~nossis/weather/basic.php
Mods i do to make it work in Auzzie land.... I change the seasons.
I also change the km/h to kts for data and added one extra shade for temp. (Tried more but I am not that clever at coding) I get plus 40 deg C regularly. It is all just about red prior to adding a segment of "$tempGrad30to40"

Running a Davis I was keen to see all the data and how it went... Ah lovely (contented sighs)

Experiment I reckon has gone great!
If we could have the same rule to knock out "no readings" data that would be grand for EVT.
All data calculation for daily appears correct and as expected. So much so I found an error in my NOAA reports with the avg wind speed. I stand corrected. They are correct. I saw the wind speed is the "highest wind speed" and not "average". I do have difficulty at reading everything at times.
The seasonal I haven't checked up on (I see there has been some previous banter on that one)

My data does have the odd lost bits due to various reasons so is good to test the show "nothing" instead of "0.0"

Even though I was reminded earlier that it isn't there yet (beta) I think this is genius work! such a visible way to easily read and understand the data. Bravo :clap: :clap: :clap: :clap:

Big ticks from me :D

PS if you want some data am happy to provide.
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 »

Experiment is hopefully a final shake-down before 'proper' release (which will replace the beta in the first post)

The experiment (zip) does not contain the example page holders, css files, or graphics and is for the proficient to overwrite what they have already (It also uses a seperate language file that the beta does not)

If in doubt .... wait :D

I'd like to get the additional translations in place (if possible) before 'release'.

@ nossis
If we could have the same rule to knock out "no readings" data that would be grand for EVT.
So is zero a 'nonsense' value for EVT ?
Try adding 'evt' to the $zero_as_null array and see if it works as expected.
Image
......................Imagine, what you will KNOW tomorrow !
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 »

Here is Version: EXPERIMENT - 10 Feb 2014 Finnish (fi) translation module:

Code: Select all

                'fi' => array(
                    'daily' => 'Päivittäin', // drop-down table selector
                    'seasonal' => 'Vuodenajoittain', // drop-down table selector
                    'note' => array('Huom!','Keskeneräinen datatiedosto', 'Nollat käsitellään tyhjinä arvoina !' ),
                    'loading' => 'Hakee tiedostoa ...',
                    'fail' => 'DATAVIRHE !!!',
                    'total' => '&#931;',
                    'avg' => 'Keskim.',
                    'hi' => 'Korkein',
                    'lo' => 'Alin',
                    'dom' => 'Hallitseva', // short for dominant (wind direction)
                    'season_1' => '<img src="snowflake.png" height="22px" />Talvi', // previous Dec, Jan, Feb
                    'season_2' => '<img src="daffodil.png" height="22px" />Kevät', // Mar, Apr, May
                    'season_3' => '<img src="sun.png" height="22px" />Kesä', // Jun, Jul, Aug
                    'season_4' => '<img src="leaf.gif" height="22px" />Syksy', // Sep, Oct, Nov
                    'mn' => array('Tam', 'Hel', 'Maa', 'Huh', 'Tou', 'Kes', 'Hei', 'Elo', 'Syy', 'Lok', 'Mar', 'Jou'),
                    'dy' => array('Su','Ma','Ti','Ke','To','Pe','La'),
                    'compass_headings' => array('POH&nbsp;&#x2193;','KOI&nbsp;&#x2199;','IT&Auml;&nbsp;&#x2190;','KAA&nbsp;&#x2196;','ETE&nbsp;&#x2191;','LOU&nbsp;&#x2197;','L&Auml;N&nbsp;&#x2192;','LUO&nbsp;&#x2198;','POH&nbsp;&#x2193;'),
                    'maxtemp' => array('Max lämpö', 'Korkein lämpötila'),
                    'mintemp' => array('Min lämpö', 'Alin lämpötila'),
                    'tdiff' => array('Lämpöero &deg', 'Lämpötilan vaihtelu &deg'),
                    'avgtemp' => array('Keskim lämpö', 'Keskimääräinen lämpötila'),
                    'tappmax' => array('Max "tuntuu kuin"', 'Korkein "tuntuu kuin" lämpötila'),
                    'tappmin' => array('Min "tuntuu kuin"', 'Alin "tuntuu kuin" lämpötila'),
                    'dpmax' => array('Max kastep', 'Korkein kastepistelämpötila'),
                    'dpmin' => array('Min kastep', 'Alin kastepistelämpötila'),
                    'rhmax' => array('Max kosteus', 'Korkein kosteus %'),
                    'rhmin' => array('Min kosteus', 'Alin kosteus %'),
                    'rainfall' => array('Sade', 'Sademäärä'),
                    'windspd' => array('Tuulen nopeus', 'Korkein keskituulen nopeus '),
                    'windgust' => array('Puuska', 'Korkein tuulenpuuska'),
                    'windrun' => array('Tuulen matka', 'Tuulen matka'),
                    'winddir' => array('Tuulen suunta', 'Hallitseva tuulen suunta'),
                    'baromax' => array('Max paine', 'Korkein Ilmanpaine'),
                    'baromin' => array('Min paine', 'Alin Ilmanpaine'),
                    'HoursSun' => array('Auringonpaiste', 'Auringonpaistetunnit'),
                    'Solar' => array('Aurinkoenergia', 'Korkein aurinkoenergia W/m&sup2;'),
                    'HighUV' => array('UV-I', 'Korkein UV-indeksi'),
                    'evt' => array('EVT', 'Kokonaishaihdunta'),
                    'heatday' => array('Lämmitys', 'Lämmitystarveluku'),
                    'coolday' => array('Jäähdytys', 'Jäähdytystarveluku')
                ),
In Leuven Template: http://www.phpoint.fi/leka446/weather2/ ... hp?p=64-10 (Finnish only, I made it quickly by iframe)
Br,
Mika
Image
User avatar
jdc
Posts: 142
Joined: Tue 19 Jun 2012 8:51 pm
Weather Station: Davis VP2 : Instromet
Operating System: Win 10
Location: Portsoy,.
Contact:

Re: Yet Another Dayfile Reader (PHP)

Post by jdc »

As far as I can tell this 'zip' is working AOK with all the data being correct. I have zeroed a value for 'Solar' 03/09/2013 and the sanitize message appears as expected, here.

I have to agree that this is a brilliant bit of work - almost a weather website on one page!
beteljuice wrote: An interesting css problem resolved that no one else seems to have noticed.
I thought you would be more concerned about functionality first. :) I have changed colours and found a couple of teensie wee things that are not in css
Line 717/1143: the 'Incomplete Data' bar is #DDD.
Line 870: there is a cell 'zerovalue' . December, on the Seasonal view.
Line 860: the 2px borders for Seasonal are 'black'

Not being picky - just FYI.
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 »

I've a look tommorow atm I'm a little tired , and I've to sort oiut the posts in this thread thats going fast (too) for me :roll:
Post Reply