IMPORTANT! The server may go down soon - possibly permanently. Please read the latest post in Announcements and News

FTP is broken. I advise all users using my server for their web site to make alternative arrangements.

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

monthly and annual average temperature

Discussion and questions about Cumulus weather station software version 1. This section and its subforums are the main place to get help with Cumulus. Anything which is not specific to the type of weather station goes in here; for anything specific to a type of weather station, please use the appropriate subforum. Use the 'website development' section for any questions relating to creating or running a web site for Cumulus data. Discussion of the stations themselves in these sections is fine.
wetterfrosch1971
Posts: 93
Joined: Sun Apr 06, 2014 1:15 pm
Weather Station: wh1080
Operating System: windows7
Location: south-west-germany

monthly and annual average temperature

Postby wetterfrosch1971 » Mon Jan 08, 2018 11:23 pm

Hi,

in cumulus I can see the monthly average temperature and the annual averrage temperature.
It is also possible to display this data in the monthly data and annual data on the website?

many thanks.
Peter

sfws
Posts: 445
Joined: Fri Jul 27, 2012 11:29 am
Weather Station: Customised mix of Fine Offset
Operating System: Tempermental Win. 10 PC
Location: UK

Re: monthly and annual average temperature

Postby sfws » Tue Jan 09, 2018 8:25 am

Since these are not available as web tags, to display them you need to add a script that adds all the daily values from past days (find them in the daily log file), calculates the average and then outputs this. You need to consider if adding those figures is worth the effort as I assume you don't have expertise to write that script already or you would not need to ask the question.

In the past I used JavaScript to work through an online copy of the daily log file (and the web tags for the current day). I may have the script I used in an archive somewhere, but don't have time to search for it. If you decide to follow that route, you can find hints online for how to write such a script, including how to read a file.

More recently with my daily data in a database, I have used a PHP script to work through all the days in a month and calculate a number of extra monthly statistics not available directly as Cumulus web tags (and it means I have all my extended monthly statistics stored for all past months). My schema is different to the one used by Mark Crossley (and adopted as the default standard, but not only one possible, in Cumulus MX), so you would have to understand my schema to use my script and anyway my script does many other calculations for month, season and year, so it would be confusing to share it.

In my script ... to add correct weighting to all the figures before averaging, I multiplied figures for past days by 24 so I could then add in the average for today from web tag (or today.ini) and multiply that by the number of hours into the meteorological day. Being perdantic I also make allowance for any day with a clock change multiplying that daily figure by 23 or 25 instead of 24.


Return to “Cumulus 1”

Who is online

Users browsing this forum: Google [Bot] and 4 guests