Degree Days calculation in NOAA Report

Post Reply
jntkwx
Newbie
Newbie
Posts: 8
Joined: Mon Oct 16, 2017 6:06 pm
Station model: Davis Pro 2
Software: WL-IP

Degree Days calculation in NOAA Report

Post by jntkwx » Mon Oct 16, 2017 8:39 pm

How are the Heating Degree Day and Cooling Degree Day values calculated?

I'm seeing values for Cooling Degree Days and Heating Degree Days existing on the same day. If the calculation is done as the National Weather Service defines it, there should never be values for heating degree days and cooling degree days occurring on the same day:

From http://www.weather.gov/media/btv/degreedays.pdf:
The National Weather Service (NWS) uses the mean of the daily maximum and minimum 24-
hour temperature (Tnws) to determine daily heating or cooling degree days (where Tnws = (Tmax +
Tmin)/2).
For example, in the red box, the 24-hr max temperature was 68, the 24-hr min was 53, and the average (68+53)/2 = 60.5, rounded up to 61. The threshold for both HDD and CDD is 65F. CDD occur when the Tnws is more than 65F, and HDD occur when the Tnws is less than 65F. Notice how even though the max temperature was above 65F,
there are no CDD, because there were HDD instead.
degree_days_NWS.PNG
degree_days_NWS.PNG (17.83 KiB) Viewed 13914 times
But as reported on my standard NOAA Report page (see: http://meteorology.lyndonstate.edu/mete ... rdized.php), and in the screenshot below, on Oct 15, for example, the high was 73.2, and low was 52.9, so the mean (average) was 61.7. Doing the HDD calculation, the HDD value should be (65-61.7)=3.3, rounded down to 3. (It also appears the MEAN TEMP column is not just (Tmax + Tmin)/2, otherwise it would be 63.05F, and not 61.7F.)
meteotemplate_degreedays.PNG
meteotemplate_degreedays.PNG (42.27 KiB) Viewed 13914 times

User avatar
Jachym
Site Admin
Site Admin
Posts: 1686
Joined: Fri Aug 18, 2017 10:12 pm
Location: Brno, Czech Republic
Station model: WH1080
Software: Meteobridge
Contact:

Re: Degree Days calculation in NOAA Report

Post by Jachym » Mon Oct 16, 2017 9:16 pm

Calculating "avg" as (max + min)/2 is IMHO total ignorance of statistics. I know even WU does this and I criticized it many times on other forum. This is not average. Meteotemplate uses the real avg, calculated from all daily values.

User avatar
John B
Forecaster
Forecaster
Posts: 211
Joined: Sun Aug 20, 2017 11:59 pm
Location: Blaxland, N.S.W., Australia
Station model: La Crosse WS2355
Software: Weather Display
Contact:

Re: Degree Days calculation in NOAA Report

Post by John B » Tue Oct 17, 2017 12:07 am

Whilst not being a statistician, or even average (sic) when playing with mathematics, I have to agree with Jáchym on this subject. If there is a genuine reason for reporting an average/mean as merely the maximum and minimum added together and then divided by two I'd like to know it.

Take a class of students sitting an examination. There are twenty of them. 18 get 100% of the questions correct. One gets 85% and the other 30%. By that reckoning the class 'average/mean' is 65%. That is ridiculous - totally meaningless.

User avatar
Jachym
Site Admin
Site Admin
Posts: 1686
Joined: Fri Aug 18, 2017 10:12 pm
Location: Brno, Czech Republic
Station model: WH1080
Software: Meteobridge
Contact:

Re: Degree Days calculation in NOAA Report

Post by Jachym » Tue Oct 17, 2017 10:40 am

Exactly, it is overcast the entire day, temp does not exceed 10°C and ranges between 8 and 12, then suddenly for about half an hour in the afternoon the clouds break and the temperature increases to 16°C. Based on this method, the avg temperature is now 14°C, even though it was only above 12 for a few minutes. If someone thinks this is what average means they should go back to third grade - thats when you learn about averages.

jntkwx
Newbie
Newbie
Posts: 8
Joined: Mon Oct 16, 2017 6:06 pm
Station model: Davis Pro 2
Software: WL-IP

Re: Degree Days calculation in NOAA Report

Post by jntkwx » Tue Oct 17, 2017 12:29 pm

The average discrepancy wasn't the point of my post (though the link I provided: http://www.weather.gov/media/btv/degreedays.pdf does explain the value of using an hourly-updating average (using 24 average temperatures and dividing by 24 hours -- you have to remember that until recently, many official observing locations in the U.S. only reported temperature near the top of the hour, we have the luxury of personal weather stations that update a lot faster than that!)

My point was that there shouldn't be Cooling Degree Day and Heating Degree Day values existing on the same day (per the NWS's definition/calculations), so my question was: how are the heating a cooling degree days values calculated?

User avatar
Jachym
Site Admin
Site Admin
Posts: 1686
Joined: Fri Aug 18, 2017 10:12 pm
Location: Brno, Czech Republic
Station model: WH1080
Software: Meteobridge
Contact:

Re: Degree Days calculation in NOAA Report

Post by Jachym » Tue Oct 17, 2017 12:35 pm

OK, I see:

Code: Select all

if($minimum>$baseT){
			$hdd = 0;
		}
		if($hdd==9999 && $average>$baseT){
			$hdd = ($baseT-$minimum)/4;
		}
		if($hdd==9999 && $maximum>=$baseT){
			$hdd = ($baseT-$minimum)/2 - ($maximum-$baseT)/4;
		}
		if($hdd==9999 && $maximum<$baseT){
			$hdd = $baseT-$average;
		}
		$data[$row['Day(DateTime)']]['HDD'] = $hdd;
		$data['month']['HDD'][] = $hdd;

		if($maximum<$baseT){
			$cdd = 0;
		}
		if($cdd==9999 && $average<$baseT){
			$cdd = ($maximum-$baseT)/4;
		}
		if($cdd==9999 && $minimum<=$baseT){
			$cdd = ($maximum-$baseT)/2 - ($baseT-$minimum)/4;
		}
		if($cdd==9999 && $minimum>$baseT){
			$cdd = $average-$baseT;
		}
		$data[$row['Day(DateTime)']]['CDD'] = $cdd;
		$data['month']['CDD'][] = $cdd;

jntkwx
Newbie
Newbie
Posts: 8
Joined: Mon Oct 16, 2017 6:06 pm
Station model: Davis Pro 2
Software: WL-IP

Re: Degree Days calculation in NOAA Report

Post by jntkwx » Thu Oct 19, 2017 2:19 pm

Thank you, that's very helpful. These are the sections of that code I'm most interested in:

Code: Select all

if($minimum>$baseT){
			$hdd = 0;
		}

Code: Select all

if($maximum<$baseT){
			$cdd = 0;
		}
Can we agree that hdd and cdd values should not both exist on the same day? Either a HDD or a CDD exists, but not both for the same day, according to NWS definition. I think the problem here is the hdd and cdd values are dependent upon how the cdd and hdd values are summed over time (how are $minimum and $maximum defined? are they running averages for the day?) - if this is true, this causes hdd values and cdd values to exist simultaneously if the average $minimum temperature is below the $baseT and the average $maximum is above the $baseT.

User avatar
Jachym
Site Admin
Site Admin
Posts: 1686
Joined: Fri Aug 18, 2017 10:12 pm
Location: Brno, Czech Republic
Station model: WH1080
Software: Meteobridge
Contact:

Re: Degree Days calculation in NOAA Report

Post by Jachym » Thu Oct 19, 2017 2:23 pm

Yes, max/min/avg are grouped by days

jntkwx
Newbie
Newbie
Posts: 8
Joined: Mon Oct 16, 2017 6:06 pm
Station model: Davis Pro 2
Software: WL-IP

Re: Degree Days calculation in NOAA Report

Post by jntkwx » Mon Oct 23, 2017 7:18 pm

Jachym wrote: Thu Oct 19, 2017 2:23 pm Yes, max/min/avg are grouped by days
Ok, the point I'm trying to get across is that HDD and CDD can't both exist, by definition, on the same day.

I think this is the logic you were trying to apply by specifying

Code: Select all

if($minimum>$baseT){
                        $hdd = 0;
}
But $hdd should always be 0 when $minimum>$baseT
And $cdd should always be 0 when $maximum<$baseT

How to ensure the always part? I think you have to use $average instead of $minimum or $maximum:

Code: Select all

if($average>$baseT){
                        $hdd = 0;
}

if($average<$baseT){
                        $hdd = 0;
}

wx_jon
Advisor
Advisor
Posts: 52
Joined: Tue Aug 29, 2017 8:54 pm
Location: Seattle, WA, USA
Station model: Davis Vantage Pro 2 Plus
Software: weeWX
Contact:

Re: Degree Days calculation in NOAA Report

Post by wx_jon » Tue Nov 07, 2017 10:54 pm

Yes, in the strictest sense, HDDs and CDDs should only be calculated by the average temperature of the day, hence one or the other must be zero. By calculating both by the amount of time above or below the threshold, the total yearly or historical numbers of HDDs and CDDs will be inflated, although the difference between them will probably not be.

A quick word about the (max + min) / 2 calculation... The NWS likely does that because historical archives, until recently, did not actually record the average temperature of a day. Since the average of the max and min is nearly always very close to the actual average of the day, it is a good estimate for the purposes of calculating long-term historical statistics on HDDs and CDDs.

Post Reply