-
-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
✨ climate: harmonize charts on temperature anomalies #4042
base: master
Are you sure you want to change the base?
Changes from all commits
547aa33
3eae92d
40de3c7
0a491e5
7882fd8
db86185
158ac3a
535c159
9dc60af
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
definitions: | ||
common: | ||
description_from_producer: |- | ||
The 1961-90 period is most often used as a baseline because it is the period recommended by the World Meteorological Organisation. In some cases other periods are used. For global average temperatures, an 1861-1890 period is sometimes used to show the warming since the "pre-industrial" period. | ||
description_processing: |- | ||
Annual sea surface anomalies were calculated by averaging the monthly anomalies in a given year. | ||
|
||
We switch from using 1961-1990 to using 1861-1890 as our baseline to better show how temperatures have changed since pre-industrial times. For each region, we calculate the mean temperature anomalies for 1961–1990 and for 1861–1890. The difference between these two means serves as the adjustment factor. This factor is applied uniformly to both the temperature anomalies and the confidence intervals to ensure that both the central values and the associated uncertainty bounds are correctly shifted relative to the new 1861–1890 baseline. | ||
processing_level: major | ||
unit: °C | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we usually use "degrees Celsius" for unit. |
||
short_unit: °C | ||
display: | ||
numDecimalPlaces: 1 | ||
presentation: | ||
topic_tags: | ||
- Climate Change | ||
grapher_config: | ||
note: The period 1861–1890 is used as the baseline to measure temperature changes relative to pre-industrial times, [as recommended by climate research institutions](https://www.metoffice.gov.uk/hadobs/indicators/index.html#:~:text=The%201961%2D90%20period%20is,other%20parts%20of%20the%20world.). | ||
|
||
dataset: | ||
title: Sea surface temperature - annual | ||
update_period_days: 60 | ||
|
||
tables: | ||
sea_surface_temperature: | ||
variables: | ||
sea_temperature_anomaly: | ||
title: Annual sea surface temperature anomalies | ||
description_short: The deviation of the average sea surface temperature measured at a nominal depth of 20cm from the 1861-1890 mean, in degrees Celsius. | ||
description_key: | ||
- Temperature anomalies show how many degrees Celsius temperatures have changed compared to the 1861-1890 period. This baseline period is commonly used to highlight the changes in temperature since pre-industrial times, prior to major human impacts. | ||
- The data includes separate measurements for the Northern and Southern Hemispheres, which helps researchers analyze regional differences. | ||
- This data is based on the HadISST method. This method averages temperature measurements onto a fixed grid. If no data is available for a grid cell, it remains empty and adds extra uncertainty when calculating averages like the global mean. | ||
- Despite different approaches, HadISST and other methods show similar global temperature trends. | ||
sea_temperature_anomaly_low: | ||
title: Annual sea surface temperature anomalies (lower bound) | ||
description_short: The lower bound, defined as the 95% confidence interval for the annual sea surface temperature anomalies, represents the deviation of the average sea surface temperature measured at a nominal depth of 20 cm from the 1861–1890 mean, in degrees Celsius. | ||
description_key: | ||
- The lower bound is the 95% confidence interval for the annual sea surface temperature anomalies. It represents the range of values within which the true value is expected to fall with 95% certainty. | ||
sea_temperature_anomaly_high: | ||
title: Annual sea surface temperature anomalies (upper bound) | ||
description_short: The upper bound, defined as the 95% confidence interval for the annual sea surface temperature anomalies, represents the deviation of the average sea surface temperature measured at a nominal depth of 20 cm from the 1861–1890 mean, in degrees Celsius. | ||
description_key: | ||
- The upper bound is the 95% confidence interval for the annual sea surface temperature anomalies. It represents the range of values within which the true value is expected to fall with 95% certainty. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
"""Load a meadow dataset and create a garden dataset.""" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Instead of creating a new dataset, I think it would be more convenient to create a new table inside the already existing |
||
|
||
import pandas as pd | ||
|
||
from etl.helpers import PathFinder, create_dataset | ||
|
||
# Get paths and naming conventions for current step. | ||
paths = PathFinder(__file__) | ||
|
||
|
||
def run(dest_dir: str) -> None: | ||
# | ||
# Load inputs. | ||
# | ||
# Load garden dataset and read its main table. | ||
ds_garden = paths.load_dataset("sea_surface_temperature") | ||
tb = ds_garden.read("sea_surface_temperature") | ||
|
||
# | ||
# Process data. | ||
# | ||
# Extract year from date column | ||
tb["year"] = pd.to_datetime(tb["date"]).dt.year | ||
|
||
# Compute annual averages | ||
tb = tb.groupby(["year", "location"], as_index=False).agg( | ||
{ | ||
"sea_temperature_anomaly": "mean", | ||
"sea_temperature_anomaly_low": "mean", | ||
"sea_temperature_anomaly_high": "mean", | ||
} | ||
) | ||
|
||
# Set an appropriate index and sort conveniently. | ||
tb = tb.format(["location", "year"]) | ||
|
||
# | ||
# Save outputs. | ||
# | ||
# Create a new garden dataset with the combined table. | ||
ds_garden = create_dataset(dest_dir, tables=[tb], check_variables_metadata=True) | ||
ds_garden.save() |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,26 @@ | ||
definitions: | ||
common: | ||
presentation: | ||
topic_tags: | ||
- Climate Change | ||
description_short: |- | ||
The deviation of the average land-sea surface temperature from the 1880-1900 mean, in degrees Celsius. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we can omit the "The" at the beginning of subtitles. |
||
description_key: | ||
- Temperature anomalies show how many degrees Celsius temperatures have changed compared to the 1880-1900 period. | ||
- While 1861–1890 baseline period is commonly used to highlight the changes in temperature since pre-industrial times, here we use 1880–1900 instead, as monthly data on temperature anomalies in this dataset is only available from 1880. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. "While a 1861-1890 baseline period..." |
||
- Temperature averages and anomalies are calculated over all land and ocean surfaces. | ||
- The data includes separate measurements for the Northern and Southern Hemispheres, which helps researchers analyze regional differences. | ||
- This data is based on the GISS method which estimates temperatures in areas without data by using information from nearby locations within 1200 kilometers. This is especially useful in the Arctic and Antarctic, where measurements are sparse. | ||
- Despite different approaches, GISS and other methods show similar global temperature trends. | ||
description_processing: |- | ||
We switch from using 1951-1980 to using 1880-1900 as our baseline to better show how temperatures have changed since pre-industrial times. For each region, we calculate the mean temperature anomalies for 1961–1990 and for 1880-1900. The difference between these two means serves as the adjustment factor. This factor is applied uniformly to both the temperature anomalies and the confidence intervals to ensure that both the central values and the associated uncertainty bounds are correctly shifted relative to the new 1880-1900 baseline. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I find this explanation a bit confusing: the original data used 1951-1980 as baseline, but to compute the adjustment factors you refer to the average of 1961-1990 (I haven't looked at the code yet, maybe it becomes clearer later). |
||
processing_level: major | ||
unit: °C | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think in other charts we usually use "degrees Celsius" as unit, and "ºC" as short unit. |
||
short_unit: °C | ||
display: | ||
numDecimalPlaces: 1 | ||
presentation: | ||
topic_tags: | ||
- Climate Change | ||
grapher_config: | ||
note: Because observations start in 1880, the 1880–1900 period is used as the baseline for measuring temperature changes relative to pre-industrial times instead of the standard 1861–1890 period [recommended by climate research institutions](https://www.metoffice.gov.uk/hadobs/indicators/index.html#:~:text=The%201961%2D90%20period%20is,other%20parts%20of%20the%20world.). | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe "standard" is not the right word, as they point out that different baselines are often used. Instead, maybe "conventional" or "commonly used"? |
||
|
||
dataset: | ||
title: GISS surface temperature analysis | ||
|
@@ -12,9 +30,5 @@ tables: | |
surface_temperature_analysis: | ||
variables: | ||
temperature_anomaly: | ||
title: "Global warming: monthly temperature anomaly" | ||
description_short: |- | ||
Combined land-surface air and sea-surface water temperature anomaly, given as the deviation from the 1951-1980 mean, in degrees Celsius. | ||
unit: °C | ||
short_unit: °C | ||
processing_level: minor | ||
title: "Global warming: monthly temperature anomalies" | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We usually start description processing as bullet points (to clarify, it should be a string where each paragraph starts with "-").