openairclim.calc_metric

Calculates climate metric for each species and scenario

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

Calculates the Absolute Global Temperature Change Potential (AGTP) climate metrics for each species and the total

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.calc_metric.calc_agwp(config: dict, t_zero: float, horizon: float, rf_dict: dict) dict[source]

Calculates the Absolute Global Warming Potential (AGWP) climate metrics for each species and the total

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.calc_metric.calc_atr(config: dict, t_zero: float, horizon: float, dtemp_dict: dict) dict[source]

Calculates Average Temperature Response (ATR) climate metrics for each species and the total

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.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.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