openairclim.core.calc_ch4

Calculates CH4 response.

openairclim.core.calc_ch4.calc_ch4_concentration(config: dict, tau_dict: dict) → dict[source]

Calculates the methane (CH4) concentration over time.

This method uses methane background and methane lifetimes of idealized emission boxes. Either the tagging or the perturbation approach is used.

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

  • tau_dict (dict) – Dictionary of a np.ndarray, either inverse lifetimes (1 / tau) or relative changes in lifetime (delta), key is “CH4” NOTE: array must be of same size as time_range

Returns:

A dictionary containing the calculated methane concentration for each time step. The dictionary has a single key “CH4” with corresponding values as a numpy array.

Return type:

dict

openairclim.core.calc_ch4.calc_ch4_drf_dconc(conc_dict: dict, config: dict) → dict[source]

Calculates the derivative of CH4 radiative forcing w.r.t. concentration.

This is used for the differential and marginal RF attribution methods. The CH4 method is taken from the config file.

Parameters:
  • conc_dict (dict) – Dictionary with array of concentrations (not including background) between the starting and ending years, keys is species

  • config (dict) – Configuration dictionary from config

Returns:

Dictionary with numpy.ndarray of CH4 radiative forcing derivative values between the starting and ending years, key is species CH4

Return type:

dict

openairclim.core.calc_ch4.calc_ch4_drf_dconc_etminan_2016(conc_dict: dict, conc_n2o_bg_dict: dict) → dict[source]

Calculates the derivative of CH4 radiative forcing w.r.t. concentration.

Reference: Etminan, M., Myhre, G., Highwood, E. J., & Shine, K. P. (2016). Radiative forcing of carbon dioxide, methane, and nitrous oxide: A significant revision of the methane radiative forcing. Geophysical Research Letters, 43(24), 12-614. https://doi.org/10.1002/2016GL071930.

Parameters:
  • conc_dict (dict) – Dictionary with array of concentrations (not including background) between the starting and ending years, keys is species

  • conc_n2o_bg_dict (dict) – Dictionary of numpy.ndarray of background N2O concentrations between the starting and ending years, key is species

Returns:

Dictionary with numpy.ndarray of dRF(CH4)/dconc values between the starting and ending years, key is species CH4

Return type:

dict

openairclim.core.calc_ch4.calc_ch4_rf(conc_dict: dict, config: dict) → dict[source]

Calculates the Radiative Forcing values for emitted CH4 concentrations.

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

  • conc_dict (dict) – Dictionary with array of concentrations between the starting and ending years, keys is species

Raises:

ValueError – if CH4.rf.method not valid

Returns:

Dictionary with numpy.ndarray of CH4 Radiative Forcing values between the starting and ending years, key is species CH4

Return type:

dict

openairclim.core.calc_ch4.calc_ch4_rf_etminan_2016(conc_dict: dict, conc_n2o_bg_dict: dict) → dict[source]

Calculates the CH4 Radiative Forcing values for emitted concentrations.

Reference: Etminan, Maryam, et al. Radiative forcing of carbon dioxide, methane, and nitrous oxide: A significant revision of the methane radiative forcing. Geophysical Research Letters 43.24 (2016): 12-614. https://doi.org/10.1002/2016GL071930.

Parameters:
  • conc_dict (dict) – Dictionary with array of concentrations between the starting and ending years, keys is species

  • conc_ch4_bg_dict (dict) – Dictionary of numpy.ndarray of background CH4 concentrations between the starting and ending years, key is species

  • conc_n2o_bg_dict (dict) – Dictionary of numpy.ndarray of background N2O concentrations between the starting and ending years, key is species

Returns:

Dictionary with numpy.ndarray of CH4 Radiative Forcing values between the starting and ending years, key is species CH4

Return type:

dict

openairclim.core.calc_ch4.calc_pmo_rf(out_dict: dict) → dict[source]

Calculates PMO RF.

Parameters:

out_dict (dict) – Dictionary with computed responses, keys are e.g. ‘RF_CH4’

Returns:

Dictionary of numpy.ndarray of computed RF, key is PMO

Return type:

dict

Raises:

KeyError – If computed CH4 RF is not available.

openairclim.core.calc_ch4.ode_ch4_perturbation(t: float, y: ndarray, ch4_bg: Callable[[float], float], delta: Callable[[float], float]) → ndarray[source]

Differential equation for evaluating CH4 concentration changes.

Perturbation approach after equation (3) in Grewe & Stenke (2008), https://doi.org/10.5194/acp-8-4621-2008

Parameters:
  • t (float) – time

  • y (np.ndarray) – CH4 concentration changes, required solution

  • ch4_bg (Callable[[float], float]) – CH4 background concentration

  • delta (Callable[[float], float]) – relative change in lifetime

Returns:

d/dt CH4 (CH4 concentration change, perturbation)

Return type:

np.ndarray

openairclim.core.calc_ch4.ode_ch4_tagging(t: float, y: ndarray, ch4_bg: Callable[[float], float], tau_inverse: Callable[[float], float]) → ndarray[source]

Differential equation, contribution (tagging) approach.

This differential equation determines CH4 concentration, after equation 4.49 in Rieger, V.S., A new method to assess the climate effect of mitigation strategies for road traffic, Delft University of Technology, PhD, 2018, https://doi.org/10.4233/uuid:cc96a7c7-1ec7-449a-84b0-2f9a342a5be5

Parameters:
  • t (float) – time

  • y (np.ndarray) – CH4 concentration, tagged, required solution

  • ch4_bg (Callable[[float], float]) – CH4 background concentration

  • tau_inverse (Callable[[float], float]) – inverse CH4 lifetime, tagged

Returns:

d/dt CH4 (CH4 concentration, tagged)

Return type:

np.ndarray