openairclim.core.calc_response
Calculates responses for each species and scenario.
- openairclim.core.calc_response.calc_resp(spec: str, inv: Dataset, weights: Dataset) ndarray[source]
Calculate response from response surfaces and emission inventories.
Uses pre-computed weighting parameters.
- Parameters:
spec (str) – Name of response species
inv (xarray.Dataset) – Emission inventory data
weights (xarray.Dataset) – Dataset with weighting parameters
- Raises:
KeyError – if species not valid
- Returns:
Response array
- Return type:
- openairclim.core.calc_response.calc_resp_all(config, resp_dict, inv_dict)[source]
Loop calc_response function over elements in response dictionary.
- Parameters:
- Returns:
- Dictionary of dictionary of numpy arrays of computed responses,
keys are species and inventory years
- Return type:
- openairclim.core.calc_response.calc_resp_sub(species_sub: list[str], config: dict, output_dict: dict, ac: str) tuple[dict, dict][source]
Calculates responses for specified sub-species.
The calculation of sub-species responses depends on the results of main species which must be calculated and written to output beforehand.
- Parameters:
- Returns:
rf_sub_dict, dictionary with computed RF responses, andconc_sub_dict, dictionary with computed concentration responses; keys are sub-species- Return type:
- Raises:
KeyError – If no method defined for the sub-species