Author Topic: Calculation of overall monthly average in Murry's daily/monthly/seasonal script  (Read 264 times)

0 Members and 1 Guest are viewing this topic.

Offline CrondallWeather

  • Crondall Weather
  • Member
  • *
  • Posts: 20
  • Still a classic - like so many of us....
    • Crondall Weather
I've been using Murry's ( excellent daily/monthly/seasonal script for sometime now, but wonder if I've set it up slightly wrong, or if a refinement could be made.

Specifically, where we are part way through a month the average data for the month seems to be included in the overall averages, rather than only when the month is complete.

An example from my current rainfall data will make it clearer.

So far in January we have had 9.9mm of rain.

This is now showing as the lowest January rainfall ever, when clearly it's not, it's merely due to the month not being complete.

Also the 9.9mm has also been taken into the calculation of overall January average of 69.0, which is actually 73.0 when the part January is excluded (and the "true" average).

No problem with the Max being included, as this allows for an extreme weather event in the month to be picked up - although I recognise this is a bit logically inconsistent!

Is it my set up, or could anyone suggest a refinement (way beyond my php skills I'm afraid).

Many thanks


I've used rainfall as an example but the same logic naturally applies to the other weather tabs.