aerocm.climate_models.fair_climate_model¶
This module contains the FairClimateModel class, which implements a climate model using the FaIR (Finite Amplitude Impulse Response) model.
FairClimateModel ¶
FairClimateModel(start_year, end_year, specie_name, specie_inventory, specie_settings, model_settings)
Bases: ClimateModel
Climate model using FaIR to compute the RF, ERF and temperature increase for a given species and its emission profile, accounting for the background scenario.
Notes
References: - Leach et al. (2021). https://doi.org/10.5194/gmd-14-3007-2021 - Model implementation https://docs.fairmodel.net/en/latest/
Source code in aerocm/utils/classes.py
55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 | |
run ¶
run(return_df=False)
Compute the RF, ERF and temperature increase for a given species and its quantities using the FaIR climate model.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
return_df
|
bool
|
If True, returns the results as a pandas DataFrame with years as index. Default is False (returns a dict). |
False
|
Returns:
| Name | Type | Description |
|---|---|---|
output_data |
dict
|
Dictionary containing the results of the FaIR climate model. |
Source code in aerocm/climate_models/fair_climate_model.py
66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 | |
get_background_species_quantities
staticmethod
¶
get_background_species_quantities(model_settings=None, start_year=None, end_year=None)
Get the background species quantities from the model settings or from the RCP scenario.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
model_settings
|
dict
|
Dictionary containing model settings. |
None
|
start_year
|
int
|
Start year of the simulation. |
None
|
end_year
|
int
|
End year of the simulation. |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
background_species_quantities |
dict
|
Dictionary containing the background species quantities (CO2 and CH4) for each year of the simulation. |
Source code in aerocm/climate_models/fair_climate_model.py
217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 | |
FairRunner ¶
FairRunner(start_year, end_year, background_species_quantities=None)
Class to run the FaIR climate model for a (single) given species and its emission profile.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
start_year
|
int
|
Start year of the simulation. |
required |
end_year
|
int
|
End year of the simulation. |
required |
background_species_quantities
|
dict
|
Dictionary containing the background species quantities (CO2 and CH4) for each year of the simulation. |
None
|
Attributes:
| Name | Type | Description |
|---|---|---|
start_year |
int
|
Start year of the simulation. |
end_year |
int
|
End year of the simulation. |
background_species_quantities |
dict
|
Dictionary containing the background species quantities (CO2 and CH4) for each year of the simulation. |
species_list |
list
|
List of species included in the simulation. |
properties |
dict
|
Dictionary containing the properties of each species. |
f |
FAIR
|
Instance of the FAIR model. |
Notes
This class is used internally by the FairClimateModel class, and is not intended to be used directly.
Source code in aerocm/climate_models/fair_climate_model.py
288 289 290 291 292 293 294 | |
run ¶
run(specie_name=None, efficacy_erf=1.0, specie_inventory=None)
Run FaIR climate model previously configured, for a (single) given species and its emission profile.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
specie_name
|
str
|
Name of the species to be studied. If None, run background scenario with no additional species. |
None
|
efficacy_erf
|
int | float
|
Efficacy of the species for effective radiative forcing (default: 1.0) |
1.0
|
specie_inventory
|
list | ndarray
|
Array of annual emissions/forcing values for the species. |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
results |
dict
|
Dictionary containing the results of the FaIR climate model run for the effective radiative forcing and temperature. |
Source code in aerocm/climate_models/fair_climate_model.py
495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 | |
initialise_emissions_and_forcing ¶
initialise_emissions_and_forcing()
Initialise all emissions and forcing to zero for all species.
Source code in aerocm/climate_models/fair_climate_model.py
579 580 581 582 583 584 585 586 587 588 | |
background_species_quantities_function ¶
background_species_quantities_function(start_year, end_year, rcp=None)
Get background species quantities (CO2 and CH4) from RCP scenarios.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
start_year
|
int
|
Start year of the simulation. |
required |
end_year
|
int
|
End year of the simulation. |
required |
rcp
|
str
|
RCP scenario to be used ('RCP26', 'RCP45', 'RCP60', 'RCP85'). Select None to set background species to zero. |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
background_species_quantities |
dict
|
Dictionary containing the background species quantities (CO2 and CH4) for each year of the simulation. |
Example
>>> from aerocm.climate_models.fair_climate_model import background_species_quantities_function
>>> background_species_quantities = background_species_quantities_function(2020, 2050, 'RCP45')
Source code in aerocm/climate_models/fair_climate_model.py
591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 | |