Degree Day Weather API

Degree days are a standardized method to calculate the total heat or warmth a location has experienced. They are used in agriculture and gardening to estimate the growth stages of plants and phenology. Degree days can be also be used in building construction and maintenance as a way to estimate the heating and cooling needs of a building.

The Degree Days Weather API is available in the Corporate plan. To sign up, visit our Weather Data Services page.

For more detailed information on degree days and their usage, see our degree days information.

For sample code using the degree day API, please see the code samples in our Github repository.

The Timeline Weather API also supports basic degree day information. For more information, please see the API documentation.

Degree Day Calculations

Simple Average Calculation

By default we use a simple average calculation. The simple average degree days for a particular day is calculated using the following formula:

Mean temperature=(maximum temperature+minimum temperature)/2
Degree days=Mean Temperature-Base Temperature

The base temperature can differ depending on the use case. For example, the growing degree days for growing corn often use a base temperature of 50F. For cooling degree days (sometimes abbreviated CDD) , a base temperature of 65F commonly used.

In some application, such as growing degree days (often abbreviated GDD) , temperatures above a certain value are considered the same as a fixed maximum. This may be because a plant will grow faster with warmer temperatures but after the temperature increases too much, no additional growth benefits will be seen. This value is the maximum threshold – any temperature above the maximum temperature threshold will be treated as the maximum threshold temperature.

Finally, heating degree days (HDD) are calculated as the inverse of growing degree days. There are more heating degree days for days with colder mean temperatures.

 Heating Degree days=Base Temperature-Mean Temperature

The base temperature for heating degree days is typically 65F. Therefore heating degree days increases as the mean daily temperature drops.

Sine and triangle calculations

In addition to the simple average, the degree day API also supports sine and triangle calculation methods for degree days. These can be augmented to their double sine and double triangle methods to combine the low temperature for the current and following day for higher accuracy.

Degree Day API Reference

The degree day API offers the following parameters:

location – A single address or latitude, longitude value indicating the location for which you would like degree day information

unitGroup – The system of units used for the output data.
Supported values are us, uk, metric, and base. See Unit groups and measurement units for more information.

degreeDayStats – Whether or not to include the maximum, minimum and mean degree day values (true or false)

degreeDayTempFix – The temperature at which to start the degree day season if no season start and end dates are specified. For example, if the fix temperature is 32F (OC), then the cumulative degree days will reset to zero on the last 32F temperature of the winter. This defines the growing season for growing degree days. Defaults to 32F/0C if not specified and no start and end dates are specified

degreeDayStartDate – Fixes the start of the degree day season based on fixed dates of the format yyyy-M-d (eg 1990-3-1 for 1st March). Default=not specified.

degreeDayEndDate – Fixes the end of the degree day season based on fixed dates of the format yyyy-M-d (eg 1990-3-1 for 1st March). Default=not specified.

degreeDayTempMaxThreshold – Defines the maximum temperature that is considered for the calculation. Any temperature above this temperature will be set to the maximum threshold temperature. Default value=not set.

degreeDayTempBase – The degree day base temperature. Default value is set to 10C/50F

degreeDayInverse – Calculate the inverse degree days so colder temperatures contribute more degree days. Used for heating degree days. Default=false.

minYear – When calculating statistics, the minimum year to include in the statistics. (default current year minus 30 years)

degreeDayFocusYear – The year for which to calculate the main degree day value. (default = current year)

degreeDayMethod (beta) – The method used for calculating the degree days. Values include average, sine, doublesine, triangle and doubletriangle. Default value is set to average.

Result format

The degree output is available as a CSV or JSON output with the following structure:

Date – the date of the information for the focus year

mint – the minimum temperature on that day

maxt – the maximum temperature on that day

degreedays – the number of degree days for that day only

cumulativedegreedays – the number of degree days from the start of the season up to and including the current day

mincumulativedegreedays – when statistics are included, the minimum cumulative degree days that occurred by this day on any year

maxcumulativedegreedays – when statistics are included, the mean cumulative degree days that occurred by this day.

meancumulativedegreedays – when statistics are included, the maximum cumulative degree days that occurred by this day on any year

Example output:


Usage Examples

Basic request,VA&key=YOUR_API_KEY

This will request the degree days for the requested location using the default base temperature of 50F/10C and the season will start on the day after the last day with below freezing temperatures.

Sine calculation method request,VA&degreeDayMethod=sine&key=YOUR_API_KEY

The “degreeDayMethod” parameter is added to change the default calculation method.

Corn Growing degree days request 86&degreeDayTempBase=50&shortColumnNames=true&location=Herndon,VA&key=YOUR_API_KEY

Similar to the above, this defines the base growing temperature of 50F using the “degreeDayTempBase” parameter. The maximum growing temperature of 86F is set using the “degreeDayTempMaxThreshold” parameter.

Heating Degree Days /VisualCrossingWebServices/rest/services/weatherdata/degreedays?&unitGroup=us&degreeDayStats=false&degreeDayStartDate=2020-7-1&degreeDayEndDate=2020-6-30&degreeDayTempBase=65&degreeDayInverse=true&degreeDayFocusYear=2019&shortColumnNames=true&location=Herndon,VA&key=YOUR_API_KEY 

In this case, the degreeDayInverse parameter has been set to true. This means that the API will calculate heating degree days. In addition, to define the heating season to cross a year boundary the year, we set explicit start and end dates.