<a id="api-esmvaltool-diag-scripts-climate-metrics-tcre"></a>

# Transient Climate Response to Cumulative CO<sub>2</sub> Emissions (TCRE)

Calculate Transient Climate Response to Cumulative CO2 Emissions (TCRE).

## Description

This diagnostics calculates the Transient Climate Response to Cumulative CO2
Emissions (TCRE) and produces relevant plots.

## Author

Manuel Schlund (DLR, Germany)

## Configuration options in recipe

calc_tcre_period: list of int, optional (default: [90, 110])
: Period considered to calculate TCRE. This needs to be a sequence of two
  integers, where the first integer defines the start and the second integer
  the end of a slice. TCRE is calculated by averaging over a subarray of the
  temperature change array which is determined by this slice. For example, if
  the input data are annual means, the values here correspond to the years
  (measured from simulation start) over which the temperature change is
  averaged (by default from years 90 to 110).

caption: str, optional
: Figure caption used for provenance tracking. By default, uses “Surface air
  temperature anomaly versus cumulative CO2 emissions for multiple datasets.”

exp_control: str, optional (default: ‘esm-piControl’)
: Name of the control experiment.

exp_target: str, optional (default: ‘esm-flat10’)
: Name of the target experiment.

figure_kwargs: dict, optional
: Optional keyword arguments for [`matplotlib.pyplot.figure()`](https://matplotlib.org/stable/api/_as_gen/matplotlib.pyplot.figure.html#matplotlib.pyplot.figure). By
  default, uses `constrained_layout: true`.

gridline_kwargs: dict, optional
: Optional keyword arguments for grid lines. By default, `color: lightgrey,
  alpha: 0.5` are used. Use `gridline_kwargs: false` to not show grid
  lines.

groupby_facet: str, optional (default: ‘dataset’)
: Facet used to group datasets. TCRE is calculated for each group element
  individually.

legend_kwargs: dict, optional
: Optional keyword arguments for [`matplotlib.pyplot.legend()`](https://matplotlib.org/stable/api/_as_gen/matplotlib.pyplot.legend.html#matplotlib.pyplot.legend). Use
  `legend_kwargs: false` to not show legends.

matplotlib_rc_params: dict, optional
: Optional [`matplotlib.RcParams`](https://matplotlib.org/stable/api/matplotlib_configuration_api.html#matplotlib.RcParams) used to customize matplotlib plots.
  Options given here will be passed to [`matplotlib.rc_context()`](https://matplotlib.org/stable/api/matplotlib_configuration_api.html#matplotlib.rc_context) and used
  for all plots produced with this diagnostic.

plot_kwargs: dict, optional
: Optional keyword arguments for [`iris.plot.plot()`](https://scitools-iris.readthedocs.io/en/latest/generated/api/iris.plot.html#iris.plot.plot). Dictionary keys are
  elements identified by `groupby_facet` or `default`, e.g.,
  `CMIP6` if `groupby_facet: project` or `CESM2` if `groupby_facet:
  dataset`. Dictionary values are dictionaries used as keyword arguments for
  [`iris.plot.plot()`](https://scitools-iris.readthedocs.io/en/latest/generated/api/iris.plot.html#iris.plot.plot).

pyplot_kwargs: dict, optional
: Optional calls to functions of [`matplotlib.pyplot`](https://matplotlib.org/stable/api/pyplot_summary.html#module-matplotlib.pyplot). Dictionary keys
  are functions of [`matplotlib.pyplot`](https://matplotlib.org/stable/api/pyplot_summary.html#module-matplotlib.pyplot). Dictionary values are used as
  argument(s) for these functions (if values are dictionaries, these are
  interpreted as keyword arguments; otherwise a single argument is assumed).

savefig_kwargs: dict, optional
: Optional keyword arguments for [`matplotlib.pyplot.savefig()`](https://matplotlib.org/stable/api/_as_gen/matplotlib.pyplot.savefig.html#matplotlib.pyplot.savefig). By
  default, uses `bbox_inches: tight, dpi: 300, orientation: landscape`.

seaborn_settings: dict, optional
: Options for [`seaborn.set_theme()`](https://seaborn.pydata.org/generated/seaborn.set_theme.html#seaborn.set_theme) (affects all plots). By default, uses
  `style: ticks`.

var_emissions: str, optional (default: ‘cumulative_fco2antt’)
: Short name of the variable describing the cumulative anthropogenic CO2
  emissions. This must be the name of the variable given in the recipe. Note
  that using the [`cumulative_sum()`](https://docs.esmvaltool.org/projects/ESMValCore/en/latest/api/esmvalcore.preprocessor.html#esmvalcore.preprocessor.cumulative_sum) preprends
  `cumulative_` to this name.

var_temperature: str, optional (default: ‘tas’)
: Short name of the variable describing the temperature change. This must be
  the name of the variable given in the recipe.
