How to run the CMIP7 ScenarioMIP workflow¶
Here we demonstrate how to run the workflow that was used in CMIP7's ScenarioMIP.
Note: this is not yet complete, we will add further steps in future.
Imports¶
import multiprocessing
import os
import platform
from functools import partial
from pathlib import Path
import openscm_units
import pandas_indexing as pix
import pandas_openscm
import pint
import seaborn as sns
from pandas_openscm.io import load_timeseries_csv
import gcages.cmip7_scenariomip.pre_processing.reaggregation.basic
from gcages.cmip7_scenariomip.harmonisation import (
create_cmip7_scenariomip_global_harmoniser,
)
from gcages.cmip7_scenariomip.infilling import CMIP7ScenarioMIPInfiller
from gcages.cmip7_scenariomip.post_processing import CMIP7ScenarioMIPPostProcessor
from gcages.cmip7_scenariomip.pre_processing import CMIP7ScenarioMIPPreProcessor
from gcages.cmip7_scenariomip.scm_running import CMIP7ScenarioMIPSCMRunner
from gcages.index_manipulation import split_sectors
# Setup pint
pint.set_application_registry(openscm_units.unit_registry)
pandas_openscm.register_pandas_accessors()
Starting point¶
The starting point is an emissions scenario submission.
This must be in a format like the below,
i.e. a pandas DataFrame with a MultiIndex with levels:
["model", "scenario", "region", "variable", "unit"]
and years as the columns.
Naming conventions and reporting¶
The naming convention and reporting rules are specific to CMIP7's ScenarioMIP. These are quite complex and not a solid target. As a result, there aren't super clear docs. Our best advice is to use an existing submission as an example, or simply try using one of the different reaggregators (see below) and let its error messages guide you through what else is needed.
Here we use the 'basic' naming convention. An example of the data required when using this convention is provided below (it is based on some example data we use for testing, because it requires reporting thousands of timeseries so writing it by hand would be hard work). The example data does not contain all possible timeseries that can be reported, rather just a selection useful for this example (again, a discussion of the complete reporting rules is out of scope here, docs specifically on this to come we hope).
EXAMPLE_INPUT_FILE = Path(
"tests/regression/cmip7-scenariomip/test-data/salted-202507-scenariomip-input.csv"
)
start = load_timeseries_csv(
EXAMPLE_INPUT_FILE,
index_columns=["model", "scenario", "region", "variable", "unit"],
out_columns_type=int,
out_columns_name="year",
)
relplot_in_emms = partial(
sns.relplot,
kind="line",
linewidth=2.0,
alpha=0.7,
facet_kws=dict(sharey=False),
x="year",
y="value",
col="variable",
col_wrap=3,
)
data = start.openscm.to_long_data(time_col_name="year")
data = data[
data["variable"].isin(
[
"Emissions|CO2",
"Emissions|CH4",
"Emissions|Sulfur",
"Emissions|BC",
"Carbon Removal|Geological Storage|Biomass",
"Carbon Removal|Geological Storage|Direct Air Capture",
"Carbon Removal|Enhanced Weathering",
]
)
& (data["region"].isin(["World"]) | data["region"].str.startswith("model_1"))
]
fg = sns.relplot(
data=data,
hue="region",
style="scenario",
kind="line",
linewidth=2.0,
alpha=0.7,
facet_kws=dict(sharey=False),
x="year",
y="value",
col="variable",
col_wrap=2,
)
for ax in fg.axes.flatten():
if "CO2" in ax.get_title():
ax.axhline(0.0, linestyle="--", color="gray")
else:
ax.set_ylim(ymin=0.0)
Pre-process¶
The first step is pre-processing the emissions scenario(s) to compile the sectors which are used for gridding. This step also produces data sets that can be used with the 'standard' global-only workflows.
Re-aggregator¶
The major challenge in processing is knowing which re-aggregator to use. At present, we only support one re-aggregation method, but we may need to support more in future, hence this idea.
For this data, we need to use the basic ReaggregatorBasic class.
When initialising our re-aggregator,
we also need to tell it which model regions to use
(models often report data in aggregate regions too,
and we need to make sure this doesn't trip things up).
model_regions = [
r
for r in start.index.get_level_values("region").unique()
if r.startswith("model_1")
]
reaggregator = (
gcages.cmip7_scenariomip.pre_processing.reaggregation.basic.ReaggregatorBasic(
model_regions=model_regions
)
)
Pre-processor¶
Having defined our re-aggregator, we can initialise our pre-processor and do the pre-processing.
pre_processor = CMIP7ScenarioMIPPreProcessor(
reaggregator=reaggregator,
n_processes=None, # run serially
run_checks=True,
)
res_pre_processed = pre_processor(start)
/home/docs/checkouts/readthedocs.org/user_builds/gcages/envs/latest/lib/python3.11/site-packages/tqdm/auto.py:21: TqdmWarning: IProgress not found. Please update jupyter and ipywidgets. See https://ipywidgets.readthedocs.io/en/stable/user_install.html from .autonotebook import tqdm as notebook_tqdm
0it [00:00, ?it/s]
1it [00:00, 3.11it/s]
1it [00:00, 3.10it/s]
As an aside, it is possible to let gcages guess the re-aggregator to use, it's also more confusing when it goes wrong though.
pre_processor_guess_reaggregator = CMIP7ScenarioMIPPreProcessor(
# Don't specifiy the re-aggregator, let gcages guess
# reaggregator=reaggregator,
n_processes=None, # run serially
run_checks=True,
)
# The guessing is not so intelligent
# (it can't figure out which regions are model native and which aren't by itself),
# so we need to give it a hand
# by stripping out everything except 'World' data
# and model-region data
# (removing all other regional aggregations).
start_guessable = start.loc[
(start.index.get_level_values("region") == "World")
| start.index.get_level_values("region").str.startswith("model_1")
]
# The result is the same as the above
_ = pre_processor_guess_reaggregator(start_guessable)
0it [00:00, ?it/s]
1it [00:00, 3.27it/s]
1it [00:00, 3.26it/s]
Results¶
The result contains a few pieces of information.
Global workflow emissions¶
The first bit of information is data which can be used with the global workflow.
fg = sns.relplot(
data=res_pre_processed.global_workflow_emissions.openscm.to_long_data(
time_col_name="year"
),
hue="scenario",
kind="line",
linewidth=2.0,
alpha=0.7,
facet_kws=dict(sharey=False),
x="year",
y="value",
col="variable",
col_order=sorted(
res_pre_processed.global_workflow_emissions.index.get_level_values(
"variable"
).unique()
),
col_wrap=4,
height=3.0,
aspect=1.0,
)
for ax in fg.axes.flatten():
if "CO2" in ax.get_title():
ax.axhline(0.0, linestyle="--", color="gray")
else:
ax.set_ylim(ymin=0.0)
Gridding workflow emissions¶
The second bit of information is data which can be used with the gridding workflow. This contains data at the region-sector level for a specific set of sectors.
data = split_sectors(
res_pre_processed.gridding_workflow_emissions
).openscm.to_long_data(time_col_name="year")
species_to_plot = "CO2"
data = data[data["species"] == species_to_plot]
# data = data[data["sectors"] == "Energy Sector"]
fg = sns.relplot(
data=data,
style="scenario",
style_order=sorted(data["scenario"].unique()),
hue="sectors",
hue_order=sorted(data["sectors"].unique()),
col="region",
col_order=sorted(data["region"].unique()),
kind="line",
linewidth=2.0,
alpha=0.7,
facet_kws=dict(sharey=False),
x="year",
y="value",
col_wrap=3,
height=4.0,
aspect=1.0,
)
for ax in fg.axes.flatten():
ax.axhline(0.0, linestyle="--", color="gray")
fg.fig.suptitle(species_to_plot, y=1.02)
Text(0.5, 1.02, 'CO2')
As part of this reporting, we also show which timeseries were assumed to be zero during the processing. (Lots of assumptions are not an issue, we simply include this for clarity and transparency.)
Harmonisation¶
The next step is harmonisation. This is the process of aligning the scenarios with historical emissions estimates. We do this at both the global level and the level used for gridding.
Historical emissions aligned with the rest of the CMIP7 exercise are used for this. These were processed in this repository: https://github.com/iiasa/emissions_harmonization_historical and are archived at https://zenodo.org/records/17845154.
Under the hood, the harmonisation uses the aneris package.
Global¶
CMIP7_SCENARIOMIP_GLOBAL_HISTORICAL_EMISSIONS_FILE = Path(
"tests/regression/cmip7-scenariomip/cmip7-scenariomip-workflow-inputs/history_cmip7_scenariomip.csv"
)
ANERIS_GLOBAL_OVERRIDES_FILE = Path(
"tests/regression/cmip7-scenariomip/cmip7-scenariomip-workflow-inputs/aneris-overrides-global.csv"
)
harmoniser_global = create_cmip7_scenariomip_global_harmoniser(
cmip7_scenariomip_global_historical_emissions_file=CMIP7_SCENARIOMIP_GLOBAL_HISTORICAL_EMISSIONS_FILE,
aneris_global_overrides_file=ANERIS_GLOBAL_OVERRIDES_FILE,
n_processes=None, # run serially for this demo
)
harmonised_global = harmoniser_global(res_pre_processed.global_workflow_emissions)
harmonised_global
Scenarios to harmonise: 0it [00:00, ?it/s]
INFO:root:Harmonizing with reduce_ratio_2080
INFO:root:Harmonizing with reduce_offset_2150_cov
Scenarios to harmonise: 1it [00:00, 2.20it/s]
Scenarios to harmonise: 1it [00:00, 2.20it/s]
| year | 2023 | 2024 | 2025 | 2026 | 2027 | 2028 | 2029 | 2030 | 2031 | 2032 | ... | 2091 | 2092 | 2093 | 2094 | 2095 | 2096 | 2097 | 2098 | 2099 | 2100 | ||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| model | scenario | region | variable | unit | |||||||||||||||||||||
| model_1 | SSP1 - Low Emissions | World | Emissions|BC | Mt BC/yr | 7.219245 | 7.144170 | 7.069115 | 6.600127 | 6.131266 | 5.662533 | 5.193926 | 4.725447 | 4.630838 | 4.536256 | ... | 1.985668 | 1.982659 | 1.979650 | 1.976642 | 1.973633 | 1.970625 | 1.967616 | 1.964607 | 1.961599 | 1.958590 |
| Emissions|CH4 | Mt CH4/yr | 363.489901 | 365.526092 | 367.565757 | 355.928260 | 344.265560 | 332.577658 | 320.864553 | 309.126246 | 300.639794 | 292.134973 | ... | 132.359170 | 130.664527 | 128.969883 | 127.275240 | 125.580596 | 123.885953 | 122.191309 | 120.496666 | 118.802023 | 117.107379 | |||
| Emissions|CO | Mt CO/yr | 774.053434 | 774.666130 | 775.256992 | 724.758119 | 673.815787 | 622.429994 | 570.600742 | 518.328030 | 509.817833 | 501.221767 | ... | 347.673297 | 348.702968 | 349.732638 | 350.762309 | 351.791979 | 352.821649 | 353.851320 | 354.880990 | 355.910661 | 356.940331 | |||
| Emissions|NH3 | Mt NH3/yr | 69.113401 | 69.584726 | 70.051607 | 69.079299 | 68.111815 | 67.149154 | 66.191318 | 65.238306 | 63.677284 | 62.125110 | ... | 21.296855 | 20.939381 | 20.581906 | 20.224432 | 19.866958 | 19.509483 | 19.152009 | 18.794534 | 18.437060 | 18.079586 | |||
| Emissions|NOx | Mt NO2/yr | 127.510494 | 122.853346 | 118.219603 | 110.532086 | 102.884767 | 95.277648 | 87.710727 | 80.184006 | 78.589364 | 77.002322 | ... | 35.380763 | 35.193219 | 35.005675 | 34.818131 | 34.630588 | 34.443044 | 34.255500 | 34.067956 | 33.880412 | 33.692869 | |||
| Emissions|OC | Mt OC/yr | 34.147891 | 34.304770 | 34.461479 | 32.212148 | 29.965001 | 27.720038 | 25.477258 | 23.236662 | 22.787355 | 22.338477 | ... | 12.146310 | 12.190877 | 12.235444 | 12.280011 | 12.324578 | 12.369145 | 12.413712 | 12.458280 | 12.502847 | 12.547414 | |||
| Emissions|SOx | Mt SO2/yr | 71.902038 | 69.148596 | 66.420641 | 62.236616 | 58.094191 | 53.993366 | 49.934143 | 45.916520 | 44.113645 | 42.328073 | ... | 14.818543 | 14.779546 | 14.740548 | 14.701550 | 14.662553 | 14.623555 | 14.584558 | 14.545560 | 14.506562 | 14.467565 | |||
| Emissions|NMVOC | Mt VOC/yr | 191.244286 | 190.557045 | 189.869826 | 174.813753 | 159.758163 | 144.703056 | 129.648433 | 114.594292 | 112.251944 | 109.909671 | ... | 61.627644 | 61.896796 | 62.165949 | 62.435102 | 62.704254 | 62.973407 | 63.242559 | 63.511712 | 63.780864 | 64.050017 | |||
| Emissions|N2O | kt N2O/yr | 11289.003671 | 11418.909664 | 11548.313212 | 11339.894890 | 11132.116080 | 10924.976783 | 10718.476998 | 10512.616726 | 10265.983337 | 10020.130856 | ... | 3867.749693 | 3814.733648 | 3761.717603 | 3708.701558 | 3655.685513 | 3602.669468 | 3549.653423 | 3496.637378 | 3443.621333 | 3390.605287 | |||
| Emissions|CO2|Fossil | Mt CO2/yr | 38712.217040 | 39021.233879 | 39330.487888 | 38844.085817 | 38357.277992 | 37870.064412 | 37382.445077 | 36894.419988 | 35372.834524 | 33850.010402 | ... | -608.686933 | -750.368775 | -892.050616 | -1033.732458 | -1175.414299 | -1317.096140 | -1458.777982 | -1600.459823 | -1742.141664 | -1883.823506 | |||
| Emissions|CO2|Biosphere | Mt CO2/yr | 3627.550667 | 3351.646901 | 3075.743135 | 2812.000589 | 2548.258043 | 2284.515497 | 2020.772951 | 1757.030406 | 1452.976240 | 1148.922074 | ... | -3178.876123 | -3227.579799 | -3276.283475 | -3324.987151 | -3373.690827 | -3422.394503 | -3471.098178 | -3519.801854 | -3568.505530 | -3617.209206 |
11 rows × 78 columns
You can see the modification to the pathways as a result of the harmonisation in the plot below.
pdf = (
pix.concat(
[
res_pre_processed.global_workflow_emissions.pix.assign(
stage="pre_processed"
),
harmonised_global.pix.assign(stage="harmonised"),
harmoniser_global.historical_emissions.pix.assign(
stage="history", scenario="history", model="history"
).loc[
pix.isin(
variable=res_pre_processed.global_workflow_emissions.pix.unique(
"variable"
)
)
],
]
)
.melt(ignore_index=False, var_name="year")
.reset_index()
)
fg = relplot_in_emms(
data=pdf,
hue="scenario",
style="stage",
dashes={
"history": (1, 1),
"pre_processed": (3, 3),
"harmonised": "",
},
)
fg.axes.flatten()[0].axhline(0.0, linestyle="--", color="gray")
fg.axes.flatten()[1].set_ylim(ymin=0.0)
(0.0, 406.88376766567256)
Region-sector (i.e. gridding level)¶
# TBD
You can see the modification to the pathways as a result of the harmonisation in the plot below. Here we obviously only show a selection of timeseries.
# pdf = (
# pix.concat(
# [
# pre_processed.pix.assign(stage="pre_processed"),
# harmonised.pix.assign(stage="harmonised"),
# harmoniser.historical_emissions.pix.assign(
# stage="history", scenario="history", model="history"
# ).loc[pix.isin(variable=pre_processed.pix.unique("variable"))],
# ]
# )
# .melt(ignore_index=False, var_name="year")
# .reset_index()
# )
# fg = relplot_in_emms(
# data=pdf,
# hue="scenario",
# style="stage",
# dashes={
# "history": (1, 1),
# "pre_processed": (3, 3),
# "harmonised": "",
# },
# )
# fg.axes.flatten()[0].axhline(0.0, linestyle="--", color="gray")
# fg.axes.flatten()[1].set_ylim(ymin=0.0)
Infilling¶
The next step is infilling. This is the process of inferring any emissions which are not included in the scenarios, but are needed for running climate models. In our example, this is things like CFC11, CFC12 and other gases covered under the Montreal Protocol and other greenhouse gases with a warming impact much smaller than the ones already included.
In CMIP7 ScenarioMIP, a specific infilling database was used. You can see where it is archived below.
Under the hood, the AR6 infilling uses the silicone package.
BASE_DIR = Path("tests/regression/cmip7-scenariomip/cmip7-scenariomip-workflow-inputs")
CMIP7_SCENARIOMIP_INFILLING_FILE = BASE_DIR / "infilling_db_cmip7_scenariomip.csv"
GHG_INVERSION_FILE = BASE_DIR / "cmip7_ghg_inversions.csv"
With the infilling databases, we can initialise our infiller.
infiller = CMIP7ScenarioMIPInfiller.from_cmip7_scenariomip_config(
cmip7_scenariomip_infilling_leader_emissions_file=CMIP7_SCENARIOMIP_INFILLING_FILE,
cmip7_ghg_inversions_file=GHG_INVERSION_FILE,
cmip7_scenariomip_global_historical_emissions_file=CMIP7_SCENARIOMIP_GLOBAL_HISTORICAL_EMISSIONS_FILE,
)
And infill
complete = infiller(harmonised_global)
complete
[WARNING] 09:41:24 - pint.util: Redefining 'kt' (<class 'pint.delegates.txt_defparser.plain.UnitDefinition'>)
[WARNING] 09:41:24 - pint.util: Redefining 'EUR_2005' (<class 'pint.delegates.txt_defparser.plain.UnitDefinition'>)
[WARNING] 09:41:24 - pint.util: Redefining 'EUR' (<class 'pint.delegates.txt_defparser.plain.UnitDefinition'>)
[WARNING] 09:41:24 - pint.util: Redefining 'C' (<class 'pint.delegates.txt_defparser.plain.UnitDefinition'>)
[WARNING] 09:41:24 - pint.util: Redefining 'N' (<class 'pint.delegates.txt_defparser.plain.UnitDefinition'>)
[WARNING] 09:41:24 - pint.util: Redefining 'NOX' (<class 'pint.delegates.txt_defparser.plain.UnitDefinition'>)
[WARNING] 09:41:24 - pint.util: Redefining 'gNOX' (<class 'pint.delegates.txt_defparser.plain.UnitDefinition'>)
[WARNING] 09:41:24 - pint.util: Redefining 'tNOX' (<class 'pint.delegates.txt_defparser.plain.UnitDefinition'>)
[WARNING] 09:41:24 - pint.util: Redefining 'S' (<class 'pint.delegates.txt_defparser.plain.UnitDefinition'>)
[WARNING] 09:41:25 - pint.util: Redefining 'yr' (<class 'pint.delegates.txt_defparser.plain.UnitDefinition'>)
[WARNING] 09:41:25 - pint.util: Redefining 'a' (<class 'pint.delegates.txt_defparser.plain.UnitDefinition'>)
[WARNING] 09:41:25 - pint.util: Redefining 'h' (<class 'pint.delegates.txt_defparser.plain.UnitDefinition'>)
[WARNING] 09:41:25 - pint.util: Redefining 'd' (<class 'pint.delegates.txt_defparser.plain.UnitDefinition'>)
[WARNING] 09:41:25 - pint.util: Redefining 'degreeC' (<class 'pint.delegates.txt_defparser.plain.UnitDefinition'>)
[WARNING] 09:41:25 - pint.util: Redefining 'degreeF' (<class 'pint.delegates.txt_defparser.plain.UnitDefinition'>)
[WARNING] 09:41:25 - pint.util: Redefining 'kt' (<class 'pint.delegates.txt_defparser.plain.UnitDefinition'>)
[WARNING] 09:41:25 - pint.util: Redefining 'Tt' (<class 'pint.delegates.txt_defparser.plain.UnitDefinition'>)
[WARNING] 09:41:25 - pint.util: Redefining 'ppm' (<class 'pint.delegates.txt_defparser.plain.UnitDefinition'>)
| year | 2023 | 2024 | 2025 | 2026 | 2027 | 2028 | 2029 | 2030 | 2031 | 2032 | ... | 2091 | 2092 | 2093 | 2094 | 2095 | 2096 | 2097 | 2098 | 2099 | 2100 | ||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| model | scenario | region | variable | unit | |||||||||||||||||||||
| model_1 | SSP1 - Low Emissions | World | Emissions|BC | Mt BC/yr | 7.219245 | 7.144170 | 7.069115 | 6.600127 | 6.131266 | 5.662533 | 5.193926 | 4.725447 | 4.630838 | 4.536256 | ... | 1.985668 | 1.982659 | 1.979650 | 1.976642 | 1.973633 | 1.970625 | 1.967616 | 1.964607 | 1.961599 | 1.958590 |
| Emissions|CH4 | Mt CH4/yr | 363.489901 | 365.526092 | 367.565757 | 355.928260 | 344.265560 | 332.577658 | 320.864553 | 309.126246 | 300.639794 | 292.134973 | ... | 132.359170 | 130.664527 | 128.969883 | 127.275240 | 125.580596 | 123.885953 | 122.191309 | 120.496666 | 118.802023 | 117.107379 | |||
| Emissions|CO | Mt CO/yr | 774.053434 | 774.666130 | 775.256992 | 724.758119 | 673.815787 | 622.429994 | 570.600742 | 518.328030 | 509.817833 | 501.221767 | ... | 347.673297 | 348.702968 | 349.732638 | 350.762309 | 351.791979 | 352.821649 | 353.851320 | 354.880990 | 355.910661 | 356.940331 | |||
| Emissions|NH3 | Mt NH3/yr | 69.113401 | 69.584726 | 70.051607 | 69.079299 | 68.111815 | 67.149154 | 66.191318 | 65.238306 | 63.677284 | 62.125110 | ... | 21.296855 | 20.939381 | 20.581906 | 20.224432 | 19.866958 | 19.509483 | 19.152009 | 18.794534 | 18.437060 | 18.079586 | |||
| Emissions|NOx | Mt NO2/yr | 127.510494 | 122.853346 | 118.219603 | 110.532086 | 102.884767 | 95.277648 | 87.710727 | 80.184006 | 78.589364 | 77.002322 | ... | 35.380763 | 35.193219 | 35.005675 | 34.818131 | 34.630588 | 34.443044 | 34.255500 | 34.067956 | 33.880412 | 33.692869 | |||
| Emissions|OC | Mt OC/yr | 34.147891 | 34.304770 | 34.461479 | 32.212148 | 29.965001 | 27.720038 | 25.477258 | 23.236662 | 22.787355 | 22.338477 | ... | 12.146310 | 12.190877 | 12.235444 | 12.280011 | 12.324578 | 12.369145 | 12.413712 | 12.458280 | 12.502847 | 12.547414 | |||
| Emissions|SOx | Mt SO2/yr | 71.902038 | 69.148596 | 66.420641 | 62.236616 | 58.094191 | 53.993366 | 49.934143 | 45.916520 | 44.113645 | 42.328073 | ... | 14.818543 | 14.779546 | 14.740548 | 14.701550 | 14.662553 | 14.623555 | 14.584558 | 14.545560 | 14.506562 | 14.467565 | |||
| Emissions|NMVOC | Mt VOC/yr | 191.244286 | 190.557045 | 189.869826 | 174.813753 | 159.758163 | 144.703056 | 129.648433 | 114.594292 | 112.251944 | 109.909671 | ... | 61.627644 | 61.896796 | 62.165949 | 62.435102 | 62.704254 | 62.973407 | 63.242559 | 63.511712 | 63.780864 | 64.050017 | |||
| Emissions|N2O | kt N2O/yr | 11289.003671 | 11418.909664 | 11548.313212 | 11339.894890 | 11132.116080 | 10924.976783 | 10718.476998 | 10512.616726 | 10265.983337 | 10020.130856 | ... | 3867.749693 | 3814.733648 | 3761.717603 | 3708.701558 | 3655.685513 | 3602.669468 | 3549.653423 | 3496.637378 | 3443.621333 | 3390.605287 | |||
| Emissions|CO2|Fossil | Mt CO2/yr | 38712.217040 | 39021.233879 | 39330.487888 | 38844.085817 | 38357.277992 | 37870.064412 | 37382.445077 | 36894.419988 | 35372.834524 | 33850.010402 | ... | -608.686933 | -750.368775 | -892.050616 | -1033.732458 | -1175.414299 | -1317.096140 | -1458.777982 | -1600.459823 | -1742.141664 | -1883.823506 | |||
| Emissions|CO2|Biosphere | Mt CO2/yr | 3627.550667 | 3351.646901 | 3075.743135 | 2812.000589 | 2548.258043 | 2284.515497 | 2020.772951 | 1757.030406 | 1452.976240 | 1148.922074 | ... | -3178.876123 | -3227.579799 | -3276.283475 | -3324.987151 | -3373.690827 | -3422.394503 | -3471.098178 | -3519.801854 | -3568.505530 | -3617.209206 | |||
| Emissions|C2F6 | kt C2F6/yr | 2.431873 | 2.528807 | 2.625905 | 2.672723 | 2.719619 | 2.766591 | 2.813640 | 2.860766 | 2.911256 | 2.961829 | ... | 1.021122 | 1.014390 | 1.007657 | 1.000924 | 0.994192 | 1.033516 | 1.072841 | 1.112165 | 1.151490 | 1.190814 | |||
| Emissions|C6F14 | kt C6F14/yr | 0.062998 | 0.064466 | 0.065935 | 0.066375 | 0.066815 | 0.067255 | 0.067695 | 0.068136 | 0.068972 | 0.069808 | ... | 0.127935 | 0.129267 | 0.130599 | 0.131930 | 0.133262 | 0.134586 | 0.135910 | 0.137234 | 0.138558 | 0.139883 | |||
| Emissions|CF4 | kt CF4/yr | 15.117718 | 15.299725 | 15.480824 | 14.740297 | 14.002787 | 13.268293 | 12.536815 | 11.808353 | 12.060031 | 12.310516 | ... | 13.483391 | 13.591301 | 13.699211 | 13.807121 | 13.915031 | 14.091919 | 14.268807 | 14.445695 | 14.622584 | 14.799472 | |||
| Emissions|HFC125 | kt HFC125/yr | 124.074300 | 129.016434 | 133.904686 | 131.476090 | 129.064917 | 126.671164 | 124.294832 | 121.935922 | 103.016576 | 84.281500 | ... | 27.627230 | 27.648761 | 27.670291 | 27.691822 | 27.713352 | 28.150706 | 28.588059 | 29.025412 | 29.462766 | 29.900119 | |||
| Emissions|HFC134a | kt HFC134a/yr | 291.788600 | 296.075875 | 300.295373 | 291.655916 | 283.096269 | 274.616432 | 266.216404 | 257.896185 | 273.531352 | 288.962665 | ... | 109.414646 | 107.893343 | 106.372040 | 104.850737 | 103.329433 | 102.231552 | 101.133670 | 100.035789 | 98.937908 | 97.840026 | |||
| Emissions|HFC143a | kt HFC143a/yr | 35.833800 | 37.368378 | 38.902956 | 38.374447 | 37.845938 | 37.317429 | 36.788920 | 36.260411 | 37.539522 | 38.818632 | ... | 9.208669 | 9.406711 | 9.604752 | 9.802794 | 10.000835 | 10.104266 | 10.207696 | 10.311126 | 10.414556 | 10.517986 | |||
| Emissions|HFC227ea | kt HFC227ea/yr | 6.645300 | 6.652549 | 6.659049 | 5.435314 | 4.228291 | 3.037980 | 1.864381 | 0.707494 | 1.666058 | 2.610431 | ... | 1.065298 | 0.926165 | 0.787032 | 0.647899 | 0.508766 | 0.501147 | 0.493527 | 0.485907 | 0.478287 | 0.470667 | |||
| Emissions|HFC23 | kt HFC23/yr | 14.051843 | 11.877941 | 9.704039 | 8.181493 | 6.658948 | 5.136402 | 3.613856 | 2.091311 | 3.118982 | 4.146654 | ... | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | |||
| Emissions|HFC245fa | kt HFC245fa/yr | 15.504500 | 16.346968 | 17.198894 | 14.549765 | 11.865979 | 9.147537 | 6.394438 | 3.606682 | 3.171099 | 2.729941 | ... | 5.760548 | 5.845571 | 5.930593 | 6.015615 | 6.100637 | 6.192335 | 6.284033 | 6.375731 | 6.467429 | 6.559127 | |||
| Emissions|HFC32 | kt HFC32/yr | 105.566000 | 110.444916 | 115.276979 | 100.579615 | 86.007847 | 71.561676 | 57.241101 | 43.046123 | 35.934222 | 28.884940 | ... | 21.607166 | 21.928615 | 22.250064 | 22.571513 | 22.892962 | 23.206831 | 23.520700 | 23.834569 | 24.148438 | 24.462307 | |||
| Emissions|HFC4310mee | kt HFC4310/yr | 0.882600 | 0.886145 | 0.889689 | 0.729938 | 0.570187 | 0.410436 | 0.250685 | 0.090935 | 0.255454 | 0.419973 | ... | 0.607384 | 0.532124 | 0.456863 | 0.381602 | 0.306341 | 0.303097 | 0.299853 | 0.296609 | 0.293365 | 0.290121 | |||
| Emissions|SF6 | kt SF6/yr | 9.352094 | 9.435333 | 9.516460 | 9.173983 | 8.835452 | 8.500867 | 8.170230 | 7.843538 | 7.852858 | 7.861174 | ... | 1.541841 | 1.450642 | 1.359442 | 1.268242 | 1.177042 | 1.145030 | 1.113019 | 1.081007 | 1.048995 | 1.016983 | |||
| Emissions|CCl4 | kt CCl4/yr | 40.297308 | 37.507899 | 34.970595 | 32.456073 | 30.041196 | 27.591942 | 25.100321 | 23.540679 | 23.662151 | 24.613811 | ... | 51.885560 | 51.908060 | 51.866591 | 51.830099 | 51.798163 | 51.770306 | 51.816629 | 51.871686 | 51.829248 | 51.792121 | |||
| Emissions|CFC11 | kt CFC11/yr | 55.993337 | 53.802418 | 51.585468 | 49.404109 | 47.385642 | 45.470128 | 43.660703 | 41.897968 | 40.119867 | 38.450704 | ... | 3.268634 | 3.094453 | 2.991418 | 2.962178 | 2.820386 | 2.624553 | 2.562224 | 2.510741 | 2.406025 | 2.307588 | |||
| Emissions|CFC113 | kt CFC113/yr | 2.030656 | 2.624086 | 2.662652 | 2.794922 | 3.019316 | 3.167136 | 3.238011 | 3.316106 | 3.400552 | 3.576931 | ... | 7.591940 | 7.648563 | 7.621687 | 7.596121 | 7.571520 | 7.547174 | 7.609181 | 7.588081 | 7.509434 | 7.483586 | |||
| Emissions|CFC114 | kt CFC114/yr | 0.873953 | 1.124991 | 1.159712 | 1.197559 | 1.237278 | 1.278910 | 1.322527 | 1.368196 | 1.415482 | 1.542378 | ... | 3.197824 | 3.191741 | 3.186103 | 3.180476 | 3.174835 | 3.168677 | 3.240427 | 3.235465 | 3.078017 | 3.000740 | |||
| Emissions|CFC115 | kt CFC115/yr | 0.027629 | 0.026451 | 0.025678 | 0.024929 | 0.024647 | 0.000000 | 0.000000 | 0.022034 | 0.020872 | 0.020580 | ... | 0.000000 | 0.000000 | 0.043234 | 0.042116 | 0.000000 | 0.000000 | 0.000000 | 0.039164 | 0.107593 | 0.107043 | |||
| Emissions|CFC12 | kt CFC12/yr | 20.278901 | 18.606179 | 17.087091 | 15.723169 | 14.517109 | 13.305941 | 12.144250 | 11.197171 | 10.357148 | 9.516056 | ... | 0.007780 | 0.017593 | 0.032351 | 0.052369 | 0.077664 | 0.108615 | 0.090490 | 0.022536 | 0.000000 | 0.000000 | |||
| Emissions|CH3Br | kt CH3Br/yr | 140.486974 | 140.445253 | 140.445528 | 140.445535 | 140.445536 | 140.445536 | 140.445536 | 140.445536 | 140.445536 | 140.445536 | ... | 140.445536 | 140.445536 | 140.445536 | 140.445536 | 140.445536 | 140.445536 | 140.445536 | 140.445536 | 140.445536 | 140.445536 | |||
| Emissions|CH3CCl3 | kt CH3CCl3/yr | 1.925368 | 1.984467 | 2.015470 | 2.121806 | 2.243025 | 2.295690 | 2.316133 | 2.424701 | 2.584005 | 2.711650 | ... | 5.689864 | 5.689864 | 5.689864 | 5.689864 | 5.689863 | 5.689863 | 5.689863 | 5.689863 | 5.689863 | 5.689863 | |||
| Emissions|CH3Cl | kt CH3Cl/yr | 5376.602241 | 5376.602241 | 5376.602241 | 5376.602241 | 5376.602241 | 5376.602241 | 5376.602241 | 5376.602241 | 5376.602241 | 5376.602241 | ... | 5376.602241 | 5376.602241 | 5376.602241 | 5376.602241 | 5376.602241 | 5376.602241 | 5376.602241 | 5376.602241 | 5376.602241 | 5376.602241 | |||
| Emissions|HCFC141b | kt HCFC141b/yr | 57.429166 | 57.680778 | 57.214803 | 56.483254 | 55.671149 | 54.851644 | 54.015283 | 53.027147 | 51.577654 | 49.895208 | ... | 6.602050 | 6.387501 | 6.184757 | 5.994172 | 5.762463 | 5.531226 | 5.364562 | 5.156822 | 4.896512 | 4.701716 | |||
| Emissions|HCFC142b | kt HCFC142b/yr | 20.176795 | 20.998765 | 20.830485 | 20.617558 | 20.395064 | 20.167233 | 19.883953 | 19.591142 | 19.197580 | 18.693290 | ... | 6.748363 | 6.677946 | 6.562452 | 6.492394 | 6.472634 | 6.412347 | 6.352457 | 6.343138 | 6.293446 | 6.222596 | |||
| Emissions|HCFC22 | kt HCFC22/yr | 324.526866 | 323.798943 | 316.207542 | 306.350001 | 295.744097 | 285.946353 | 276.890203 | 266.147380 | 251.390469 | 235.222718 | ... | 21.863943 | 21.698471 | 21.501999 | 21.306995 | 21.151981 | 21.036735 | 20.961812 | 20.849738 | 20.569984 | 20.259407 | |||
| Emissions|Halon1202 | kt Halon1202/yr | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | ... | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | |||
| Emissions|Halon1211 | kt Halon1211/yr | 2.562978 | 2.471289 | 2.304956 | 2.213393 | 2.205219 | 2.131462 | 1.984032 | 1.837040 | 1.689530 | 1.616350 | ... | 0.064282 | 0.045382 | 0.101339 | 0.166331 | 0.081848 | 0.064133 | 0.129589 | 0.045532 | 0.000000 | 0.000000 | |||
| Emissions|Halon1301 | kt Halon1301/yr | 1.232019 | 1.165094 | 1.096459 | 1.162428 | 1.161851 | 1.093271 | 1.091831 | 1.090003 | 1.088166 | 1.086341 | ... | 0.352499 | 0.345555 | 0.338213 | 0.330847 | 0.323018 | 0.382600 | 0.443897 | 0.371047 | 0.298030 | 0.293164 | |||
| Emissions|Halon2402 | kt Halon2402/yr | 0.000000 | 0.000000 | 0.074954 | 0.057748 | 0.041236 | 0.024741 | 0.008247 | 0.000000 | 0.000000 | 0.000000 | ... | 0.049483 | 0.049482 | 0.049483 | 0.049506 | 0.050338 | 0.000000 | 0.000000 | 0.000000 | 0.025644 | 0.008322 | |||
| Emissions|C3F8 | kt C3F8/yr | 0.721178 | 0.749924 | 0.778719 | 0.792603 | 0.806510 | 0.820439 | 0.834392 | 0.848367 | 0.863340 | 0.878338 | ... | 0.302816 | 0.300820 | 0.298823 | 0.296827 | 0.294830 | 0.306492 | 0.318154 | 0.329815 | 0.341477 | 0.353139 | |||
| Emissions|C4F10 | kt C4F10/yr | 0.101586 | 0.105636 | 0.109692 | 0.111647 | 0.113606 | 0.115569 | 0.117534 | 0.119503 | 0.121612 | 0.123724 | ... | 0.042655 | 0.042374 | 0.042093 | 0.041812 | 0.041530 | 0.043173 | 0.044816 | 0.046458 | 0.048101 | 0.049744 | |||
| Emissions|C5F12 | kt C5F12/yr | 0.061383 | 0.063830 | 0.066280 | 0.067462 | 0.068646 | 0.069831 | 0.071019 | 0.072208 | 0.073483 | 0.074759 | ... | 0.025774 | 0.025604 | 0.025434 | 0.025264 | 0.025094 | 0.026087 | 0.027080 | 0.028072 | 0.029065 | 0.030057 | |||
| Emissions|C7F16 | kt C7F16/yr | 0.186453 | 0.193885 | 0.201330 | 0.204919 | 0.208515 | 0.212116 | 0.215723 | 0.219336 | 0.223208 | 0.227085 | ... | 0.078290 | 0.077774 | 0.077258 | 0.076741 | 0.076225 | 0.079240 | 0.082255 | 0.085270 | 0.088285 | 0.091300 | |||
| Emissions|C8F18 | kt C8F18/yr | 0.136638 | 0.142084 | 0.147539 | 0.150170 | 0.152805 | 0.155444 | 0.158088 | 0.160735 | 0.163572 | 0.166414 | ... | 0.057373 | 0.056995 | 0.056616 | 0.056238 | 0.055860 | 0.058069 | 0.060279 | 0.062488 | 0.064698 | 0.066907 | |||
| Emissions|cC4F8 | kt cC4F8/yr | 2.248599 | 2.275690 | 2.302645 | 2.192422 | 2.082648 | 1.973323 | 1.864447 | 1.756019 | 1.793480 | 1.830763 | ... | 2.005339 | 2.021401 | 2.037462 | 2.053524 | 2.069586 | 2.095915 | 2.122244 | 2.148572 | 2.174901 | 2.201230 | |||
| Emissions|SO2F2 | kt SO2F2/yr | 4.594033 | 4.649381 | 4.704452 | 4.479260 | 4.254984 | 4.031625 | 3.809184 | 3.587660 | 3.664195 | 3.740367 | ... | 4.097036 | 4.129852 | 4.162667 | 4.195482 | 4.228297 | 4.282089 | 4.335880 | 4.389672 | 4.443463 | 4.497254 | |||
| Emissions|HFC236fa | kt HFC236fa/yr | 0.354300 | 0.373552 | 0.393019 | 0.332483 | 0.271155 | 0.209034 | 0.146122 | 0.082418 | 0.072464 | 0.062383 | ... | 0.131637 | 0.133580 | 0.135523 | 0.137465 | 0.139408 | 0.141504 | 0.143599 | 0.145695 | 0.147790 | 0.149885 | |||
| Emissions|HFC152a | kt HFC152a/yr | 54.869900 | 55.090259 | 55.310617 | 45.379146 | 35.447675 | 25.516204 | 15.584733 | 5.653263 | 15.881160 | 26.109058 | ... | 37.760156 | 33.081313 | 28.402470 | 23.723627 | 19.044783 | 18.843101 | 18.641418 | 18.439735 | 18.238053 | 18.036370 | |||
| Emissions|HFC365mfc | kt HFC365mfc/yr | 5.241900 | 5.318920 | 5.394722 | 5.239516 | 5.085745 | 4.933407 | 4.782503 | 4.633032 | 4.913914 | 5.191133 | ... | 1.965603 | 1.938274 | 1.910944 | 1.883614 | 1.856284 | 1.836561 | 1.816838 | 1.797115 | 1.777392 | 1.757669 | |||
| Emissions|CH2Cl2 | kt CH2Cl2/yr | 1612.125558 | 1632.639346 | 1652.828830 | 1611.490692 | 1570.534427 | 1529.960034 | 1489.767514 | 1449.956867 | 1524.768137 | 1598.604001 | ... | 739.501246 | 732.222103 | 724.942959 | 717.663816 | 710.384673 | 705.131521 | 699.878369 | 694.625218 | 689.372066 | 684.118914 | |||
| Emissions|CHCl3 | kt CHCl3/yr | 400.499380 | 406.058514 | 411.627042 | 414.312063 | 417.001490 | 419.695323 | 422.393562 | 425.096207 | 427.991806 | 430.892135 | ... | 319.593466 | 319.207350 | 318.821234 | 318.435117 | 318.049001 | 320.304241 | 322.559481 | 324.814722 | 327.069962 | 329.325202 | |||
| Emissions|NF3 | kt NF3/yr | 4.010291 | 4.045985 | 4.080774 | 3.933915 | 3.788749 | 3.645275 | 3.503494 | 3.363405 | 3.367401 | 3.370967 | ... | 0.661160 | 0.622053 | 0.582945 | 0.543838 | 0.504730 | 0.491003 | 0.477276 | 0.463549 | 0.449822 | 0.436095 |
52 rows × 78 columns
You can see infilled pathways compared to raw pathways in the below.
This is not a deep analysis. If you want to see the full details of how the infilling works, see Lamboll et al., 2020.
pdf = (
pix.concat(
[
res_pre_processed.global_workflow_emissions.loc[:, 2023:].pix.assign(
stage="pre_processed"
),
harmonised_global.pix.assign(stage="harmonised"),
complete.pix.assign(stage="infilled"),
]
)
.loc[pix.ismatch(variable=["**CO2|Fossil", "**CH4", "**N2O", "**CO"])]
.melt(ignore_index=False, var_name="year")
.reset_index()
)
fg = relplot_in_emms(
data=pdf,
hue="scenario",
style="stage",
dashes={
"pre_processed": (3, 3),
"harmonised": "",
"infilled": (1, 1),
},
)
fg.axes.flatten()[0].axhline(0.0, linestyle="--", color="gray")
fg.axes.flatten()[1].set_ylim(ymin=0.0)
(0.0, 989.1820568503626)
SCM Running¶
The next step is running a simple climate model (SCM) or models (SCMs). This provides information about the climate implications of the scenario(s).
In CMIP7 ScenarioMIP, MAGICCv7.6.0 and FaIR [version TBD] were used to inform this climate assessment.
Under the hood, the AR6 SCM running uses the OpenSCM-Runner package.
# Get MAGICC from somewhere public
# FaIR should be pre-installed
# combine to create complete timeseries using sum of gridded
# and the global harmonised timeseries or provide both as input
# complete_scenarios = pd.concat([harmonised, infilled])
# complete_scenarios
MAGICC_EXE_PATH = Path(
"tests/regression/cmip7-scenariomip/cmip7-scenariomip-workflow-inputs/magicc-v7.6.0a3/bin"
)
MAGICC_CMIP7_SCENARIOMIP_PROBABILISTIC_CONFIG_FILE = Path(
"tests/regression/cmip7-scenariomip/cmip7-scenariomip-workflow-inputs/magicc-v7.6.0a3/configs/magicc-ar7-fast-track-drawnset-v0-3-0.json"
)
if platform.system() == "Darwin":
if platform.processor() == "arm":
MAGICC_EXE = MAGICC_EXE_PATH / "magicc-darwin-arm64"
os.environ["DYLD_LIBRARY_PATH"] = "/opt/homebrew/opt/gfortran/lib/gcc/current/"
elif platform.system() == "Linux":
MAGICC_EXE = MAGICC_EXE_PATH / "magicc"
elif platform.system() == "Windows":
MAGICC_EXE = MAGICC_EXE_PATH / "magicc.exe"
With the set up done, we can initialise our SCM runner.
scm_runner = CMIP7ScenarioMIPSCMRunner.from_cmip7_scenariomip_config(
# Generally, you want to run SCMs in parallel
n_processes=multiprocessing.cpu_count(),
magicc_exe_path=MAGICC_EXE,
magicc_prob_distribution_path=MAGICC_CMIP7_SCENARIOMIP_PROBABILISTIC_CONFIG_FILE,
historical_emissions_path=CMIP7_SCENARIOMIP_GLOBAL_HISTORICAL_EMISSIONS_FILE,
output_variables=("Surface Air Temperature Change", "Effective Radiative Forcing"),
batch_size_scenarios=15,
)
If you're reading this on RtD, note that we run a greatly reduced number of ensemble members. You will likely want to skip this step if running yourself.
if os.environ.get("READTHEDOCS", False):
scm_runner.climate_models_cfgs["MAGICC7"] = scm_runner.climate_models_cfgs[
"MAGICC7"
][:10]
And then run
scm_results = scm_runner(complete)
scm_results
Climate models: 0%| | 0/1 [00:00<?, ?it/s]
Scenario batch: 0%| | 0/1 [00:00<?, ?it/s]
Climate models: 0%| | 0.00/1.00 [00:00<?, ?it/s]
[WARNING] 09:41:29 - openscm_runner.adapters.magicc7.magicc7: Historical data has not been checked
/home/docs/checkouts/readthedocs.org/user_builds/gcages/envs/latest/lib/python3.11/site-packages/scmdata/run.py:2632: FutureWarning: The behavior of DataFrame concatenation with empty or all-NA entries is deprecated. In a future version, this will no longer exclude empty or all-NA columns when determining the result dtypes. To retain the old behavior, exclude the relevant entries before the concat operation.
pd.concat([ret._meta.to_frame(), *to_join_metas]).astype("category")
Writing SCEN7 files: 0%| | 0.00/1.00 [00:00<?, ?it/s]
Writing SCEN7 files: 100%|██████████| 1.00/1.00 [00:00<00:00, 3.38it/s]
Front serial: 0%| | 0.00/2.00 [00:00<?, ?it/s]
Front serial: 100%|██████████| 2.00/2.00 [00:01<00:00, 1.54it/s]
Front parallel: 0%| | 0.00/2.00 [00:00<?, ?it/s]
Front parallel: 100%|██████████| 2.00/2.00 [00:01<00:00, 1.71it/s]
Parallel runs: 0%| | 0.00/6.00 [00:00<?, ?it/s]
Parallel runs: 100%|██████████| 6.00/6.00 [00:03<00:00, 1.75it/s]
Climate models: 100%|██████████| 1.00/1.00 [00:09<00:00, 9.09s/it]
Climate models: 100%|██████████| 1.00/1.00 [00:09<00:00, 9.09s/it]
Scenario batch: 100%|██████████| 1/1 [00:09<00:00, 9.11s/it]
Scenario batch: 100%|██████████| 1/1 [00:09<00:00, 9.11s/it]
Climate models: 100%|██████████| 1/1 [00:09<00:00, 9.12s/it]
Climate models: 100%|██████████| 1/1 [00:09<00:00, 9.12s/it]
| time | 1750 | 1751 | 1752 | 1753 | 1754 | 1755 | 1756 | 1757 | 1758 | 1759 | ... | 2091 | 2092 | 2093 | 2094 | 2095 | 2096 | 2097 | 2098 | 2099 | 2100 | ||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| climate_model | model | region | run_id | scenario | unit | variable | |||||||||||||||||||||
| MAGICCv7.6.0a3 | model_1 | World | 0 | SSP1 - Low Emissions | W/m^2 | Effective Radiative Forcing | 0.024862 | 0.118897 | 0.116943 | 0.101121 | 0.073664 | 0.010479 | -0.012348 | 0.037891 | 0.084870 | 0.115642 | ... | 3.083843 | 3.075493 | 3.054449 | 3.029675 | 3.006603 | 2.982615 | 2.963324 | 2.944188 | 2.930397 | 2.921243 |
| K | Surface Air Temperature Change | 0.000000 | 0.025523 | 0.035245 | 0.038705 | 0.037403 | 0.035409 | 0.028824 | 0.013995 | 0.019164 | 0.031390 | ... | 2.111727 | 2.108801 | 2.104123 | 2.097292 | 2.089272 | 2.080448 | 2.071740 | 2.063266 | 2.055657 | 2.049453 | |||||
| 1 | SSP1 - Low Emissions | W/m^2 | Effective Radiative Forcing | 0.040476 | 0.188135 | 0.175385 | 0.153909 | 0.121071 | 0.013471 | -0.034662 | 0.058462 | 0.133571 | 0.179039 | ... | 3.094397 | 3.093155 | 3.071267 | 3.043145 | 3.017493 | 2.990062 | 2.969977 | 2.949997 | 2.938670 | 2.934664 | |||
| K | Surface Air Temperature Change | 0.000000 | 0.031040 | 0.042205 | 0.048116 | 0.050462 | 0.050914 | 0.043648 | 0.027046 | 0.034479 | 0.048696 | ... | 3.503449 | 3.507925 | 3.510118 | 3.508996 | 3.505763 | 3.500927 | 3.495672 | 3.490288 | 3.485688 | 3.482789 | |||||
| 2 | SSP1 - Low Emissions | W/m^2 | Effective Radiative Forcing | 0.045260 | 0.197474 | 0.192773 | 0.165397 | 0.121218 | 0.011162 | -0.031142 | 0.057258 | 0.136335 | 0.189962 | ... | 3.189095 | 3.186040 | 3.159951 | 3.126917 | 3.096682 | 3.064538 | 3.040696 | 3.017066 | 3.003200 | 2.997172 | |||
| K | Surface Air Temperature Change | 0.000000 | 0.030692 | 0.040997 | 0.045351 | 0.045125 | 0.044089 | 0.036419 | 0.019364 | 0.027058 | 0.041304 | ... | 2.255736 | 2.254983 | 2.251817 | 2.245242 | 2.236770 | 2.227074 | 2.217516 | 2.208366 | 2.200556 | 2.194913 | |||||
| 3 | SSP1 - Low Emissions | W/m^2 | Effective Radiative Forcing | 0.075002 | 0.176557 | 0.155117 | 0.115360 | 0.065439 | -0.030846 | -0.065528 | 0.012842 | 0.099842 | 0.167591 | ... | 3.024171 | 3.030908 | 2.999572 | 2.956839 | 2.918830 | 2.877727 | 2.850460 | 2.823628 | 2.813078 | 2.815474 | |||
| K | Surface Air Temperature Change | 0.000000 | 0.031590 | 0.038679 | 0.038038 | 0.032724 | 0.026720 | 0.016755 | 0.001728 | 0.011589 | 0.029319 | ... | 1.669894 | 1.670524 | 1.667166 | 1.658750 | 1.648003 | 1.635818 | 1.624364 | 1.613752 | 1.605480 | 1.600646 | |||||
| 4 | SSP1 - Low Emissions | W/m^2 | Effective Radiative Forcing | 0.064249 | 0.152303 | 0.142644 | 0.102969 | 0.045903 | -0.022696 | -0.045883 | 0.007949 | 0.082311 | 0.142061 | ... | 2.920006 | 2.922528 | 2.892401 | 2.852596 | 2.816974 | 2.778781 | 2.752477 | 2.726529 | 2.714500 | 2.714121 | |||
| K | Surface Air Temperature Change | 0.000000 | 0.027147 | 0.035592 | 0.036302 | 0.030512 | 0.026315 | 0.019135 | 0.006278 | 0.013671 | 0.028335 | ... | 2.139012 | 2.139391 | 2.136262 | 2.128616 | 2.118696 | 2.107241 | 2.096132 | 2.085539 | 2.076827 | 2.071158 | |||||
| 5 | SSP1 - Low Emissions | W/m^2 | Effective Radiative Forcing | 0.063361 | 0.161519 | 0.136322 | 0.105250 | 0.070650 | -0.020938 | -0.059445 | 0.019417 | 0.102558 | 0.157535 | ... | 2.930197 | 2.932259 | 2.902117 | 2.862398 | 2.826766 | 2.788597 | 2.762183 | 2.736166 | 2.723925 | 2.722748 | |||
| K | Surface Air Temperature Change | 0.000000 | 0.027591 | 0.032539 | 0.031000 | 0.026948 | 0.021737 | 0.012411 | -0.001149 | 0.008632 | 0.024716 | ... | 1.291494 | 1.291044 | 1.287469 | 1.280211 | 1.271488 | 1.261900 | 1.253056 | 1.244913 | 1.238576 | 1.234806 | |||||
| 6 | SSP1 - Low Emissions | W/m^2 | Effective Radiative Forcing | 0.028969 | 0.142720 | 0.143538 | 0.124446 | 0.090351 | 0.014523 | -0.014325 | 0.047448 | 0.102313 | 0.140134 | ... | 3.147702 | 3.136302 | 3.110177 | 3.079644 | 3.050937 | 3.021023 | 2.996444 | 2.972010 | 2.953826 | 2.940899 | |||
| K | Surface Air Temperature Change | 0.000000 | 0.023076 | 0.031425 | 0.034695 | 0.033929 | 0.033021 | 0.027644 | 0.013909 | 0.019043 | 0.029946 | ... | 1.723372 | 1.719082 | 1.713451 | 1.706168 | 1.698065 | 1.689363 | 1.680731 | 1.672209 | 1.664298 | 1.657414 | |||||
| 7 | SSP1 - Low Emissions | W/m^2 | Effective Radiative Forcing | 0.061555 | 0.134827 | 0.123996 | 0.087731 | 0.038717 | -0.028246 | -0.044861 | 0.004328 | 0.070991 | 0.127741 | ... | 3.723759 | 3.729312 | 3.703411 | 3.668161 | 3.636964 | 3.603372 | 3.581207 | 3.559355 | 3.550740 | 3.552999 | |||
| K | Surface Air Temperature Change | 0.000000 | 0.027917 | 0.037654 | 0.038351 | 0.031970 | 0.024944 | 0.016686 | 0.002665 | 0.008787 | 0.025196 | ... | 2.570896 | 2.573917 | 2.573343 | 2.567761 | 2.559461 | 2.549407 | 2.539579 | 2.530336 | 2.523045 | 2.518969 | |||||
| 8 | SSP1 - Low Emissions | W/m^2 | Effective Radiative Forcing | 0.027534 | 0.145660 | 0.143361 | 0.126693 | 0.097244 | 0.016528 | -0.014465 | 0.051436 | 0.107386 | 0.143041 | ... | 3.237184 | 3.227599 | 3.203926 | 3.176016 | 3.149821 | 3.122462 | 3.100197 | 3.078061 | 3.061840 | 3.050692 | |||
| K | Surface Air Temperature Change | 0.000000 | 0.021493 | 0.027976 | 0.030634 | 0.030421 | 0.029793 | 0.024080 | 0.012661 | 0.018823 | 0.028366 | ... | 1.754271 | 1.751256 | 1.746683 | 1.740487 | 1.733516 | 1.725890 | 1.718351 | 1.710839 | 1.703944 | 1.698049 | |||||
| 9 | SSP1 - Low Emissions | W/m^2 | Effective Radiative Forcing | 0.089170 | 0.247113 | 0.224403 | 0.175709 | 0.109414 | -0.024954 | -0.078921 | 0.031023 | 0.144344 | 0.230172 | ... | 3.191125 | 3.205830 | 3.175017 | 3.130727 | 3.092397 | 3.050749 | 3.025845 | 3.001593 | 2.996725 | 3.006899 | |||
| K | Surface Air Temperature Change | 0.000000 | 0.038188 | 0.048259 | 0.050171 | 0.046314 | 0.041752 | 0.030263 | 0.011439 | 0.022490 | 0.041930 | ... | 2.117250 | 2.121848 | 2.122067 | 2.116812 | 2.108982 | 2.099439 | 2.090574 | 2.082487 | 2.076912 | 2.075073 |
20 rows × 351 columns
With these outputs, we can look at raw (i.e. before pre-processing) variables.
scm_results.loc[
pix.isin(variable=["Effective Radiative Forcing"])
].openscm.plot_plume_after_calculating_quantiles(
style_var="variable",
quantile_over="run_id",
quantiles_plumes=(
(0.5, 0.8),
((0.05, 0.95), 0.3),
),
)
<Axes: xlabel='time', ylabel='W/m^2'>
Post-processing¶
The last step is post-processing. This handles calculation of key pieces of metadata.
post_processor = CMIP7ScenarioMIPPostProcessor.from_cmip7_scenariomip_config()
post_processed_results = post_processor(
scm_results.loc[pix.isin(variable=["Surface Air Temperature Change"])]
)
For example, the scenario category.
post_processed_results.metadata_categories.unstack("metric")
| metric | category | category_name | ||
|---|---|---|---|---|
| climate_model | model | scenario | ||
| MAGICCv7.6.0a3 | model_1 | SSP1 - Low Emissions | C5 | C5: limit warming to 2.5°C (>50%) |
Exceedance thresholds.
post_processed_results.metadata_exceedance_probabilities.unstack("threshold")
| threshold | 0.50 | 1.00 | 4.01 | ||||||
|---|---|---|---|---|---|---|---|---|---|
| climate_model | model | region | scenario | unit | variable | threshold_unit | |||
| MAGICCv7.6.0a3 | model_1 | World | SSP1 - Low Emissions | % | Exceedance probability | K | 100.0 | 100.0 | 0.0 |
Key warming metrics.
post_processed_results.metadata_quantile.loc[
pix.isin(quantile=[0.05, 0.5, 0.95])
].unstack(["quantile", "metric"]).round(2).sort_index(axis="columns")
| quantile | 0.05 | 0.50 | 0.95 | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| metric | 2100 | max | max_year | 2100 | max | max_year | 2100 | max | max_year | |||||
| climate_model | model | region | scenario | unit | variable | |||||||||
| MAGICCv7.6.0a3 | model_1 | World | SSP1 - Low Emissions | K | Surface Temperature (GSAT) | 1.26 | 1.45 | NaN | 1.93 | 2.03 | NaN | 2.96 | 3.01 | NaN |
| yr | Surface Temperature (GSAT) | NaN | NaN | 2053.5 | NaN | NaN | 2070.0 | NaN | NaN | 2088.05 | ||||
Assessed surface temperatures.
post_processed_results.timeseries_quantile.loc[:, 2000:].openscm.plot_plume(
style_var="variable",
quantiles_plumes=(
(0.5, 0.8),
((0.05, 0.95), 0.3),
),
)
<Axes: xlabel='time', ylabel='K'>