openairclim.core.calc_metric

Calculates climate metric for each species and scenario.

openairclim.core.calc_metric.calc_aegwp(config: dict, t_zero: float, horizon: float, rf_dict: dict) → dict[source]

Calculates the Absolute Efficacy-weighted Global Warming Potential (AEGWP).

Reference: Megill et al. (2024), https://doi.org/10.1038/s43247-024-01423-6

Parameters:
  • config (dict) – Configuration

  • t_zero (float) – Starting year for the metrics calculation

  • horizon (float) – Time horizon in years

  • rf_dict (dict) – Dictionary containing RF values for each species

Returns:

Dictionary containing the AEGWP values for each species and

the total

Return type:

dict

openairclim.core.calc_metric.calc_agtp(config: dict, t_zero: float, horizon: float, dtemp_dict: dict) → dict[source]

Calculates the Absolute Global Temperature Change Potential (AGTP).

Reference: Shine, K. P., Fuglestvedt, J. S., Hailemariam, K., & Stuber, N.: Alternatives to the global warming potential for comparing climate impacts of emissions of greenhouse gases. Climatic change, 68(3), 281-302, doi: https://doi.org/10.1007/s10584-005-1146-9 (2005).

Parameters:
  • config (dict) – Configuration from the configuration file.

  • t_zero (float) – The start year for the metrics calculation.

  • horizon (float) – The time horizon in years.

  • dtemp_dict (dict) – A dictionary containing the temperature changes for each species.

Returns:

A dictionary containing the AGTP values for each species and the total.

Return type:

dict

openairclim.core.calc_metric.calc_agwp(config: dict, t_zero: float, horizon: float, rf_dict: dict) → dict[source]

Calculates the Absolute Global Warming Potential (AGWP).

Reference: Rodhe, H.: A comparison of the contribution of various gases to the greenhouse effect. Science, 248(4960), 1217-1219, doi: http://dx.doi.org/10.1126/science.248.4960.1217 (1990).

Parameters:
  • config (dict) – Configuration from the configuration file.

  • t_zero (float) – The start year for the metrics calculation.

  • horizon (float) – The time horizon in years.

  • rf_dict (dict) – A dictionary containing the RF values for each species.

Returns:

A dictionary containing the AGWP values for each species and the total.

Return type:

dict

openairclim.core.calc_metric.calc_atr(config: dict, t_zero: float, horizon: float, dtemp_dict: dict) → dict[source]

Calculates Average Temperature Response (ATR).

Reference: Dallara, E. S., Kroo, I. M., & Waitz, I. A.: Metric for comparing lifetime average climate impact of aircraft. AIAA Journal 49(8), 1600-1613, doi: http://dx.doi.org/10.2514/1.J050763 (2011).

Parameters:
  • config (dict) – Configuration from config file

  • t_zero (float) – start year for metrics calculation

  • horizon (float) – time horizon in years

  • dtemp_dict (dict) – Dictionary containing temperature changes for each species

Returns:

Dictionary containing ATR values, keys are species and total

Return type:

dict

openairclim.core.calc_metric.calc_climate_metrics(config: dict) → dict[source]

Get all combinations of required climate metrics.

Parameters:

config (dict) – Configuration from config file

Returns:

Dictionary of dictionaries containing climate metrics values, keys are unique climate metrics identifiers for each combination and species

Return type:

dict

openairclim.core.calc_metric.get_metrics_dict(config: dict, t_zero: float, horizon: float, resp_dict: dict) → dict[source]

Get subset of timeseries dictionary: only for years in time_metrics.

Parameters:
  • config (dict) – Configuration from config file

  • t_zero (float) – start year for metrics calculation

  • horizon (float) – time horizon in years

  • resp_dict (dict) – Dictionary containing response (RF or dtemp) values for each species

Returns:

Dictionary containig metrics values only for years in time_metrics, keys are species (and total)

Return type:

dict