Average temperature: Difference between revisions

2,793 bytes added ,  10:27, 9 March 2020
m
(→‎Cumulus outputs: Expanding re NOAA report annual averages with reference to Cumulus MX builds up to 3067)
Line 3: Line 3:


== Cumulus outputs ==
== Cumulus outputs ==
At rollover, the ''AvgTemp'' field in [[yesterday.ini]] holds the final integrated mean calculated by the quotient of '''Total''' over '''Samples''' in the old today.ini and the same average is written to [[dayfile.txt]]. The integrated mean temperature for each day is also output to the monthly NOAA style report row for the last line (which is yesterday's date). Integrated average temperatures are thus available as [[webtags]] for today and yesterday. For past days they are found in the [[dayfile.txt]].  
At rollover, the ''AvgTemp'' field in [[yesterday.ini]] holds the final integrated mean calculated by the quotient of '''Total''' over '''Samples''' in the [[today.ini|previous today.ini]] and the same average is written to [[dayfile.txt|the daily log file line representing that last complete day]]. The integrated mean temperature for each day is also output to the monthly NOAA style report row for the last line (which is yesterday's date). For past days they are found in the [[dayfile.txt]]. Integrated average temperatures are also made available as [[webtags]] for today (<#avgtemp>) and yesterday (<#avgtempY>).


The average of these daily intregated means for the whole month is shown at the bottom of the monthly NOAA style report, and the lowest, actual, and highest of these integrated daily mean for each month are output to the annual NOAA style report. Providing Cumulus is in continuous operation, so the number of measurements in the calculation is the same for every day, the average of integrated daily means over a month is mathematically the same as an integrated mean for the whole month.  
=== Monthly NOAA report ===
This report shows the figures taken from [[dayfile.txt|daily summary log file]] for each day, so in the "Mean Temp" column it is reporting the same integrated average temperature (not the average of daily maximum and daily minimum). The value at the bottom of the column is the monthly average and that is in accordance with [https://library.wmo.int/doc_num.php?explnum_id=4166 WMO guidance] that says a monthly mean is calculated as "The mean of the daily values throughout the month". Obviously, prior to the end of the month it is mean-so-far! Providing Cumulus is in continuous operation, so the number of measurements in the daily calculation is the same for every day, the average of integrated daily means over month-so-far or whole past month is mathematically the same as an integrated mean calculated from all readings read by Cumulus whether this is for a part current month or for a whole past month.  


The annual averages shown at the bottom of the annual NOAA report do not use these integrated daily means, instead they simply add up the figures in that column. '''Thus, the way that Cumulus 1.9.4 (and Cumulus MX up to and including build 3067) works out all of the annual averages is arithmetrically wrong (the discrepancy varies through the year but is highest in March/April (because February has fewer days).  The yearly average is calculated by adding all the months and then dividing by the number of months. Arithmetrically, the most accurate average is from adding all individual readings and dividing by number of readings (this what Cumulus does in the [[today.ini]] file that holds sum and number of readings. The NOAA reports however read from the [[dayfile.txt|daily log]] so a more accurate annual average can be calculated from adding all the daily averages and dividing by number of days (which is what newer CM builds do).'''
=== Annual NOAA report ===
'''Each monthly line'''
This report shows temperature in its first table, each line shows values calculated from [[dayfile.txt|daily summary log file]],with columns for lowest, average, and highest of those integrated daily mean. For each month line, looking at the corresponding monthly table you can find the same figures. Another column gives the departure from normal; the normal mean temperature is defined for each month on the NOAA setup part of the Cumulus initial configuration, and the annual report takes the immediate preceding (mean) column, subtracts the figure you entered as the normal and shows the difference. Since the monthly mean is calculated in accordance with WMO guidelines, and the normal figure should be, the difference is also in compliance.
 
'''Annual summary line:'''
  The [https://library.wmo.int/doc_num.php?explnum_id=4166 WMO guidlines] say that for a climatic normal over an annual or seasonal period, the mean you quote should be the average of the monthly means you calculated for international exchanged products, but allow "National Meteorological and Hydrological Services [to] weight monthly normals by the number of days in the month when calculating the multimonth normal". In other words, within a nation you can report annual averages calculated using integrated daily means. If you are calculating climate norms for international publication you average the individual months. Put another way, within a nation you can add all the daily average temperature values you have and divide by the number of days (part or full year); for publishing climate norms you add all the monthly average temperatures you have for a past year and divide by 12.
 
For Cumulus users looking at complete ''past years'' the difference between the two approaches just sometimes shows small discrepancies, and those are mainly because of the way Cumulus does its rounding of each daily figure, rather than just rounding final figure. For the ''current year'', especially in Northern Hemisphere Spring, the difference between approaches is seen because February and April have fewer days than January, March, and May, and when you look at a report the current month may have even fewer days. e.g. on 7 March one approach divides by 3, the other by 66 in a non-leap year (31+28+6 completed days) leading to discrepancies, but in the same year on 1 April the first approach is still dividing by 3, but the second approach is dividing by 90. The latter shows little discrepancy because 30 (the 90 quoted divided by the 3 quoted) days is a reasonable average length for a month.
 
From Cumulus ''Version 3.4.4 - Build 3068'' onwards the figures shown at the bottom of the columns in this first table on the annual report shows the '''more accurate annual average calculated from adding all the daily averages and dividing by number of days'''. For Cumulus 1.9.4 (and Cumulus MX up to and including build 3067), the annual averages shown at the bottom of the annual NOAA report do not use these integrated daily means, instead '''the yearly average is calculated by adding all the months and then dividing by the number of months'''.


== Alternatives ==
== Alternatives ==
5,838

edits