weatherlinguist

Wettest year in Denmark

The past 12 months have been the wettest ever registered in Denmark, according to a recent report by the Danish Meteorological Institute. There's been 1125 mm of precipitation between July 2023 and July 2024. For comparison, this plot from DMI shows on the left the wettest 12 months ever from jan-dec coming out at 1675 mm. 12_og_12

Rain statistics. Source: DMI (link above).

The average rain from 1991-2020 is also shown in the figure above for comparison (759 mm). This is an immense increase in precipitation. Things are so wet that it is even difficult to finish houses(construction does not get enough time to dry).

On the other hand, May was warmer than June for the first time in 150 years!.

I wanted to check the precipitation numbers myself, so I used the openmeteo API to get some precipitation data.

def get_precipitation_data(latitude, longitude, start_date, end_date):
    base_url = "https://archive-api.open-meteo.com/v1/archive"

    params = {
        "latitude": latitude,
        "longitude": longitude,
        "start_date": start_date,
        "end_date": end_date,
        "daily": "precipitation_sum",
        "timezone": "Europe/Copenhagen"
    }

    response = requests.get(base_url, params=params)

    if response.status_code == 200:
        data = response.json()
        df = pd.DataFrame({
            'date': data['daily']['time'],
            'precipitation': data['daily']['precipitation_sum']
        })
        df['date'] = pd.to_datetime(df['date'])
        df.set_index('date', inplace=True)
        return df
    else:
        print(f"Error: {response.status_code}")
        return None


def get_yearly_precipitation(df):
    # Resample to yearly data
    yearly_data = df.resample('Y').sum()
    yearly_data['year'] = yearly_data.index.year

    # Sort years from driest to wettest
    yearly_data_sorted = yearly_data.sort_values('precipitation')

    return yearly_data_sorted

# Approximate center coordinates of Denmark
latitude = 56.2639  # Denmark
longitude = 9.5018
#Set date range for 1991-2020
start_date = "1991-01-01"
end_date = "2020-12-31"
precipitation_data = get_precipitation_data(latitude, longitude, start_date, end_date)
# Calculate the climate normal (1991-2020 average)
climate_normal = calculate_climate_normal(precipitation_data)
print(f"Average yearly precipitation (1991-2020): {climate_normal:.2f} mm")

Using openmeteo I get an average yearly precipitation for the period (1991-2020) of 757.60 mm, which is surprisingly close to the DMI number shown in the plot (759 mm). This gives me some confidence on the reliability of this open data source. Plotting all the years from 1991 until present, but now ordering them by amount of precipitation we can see in the plot below that the top 3 wettest years have occurred in the last 10 years! I am showing all years of the last decade in red and ordering the bars in increasing order for clarity. Five of the last years are in the top five as well.

denmark_ordered_yearly_precipitation_1991_2024

Rain amount per year, ordered from driest to wettest. The last 10 years are shown in red. Source: openmeteo data.

Note that the rain data provided by openmeteo is not only observational data, but a post-processed product. According to their website:

The Historical Weather API is based on reanalysis datasets and uses a combination of weather station, aircraft, buoy, radar, and satellite observations to create a comprehensive record of past weather conditions. These datasets are able to fill in gaps by using mathematical models to estimate the values of various weather variables. As a result, reanalysis datasets are able to provide detailed historical weather information for locations that may not have had weather stations nearby, such as rural areas or the open ocean.

I will write a post in the future about open data sources of observational, as opposed to the more common reanalysis datasets.