├── README.md ├── beam_model ├── LICENSE ├── README.md ├── beam_carbon.egg-info │ ├── PKG-INFO │ ├── SOURCES.txt │ ├── dependency_links.txt │ ├── entry_points.txt │ └── top_level.txt ├── beam_carbon │ ├── __init__.py │ ├── __main__.py │ ├── beam.py │ └── temperature.py ├── build │ └── lib │ │ └── beam_carbon │ │ ├── __init__.py │ │ ├── __main__.py │ │ ├── beam.py │ │ └── temperature.py ├── dist │ └── beam_carbon-0.3-py2.7.egg ├── requirements.txt ├── run.py ├── setup.py └── test │ └── test_beam_carbon.py ├── concs_pulse_decay.py ├── constants.py ├── emissions ├── historical_ghgs.csv ├── rcp_2.6_data.csv ├── rcp_4.5_data.csv ├── rcp_6.0_data.csv └── rcp_8.5_data.csv ├── emissions_parser.py ├── heat_diffusion.py ├── mitigation_efficacy_analysis.py ├── radiative_forcing.py ├── results ├── co2_sat_target_year_2.6.csv ├── co2_sat_target_year_4.5.csv ├── co2_sat_target_year_6.0.csv ├── co2_sat_target_year_8.5.csv ├── co2_target_year_2.6.csv ├── co2_target_year_4.5.csv ├── co2_target_year_6.0.csv ├── co2_target_year_8.5.csv ├── simmod_run_2.6 pulse response.csv ├── simmod_run_4.5 pulse response.csv ├── simmod_run_6.0 pulse response.csv └── simmod_run_8.5 pulse response.csv ├── seq_rate_sat_years_analysis.py ├── seq_rate_start_year_analysis.py └── simmod_controller.py /README.md: -------------------------------------------------------------------------------- 1 | # SimMod - Python Simple Climate Model 2 | Version 0.3 (Alpha - may contain bugs!) 3 | ![SimMod vs. CMIP5](https://s22.postimg.cc/3rcbpfvoh/simmod_cmip5_temperature_comparison_python.png) 4 | 5 | ## Usage 6 | 0. Make sure you have numpy and pandas installed. 7 | 1. Open simmod_controller.py in your editing tool of choice 8 | 2. Select desired parameters for RCP, carbon model, climate sensitivity, etc. 9 | 3. Run simmod_controller.py in your terminal via python simmod_controller.py 10 | 4. Results will be saved as a csv in the SimMod/results folder. 11 | 12 | ## Notes 13 | The heat diffusion module that converts radiative forcing to global mean 14 | surface temperatures currently breaks for timesteps other than 1 year. 15 | This will be fixed in the near future. 16 | 17 | The BEAM carbon model overestimates 2100 atmospheric CO2 concentrations 18 | by ~25% relative to RCP scenarios. Using the pulse response carbon model 19 | is recommended for the time being. 20 | 21 | The latest BEAM model can be found here: https://github.com/RDCEP/BEAM-carbon/find/master 22 | 23 | ##CSV Output Legend 24 | MODEL INPUTS/DIAGNOSTIC VALUES 25 | 26 | date - Count of timesteps since specified run_start_year 27 | 28 | year - Calendar Year 29 | 30 | co2_pg - Emissions of CO2 by timestep from selected RCP 31 | 32 | ch4_tg - Emissions of CH4 by timestep from selected RCP 33 | 34 | n2o_tg - Emissions of N20 by timestep from selected RCP 35 | 36 | co2_forcing_rcp - Radiative forcing of CO2 in selected RCP; for comparison purposes 37 | 38 | ch4_forcing_rcp - Radiative forcing of CH4 in selected RCP; for comparison purposes 39 | 40 | n2o_forcing_rcp - Radiative forcing of N2O in selected RCP; for comparison purposes 41 | 42 | total_forcing_rcp - Total radiative forcing in selected RCP; for comparison purposes 43 | 44 | rcp_co2_ppm - CO2 ppm in selected RCP; for comparison purposes 45 | 46 | rcp_ch4_ppb - CH4 ppm in selected RCP; for comparison purposes 47 | 48 | rcp_n2o_ppb - N2O ppm in selected RCP; for comparison purposes 49 | 50 | 51 | 52 | MODEL OUTPUTS 53 | 54 | co2_pg_atm - Atmospheric CO2 concentration (in Pg CO2) 55 | 56 | ch4_tg_atm - Atmospheric CH4 concentration (in Tg CH4) 57 | 58 | n2o_tg_atm - Atmospheric N2O concentration (in Tg N2O) 59 | 60 | ch4_co2_decay_marginal - Additional CO2 from oxidation of CH4 (in Pg) 61 | 62 | co2_ppm - Parts per million CO2 63 | 64 | ch4_ppb - Parts per billion CH4 65 | 66 | n2o_ppb - Parts per billion N2O 67 | 68 | co2_forcing - Radiative forcing (watts/m^2) from CO2 69 | 70 | ch4_forcing - Radiative forcing (watts/m^2) from CH4 71 | 72 | n2o_forcing - Radiative forcing (watts/m^2) from N2O 73 | 74 | total_forcing_ghg - Total radiative forcing from GHGs 75 | 76 | rcp_nonghg_forcing - Non-GHG radiative forcing (taken from RCP) 77 | 78 | total_forcing - Sum of GHG and non-GHG forcing 79 | 80 | t_os - Aquaworld transient temperature response (no land fraction) 81 | 82 | t_eq - Equilibrium temperature reponse (no oceans) 83 | 84 | t_s - Transient temperature response (land/ocean) 85 | 86 | ## License 87 | This code is distributed under the Apache 2 License. 88 | 89 | -------------------------------------------------------------------------------- /beam_model/LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "{}" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright 2015 Nathan Matteson 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. -------------------------------------------------------------------------------- /beam_model/README.md: -------------------------------------------------------------------------------- 1 | # BEAM Carbon 2 | 3 | ## Installation 4 | 1. Clone the repo: `git clone https://github.com/RDCEP/BEAM-carbon.git`. 5 | 6 | 2. `cd` into the directory. 7 | 8 | 3. A typical `python setup.py install` should suffice. 9 | 10 | ## Usage 11 | BEAM carbon can be run in python or a command line. 12 | 13 | ### In python 14 | 15 | 1. Import the BEAMCarbon object 16 | 17 | `from beam_carbon.beam import BEAMCarbon` 18 | 19 | `beam = BEAMCarbon()` 20 | 21 | 2. Set the emissions values 22 | 23 | `beam.emissions = [10., 13., 15., ]` 24 | 25 | 3. The following example specifies decadal time steps for emissions values and calculates 26 | BEAM 10 times each year (or 100 times per 10-year time step). 27 | 28 | `beam.time_step = 10` 29 | 30 | `beam.intervals = 100` 31 | 32 | 4. Finally, run BEAM. 33 | 34 | `beam.run()` 35 | 36 | 5. Several properties of the BEAMCarbon object can affect its output. You 37 | can use either a DICE-like or linear temperature model. For more detailed 38 | runs you can also turn off the temperature-dependent recalibration of k_{1}, 39 | k_{2} and k_{h}. 40 | 41 | ### Command line 42 | 43 | * `beam_carbon -h` will acquaint you with the basic options. 44 | 45 | * Emissions can be specified as a comma-separated list (without any spaces) 46 | or in a CSV file with no header row or column: 47 | 48 | `beam_carbon -e 10,13,15` 49 | 50 | `beam_carbon --csv "./emissions.csv"` 51 | 52 | * Output is sent to `stdout` but cen be directed to a CSV file instead: 53 | 54 | `beam_carbon -e 10,13,15 -o "./beam_output.csv"` 55 | 56 | * As in python, the emissions time step and BEAM interval can be specified: 57 | 58 | `beam_carbon -e 10,13,15 --timestep 10 --interval 100` 59 | 60 | ## License 61 | 62 | This code is distributed under the Apache 2 License. -------------------------------------------------------------------------------- /beam_model/beam_carbon.egg-info/PKG-INFO: -------------------------------------------------------------------------------- 1 | Metadata-Version: 1.0 2 | Name: beam-carbon 3 | Version: 0.3 4 | Summary: Python command line application for running the BEAM carbon cycle. 5 | Home-page: UNKNOWN 6 | Author: Nathan Matteson 7 | Author-email: matteson@obstructures.org 8 | License: GPLv3 9 | Description: # BEAM Carbon 10 | 11 | ## Installation 12 | 1. Clone the repo: `git clone https://github.com/RDCEP/BEAM-carbon.git`. 13 | 14 | 2. `cd` into the directory. 15 | 16 | 3. A typical `python setup.py install` should suffice. 17 | 18 | ## Usage 19 | BEAM carbon can be run in python or a command line. 20 | 21 | ### In python 22 | 23 | 1. Import the BEAMCarbon object 24 | 25 | `from beam_carbon.beam import BEAMCarbon` 26 | 27 | `beam = BEAMCarbon()` 28 | 29 | 2. Set the emissions values 30 | 31 | `beam.emissions = [10., 13., 15., ]` 32 | 33 | 3. The following example specifies decadal time steps for emissions values and calculates 34 | BEAM 10 times each year (or 100 times per 10-year time step). 35 | 36 | `beam.time_step = 10` 37 | 38 | `beam.intervals = 100` 39 | 40 | 4. Finally, run BEAM. 41 | 42 | `beam.run()` 43 | 44 | 5. Several properties of the BEAMCarbon object can affect its output. You 45 | can use either a DICE-like or linear temperature model. For more detailed 46 | runs you can also turn off the temperature-dependent recalibration of k_{1}, 47 | k_{2} and k_{h}. 48 | 49 | ### Command line 50 | 51 | * `beam_carbon -h` will acquaint you with the basic options. 52 | 53 | * Emissions can be specified as a comma-separated list (without any spaces) 54 | or in a CSV file with no header row or column: 55 | 56 | `beam_carbon -e 10,13,15` 57 | 58 | `beam_carbon --csv "./emissions.csv"` 59 | 60 | * Output is sent to `stdout` but cen be directed to a CSV file instead: 61 | 62 | `beam_carbon -e 10,13,15 -o "./beam_output.csv"` 63 | 64 | * As in python, the emissions time step and BEAM interval can be specified: 65 | 66 | `beam_carbon -e 10,13,15 --timestep 10 --interval 100` 67 | 68 | ## License 69 | 70 | This code is distributed under the Apache 2 License. 71 | Platform: UNKNOWN 72 | -------------------------------------------------------------------------------- /beam_model/beam_carbon.egg-info/SOURCES.txt: -------------------------------------------------------------------------------- 1 | setup.py 2 | beam_carbon/__init__.py 3 | beam_carbon/__main__.py 4 | beam_carbon/beam.py 5 | beam_carbon/temperature.py 6 | beam_carbon.egg-info/PKG-INFO 7 | beam_carbon.egg-info/SOURCES.txt 8 | beam_carbon.egg-info/dependency_links.txt 9 | beam_carbon.egg-info/entry_points.txt 10 | beam_carbon.egg-info/top_level.txt 11 | test/test_beam_carbon.py -------------------------------------------------------------------------------- /beam_model/beam_carbon.egg-info/dependency_links.txt: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /beam_model/beam_carbon.egg-info/entry_points.txt: -------------------------------------------------------------------------------- 1 | [console_scripts] 2 | beam_carbon = beam_carbon.beam:main 3 | 4 | -------------------------------------------------------------------------------- /beam_model/beam_carbon.egg-info/top_level.txt: -------------------------------------------------------------------------------- 1 | beam_carbon 2 | -------------------------------------------------------------------------------- /beam_model/beam_carbon/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hausfath/SimMod/4f882992d94b5229a9de3542349ed30e83bae439/beam_model/beam_carbon/__init__.py -------------------------------------------------------------------------------- /beam_model/beam_carbon/__main__.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | 4 | from .beam import main 5 | 6 | main() -------------------------------------------------------------------------------- /beam_model/beam_carbon/beam.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | from __future__ import division 4 | from math import floor 5 | import numpy as np 6 | import pandas as pd 7 | from beam_carbon.temperature import DICETemperature, LinearTemperature 8 | 9 | 10 | __version__ = '0.3' 11 | 12 | 13 | class BEAMCarbon(object): 14 | """Class for computing BEAM carbon cycle from emissions input. 15 | """ 16 | def __init__(self, emissions=None, time_step=1, intervals=10): 17 | """BEAMCarbon init 18 | 19 | Args: 20 | :param emissions: Array of annual emissions in GtC, beginning 21 | in 2005 22 | :type emissions: list 23 | :param time_step: Time between emissions values in years 24 | :type time_step: float 25 | :param intervals: Number of times to calculate BEAM carbon 26 | per timestep 27 | :type intervals: int 28 | """ 29 | self._temperature_dependent = True 30 | self._intervals = intervals 31 | self._time_step = time_step 32 | self.temperature = DICETemperature(self.time_step, self.intervals, 0) 33 | 34 | if emissions is not None and type(emissions) in [list, np.ndarray]: 35 | self.emissions = emissions 36 | else: 37 | self.emissions = np.zeros(1) 38 | 39 | self._k_1 = 8e-7 40 | self._k_2 = 4.53e-10 41 | self._k_h = 1.23e3 42 | self._A = None 43 | self._B = None 44 | self._Alk = 767. 45 | 46 | self._initial_carbon = np.array([808.9, 725., 35641.]) 47 | self._carbon_mass = None 48 | 49 | self._linear_temperature = False 50 | 51 | @property 52 | def initial_carbon(self): 53 | """Values for initial carbon in atmosphere, upper and lower oceans 54 | in GtC. Default values are from 2005. 55 | """ 56 | return self._initial_carbon 57 | 58 | @initial_carbon.setter 59 | def initial_carbon(self, value): 60 | self._initial_carbon = value 61 | 62 | @property 63 | def carbon_mass(self): 64 | if self._carbon_mass is None: 65 | self._carbon_mass = self.initial_carbon.copy() 66 | return self._carbon_mass 67 | 68 | @carbon_mass.setter 69 | def carbon_mass(self, value): 70 | self._carbon_mass = value 71 | 72 | @property 73 | def transfer_matrix(self): 74 | """3 by 3 matrix of transfer coefficients for carbon cycle. 75 | """ 76 | return np.array([ 77 | -self.k_a, self.k_a * self.A * self.B, 0, 78 | self.k_a, -(self.k_a * self.A * self.B) - self.k_d, 79 | self.k_d / self.delta, 80 | 0, self.k_d, -self.k_d / self.delta, 81 | ]).reshape((3, 3,)) 82 | 83 | @property 84 | def emissions(self): 85 | """Array of emissions values in GtC per year. 86 | """ 87 | return self._emissions 88 | 89 | @emissions.setter 90 | def emissions(self, value): 91 | self._emissions = value 92 | self.temperature.n = self.n 93 | 94 | @property 95 | def time_step(self): 96 | """Size of time steps in emissions array. 97 | """ 98 | return self._time_step 99 | 100 | @time_step.setter 101 | def time_step(self, value): 102 | self._time_step = value 103 | self.temperature.time_step = self.time_step 104 | 105 | @property 106 | def n(self): 107 | return len(self.emissions) 108 | 109 | @property 110 | def intervals(self): 111 | """Number of intervals in each time step. 112 | """ 113 | return self._intervals 114 | 115 | @intervals.setter 116 | def intervals(self, value): 117 | self._intervals = value 118 | self.temperature.periods = self.intervals 119 | 120 | @property 121 | def k_a(self): 122 | """Time constant k_{a} (used for building transfer matrix). 123 | """ 124 | return .2 125 | 126 | @property 127 | def k_d(self): 128 | """Time constant k_{d} (used for building transfer matrix). 129 | """ 130 | return .05 131 | 132 | @property 133 | def delta(self): 134 | """Ratio of lower ocean to upper ocean (used for building transfer 135 | matrix). 136 | """ 137 | return 50. 138 | 139 | @property 140 | def k_h(self): 141 | """CO2 solubility. 142 | """ 143 | if self._k_h is None: 144 | self._k_h = self.get_kh(self.temperature.initial_temp[1]) 145 | return self._k_h 146 | 147 | @k_h.setter 148 | def k_h(self, value): 149 | self._k_h = value 150 | 151 | @property 152 | def k_1(self): 153 | """First dissociation constant. 154 | """ 155 | if self._k_1 is None: 156 | self._k_1 = self.get_k1(self.temperature.initial_temp[1]) 157 | return self._k_1 158 | 159 | @k_1.setter 160 | def k_1(self, value): 161 | self._k_1 = value 162 | 163 | @property 164 | def k_2(self): 165 | """Second dissociation constant. 166 | """ 167 | if self._k_2 is None: 168 | self._k_2 = self.get_k2(self.temperature.initial_temp[1]) 169 | return self._k_2 170 | 171 | @k_2.setter 172 | def k_2(self, value): 173 | self._k_2 = value 174 | 175 | @property 176 | def AM(self): 177 | """Moles in the atmosphere. 178 | """ 179 | return 1.77e20 180 | 181 | @property 182 | def OM(self): 183 | """Moles in the ocean. 184 | """ 185 | return 7.8e22 186 | 187 | @property 188 | def Alk(self): 189 | """Alkalinity in GtC. 190 | """ 191 | return self._Alk 192 | 193 | @Alk.setter 194 | def Alk(self, value): 195 | self._Alk = value 196 | 197 | @property 198 | def A(self): 199 | """Ratio of mass of CO2 in atmospheric to upper ocean dissolved CO2. 200 | """ 201 | if self._A is None: 202 | if self.temperature_dependent: 203 | self.k_h = self.get_kh(self.temperature.initial_temp[1]) 204 | self._A = self.get_A() 205 | return self._A 206 | 207 | @A.setter 208 | def A(self, value): 209 | self._A = value 210 | 211 | @property 212 | def B(self): 213 | """Ratio of dissolved CO2 to total oceanic carbon. 214 | """ 215 | if self._B is None: 216 | self.temp_calibrate(self.temperature.initial_temp[1]) 217 | self._B = self.get_B(self.get_H(self.initial_carbon[1])) 218 | return self._B 219 | 220 | @B.setter 221 | def B(self, value): 222 | self._B = value 223 | 224 | @property 225 | def salinity(self): 226 | """Salinity in g / kg of seawater. 227 | """ 228 | return 35. 229 | 230 | @property 231 | def temperature_dependent(self): 232 | """Switch for calculating temperature-dependent parameters k_1, 233 | k_2, and k_h. 234 | """ 235 | return self._temperature_dependent 236 | 237 | @property 238 | def linear_temperature(self): 239 | return self._linear_temperature 240 | 241 | @linear_temperature.setter 242 | def linear_temperature(self, value): 243 | if value: 244 | self.temperature = LinearTemperature(self.time_step, 245 | self.intervals, self.n) 246 | else: 247 | self.temperature = DICETemperature(self.time_step, 248 | self.intervals, self.n) 249 | self._linear_temperature = value 250 | 251 | @temperature_dependent.setter 252 | def temperature_dependent(self, value): 253 | if type(value) is bool: 254 | self._temperature_dependent = value 255 | else: 256 | raise TypeError('BEAMCarbon.temperature_dependent must be True or False.') 257 | 258 | def temp_calibrate(self, to): 259 | """Recalibrate temperature-dependent parameters k_1, k_2, and k_h. 260 | """ 261 | self.k_1 = self.get_k1(to) 262 | self.k_2 = self.get_k2(to) 263 | self.k_h = self.get_kh(to) 264 | self.A = self.get_A() 265 | 266 | def get_B(self, h): 267 | """Calculate B (Ratio of dissolved CO2 to total oceanic carbon), 268 | given H (the concentration of hydrogen ions) 269 | 270 | :param h: H, concentration of hydrogen ions [H+] (the (pH) of seawater) 271 | :type h: float 272 | :return: B, ratio of dissolved CO2 to total oceanic carbon 273 | :rtype: float 274 | """ 275 | return 1 / (1 + self.k_1 / h + self.k_1 * self.k_2 / h ** 2) 276 | 277 | def get_A(self): 278 | """Calculate A based on temperature-dependent changes in k_h 279 | 280 | :return: A 281 | :rtype: float 282 | """ 283 | return self.k_h * self.AM / (self.OM / (self.delta + 1)) 284 | 285 | def get_H(self, mass_upper): 286 | """Solve for H+, the concentration of hydrogen ions 287 | (the (pH) of seawater). 288 | 289 | :param mass_upper: Carbon mass in ocenas in GtC 290 | :type mass_upper: float 291 | :return: H 292 | :rtype: float 293 | """ 294 | p0 = 1 295 | p1 = (self.k_1 - mass_upper * self.k_1 / self.Alk) 296 | p2 = (1 - 2 * mass_upper / self.Alk) * self.k_1 * self.k_2 297 | return max(np.roots([p0, p1, p2])) 298 | 299 | def get_kh(self, temp_ocean): 300 | """Calculate temperature dependent k_h 301 | 302 | :param temp_ocean: ocean temperature (C) 303 | :type temp_ocean: float 304 | :return: k_h 305 | :rtype: float 306 | """ 307 | t = 283.15 + temp_ocean 308 | k0 = np.exp( 309 | 9345.17 / t - 60.2409 + 23.3585 * np.log(t / 100.) + 310 | self.salinity * ( 311 | .023517 - .00023656 * t + .0047036 * (t / 100.) ** 2)) 312 | kh = 1 / (k0 * 1.027) * 55.57 313 | self.A = kh * self.AM / (self.OM / (self.delta + 1.)) 314 | return kh 315 | 316 | def get_pk1(self, t): 317 | return ( 318 | -13.721 + 0.031334 * t + 3235.76 / t + 1.3e-5 * self.salinity * t - 319 | 0.1031 * self.salinity ** 0.5) 320 | 321 | def get_pk2(self, t): 322 | return ( 323 | 5371.96 + 1.671221 * t + 0.22913 * self.salinity + 324 | 18.3802 * np.log10(self.salinity)) - (128375.28 / t + 325 | 2194.30 * np.log10(t) + 8.0944e-4 * self.salinity * t + 326 | 5617.11 * np.log10(self.salinity) / t) + 2.136 * self.salinity / t 327 | 328 | def get_k1(self, temp_ocean): 329 | """Calculate temperature dependent k_1 330 | 331 | :param temp_ocean: ocean temperature (C) 332 | :type temp_ocean: float 333 | :return: k_1 334 | :rtype: float 335 | """ 336 | return 10 ** -self.get_pk1(283.15 + temp_ocean) 337 | 338 | def get_k2(self, temp_ocean): 339 | """Calculate temperature dependent k_2 340 | 341 | :param temp_ocean: ocean temperature (C) 342 | :type temp_ocean: float 343 | :return: k_2 344 | :rtype: float 345 | """ 346 | return 10 ** -self.get_pk2(283.15 + temp_ocean) 347 | 348 | def run(self): 349 | N = self.n * self.intervals 350 | self.carbon_mass = self.initial_carbon.copy() 351 | total_carbon = 0 352 | emissions = np.zeros(3) 353 | temp_atmosphere, temp_ocean = self.temperature.initial_temp 354 | 355 | output = np.tile(np.concatenate(( 356 | self.initial_carbon, 357 | self.temperature.initial_temp, 358 | np.array([ 359 | self.transfer_matrix[0][1], self.transfer_matrix[1][1]]), 360 | np.zeros(3), 361 | )).reshape((10, 1)).copy(), (self.n + 1, )) 362 | output = pd.DataFrame( 363 | output, 364 | index=['mass_atmosphere', 'mass_upper', 'mass_lower', 365 | 'temp_atmosphere', 'temp_ocean', 'phi12', 'phi22', 366 | 'cumulative', 'A', 'B'], 367 | columns=np.arange(self.n + 1) * self.time_step, 368 | ) 369 | 370 | for i in xrange(N): 371 | 372 | _i = int(floor(i / self.intervals)) # time_step 373 | 374 | if i % self.intervals == 0 and self.temperature_dependent: 375 | self.temp_calibrate(temp_ocean) 376 | 377 | h = self.get_H(self.carbon_mass[1]) 378 | self.B = self.get_B(h) 379 | 380 | emissions[0] = self.emissions[_i] * self.time_step / self.intervals 381 | total_carbon += emissions[0] 382 | 383 | self.carbon_mass += ( 384 | (self.transfer_matrix * 385 | np.divide(self.carbon_mass, self.intervals)).sum(axis=1) + 386 | emissions) 387 | 388 | if (i + 1) % self.intervals == 0: 389 | 390 | emissions[0] = self.emissions[_i] * self.time_step 391 | total_carbon += emissions[0] 392 | 393 | ta = temp_atmosphere 394 | temp_atmosphere = self.temperature.temp_atmosphere( 395 | index=_i, temp_atmosphere=ta, 396 | temp_ocean=temp_ocean, mass_atmosphere=self.carbon_mass[0], 397 | carbon=total_carbon, initial_carbon=self.initial_carbon, 398 | phi11=self.transfer_matrix[0][0], 399 | phi21=self.transfer_matrix[1][0]) 400 | temp_ocean = self.temperature.temp_ocean( 401 | ta, temp_ocean) 402 | 403 | output.iloc[:, _i + 1] = ( 404 | np.concatenate((self.carbon_mass.copy(), 405 | np.array([temp_atmosphere, temp_ocean]), 406 | np.array([self.transfer_matrix[0][1], 407 | self.transfer_matrix[1][1], 408 | total_carbon, 409 | self.A, self.B])))) 410 | 411 | return output 412 | 413 | 414 | def main(): 415 | def create_args(): 416 | import argparse 417 | parser = argparse.ArgumentParser( 418 | description='TKTK.' 419 | ) 420 | input_group = parser.add_mutually_exclusive_group() 421 | input_group.add_argument( 422 | '-e', '--emissions', type=str, 423 | help='Comma separated values to use as emissions input.') 424 | input_group.add_argument( 425 | '-c', '--input', '--csv', type=str, 426 | help='Path to CSV file to use as input.') 427 | parser.add_argument( 428 | '-t', '--timestep', type=float, default=1, 429 | help='Time step for input values in years. Default is 1.') 430 | parser.add_argument( 431 | '-i', '--intervals', type=int, default=10, 432 | help='BEAM calculation intervals per time step. Default is 10.') 433 | parser.add_argument( 434 | '-o', '--output', type=str, default='beam_output.csv', 435 | help='Write values to CSV file instead of stdout') 436 | 437 | return parser.parse_args() 438 | 439 | args = create_args() 440 | 441 | def run_beam(e): 442 | beam = BEAMCarbon(e) 443 | if args.timestep: 444 | beam.time_step = args.timestep 445 | if args.intervals: 446 | beam.intervals = args.intervals 447 | return beam.run() 448 | 449 | def write_beam(output, csv=None): 450 | if csv is not None: 451 | output.to_csv(csv) 452 | else: 453 | print(output.to_string()) 454 | return True 455 | 456 | csv = args.output if args.output else None 457 | emissions = np.array([float(n) for n in args.emissions.split(',')]) \ 458 | if args.emissions else None 459 | 460 | if args.input: 461 | with open(args.input, 'r') as f: 462 | for line in f: 463 | write_beam(run_beam(line.split(',')), csv=csv) 464 | else: 465 | write_beam(run_beam(emissions), csv=csv) 466 | 467 | 468 | if __name__ == '__main__': 469 | b = BEAMCarbon() 470 | b.time_step = 10. 471 | b.intervals = 200 472 | N = 100 473 | b.emissions = np.array([ 474 | # 7.10, 7.97, 475 | 9.58, 12.25, 14.72, 16.07, 17.43, 19.16, 20.89, 23.22, 26.15, 29.09 476 | ]) 477 | # df = pd.DataFrame.from_csv('webDICE-CSV.csv', header=-1, index_col=0) 478 | # b.emissions = np.array(df.ix['emissions_total', :]) 479 | # b.emissions = np.concatenate((10. * np.exp(-np.arange(N) / 40), np.zeros(100-N))) 480 | b.temperature_dependent = False 481 | b.linear_temperature = False 482 | r = b.run() 483 | print(r) -------------------------------------------------------------------------------- /beam_model/beam_carbon/temperature.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | from __future__ import division 4 | from math import floor 5 | import numpy as np 6 | 7 | 8 | class Temperature(object): 9 | def __init__(self, time_step, periods, n): 10 | self.time_step = time_step 11 | self.periods = periods 12 | self.n = n 13 | 14 | @property 15 | def initial_temp(self): 16 | return np.array([.7307, .0068]) 17 | 18 | @property 19 | def forcing_ghg_2000(self): 20 | """Value from DICE2010 21 | """ 22 | return .83 23 | 24 | @property 25 | def forcing_ghg_2100(self): 26 | return .30 27 | 28 | @property 29 | def transfer_matrix(self): 30 | """Values from DICE2010 31 | """ 32 | return np.array([.208, 0., .310, .050]) 33 | 34 | @property 35 | def forcing_co2_doubling(self): 36 | return 3.8 37 | 38 | @property 39 | def temp_co2_doubling(self): 40 | return 3.2 41 | 42 | @property 43 | def mass_pi(self): 44 | """Pre-industrial carbon in GtC 45 | 46 | :rtype: float 47 | """ 48 | return 592.14 49 | 50 | @property 51 | def forcing_ghg(self): 52 | """F_EX, Exogenous forcing for other greenhouse gases 53 | 54 | Returns: 55 | :return: Array of forcing values 56 | :rtype: np.ndarray 57 | 58 | """ 59 | _n = int(floor(100 / self.time_step)) 60 | a = self.forcing_ghg_2000 + (1. / _n) * ( 61 | self.forcing_ghg_2100 - self.forcing_ghg_2000 62 | ) * np.arange(_n + 1) 63 | b = self.forcing_ghg_2100 * np.ones(self.n - (_n + 1)) \ 64 | if self.n > _n \ 65 | else np.array([]) 66 | return np.concatenate((a, b))[:self.n] 67 | 68 | def forcing(self, index, mass_atmosphere): 69 | """F, Forcing, W/m^2 70 | 71 | Args: 72 | :param index: Current time step 73 | :type index: int 74 | :param mass_atmosphere: Carbon mass in the atmosphere, GtC 75 | :type mass_atmosphere: float 76 | 77 | Returns: 78 | :return: Forcing 79 | :rtype: float 80 | 81 | """ 82 | return ( 83 | self.forcing_co2_doubling * 84 | (np.log( 85 | mass_atmosphere / self.mass_pi 86 | ) / np.log(2)) + self.forcing_ghg[index] 87 | ) 88 | 89 | def temp_ocean(self, temp_atmosphere, temp_ocean): 90 | """T_LO, increase in atmospheric temperature since 1750, degrees C 91 | 92 | Args: 93 | :param temp_atmosphere: Atmospheric temperature at t-1 94 | :type temp_atmosphere: float 95 | :param temp_ocean: Ocean temperature at t-1 96 | :type temp_ocean: float 97 | 98 | Returns: 99 | :returns: T_Ocean(t-1) + ξ_4 * (T_AT(t-1) - T_Ocean(t-1)) 100 | :rtype: float 101 | """ 102 | return ( 103 | temp_ocean + self.transfer_matrix[3] * 104 | (temp_atmosphere - temp_ocean) 105 | ) 106 | 107 | 108 | class DICETemperature(Temperature): 109 | 110 | def temp_atmosphere(self, index, temp_atmosphere, temp_ocean, 111 | mass_atmosphere, **kwargs): 112 | """T_AT, increase in atmospheric temperature since 1750, degrees C 113 | 114 | Args: 115 | :param temp_atmosphere: Atmospheric temperature at t-1 116 | :type temp_atmosphere: float 117 | :param temp_ocean: Lower ocean temperature at t-1 118 | :type temp_ocean: float 119 | :param forcing: Forcings at t 120 | :type forcing: float 121 | 122 | Returns: 123 | :returns: T_AT(t-1) + ξ_1 * (F(t) - F2xCO2 / T2xCO2 * T_AT(t-1) - ξ_3 * (T_AT(t-1) - T_Ocean(t-1))) 124 | :rtype: float 125 | """ 126 | return ( 127 | temp_atmosphere + 128 | self.transfer_matrix[0] * ( 129 | self.forcing(index, mass_atmosphere) - ( 130 | self.forcing_co2_doubling / self.temp_co2_doubling) * 131 | temp_atmosphere - self.transfer_matrix[2] * 132 | (temp_atmosphere - temp_ocean))) 133 | 134 | 135 | class LinearTemperature(Temperature): 136 | def temp_atmosphere(self, *args, **kwargs): 137 | # return ( 138 | # self.initial_temp[0] + 139 | # kwargs['carbon'] * ( 140 | # self.temp_co2_doubling / (( 141 | # 2 * self.mass_pi + ( 142 | # 2 * self.mass_pi - 143 | # (kwargs['initial_carbon'][0] * kwargs['phi11']) - 144 | # (kwargs['initial_carbon'][1] * kwargs['phi21']) 145 | # )) * 1e-3) 146 | # ) * 1e-3 147 | # ) 148 | return self.initial_temp[0] + 1.7e-3 * kwargs['carbon'] -------------------------------------------------------------------------------- /beam_model/build/lib/beam_carbon/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hausfath/SimMod/4f882992d94b5229a9de3542349ed30e83bae439/beam_model/build/lib/beam_carbon/__init__.py -------------------------------------------------------------------------------- /beam_model/build/lib/beam_carbon/__main__.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | 4 | from .beam import main 5 | 6 | main() -------------------------------------------------------------------------------- /beam_model/build/lib/beam_carbon/beam.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | from __future__ import division 4 | from math import floor 5 | import numpy as np 6 | import pandas as pd 7 | from beam_carbon.temperature import DICETemperature, LinearTemperature 8 | 9 | 10 | __version__ = '0.3' 11 | 12 | 13 | class BEAMCarbon(object): 14 | """Class for computing BEAM carbon cycle from emissions input. 15 | """ 16 | def __init__(self, emissions=None, time_step=1, intervals=10): 17 | """BEAMCarbon init 18 | 19 | Args: 20 | :param emissions: Array of annual emissions in GtC, beginning 21 | in 2005 22 | :type emissions: list 23 | :param time_step: Time between emissions values in years 24 | :type time_step: float 25 | :param intervals: Number of times to calculate BEAM carbon 26 | per timestep 27 | :type intervals: int 28 | """ 29 | self._temperature_dependent = True 30 | self._intervals = intervals 31 | self._time_step = time_step 32 | self.temperature = DICETemperature(self.time_step, self.intervals, 0) 33 | 34 | if emissions is not None and type(emissions) in [list, np.ndarray]: 35 | self.emissions = emissions 36 | else: 37 | self.emissions = np.zeros(1) 38 | 39 | self._k_1 = 8e-7 40 | self._k_2 = 4.53e-10 41 | self._k_h = 1.23e3 42 | self._A = None 43 | self._B = None 44 | self._Alk = 767. 45 | 46 | self._initial_carbon = np.array([808.9, 725., 35641.]) 47 | self._carbon_mass = None 48 | 49 | self._linear_temperature = False 50 | 51 | @property 52 | def initial_carbon(self): 53 | """Values for initial carbon in atmosphere, upper and lower oceans 54 | in GtC. Default values are from 2005. 55 | """ 56 | return self._initial_carbon 57 | 58 | @initial_carbon.setter 59 | def initial_carbon(self, value): 60 | self._initial_carbon = value 61 | 62 | @property 63 | def carbon_mass(self): 64 | if self._carbon_mass is None: 65 | self._carbon_mass = self.initial_carbon.copy() 66 | return self._carbon_mass 67 | 68 | @carbon_mass.setter 69 | def carbon_mass(self, value): 70 | self._carbon_mass = value 71 | 72 | @property 73 | def transfer_matrix(self): 74 | """3 by 3 matrix of transfer coefficients for carbon cycle. 75 | """ 76 | return np.array([ 77 | -self.k_a, self.k_a * self.A * self.B, 0, 78 | self.k_a, -(self.k_a * self.A * self.B) - self.k_d, 79 | self.k_d / self.delta, 80 | 0, self.k_d, -self.k_d / self.delta, 81 | ]).reshape((3, 3,)) 82 | 83 | @property 84 | def emissions(self): 85 | """Array of emissions values in GtC per year. 86 | """ 87 | return self._emissions 88 | 89 | @emissions.setter 90 | def emissions(self, value): 91 | self._emissions = value 92 | self.temperature.n = self.n 93 | 94 | @property 95 | def time_step(self): 96 | """Size of time steps in emissions array. 97 | """ 98 | return self._time_step 99 | 100 | @time_step.setter 101 | def time_step(self, value): 102 | self._time_step = value 103 | self.temperature.time_step = self.time_step 104 | 105 | @property 106 | def n(self): 107 | return len(self.emissions) 108 | 109 | @property 110 | def intervals(self): 111 | """Number of intervals in each time step. 112 | """ 113 | return self._intervals 114 | 115 | @intervals.setter 116 | def intervals(self, value): 117 | self._intervals = value 118 | self.temperature.periods = self.intervals 119 | 120 | @property 121 | def k_a(self): 122 | """Time constant k_{a} (used for building transfer matrix). 123 | """ 124 | return .2 125 | 126 | @property 127 | def k_d(self): 128 | """Time constant k_{d} (used for building transfer matrix). 129 | """ 130 | return .05 131 | 132 | @property 133 | def delta(self): 134 | """Ratio of lower ocean to upper ocean (used for building transfer 135 | matrix). 136 | """ 137 | return 50. 138 | 139 | @property 140 | def k_h(self): 141 | """CO2 solubility. 142 | """ 143 | if self._k_h is None: 144 | self._k_h = self.get_kh(self.temperature.initial_temp[1]) 145 | return self._k_h 146 | 147 | @k_h.setter 148 | def k_h(self, value): 149 | self._k_h = value 150 | 151 | @property 152 | def k_1(self): 153 | """First dissociation constant. 154 | """ 155 | if self._k_1 is None: 156 | self._k_1 = self.get_k1(self.temperature.initial_temp[1]) 157 | return self._k_1 158 | 159 | @k_1.setter 160 | def k_1(self, value): 161 | self._k_1 = value 162 | 163 | @property 164 | def k_2(self): 165 | """Second dissociation constant. 166 | """ 167 | if self._k_2 is None: 168 | self._k_2 = self.get_k2(self.temperature.initial_temp[1]) 169 | return self._k_2 170 | 171 | @k_2.setter 172 | def k_2(self, value): 173 | self._k_2 = value 174 | 175 | @property 176 | def AM(self): 177 | """Moles in the atmosphere. 178 | """ 179 | return 1.77e20 180 | 181 | @property 182 | def OM(self): 183 | """Moles in the ocean. 184 | """ 185 | return 7.8e22 186 | 187 | @property 188 | def Alk(self): 189 | """Alkalinity in GtC. 190 | """ 191 | return self._Alk 192 | 193 | @Alk.setter 194 | def Alk(self, value): 195 | self._Alk = value 196 | 197 | @property 198 | def A(self): 199 | """Ratio of mass of CO2 in atmospheric to upper ocean dissolved CO2. 200 | """ 201 | if self._A is None: 202 | if self.temperature_dependent: 203 | self.k_h = self.get_kh(self.temperature.initial_temp[1]) 204 | self._A = self.get_A() 205 | return self._A 206 | 207 | @A.setter 208 | def A(self, value): 209 | self._A = value 210 | 211 | @property 212 | def B(self): 213 | """Ratio of dissolved CO2 to total oceanic carbon. 214 | """ 215 | if self._B is None: 216 | self.temp_calibrate(self.temperature.initial_temp[1]) 217 | self._B = self.get_B(self.get_H(self.initial_carbon[1])) 218 | return self._B 219 | 220 | @B.setter 221 | def B(self, value): 222 | self._B = value 223 | 224 | @property 225 | def salinity(self): 226 | """Salinity in g / kg of seawater. 227 | """ 228 | return 35. 229 | 230 | @property 231 | def temperature_dependent(self): 232 | """Switch for calculating temperature-dependent parameters k_1, 233 | k_2, and k_h. 234 | """ 235 | return self._temperature_dependent 236 | 237 | @property 238 | def linear_temperature(self): 239 | return self._linear_temperature 240 | 241 | @linear_temperature.setter 242 | def linear_temperature(self, value): 243 | if value: 244 | self.temperature = LinearTemperature(self.time_step, 245 | self.intervals, self.n) 246 | else: 247 | self.temperature = DICETemperature(self.time_step, 248 | self.intervals, self.n) 249 | self._linear_temperature = value 250 | 251 | @temperature_dependent.setter 252 | def temperature_dependent(self, value): 253 | if type(value) is bool: 254 | self._temperature_dependent = value 255 | else: 256 | raise TypeError('BEAMCarbon.temperature_dependent must be True or False.') 257 | 258 | def temp_calibrate(self, to): 259 | """Recalibrate temperature-dependent parameters k_1, k_2, and k_h. 260 | """ 261 | self.k_1 = self.get_k1(to) 262 | self.k_2 = self.get_k2(to) 263 | self.k_h = self.get_kh(to) 264 | self.A = self.get_A() 265 | 266 | def get_B(self, h): 267 | """Calculate B (Ratio of dissolved CO2 to total oceanic carbon), 268 | given H (the concentration of hydrogen ions) 269 | 270 | :param h: H, concentration of hydrogen ions [H+] (the (pH) of seawater) 271 | :type h: float 272 | :return: B, ratio of dissolved CO2 to total oceanic carbon 273 | :rtype: float 274 | """ 275 | return 1 / (1 + self.k_1 / h + self.k_1 * self.k_2 / h ** 2) 276 | 277 | def get_A(self): 278 | """Calculate A based on temperature-dependent changes in k_h 279 | 280 | :return: A 281 | :rtype: float 282 | """ 283 | return self.k_h * self.AM / (self.OM / (self.delta + 1)) 284 | 285 | def get_H(self, mass_upper): 286 | """Solve for H+, the concentration of hydrogen ions 287 | (the (pH) of seawater). 288 | 289 | :param mass_upper: Carbon mass in ocenas in GtC 290 | :type mass_upper: float 291 | :return: H 292 | :rtype: float 293 | """ 294 | p0 = 1 295 | p1 = (self.k_1 - mass_upper * self.k_1 / self.Alk) 296 | p2 = (1 - 2 * mass_upper / self.Alk) * self.k_1 * self.k_2 297 | return max(np.roots([p0, p1, p2])) 298 | 299 | def get_kh(self, temp_ocean): 300 | """Calculate temperature dependent k_h 301 | 302 | :param temp_ocean: ocean temperature (C) 303 | :type temp_ocean: float 304 | :return: k_h 305 | :rtype: float 306 | """ 307 | t = 283.15 + temp_ocean 308 | k0 = np.exp( 309 | 9345.17 / t - 60.2409 + 23.3585 * np.log(t / 100.) + 310 | self.salinity * ( 311 | .023517 - .00023656 * t + .0047036 * (t / 100.) ** 2)) 312 | kh = 1 / (k0 * 1.027) * 55.57 313 | self.A = kh * self.AM / (self.OM / (self.delta + 1.)) 314 | return kh 315 | 316 | def get_pk1(self, t): 317 | return ( 318 | -13.721 + 0.031334 * t + 3235.76 / t + 1.3e-5 * self.salinity * t - 319 | 0.1031 * self.salinity ** 0.5) 320 | 321 | def get_pk2(self, t): 322 | return ( 323 | 5371.96 + 1.671221 * t + 0.22913 * self.salinity + 324 | 18.3802 * np.log10(self.salinity)) - (128375.28 / t + 325 | 2194.30 * np.log10(t) + 8.0944e-4 * self.salinity * t + 326 | 5617.11 * np.log10(self.salinity) / t) + 2.136 * self.salinity / t 327 | 328 | def get_k1(self, temp_ocean): 329 | """Calculate temperature dependent k_1 330 | 331 | :param temp_ocean: ocean temperature (C) 332 | :type temp_ocean: float 333 | :return: k_1 334 | :rtype: float 335 | """ 336 | return 10 ** -self.get_pk1(283.15 + temp_ocean) 337 | 338 | def get_k2(self, temp_ocean): 339 | """Calculate temperature dependent k_2 340 | 341 | :param temp_ocean: ocean temperature (C) 342 | :type temp_ocean: float 343 | :return: k_2 344 | :rtype: float 345 | """ 346 | return 10 ** -self.get_pk2(283.15 + temp_ocean) 347 | 348 | def run(self): 349 | N = self.n * self.intervals 350 | self.carbon_mass = self.initial_carbon.copy() 351 | total_carbon = 0 352 | emissions = np.zeros(3) 353 | temp_atmosphere, temp_ocean = self.temperature.initial_temp 354 | 355 | output = np.tile(np.concatenate(( 356 | self.initial_carbon, 357 | self.temperature.initial_temp, 358 | np.array([ 359 | self.transfer_matrix[0][1], self.transfer_matrix[1][1]]), 360 | np.zeros(3), 361 | )).reshape((10, 1)).copy(), (self.n + 1, )) 362 | output = pd.DataFrame( 363 | output, 364 | index=['mass_atmosphere', 'mass_upper', 'mass_lower', 365 | 'temp_atmosphere', 'temp_ocean', 'phi12', 'phi22', 366 | 'cumulative', 'A', 'B'], 367 | columns=np.arange(self.n + 1) * self.time_step, 368 | ) 369 | 370 | for i in xrange(N): 371 | 372 | _i = int(floor(i / self.intervals)) # time_step 373 | 374 | if i % self.intervals == 0 and self.temperature_dependent: 375 | self.temp_calibrate(temp_ocean) 376 | 377 | h = self.get_H(self.carbon_mass[1]) 378 | self.B = self.get_B(h) 379 | 380 | emissions[0] = self.emissions[_i] * self.time_step / self.intervals 381 | total_carbon += emissions[0] 382 | 383 | self.carbon_mass += ( 384 | (self.transfer_matrix * 385 | np.divide(self.carbon_mass, self.intervals)).sum(axis=1) + 386 | emissions) 387 | 388 | if (i + 1) % self.intervals == 0: 389 | 390 | emissions[0] = self.emissions[_i] * self.time_step 391 | total_carbon += emissions[0] 392 | 393 | ta = temp_atmosphere 394 | temp_atmosphere = self.temperature.temp_atmosphere( 395 | index=_i, temp_atmosphere=ta, 396 | temp_ocean=temp_ocean, mass_atmosphere=self.carbon_mass[0], 397 | carbon=total_carbon, initial_carbon=self.initial_carbon, 398 | phi11=self.transfer_matrix[0][0], 399 | phi21=self.transfer_matrix[1][0]) 400 | temp_ocean = self.temperature.temp_ocean( 401 | ta, temp_ocean) 402 | 403 | output.iloc[:, _i + 1] = ( 404 | np.concatenate((self.carbon_mass.copy(), 405 | np.array([temp_atmosphere, temp_ocean]), 406 | np.array([self.transfer_matrix[0][1], 407 | self.transfer_matrix[1][1], 408 | total_carbon, 409 | self.A, self.B])))) 410 | 411 | return output 412 | 413 | 414 | def main(): 415 | def create_args(): 416 | import argparse 417 | parser = argparse.ArgumentParser( 418 | description='TKTK.' 419 | ) 420 | input_group = parser.add_mutually_exclusive_group() 421 | input_group.add_argument( 422 | '-e', '--emissions', type=str, 423 | help='Comma separated values to use as emissions input.') 424 | input_group.add_argument( 425 | '-c', '--input', '--csv', type=str, 426 | help='Path to CSV file to use as input.') 427 | parser.add_argument( 428 | '-t', '--timestep', type=float, default=1, 429 | help='Time step for input values in years. Default is 1.') 430 | parser.add_argument( 431 | '-i', '--intervals', type=int, default=10, 432 | help='BEAM calculation intervals per time step. Default is 10.') 433 | parser.add_argument( 434 | '-o', '--output', type=str, default='beam_output.csv', 435 | help='Write values to CSV file instead of stdout') 436 | 437 | return parser.parse_args() 438 | 439 | args = create_args() 440 | 441 | def run_beam(e): 442 | beam = BEAMCarbon(e) 443 | if args.timestep: 444 | beam.time_step = args.timestep 445 | if args.intervals: 446 | beam.intervals = args.intervals 447 | return beam.run() 448 | 449 | def write_beam(output, csv=None): 450 | if csv is not None: 451 | output.to_csv(csv) 452 | else: 453 | print(output.to_string()) 454 | return True 455 | 456 | csv = args.output if args.output else None 457 | emissions = np.array([float(n) for n in args.emissions.split(',')]) \ 458 | if args.emissions else None 459 | 460 | if args.input: 461 | with open(args.input, 'r') as f: 462 | for line in f: 463 | write_beam(run_beam(line.split(',')), csv=csv) 464 | else: 465 | write_beam(run_beam(emissions), csv=csv) 466 | 467 | 468 | if __name__ == '__main__': 469 | b = BEAMCarbon() 470 | b.time_step = 10. 471 | b.intervals = 200 472 | N = 100 473 | b.emissions = np.array([ 474 | # 7.10, 7.97, 475 | 9.58, 12.25, 14.72, 16.07, 17.43, 19.16, 20.89, 23.22, 26.15, 29.09 476 | ]) 477 | # df = pd.DataFrame.from_csv('webDICE-CSV.csv', header=-1, index_col=0) 478 | # b.emissions = np.array(df.ix['emissions_total', :]) 479 | # b.emissions = np.concatenate((10. * np.exp(-np.arange(N) / 40), np.zeros(100-N))) 480 | b.temperature_dependent = False 481 | b.linear_temperature = False 482 | r = b.run() 483 | print(r) -------------------------------------------------------------------------------- /beam_model/build/lib/beam_carbon/temperature.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | from __future__ import division 4 | from math import floor 5 | import numpy as np 6 | 7 | 8 | class Temperature(object): 9 | def __init__(self, time_step, periods, n): 10 | self.time_step = time_step 11 | self.periods = periods 12 | self.n = n 13 | 14 | @property 15 | def initial_temp(self): 16 | return np.array([.7307, .0068]) 17 | 18 | @property 19 | def forcing_ghg_2000(self): 20 | """Value from DICE2010 21 | """ 22 | return .83 23 | 24 | @property 25 | def forcing_ghg_2100(self): 26 | return .30 27 | 28 | @property 29 | def transfer_matrix(self): 30 | """Values from DICE2010 31 | """ 32 | return np.array([.208, 0., .310, .050]) 33 | 34 | @property 35 | def forcing_co2_doubling(self): 36 | return 3.8 37 | 38 | @property 39 | def temp_co2_doubling(self): 40 | return 3.2 41 | 42 | @property 43 | def mass_pi(self): 44 | """Pre-industrial carbon in GtC 45 | 46 | :rtype: float 47 | """ 48 | return 592.14 49 | 50 | @property 51 | def forcing_ghg(self): 52 | """F_EX, Exogenous forcing for other greenhouse gases 53 | 54 | Returns: 55 | :return: Array of forcing values 56 | :rtype: np.ndarray 57 | 58 | """ 59 | _n = int(floor(100 / self.time_step)) 60 | a = self.forcing_ghg_2000 + (1. / _n) * ( 61 | self.forcing_ghg_2100 - self.forcing_ghg_2000 62 | ) * np.arange(_n + 1) 63 | b = self.forcing_ghg_2100 * np.ones(self.n - (_n + 1)) \ 64 | if self.n > _n \ 65 | else np.array([]) 66 | return np.concatenate((a, b))[:self.n] 67 | 68 | def forcing(self, index, mass_atmosphere): 69 | """F, Forcing, W/m^2 70 | 71 | Args: 72 | :param index: Current time step 73 | :type index: int 74 | :param mass_atmosphere: Carbon mass in the atmosphere, GtC 75 | :type mass_atmosphere: float 76 | 77 | Returns: 78 | :return: Forcing 79 | :rtype: float 80 | 81 | """ 82 | return ( 83 | self.forcing_co2_doubling * 84 | (np.log( 85 | mass_atmosphere / self.mass_pi 86 | ) / np.log(2)) + self.forcing_ghg[index] 87 | ) 88 | 89 | def temp_ocean(self, temp_atmosphere, temp_ocean): 90 | """T_LO, increase in atmospheric temperature since 1750, degrees C 91 | 92 | Args: 93 | :param temp_atmosphere: Atmospheric temperature at t-1 94 | :type temp_atmosphere: float 95 | :param temp_ocean: Ocean temperature at t-1 96 | :type temp_ocean: float 97 | 98 | Returns: 99 | :returns: T_Ocean(t-1) + ξ_4 * (T_AT(t-1) - T_Ocean(t-1)) 100 | :rtype: float 101 | """ 102 | return ( 103 | temp_ocean + self.transfer_matrix[3] * 104 | (temp_atmosphere - temp_ocean) 105 | ) 106 | 107 | 108 | class DICETemperature(Temperature): 109 | 110 | def temp_atmosphere(self, index, temp_atmosphere, temp_ocean, 111 | mass_atmosphere, **kwargs): 112 | """T_AT, increase in atmospheric temperature since 1750, degrees C 113 | 114 | Args: 115 | :param temp_atmosphere: Atmospheric temperature at t-1 116 | :type temp_atmosphere: float 117 | :param temp_ocean: Lower ocean temperature at t-1 118 | :type temp_ocean: float 119 | :param forcing: Forcings at t 120 | :type forcing: float 121 | 122 | Returns: 123 | :returns: T_AT(t-1) + ξ_1 * (F(t) - F2xCO2 / T2xCO2 * T_AT(t-1) - ξ_3 * (T_AT(t-1) - T_Ocean(t-1))) 124 | :rtype: float 125 | """ 126 | return ( 127 | temp_atmosphere + 128 | self.transfer_matrix[0] * ( 129 | self.forcing(index, mass_atmosphere) - ( 130 | self.forcing_co2_doubling / self.temp_co2_doubling) * 131 | temp_atmosphere - self.transfer_matrix[2] * 132 | (temp_atmosphere - temp_ocean))) 133 | 134 | 135 | class LinearTemperature(Temperature): 136 | def temp_atmosphere(self, *args, **kwargs): 137 | # return ( 138 | # self.initial_temp[0] + 139 | # kwargs['carbon'] * ( 140 | # self.temp_co2_doubling / (( 141 | # 2 * self.mass_pi + ( 142 | # 2 * self.mass_pi - 143 | # (kwargs['initial_carbon'][0] * kwargs['phi11']) - 144 | # (kwargs['initial_carbon'][1] * kwargs['phi21']) 145 | # )) * 1e-3) 146 | # ) * 1e-3 147 | # ) 148 | return self.initial_temp[0] + 1.7e-3 * kwargs['carbon'] -------------------------------------------------------------------------------- /beam_model/dist/beam_carbon-0.3-py2.7.egg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hausfath/SimMod/4f882992d94b5229a9de3542349ed30e83bae439/beam_model/dist/beam_carbon-0.3-py2.7.egg -------------------------------------------------------------------------------- /beam_model/requirements.txt: -------------------------------------------------------------------------------- 1 | numpy==1.9.2 2 | sympy==0.7.5 3 | pandas==0.16.2 -------------------------------------------------------------------------------- /beam_model/run.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | from beam_carbon.beam import main 4 | 5 | main() -------------------------------------------------------------------------------- /beam_model/setup.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | import re 4 | from setuptools import setup 5 | from setuptools.command.build_ext import build_ext as _build_ext 6 | 7 | 8 | class build_ext(_build_ext): 9 | def finalize_options(self): 10 | _build_ext.finalize_options(self) 11 | # Prevent numpy from thinking it is still in its setup process: 12 | __builtins__.__NUMPY_SETUP__ = False 13 | import numpy 14 | self.include_dirs.append(numpy.get_include()) 15 | 16 | 17 | version = re.search( 18 | '^__version__\s*=\s*\'(.*)\'', 19 | open('beam_carbon/beam.py').read(), 20 | re.M 21 | ).group(1) 22 | 23 | with open('README.md', 'rb') as f: 24 | long_description = f.read().decode('utf-8') 25 | 26 | setup( 27 | name='beam_carbon', 28 | packages=['beam_carbon'], 29 | entry_points={ 30 | 'console_scripts': ['beam_carbon = beam_carbon.beam:main'] 31 | }, 32 | license='GPLv3', 33 | version=version, 34 | description='Python command line application for running the BEAM carbon cycle.', 35 | long_description=long_description, 36 | author='Nathan Matteson', 37 | author_email='matteson@obstructures.org', 38 | url='', 39 | cmdclass={'build_ext': build_ext}, 40 | setup_requires=['numpy'], 41 | ) -------------------------------------------------------------------------------- /beam_model/test/test_beam_carbon.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | import os 3 | import sys 4 | import unittest 5 | 6 | sys.path.insert(0, os.path.abspath('..')) 7 | from beam_carbon.beam import BEAMCarbon 8 | 9 | 10 | class BEAMCarbonTest(unittest.TestCase): 11 | 12 | def setUp(self): 13 | self.fixture = BEAMCarbon() 14 | 15 | def tearDown(self): 16 | del self.fixture 17 | 18 | def test_n(self): 19 | p = self.fixture.n 20 | self.failUnlessEqual(100, p) 21 | 22 | 23 | if __name__ == '__main__': 24 | unittest.main() 25 | -------------------------------------------------------------------------------- /concs_pulse_decay.py: -------------------------------------------------------------------------------- 1 | import pandas as pd 2 | import numpy as np 3 | from constants import * 4 | 5 | 6 | def pulse_decay_runner(run_years, dt, emissions): 7 | """ 8 | Simple pulse response model adapted from Myhrvold and Caldeira (2012) 9 | adapted from Joos et al (1996) 10 | """ 11 | df = emissions 12 | co2_0 = df['rcp_co2_ppm'][0] 13 | ch4_0 = df['rcp_ch4_ppb'][0] 14 | n2o_0 = df['rcp_n2o_ppb'][0] 15 | 16 | run_year = 0 17 | df['co2_pg_atm'] = 0 18 | df['ch4_tg_atm'] = 0 19 | df['n2o_tg_atm'] = 0 20 | df['ch4_co2_decay_marginal'] = 0 21 | while run_year < run_years: 22 | df['ch4_step'] = ( 23 | df['ch4_tg'][int(run_year / dt)] * 24 | np.exp(-(df['date'] - run_year) / CH4_EFOLD) 25 | ) 26 | df['ch4_step'][0:int(run_year / dt)] = 0 27 | 28 | df['ch4_co2_decay'] = (df['ch4_tg'][int(run_year / dt)] - df['ch4_step']) * CO2_PER_TON_CH4 / 10**3 29 | #convert from TgC to PgC 30 | 31 | df['ch4_co2_decay'][0:int(run_year / dt)] = 0 32 | df['ch4_co2_decay_marginal'] += df['ch4_co2_decay'].diff(-1) * -1 33 | df['ch4_co2_decay_marginal'][-1:] = 0 34 | 35 | df['co2_step'] = ( 36 | (df['co2_pg'][int(run_year / dt)] + df['ch4_co2_decay_marginal'][int(run_year / dt)]) * 37 | (0.217 + 0.259 * np.exp(-(df['date'] - run_year) / 172.9) + 38 | 0.338 * np.exp(-(df['date'] - run_year) / 18.51) + 39 | 0.186 * np.exp(-(df['date'] - run_year) / 1.186)) 40 | ) 41 | 42 | df['n2o_step'] = ( 43 | df['n2o_tg'][int(run_year / dt)] * 44 | np.exp(-(df['date'] - run_year) / N2O_EFOLD) 45 | ) 46 | df['co2_step'][0:int(run_year / dt)] = 0 47 | df['n2o_step'][0:int(run_year / dt)] = 0 48 | 49 | df['co2_pg_atm'] += df['co2_step'] 50 | df['ch4_tg_atm'] += df['ch4_step'] 51 | df['n2o_tg_atm'] += df['n2o_step'] 52 | 53 | run_year += dt 54 | 55 | df['co2_ppm'] = ( 56 | co2_0 + (df['co2_pg_atm'] * 10.**15. / GRAMS_PER_MOLE_CO2) / 57 | MOLES_IN_ATMOSPHERE * 10.**6. 58 | ) 59 | 60 | df['ch4_ppb'] = ( 61 | ch4_0 + (df['ch4_tg_atm'] * 10.**12. / GRAMS_PER_MOLE_CH4) / 62 | MOLES_IN_ATMOSPHERE * 10.**9. 63 | ) 64 | 65 | df['n2o_ppb'] = ( 66 | n2o_0 + (df['n2o_tg_atm'] * 10.**12. / GRAMS_PER_MOLE_N2O) / 67 | MOLES_IN_ATMOSPHERE * 10.**9. 68 | ) 69 | df = df.drop(['ch4_step', 'co2_step', 'n2o_step', 'ch4_co2_decay'], axis=1) 70 | return df -------------------------------------------------------------------------------- /constants.py: -------------------------------------------------------------------------------- 1 | #Constants used in SimMod modules 2 | 3 | TEMP_0 = 10. #Mean Earth surface temp (degrees C) 4 | C_TO_CO2 = 3.67 5 | PGC_TO_MOL = 1e15/12. 6 | MOLES_IN_ATMOSPHERE = 1.8 * 10.**20. 7 | GRAMS_PER_MOLE_CO2 = 44.01 8 | GRAMS_PER_MOLE_CH4 = 16.04 9 | GRAMS_PER_MOLE_N2O = 44.01 10 | CO2_PER_TON_CH4 = 1.5 #Tons CO2 produced when ton CH4 decays 11 | CH4_EFOLD = 10. 12 | N2O_EFOLD = 114. 13 | CO2_PPM_1750 = 277.01467 14 | CH4_PPB_1750 = 721.89411 15 | N2O_PPB_1750 = 272.95961 16 | 17 | CH4_IND_FORCING_SCALAR = 1. #0.970 / 0.641 #Based on IPCC AR5 WG1 Chapter 8 Supp Mats table 8.SM.6. 18 | #Accounts for indirect CH4 forcing due to tropospheric ozone and stratospheric water vapor. Assumed to scale linearly with atmospheric CH4. -------------------------------------------------------------------------------- /emissions/historical_ghgs.csv: -------------------------------------------------------------------------------- 1 | year,c_emissions_pg,ch4_emissions_tg,n2o_emissions_tg,hist_forcing_wm2 1765,0.003,0,0, 1766,0.008338296,1.9632619,0.005191085, 1767,0.013676593,2.4364481,0.010116813, 1768,0.019014889,2.911105,0.015042803, 1769,0.024353185,3.3872782,0.019969063, 1770,0.029691482,3.8650146,0.024895601, 1771,0.036029778,4.3443625,0.029822427, 1772,0.041368074,4.8253718,0.034749548, 1773,0.046706371,5.3080938,0.039676975, 1774,0.052044667,5.7925816,0.044604715, 1775,0.057382963,6.2788896,0.04953278, 1776,0.062721259,6.7670743,0.05446118, 1777,0.068059556,7.2571937,0.059389923, 1778,0.073397852,7.7493076,0.064319022, 1779,0.078736148,8.2434776,0.069248487, 1780,0.084074445,8.7397674,0.07417833, 1781,0.090412741,9.2382426,0.079108562, 1782,0.095751037,9.7389706,0.084039195, 1783,0.101089334,10.242021,0.088970241, 1784,0.10642763,10.747466,0.093901714, 1785,0.11176593,11.25538,0.098833627, 1786,0.11710422,11.765839,0.10376599, 1787,0.12244252,12.278921,0.10869883, 1788,0.12778082,12.794707,0.11363214, 1789,0.13311911,13.313282,0.11856595, 1790,0.13845741,13.834732,0.12350027, 1791,0.1447957,14.359145,0.12843512, 1792,0.150134,14.886613,0.13337052, 1793,0.1554723,15.417231,0.13830648, 1794,0.16081059,15.951096,0.14324301, 1795,0.16614889,16.488308,0.14818014, 1796,0.17148719,17.028971,0.15311788, 1797,0.17782548,17.573192,0.15805626, 1798,0.18316378,18.121081,0.16299529, 1799,0.18850207,18.672751,0.167935, 1800,0.19484037,19.228319,0.1728754, 1801,0.20017867,19.787906,0.17781651, 1802,0.20751696,20.351635,0.18275836, 1803,0.21185526,20.919636,0.18770098, 1804,0.21719356,21.49204,0.19264437, 1805,0.22253185,22.068984,0.19758858, 1806,0.22887015,22.650607,0.20253362, 1807,0.23420845,23.237055,0.20747952, 1808,0.23954674,23.828476,0.2124263, 1809,0.24488504,24.425025,0.217374, 1810,0.25022333,25.02686,0.22232264, 1811,0.25656163,25.634145,0.22727225, 1812,0.26189993,26.247048,0.23222285, 1813,0.26723822,26.865743,0.2371745, 1814,0.27257652,27.490408,0.2421272, 1815,0.27891482,28.12123,0.247081, 1816,0.28525311,28.758398,0.25203593, 1817,0.29159141,29.402108,0.25699203, 1818,0.2969297,30.052563,0.26194932, 1819,0.302268,30.709971,0.26690786, 1820,0.3076063,31.374548,0.27186767, 1821,0.31294459,32.046514,0.2768288, 1822,0.31928289,32.7261,0.28179128, 1823,0.32562119,33.413539,0.28675516, 1824,0.33095948,34.109076,0.29172049, 1825,0.33729778,34.81296,0.2966873, 1826,0.34263608,35.52545,0.30165564, 1827,0.34897437,36.246813,0.30662557, 1828,0.35431267,36.977321,0.31159712, 1829,0.35965096,37.717259,0.31657035, 1830,0.37098926,38.466917,0.32154532, 1831,0.37532756,39.226597,0.32652206, 1832,0.38066585,39.996609,0.33150065, 1833,0.38700415,40.777271,0.33648114, 1834,0.39234245,41.568914,0.34146358, 1835,0.39868074,42.371876,0.34644803, 1836,0.40801904,43.186509,0.35143456, 1837,0.41335733,44.013173,0.35642324, 1838,0.41969563,44.85224,0.36141413, 1839,0.42603393,45.704093,0.36640729, 1840,0.433372219,46.569129,0.3714028, 1841,0.439710519,47.447755,0.37640073, 1842,0.447048819,48.34039,0.38140115, 1843,0.453387109,49.247469,0.38640415, 1844,0.460725409,50.169439,0.3914098, 1845,0.470063709,51.106759,0.39641818, 1846,0.475401999,52.059904,0.40142938, 1847,0.483740299,53.029365,0.40644349, 1848,0.490078589,54.015644,0.41146059, 1849,0.498416889,55.019264,0.41648078, 1850,0.507755189,56.040759,0.42150415,0.17236 1851,0.500785689,56.46132,0.42740096,0.172544 1852,0.555622819,56.88188,0.46466062,0.172728 1853,0.556354489,57.302441,0.46477417,0.172912 1854,0.564817079,57.723001,0.46443647,0.173096 1855,0.564679249,58.143562,0.46327909,0.17328 1856,0.574934879,58.564122,0.46729312,0.173464 1857,0.581231999,58.984683,0.47126447,0.173648 1858,0.587232979,59.405243,0.47503119,0.173832 1859,0.597253889,59.825804,0.47876627,0.174016 1860,0.609966889,60.246364,0.48257672,0.1742 1861,0.623223598,59.614468,0.50499476,0.17489 1862,0.570716628,58.982573,0.47111281,0.17558 1863,0.57774912,58.350677,0.47444935,0.17627 1864,0.58613825,57.718781,0.47785801,0.17696 1865,0.59379536,57.086885,0.48144966,0.17765 1866,0.59691218,56.45499,0.48420454,0.17834 1867,0.60360622,55.823094,0.48472337,0.17903 1868,0.6072347,55.191198,0.48595323,0.17972 1869,0.61276645,54.559303,0.48686155,0.18041 1870,0.6166445,53.927407,0.48774355,0.1811 1871,0.64366524,56.683869,0.58501628,0.182083 1872,0.7403334,59.440331,0.66673981,0.183066 1873,0.76129965,62.196793,0.69637076,0.184049 1874,0.75771154,64.953255,0.7087503,0.185032 1875,0.77842647,67.709717,0.72034342,0.186015 1876,0.78787801,70.46618,0.74524338,0.186998 1877,0.79713853,73.222642,0.75633197,0.187981 1878,0.8050507,75.979104,0.7660459,0.188964 1879,0.82534752,78.735566,0.77491118,0.189947 1880,0.85724317,81.492028,0.78412129,0.19093 1881,0.89187292,84.359461,0.81157848,0.195577 1882,0.86066403,87.226893,0.78526034,0.200224 1883,0.88051762,90.094326,0.79255607,0.204871 1884,0.88712775,92.961758,0.7987505,0.209518 1885,0.8922361,95.829191,0.80453383,0.214165 1886,0.89814412,98.696624,0.82619361,0.218812 1887,0.91116314,101.56406,0.83219647,0.223459 1888,0.94173355,104.43149,0.83705812,0.228106 1889,0.94020019,107.29892,0.84143987,0.232753 1890,0.96775411,110.16635,0.84552548,0.2374 1891,0.98224854,111.52362,0.85098169,0.237881 1892,0.99719118,112.88089,0.85741997,0.238362 1893,0.9944033,114.23816,0.86475824,0.238843 1894,1.02336718,115.59543,0.87294487,0.239324 1895,1.0504185,116.9527,0.88188195,0.239805 1896,1.06527839,118.30997,0.89141802,0.240286 1897,1.08956411,119.66724,0.90140157,0.240767 1898,1.11600097,121.02451,0.91168111,0.241248 1899,1.15920445,122.38178,0.92210515,0.241729 1900,1.18720627,123.73905,0.9325222,0.24221 1901,1.25494317,124.8415,0.9446669,0.247364 1902,1.26897363,125.94396,0.95993065,0.252518 1903,1.34367095,127.04642,0.97764708,0.257672 1904,1.37229323,128.14887,0.99722904,0.262826 1905,1.4328152,129.25133,1.0181293,0.26798 1906,1.50353383,130.35378,1.0397413,0.273134 1907,1.58776273,131.45624,1.0614586,0.278288 1908,1.56141277,132.5587,1.0826746,0.283442 1909,1.60237806,133.66115,1.1027829,0.288596 1910,1.64098168,134.76361,1.121177,0.29375 1911,1.61489404,135.96943,1.1389722,0.302692 1912,1.62684843,137.17525,1.1575596,0.311634 1913,1.66597976,138.38107,1.1767464,0.320576 1914,1.56479151,139.5869,1.1962611,0.329518 1915,1.54374963,140.79272,1.2158443,0.33846 1916,1.60911647,141.99854,1.2353217,0.347402 1917,1.66619629,143.20436,1.254519,0.356344 1918,1.65030426,144.41019,1.2732618,0.365286 1919,1.52565434,145.61601,1.2913759,0.374228 1920,1.65328337,146.82183,1.3086869,0.38317 1921,1.5604166,147.86155,1.3257924,0.392923 1922,1.59294089,148.90128,1.343275,0.402676 1923,1.72328818,149.941,1.3609385,0.412429 1924,1.71986058,150.98072,1.3796194,0.422182 1925,1.73308854,152.02045,1.3998974,0.431935 1926,1.74448326,153.06017,1.4211909,0.441688 1927,1.85918283,154.09989,1.4429184,0.451441 1928,1.86467141,155.13962,1.4644982,0.461194 1929,1.96922601,156.17934,1.4853488,0.470947 1930,1.94887975,157.21906,1.5048887,0.4807 1931,1.84334081,158.34545,1.5226236,0.4891 1932,1.65922596,159.47183,1.5385172,0.4975 1933,1.70158848,160.59821,1.5526746,0.5059 1934,1.76986255,161.7246,1.5653127,0.5143 1935,1.82171575,162.85098,1.5771213,0.5227 1936,1.93129993,163.97736,1.5889151,0.5311 1937,1.98869902,165.10375,1.6015088,0.5395 1938,1.92388222,166.23013,1.615717,0.5479 1939,1.97144376,167.35651,1.6323545,0.5563 1940,2.06583237,168.4829,1.6522358,0.5647 1941,2.08436458,170.03046,1.7002044,0.562869 1942,2.1110497,171.57803,1.7938613,0.561038 1943,2.1547656,173.12559,1.9231582,0.559207 1944,2.15139864,174.67315,2.0866797,0.557376 1945,1.92914739,176.22072,2.280402,0.555545 1946,2.08014892,177.76828,2.4903635,0.553714 1947,2.26217994,179.31584,2.7026031,0.551883 1948,2.34413044,180.86341,2.9031595,0.550052 1949,2.30112641,182.41097,3.0780722,0.548221 1950,2.52233465,183.95853,3.2133815,0.54639 1951,2.8565201,189.11003,3.3186021,0.553909 1952,2.9056378,194.26153,3.4111061,0.561428 1953,2.9455171,199.41303,3.4887221,0.568947 1954,3.0171416,204.56453,3.5543489,0.576466 1955,3.2341855,209.71603,3.614111,0.583985 1956,3.4226883,214.86753,3.6706801,0.591504 1957,3.5418718,220.01902,3.7267318,0.599023 1958,3.6495817,225.17052,3.7849451,0.606542 1959,3.6655957,230.32202,3.8480013,0.614061 1960,3.7692833,235.47352,3.9185827,0.62158 1961,3.8383218,238.52217,4.0240052,0.642117 1962,3.9355717,241.57083,4.1836477,0.662654 1963,4.0922947,244.61948,4.3883117,0.683191 1964,4.2595879,247.66813,4.6374693,0.703728 1965,4.4092558,250.71679,4.8968181,0.724265 1966,4.5986968,253.76544,5.195583,0.744802 1967,4.7086254,256.81409,5.457478,0.765339 1968,4.8232028,259.86274,5.619744,0.785876 1969,5.0383879,262.9114,5.784831,0.806413 1970,5.2731129,265.96005,5.9368752,0.82695 1971,5.3018913,270.02505,5.6049759,0.859085 1972,5.4460621,274.09004,5.9181309,0.89122 1973,5.6680986,278.15504,6.0449043,0.923355 1974,5.6827371,282.22003,5.9406002,0.95549 1975,5.6465876,286.28503,6.1409693,0.987625 1976,5.9736077,290.35002,6.3042588,1.01976 1977,6.1229874,294.41502,6.534405,1.051895 1978,6.19537,298.48002,6.6193729,1.08403 1979,6.4517127,302.54501,7.007773,1.116165 1980,6.3572096,306.61001,7.0613923,1.1483 1981,6.2128621,310.01251,6.8417522,1.185141 1982,6.3174055,313.415,7.1189858,1.221982 1983,6.3355201,316.8175,7.2168971,1.258823 1984,6.5500833,320.22,7.0481314,1.295664 1985,6.7193449,323.6225,7.0169243,1.332505 1986,6.8972023,327.025,7.0704917,1.369346 1987,7.0470086,330.42749,7.4616728,1.406187 1988,7.2807248,333.82999,7.2025077,1.443028 1989,7.4126436,337.23249,7.3310397,1.479869 1990,7.4634833,340.63499,7.5856812,1.51671 1991,7.6159799,336.59218,7.4023631,1.537388 1992,7.4215304,332.54937,7.7989323,1.558066 1993,7.4221006,328.50656,7.3131034,1.578744 1994,7.5315956,324.46375,7.5072841,1.599422 1995,7.6470104,320.42094,7.6191035,1.6201 1996,7.7611025,316.37814,7.6520638,1.640778 1997,7.8371397,312.33533,7.9097526,1.661456 1998,7.8028431,308.29252,7.8957263,1.682134 1999,7.7517892,304.24971,7.5269849,1.702812 -------------------------------------------------------------------------------- /emissions/rcp_2.6_data.csv: -------------------------------------------------------------------------------- 1 | year,total_forcing_wm2,n2o_forcing_wm2,ch4_forcing_wm2,co2_forcing_wm2,n2o_concentration_ppb,ch4_concentration_ppb,co2_concentration_ppm,n2o_emissions_tg,ch4_emissions_tg,c_emissions_pg 2 | 2000,1.72349,.14452,.48518,1.54279,315.85,1751.0225,368.865,11.71767,300.13794,7.8838 3 | 2001,1.75954999999999,.1468979999999993,.485364,1.572190000000006,316.5679999999998,1751.565,370.8544999999999,11.78916999999998,301.928656,8.140339999999981 4 | 2002,1.795609999999996,.1492759999999995,.485548,1.601590000000009,317.2859999999998,1752.1075,372.8440000000001,11.86067,303.719372,8.396879999999953 5 | 2003,1.831670000000003,.1516539999999997,.485732,1.630990000000004,318.0039999999999,1752.65,374.8334999999997,11.93216999999999,305.510088,8.653419999999926 6 | 2004,1.867729999999995,.1540319999999999,.485916,1.660390000000007,318.7219999999998,1753.1925,376.8229999999999,12.00367,307.300804,8.909959999999899 7 | 2005,1.90379,.15641,.4861,1.68979,319.44,1753.735,378.8125,12.07517,309.09152,9.166499999999999 8 | 2006,1.94883200000001,.1585940000000008,.487806,1.719743999999999,320.1433080000002,1757.61356,380.9070420000007,12.123508,313.2388719999999,9.308779999999956 9 | 2007,1.993874000000005,.1607780000000005,.4895119999999999,1.749697999999995,320.846616,1761.49212,383.0015840000005,12.171846,317.3862239999999,9.451059999999984 10 | 2008,2.038916,.1629620000000003,.4912179999999999,1.779651999999999,321.5499240000001,1765.37068,385.0961260000004,12.220184,321.5335759999998,9.593339999999955 11 | 2009,2.08395800000001,.1651460000000009,.4929239999999999,1.809606000000002,322.2532320000003,1769.24924,387.1906680000002,12.268522,325.6809279999998,9.735619999999983 12 | 2010,2.129,.16733,.49463,1.83956,322.95654,1773.1278,389.28521,12.31686,329.82828,9.8779 13 | 2011,2.174457000000004,.1692740000000006,.4925800000000002,1.870997000000003,323.581716,1768.866819999999,391.5634719999998,12.24226400000001,322.148611999999,9.916150000000002 14 | 2012,2.219914000000003,.1712180000000005,.4905300000000006,1.902434,324.206892,1764.60584,393.8417340000005,12.16766799999999,314.4689440000002,9.954400000000007 15 | 2013,2.265371000000002,.1731620000000005,.48848,1.933870999999996,324.832068,1760.344859999999,396.1199960000004,12.09307200000001,306.7892759999995,9.992649999999998 16 | 2014,2.310828000000015,.1751060000000004,.4864300000000004,1.965308,325.4572440000001,1756.08388,398.3982580000002,12.01847599999999,299.1096079999988,10.0309 17 | 2015,2.356285000000014,.1770500000000004,.4843800000000007,1.996744999999997,326.0824200000001,1751.822899999999,400.67652,11.94388000000001,291.42994,10.06915000000001 18 | 2016,2.401742000000013,.1789940000000003,.4823300000000001,2.028182000000001,326.7075960000001,1747.56192,402.9547819999998,11.86928399999999,283.7502719999993,10.1074 19 | 2017,2.447199000000012,.1809380000000003,.4802800000000005,2.059618999999998,327.3327720000001,1743.300939999999,405.2330440000005,11.79468800000001,276.0706040000005,10.14565 20 | 2018,2.492656000000011,.1828820000000002,.4782299999999999,2.091056000000002,327.9579479999999,1739.03996,407.5113060000003,11.72009199999999,268.3909359999998,10.18390000000001 21 | 2019,2.53811300000001,.1848260000000006,.4761800000000003,2.122492999999999,328.5831239999999,1734.778979999999,409.7895680000001,11.64549600000001,260.7112679999991,10.22215 22 | 2020,2.58357,.18677,.47413,2.15393,329.2083,1730.518,412.06783,11.5709,253.0316,10.2604 23 | 2021,2.611377000000005,.1883460000000001,.4691320000000001,2.177990999999999,329.7171979999998,1717.487739999997,413.9393620000001,11.561739,251.066609,10.02893 24 | 2022,2.639184,.1899220000000001,.4641340000000014,2.202052000000002,330.2260959999999,1704.457479999997,415.8108940000002,11.552578,249.1016180000001,9.797460000000001 25 | 2023,2.666991000000003,.1914980000000002,.4591360000000009,2.226112999999998,330.7349939999999,1691.427219999998,417.6824260000003,11.543417,247.1366270000003,9.565989999999999 26 | 2024,2.694797999999999,.1930740000000002,.4541380000000004,2.250174000000001,331.243892,1678.396959999998,419.553958,11.534256,245.171636,9.334519999999998 27 | 2025,2.722605000000001,.1946500000000002,.4491399999999999,2.274234999999997,331.75279,1665.366699999999,421.4254900000001,11.525095,243.2066450000002,9.103049999999996 28 | 2026,2.750412000000004,.1962260000000002,.4441420000000011,2.298296000000001,332.2616879999998,1652.336439999999,423.2970220000002,11.51593400000001,241.2416539999999,8.871579999999994 29 | 2027,2.778219,.1978020000000003,.4391440000000006,2.322356999999997,332.7705859999999,1639.30618,425.1685540000003,11.506773,239.2766630000001,8.640109999999993 30 | 2028,2.806026000000003,.1993780000000003,.4341460000000001,2.346418,333.2794839999999,1626.275919999996,427.040086,11.497612,237.3116720000003,8.408639999999991 31 | 2029,2.833832999999998,.2009540000000003,.4291480000000014,2.370479000000003,333.788382,1613.245659999997,428.9116180000001,11.488451,235.346681,8.17716999999999 32 | 2030,2.86164,.20253,.42415,2.39454,334.29728,1600.2154,430.78315,11.47929,233.38169,7.9457 33 | 2031,2.875344000000002,.2039010000000001,.4212680000000004,2.406369999999999,334.743386,1592.903620000001,431.727075,11.459207,232.4454520000002,7.653509999999983 34 | 2032,2.889048000000003,.2052719999999999,.4183859999999999,2.418199999999999,335.189492,1585.591840000001,432.6709999999998,11.439124,231.5092140000002,7.361319999999978 35 | 2033,2.902752000000003,.2066430000000001,.4155040000000003,2.430029999999999,335.635598,1578.280060000001,433.6149249999999,11.419041,230.5729760000002,7.069129999999973 36 | 2034,2.916456,.2080139999999999,.4126219999999998,2.441859999999998,336.0817040000001,1570.968280000001,434.5588499999999,11.398958,229.6367380000002,6.776939999999968 37 | 2035,2.930160000000001,.2093850000000002,.4097400000000002,2.453689999999998,336.52781,1563.656500000001,435.5027749999999,11.378875,228.7005000000001,6.484749999999963 38 | 2036,2.943864000000001,.2107559999999999,.4068579999999997,2.465519999999998,336.973916,1556.344720000001,436.4467,11.358792,227.7642620000001,6.192559999999958 39 | 2037,2.957568000000002,.2121270000000002,.4039760000000001,2.477349999999998,337.420022,1549.032940000001,437.390625,11.338709,226.8280240000001,5.900370000000066 40 | 2038,2.971272000000003,.213498,.4010939999999996,2.489179999999998,337.866128,1541.721160000001,438.3345499999998,11.31862599999999,225.8917860000001,5.608180000000061 41 | 2039,2.984976000000003,.2148690000000002,.398212,2.501009999999997,338.312234,1534.409380000001,439.2784749999998,11.298543,224.9555480000001,5.315990000000056 42 | 2040,2.99868,.21624,.39533,2.51284,338.75834,1527.0976,440.2224,11.27846,224.01931,5.0238 43 | 2041,2.998578,.2171729999999998,.3921159999999997,2.516377000000001,339.0720679999999,1519.54182,440.470206,11.13222300000001,220.5465320000003,4.860089999999957 44 | 2042,2.998476,.2181059999999999,.3889019999999999,2.519914000000001,339.3857959999999,1511.98604,440.718012,10.98598600000003,217.073754,4.696379999999976 45 | 2043,2.998374,.219039,.385688,2.523451000000001,339.699524,1504.430259999999,440.965818,10.83974899999998,213.6009759999997,4.532669999999996 46 | 2044,2.998272,.2199719999999998,.3824740000000002,2.526988000000001,340.013252,1496.87448,441.213624,10.693512,210.1281980000003,4.368959999999959 47 | 2045,2.99817,.2209049999999999,.3792600000000004,2.530525000000001,340.3269799999999,1489.3187,441.46143,10.54727500000001,206.65542,4.205249999999978 48 | 2046,2.998068,.221838,.3760459999999997,2.534062,340.6407079999999,1481.762919999999,441.709236,10.40103800000003,203.1826419999998,4.041539999999998 49 | 2047,2.997966,.2227709999999998,.3728319999999998,2.537599000000001,340.954436,1474.20714,441.957042,10.25480099999999,199.7098640000004,3.87782999999996 50 | 2048,2.997864,.2237039999999999,.369618,2.541136000000001,341.268164,1466.65136,442.204848,10.108564,196.2370860000001,3.71411999999998 51 | 2049,2.997762,.224637,.3664040000000002,2.544673,341.5818919999999,1459.095579999999,442.4526540000001,9.962327000000016,192.7643079999998,3.550409999999999 52 | 2050,2.99766,.22557,.36319,2.54821,341.89562,1451.5398,442.70046,9.816090000000001,189.29153,3.3867 53 | 2051,2.989738000000003,.225947,.3595380000000006,2.547502,342.025229,1442.896379999998,442.597688,9.733040000000017,187.0085170000011,3.251480000000015 54 | 2052,2.981816000000002,.226324,.3558860000000008,2.546794,342.154838,1434.252959999998,442.494916,9.649990000000003,184.7255040000009,3.116260000000011 55 | 2053,2.973894000000001,.226701,.352234000000001,2.546086,342.2844470000001,1425.609539999998,442.392144,9.566939999999988,182.4424910000007,2.981040000000007 56 | 2054,2.965972000000001,.227078,.3485820000000004,2.545378,342.414056,1416.966120000001,442.289372,9.483890000000002,180.1594780000005,2.845820000000003 57 | 2055,2.95805,.227455,.3449300000000006,2.54467,342.543665,1408.322700000001,442.1866,9.400840000000017,177.8764650000012,2.710599999999999 58 | 2056,2.950127999999999,.227832,.3412780000000009,2.543962,342.673274,1399.67928,442.083828,9.317790000000002,175.593452000001,2.575380000000052 59 | 2057,2.942206000000002,.228209,.3376260000000011,2.543254,342.802883,1391.03586,441.981056,9.234739999999988,173.3104390000008,2.440160000000049 60 | 2058,2.934284000000002,.2285860000000001,.3339740000000004,2.542546,342.932492,1382.39244,441.878284,9.151690000000002,171.0274260000006,2.304940000000045 61 | 2059,2.926362000000001,.228963,.3303220000000007,2.541838,343.062101,1373.749019999999,441.7755119999999,9.068640000000016,168.7444130000013,2.169720000000041 62 | 2060,2.91844,.22934,.32667,2.54113,343.19171,1365.1056,441.67274,8.98559,166.4614,2.0345 63 | 2061,2.912038000000001,.229507,.324376,2.536512,343.246915,1359.660100000001,441.2535280000001,8.989204000000001,165.9455419999999,1.896429999999953 64 | 2062,2.905636000000001,.229674,.322082,2.531893999999999,343.30212,1354.214599999999,440.8343160000001,8.992818,165.429684,1.758359999999982 65 | 2063,2.899234000000002,.229841,.319788,2.527276000000001,343.357325,1348.7691,440.415104,8.996432,164.913826,1.620289999999954 66 | 2064,2.892832,.230008,.3174939999999999,2.522658,343.41253,1343.3236,439.995892,9.000046000000001,164.397968,1.482219999999984 67 | 2065,2.886430000000001,.230175,.3151999999999999,2.518039999999999,343.467735,1337.8781,439.5766800000001,9.00366,163.88211,1.344149999999956 68 | 2066,2.880028000000001,.230342,.3129059999999999,2.513422,343.52294,1332.4326,439.1574680000001,9.007274000000001,163.3662519999998,1.206079999999986 69 | 2067,2.873626000000002,.230509,.3106119999999999,2.508804,343.578145,1326.9871,438.7382560000001,9.010888000000001,162.8503939999998,1.068009999999958 70 | 2068,2.867224,.230676,.3083179999999999,2.504186000000001,343.63335,1321.5416,438.3190440000001,9.014502,162.3345359999998,.9299399999999878 71 | 2069,2.860822000000001,.230843,.3060239999999999,2.499568,343.688555,1316.096100000001,437.8998320000001,9.018115999999999,161.8186779999999,.7918699999999603 72 | 2070,2.85442,.23101,.30373,2.49495,343.74376,1310.6506,437.48062,9.02173,161.30282,.6538 73 | 2071,2.849791,.231134,.3026339999999998,2.488361999999999,343.785522,1308.126,436.894217,9.001662999999994,160.679605,.6001100000000008 74 | 2072,2.845161999999998,.231258,.3015379999999999,2.481774,343.827284,1305.6014,436.307814,8.981595999999996,160.0563900000002,.5464199999999977 75 | 2073,2.840532999999999,.231382,.3004419999999999,2.475185999999999,343.869046,1303.0768,435.721411,8.961528999999999,159.4331750000001,.4927299999999946 76 | 2074,2.835903999999999,.231506,.2993459999999999,2.468597999999998,343.910808,1300.5522,435.135008,8.941461999999994,158.80996,.4390400000000056 77 | 2075,2.831275,.23163,.2982499999999999,2.462009999999999,343.95257,1298.0276,434.548605,8.921394999999997,158.1867450000002,.3853500000000025 78 | 2076,2.826645999999998,.231754,.2971539999999999,2.455421999999999,343.994332,1295.503,433.9622019999999,8.901327999999999,157.5635300000001,.3316599999999994 79 | 2077,2.822016999999999,.231878,.2960579999999999,2.448834,344.036094,1292.9784,433.3757989999999,8.881260999999995,156.9403150000001,.2779699999999963 80 | 2078,2.817387999999999,.232002,.2949619999999999,2.442245999999999,344.077856,1290.4538,432.7893959999999,8.861193999999998,156.3171000000002,.2242800000000074 81 | 2079,2.812758999999998,.232126,.293866,2.435657999999998,344.119618,1287.9292,432.2029929999999,8.841126999999993,155.6938850000001,.1705900000000042 82 | 2080,2.80813,.23225,.29277,2.42907,344.16138,1285.4046,431.61659,8.821059999999999,155.07067,.1169 83 | 2081,2.803214000000001,.232275,.2919959999999999,2.422675,344.171327,1283.6923,431.0554030000001,8.797063999999999,154.4069890000001,.0784100000000052 84 | 2082,2.798298000000001,.2323,.2912219999999999,2.41628,344.181274,1281.98,430.4942160000001,8.773068000000002,153.7433080000001,.0399199999999951 85 | 2083,2.793382000000001,.232325,.290448,2.409884999999999,344.191221,1280.267699999999,429.9330290000003,8.749071999999998,153.0796270000001,.0014299999999992 86 | 2084,2.788466000000001,.23235,.289674,2.40349,344.201168,1278.5554,429.3718420000002,8.725076000000001,152.4159460000001,-.0370599999999968 87 | 2085,2.78355,.232375,.2888999999999999,2.397095,344.211115,1276.8431,428.8106550000002,8.701079999999997,151.7522650000001,-.0755500000000069 88 | 2086,2.778634,.2324,.2881260000000001,2.390700000000001,344.221062,1275.130799999999,428.2494680000002,8.677084000000001,151.0885840000001,-.1140400000000028 89 | 2087,2.773718000000001,.232425,.2873520000000001,2.384304999999999,344.231009,1273.4185,427.6882810000002,8.653087999999997,150.4249030000001,-.1525299999999987 90 | 2088,2.768802000000001,.23245,.286578,2.37791,344.240956,1271.7062,427.1270940000002,8.629092,149.7612219999999,-.1910200000000088 91 | 2089,2.763886000000001,.232475,.2858039999999999,2.371515,344.250903,1269.993899999999,426.5659070000002,8.605096000000003,149.0975409999999,-.2295100000000048 92 | 2090,2.75897,.2325,.28503,2.36512,344.26085,1268.2816,426.00472,8.581099999999999,148.43386,-.268 93 | 2091,2.754446999999999,.23242,.2843640000000001,2.359266000000002,344.236395,1266.81628,425.493794,8.553065999999987,147.7951840000001,-.2831599999999987 94 | 2092,2.749924,.23234,.283698,2.353412000000002,344.21194,1265.35096,424.9828680000001,8.525031999999989,147.156508,-.2983200000000004 95 | 2093,2.745400999999999,.23226,.283032,2.347558000000001,344.187485,1263.88564,424.4719419999999,8.496997999999991,146.517832,-.3134799999999984 96 | 2094,2.740877999999999,.23218,.2823660000000001,2.341704000000002,344.16303,1262.42032,423.961016,8.468963999999986,145.879156,-.32864 97 | 2095,2.736355,.2321,.2817000000000001,2.335850000000001,344.138575,1260.955,423.45009,8.440929999999987,145.2404799999999,-.3438000000000017 98 | 2096,2.731831999999999,.23202,.281034,2.329996000000001,344.11412,1259.48968,422.9391639999999,8.412895999999989,144.6018040000001,-.3589599999999997 99 | 2097,2.727309,.23194,.280368,2.324142000000002,344.089665,1258.02436,422.428238,8.384861999999991,143.9631280000001,-.3741200000000013 100 | 2098,2.722785999999999,.23186,.2797019999999999,2.318288000000001,344.06521,1256.55904,421.917312,8.356827999999993,143.3244520000001,-.3892799999999994 101 | 2099,2.718262999999999,.23178,.2790360000000001,2.312434000000001,344.040755,1255.09372,421.4063859999999,8.328793999999988,142.685776,-.404440000000001 102 | 2100,2.71374,.2317,.27837,2.30658,344.0163,1253.6284,420.89546,8.30076,142.0471,-.4196 103 | -------------------------------------------------------------------------------- /emissions/rcp_4.5_data.csv: -------------------------------------------------------------------------------- 1 | year,total_forcing_wm2,n2o_forcing_wm2,ch4_forcing_wm2,co2_forcing_wm2,n2o_concentration_ppb,ch4_concentration_ppb,co2_concentration_ppm,n2o_emissions_tg,ch4_emissions_tg,c_emissions_pg 2 | 2000,1.72349,.14452,.48518,1.54279,315.85,1751.0225,368.865,11.71767,300.54932,7.8838 3 | 2001,1.759775999999988,.1468979999999993,.485364,1.572190000000006,316.5679999999998,1751.565,370.8544999999999,11.78916999999998,300.7502020000001,8.140339999999981 4 | 2002,1.796061999999992,.1492759999999995,.485548,1.601590000000009,317.2859999999998,1752.1075,372.8440000000001,11.86067,300.951084,8.396879999999953 5 | 2003,1.832347999999996,.1516539999999997,.485732,1.630990000000004,318.0039999999999,1752.65,374.8334999999997,11.93216999999999,301.151966,8.653419999999926 6 | 2004,1.868634,.1540319999999999,.485916,1.660390000000007,318.7219999999998,1753.1925,376.8229999999999,12.00367,301.352848,8.909959999999899 7 | 2005,1.90492,.15641,.4861,1.68979,319.44,1753.735,378.8125,12.07517,301.55373,9.166499999999999 8 | 2006,1.949190000000002,.1586020000000001,.487244,1.719150000000006,320.1453040000001,1756.40756,380.8755700000002,12.132998,303.1144279999999,9.236799999999988 9 | 2007,1.993459999999999,.1607940000000001,.488388,1.748510000000003,320.850608,1759.08012,382.9386400000003,12.190826,304.6751259999996,9.307099999999991 10 | 2008,2.03773000000001,.1629860000000001,.4895320000000001,1.777870000000007,321.555912,1761.75268,385.0017100000005,12.248654,306.2358239999999,9.377399999999994 11 | 2009,2.082000000000008,.165178,.4906760000000001,1.807230000000004,322.2612160000001,1764.42524,387.0647799999997,12.306482,307.7965220000001,9.447699999999998 12 | 2010,2.12627,.16737,.49182,1.83659,322.96652,1767.0978,389.12785,12.36431,309.35722,9.518000000000001 13 | 2011,2.171527999999995,.1695780000000005,.4930810000000001,1.867094000000002,323.6682089999999,1770.53138,391.3279329999996,12.421998,310.9191839999999,9.587440000000015 14 | 2012,2.216785999999999,.171786,.4943420000000001,1.897598000000002,324.3698979999999,1773.964960000001,393.5280159999993,12.479686,312.4811479999998,9.656880000000001 15 | 2013,2.262044000000003,.1739940000000004,.495603,1.928102000000003,325.0715869999999,1777.398540000001,395.7280989999999,12.537374,314.0431119999998,9.726320000000015 16 | 2014,2.307302000000007,.176202,.496864,1.958605999999996,325.7732759999999,1780.832120000001,397.9281819999997,12.595062,315.6050759999998,9.795760000000001 17 | 2015,2.352559999999997,.1784100000000004,.4981249999999999,1.989109999999997,326.4749649999999,1784.265700000001,400.1282649999994,12.65275,317.1670399999998,9.865200000000016 18 | 2016,2.397818000000001,.1806180000000008,.4993859999999999,2.019613999999997,327.1766539999999,1787.699280000001,402.3283479999991,12.710438,318.7290039999998,9.934640000000002 19 | 2017,2.443076000000005,.1828260000000004,.5006470000000003,2.050117999999998,327.8783429999999,1791.132860000001,404.5284309999997,12.768126,320.2909679999998,10.00408000000002 20 | 2018,2.488333999999995,.1850340000000008,.5019080000000002,2.080621999999998,328.5800320000001,1794.566440000001,406.7285139999994,12.82581399999999,321.8529319999998,10.07352 21 | 2019,2.533591999999999,.1872420000000004,.5031690000000002,2.111125999999999,329.2817210000001,1798.00002,408.9285969999992,12.88350199999999,323.4148959999998,10.14296000000002 22 | 2020,2.57885,.18945,.50443,2.14163,329.98341,1801.4336,411.12868,12.94119,324.97686,10.2124 23 | 2021,2.621431000000001,.1916690000000001,.5054350000000003,2.172800000000002,330.69688,1804.28107,413.5204059999996,12.994068,325.663159,10.30812 24 | 2022,2.664012,.1938880000000003,.50644,2.203969999999998,331.4103499999999,1807.128540000001,415.9121319999995,13.04694600000001,326.3494579999999,10.40384 25 | 2023,2.706592999999998,.1961069999999996,.5074450000000001,2.235140000000001,332.12382,1809.97601,418.3038579999993,13.099824,327.0357570000001,10.49956 26 | 2024,2.749173999999996,.1983259999999998,.5084500000000003,2.266309999999997,332.8372899999999,1812.82348,420.6955840000001,13.15270200000001,327.7220560000001,10.59528 27 | 2025,2.791754999999995,.200545,.509455,2.29748,333.5507599999999,1815.670950000001,423.0873099999999,13.20558,328.408355,10.691 28 | 2026,2.834336000000008,.2027640000000002,.5104600000000001,2.328649999999996,334.26423,1818.51842,425.4790359999997,13.258458,329.094654,10.78672 29 | 2027,2.876917000000006,.2049830000000004,.5114650000000003,2.359819999999999,334.9776999999999,1821.36589,427.8707619999996,13.311336,329.780953,10.88244 30 | 2028,2.919498000000004,.2072019999999997,.5124700000000004,2.390990000000002,335.6911699999998,1824.21336,430.2624879999994,13.364214,330.4672520000001,10.97816 31 | 2029,2.962079000000003,.2094209999999999,.5134750000000001,2.422159999999998,336.40464,1827.06083,432.6542140000001,13.417092,331.1535510000001,11.07388 32 | 2030,3.00466,.21164,.51448,2.45333,337.11811,1829.9083,435.04594,13.46997,331.83985,11.1696 33 | 2031,3.045299999999997,.2137949999999993,.5148560000000001,2.484796000000003,337.8201779999999,1831.09776,437.6258449999996,13.48834,332.051123,11.20630000000001 34 | 2032,3.085940000000008,.2159499999999994,.515232,2.516262000000005,338.522246,1832.28722,440.2057500000001,13.50671,332.262396,11.24300000000001 35 | 2033,3.126580000000004,.2181049999999995,.5156080000000001,2.547728000000006,339.224314,1833.47668,442.7856549999997,13.52508,332.473669,11.27970000000001 36 | 2034,3.16722,.2202599999999997,.5159840000000001,2.579194000000008,339.9263820000001,1834.66614,445.3655600000002,13.54345,332.684942,11.3164 37 | 2035,3.207860000000011,.2224149999999998,.51636,2.610660000000003,340.6284499999999,1835.8556,447.9454649999998,13.56182,332.896215,11.35310000000001 38 | 2036,3.248500000000007,.2245699999999999,.5167360000000001,2.642125999999998,341.330518,1837.04506,450.5253700000003,13.58019000000001,333.107488,11.38980000000001 39 | 2037,3.289140000000003,.2267250000000001,.517112,2.673592000000006,342.032586,1838.23452,453.1052749999999,13.59856,333.318761,11.4265 40 | 2038,3.32978,.2288799999999993,.5174880000000001,2.705058000000001,342.7346539999999,1839.42398,455.6851800000004,13.61693,333.530034,11.4632 41 | 2039,3.37042000000001,.2310349999999994,.5178640000000001,2.73652400000001,343.4367219999999,1840.61344,458.265085,13.6353,333.741307,11.49990000000001 42 | 2040,3.41106,.23319,.51824,2.76799,344.13879,1841.8029,460.84499,13.65367,333.95258,11.5366 43 | 2041,3.446511999999998,.2351480000000001,.517856,2.797460999999998,344.7856649999999,1840.93205,463.4140229999994,13.637893,333.6888299999999,11.51093 44 | 2042,3.481964000000005,.2371060000000003,.517472,2.826931999999999,345.43254,1840.0612,465.9830559999991,13.622116,333.42508,11.48526 45 | 2043,3.517415999999997,.2390640000000004,.517088,2.856403,346.0794149999999,1839.19035,468.5520889999998,13.606339,333.16133,11.45959 46 | 2044,3.552868000000004,.2410220000000005,.5167039999999999,2.885874000000001,346.7262899999998,1838.3195,471.1211219999996,13.590562,332.8975799999999,11.43392 47 | 2045,3.588319999999996,.2429799999999998,.51632,2.915344999999995,347.373165,1837.44865,473.6901549999993,13.574785,332.63383,11.40825 48 | 2046,3.623772000000002,.2449379999999999,.515936,2.944815999999996,348.0200399999999,1836.5778,476.2591879999991,13.559008,332.37008,11.38258 49 | 2047,3.659223999999995,.246896,.515552,2.974286999999997,348.666915,1835.70695,478.8282209999998,13.543231,332.10633,11.35691 50 | 2048,3.694676000000001,.2488540000000001,.515168,3.003757999999998,349.3137899999999,1834.8361,481.3972539999995,13.527454,331.84258,11.33124 51 | 2049,3.730128000000008,.2508120000000003,.5147839999999999,3.033228999999999,349.9606649999998,1833.96525,483.9662869999993,13.511677,331.57883,11.30557 52 | 2050,3.76558,.25277,.5144,3.0627,350.60754,1833.0944,486.53532,13.4959,331.31508,11.2799 53 | 2051,3.791168999999996,.2544850000000003,.5131180000000004,3.086888000000002,351.1790230000001,1829.836079999999,488.7689229999996,13.48303,329.9423839999995,11.11042999999995 54 | 2052,3.816758,.2562000000000002,.5118360000000002,3.111076000000004,351.7505060000001,1826.577759999999,491.0025259999993,13.47016,328.5696879999996,10.94095999999996 55 | 2053,3.842346999999997,.2579150000000001,.5105540000000004,3.135263999999999,352.321989,1823.319439999998,493.2361289999999,13.45729,327.1969919999997,10.77148999999997 56 | 2054,3.867936,.25963,.5092720000000002,3.159452000000002,352.8934720000002,1820.061119999998,495.4697319999996,13.44442,325.8242959999998,10.60201999999998 57 | 2055,3.893524999999997,.2613449999999999,.5079900000000004,3.183640000000004,353.4649550000001,1816.802799999999,497.7033349999992,13.43155,324.4515999999999,10.43254999999999 58 | 2056,3.919114,.2630600000000003,.5067080000000002,3.207827999999999,354.0364380000001,1813.544479999999,499.9369379999998,13.41868,323.0789039999995,10.26308 59 | 2057,3.944702999999997,.2647750000000002,.5054260000000004,3.232016000000002,354.607921,1810.286159999999,502.1705409999995,13.40581,321.7062079999996,10.09360999999996 60 | 2058,3.970292000000001,.2664900000000001,.5041440000000001,3.256204000000004,355.179404,1807.027839999999,504.4041440000001,13.39294,320.3335119999997,9.924139999999966 61 | 2059,3.995880999999997,.268205,.5028620000000004,3.280391999999999,355.7508870000001,1803.769519999999,506.6377469999998,13.38007,318.9608159999998,9.754669999999976 62 | 2060,4.02147,.26992,.50158,3.30458,356.32237,1800.5112,508.87135,13.3672,317.58812,9.5852 63 | 2061,4.038144000000003,.271404,.4994230000000002,3.320661999999999,356.821491,1794.93396,510.414432,13.344084,315.9038949999999,9.348869999999977 64 | 2062,4.054817999999997,.272888,.4972659999999998,3.336743999999996,357.3206119999999,1789.35672,511.9575140000002,13.32096799999999,314.21967,9.112539999999967 65 | 2063,4.071491999999999,.2743720000000001,.4951090000000002,3.352826,357.8197329999999,1783.779479999999,513.5005960000003,13.29785199999999,312.535445,8.876209999999958 66 | 2064,4.088166000000001,.2758560000000001,.4929519999999998,3.368907999999998,358.318854,1778.202240000001,515.043678,13.274736,310.85122,8.639880000000005 67 | 2065,4.104840000000003,.2773400000000001,.4907950000000003,3.384989999999995,358.817975,1772.625,516.5867600000001,13.25162,309.166995,8.403549999999996 68 | 2066,4.121513999999998,.2788239999999997,.4886379999999999,3.401071999999999,359.3170960000001,1767.047759999999,518.1298420000003,13.22850399999999,307.4827700000001,8.167219999999986 69 | 2067,4.138188,.2803079999999998,.4864810000000004,3.417153999999996,359.8162169999999,1761.470520000001,519.672924,13.20538799999999,305.7985450000001,7.930889999999977 70 | 2068,4.154862000000001,.2817919999999998,.484324,3.433236000000001,360.315338,1755.89328,521.2160060000001,13.182272,304.1143200000001,7.694559999999967 71 | 2069,4.171535999999996,.2832759999999999,.4821670000000005,3.449317999999998,360.8144590000001,1750.31604,522.7590880000002,13.159156,302.4300950000002,7.458229999999958 72 | 2070,4.18821,.28476,.48001,3.4654,361.31358,1744.7388,524.30217,13.13604,300.74587,7.2219 73 | 2071,4.19495,.2859980000000002,.4771879999999999,3.472367,361.733325,1737.44778,524.9857499999999,13.10264699999999,298.7500620000001,6.918709999999919 74 | 2072,4.201690000000001,.287236,.4743659999999998,3.479334,362.1530700000001,1730.156760000002,525.6693300000001,13.069254,296.7542539999995,6.615519999999947 75 | 2073,4.20843,.2884739999999999,.4715439999999997,3.486300999999999,362.5728150000001,1722.865740000001,526.35291,13.035861,294.7584459999998,6.312329999999974 76 | 2074,4.215170000000001,.2897120000000002,.4687219999999996,3.493268,362.99256,1715.574720000001,527.0364900000001,13.00246799999999,292.7626379999992,6.009140000000002 77 | 2075,4.221910000000001,.29095,.4658999999999995,3.500235,363.4123050000001,1708.2837,527.72007,12.96907499999999,290.7668299999996,5.705949999999916 78 | 2076,4.22865,.2921879999999999,.4630779999999994,3.507201999999999,363.8320500000001,1700.992680000001,528.4036500000001,12.935682,288.7710219999999,5.402759999999944 79 | 2077,4.235390000000001,.2934260000000002,.4602559999999993,3.514169000000001,364.251795,1693.701660000001,529.08723,12.902289,286.7752139999993,5.099569999999972 80 | 2078,4.24213,.294664,.4574340000000001,3.521136,364.6715400000001,1686.41064,529.7708100000001,12.86889599999999,284.7794059999997,4.796379999999999 81 | 2079,4.24887,.2959019999999999,.454612,3.528103,365.0912850000001,1679.119620000001,530.45439,12.835503,282.783598,4.493189999999913 82 | 2080,4.25561,.29714,.45179,3.53507,365.51103,1671.8286,531.13797,12.80211,280.78779,4.19 83 | 2081,4.256584999999999,.2981870000000002,.4495820000000004,3.538256000000001,365.866702,1666.00117,531.3982450000001,12.79936,280.0508709999999,4.19296 84 | 2082,4.25756,.299234,.4473739999999999,3.541442,366.2223740000001,1660.17374,531.6585200000001,12.79661,279.3139519999997,4.19592 85 | 2083,4.258535,.3002810000000002,.4451660000000004,3.544628,366.578046,1654.346310000001,531.918795,12.79386,278.5770329999998,4.198880000000001 86 | 2084,4.259510000000001,.301328,.442958,3.547814000000001,366.933718,1648.51888,532.17907,12.79111,277.8401139999999,4.201840000000001 87 | 2085,4.260485,.3023750000000003,.4407500000000004,3.551,367.28939,1642.69145,532.439345,12.78836,277.1031949999999,4.204800000000001 88 | 2086,4.26146,.3034220000000001,.438542,3.554186000000001,367.6450619999999,1636.864020000001,532.6996200000001,12.78561,276.3662759999997,4.20776 89 | 2087,4.262435,.3044690000000003,.4363340000000004,3.557372,368.000734,1631.03659,532.9598950000001,12.78286,275.6293569999998,4.21072 90 | 2088,4.26341,.3055160000000001,.434126,3.560558,368.356406,1625.20916,533.2201700000001,12.78011,274.8924379999999,4.21368 91 | 2089,4.264385000000001,.3065629999999999,.4319180000000005,3.563744000000001,368.712078,1619.381730000001,533.480445,12.77736,274.1555189999999,4.21664 92 | 2090,4.26536,.30761,.42971,3.56693,369.06775,1613.5543,533.74072,12.77461,273.4186,4.2196 93 | 2091,4.269728,.3085499999999999,.4282530000000002,3.572015999999999,369.388358,1609.83345,534.202478,12.771845,272.6818759999999,4.22257 94 | 2092,4.274095999999999,.3094899999999998,.426796,3.577101999999999,369.708966,1606.1126,534.6642360000001,12.76908,271.945152,4.22554 95 | 2093,4.278463999999999,.3104299999999998,.4253390000000001,3.582187999999999,370.029574,1602.39175,535.1259940000001,12.766315,271.2084279999999,4.22851 96 | 2094,4.282832,.3113699999999999,.4238820000000003,3.587274,370.350182,1598.6709,535.587752,12.76355,270.4717039999998,4.23148 97 | 2095,4.287199999999999,.3123099999999999,.4224250000000001,3.592359999999998,370.67079,1594.95005,536.0495100000001,12.760785,269.73498,4.23445 98 | 2096,4.291567999999999,.3132499999999998,.4209680000000002,3.597445999999999,370.9913979999999,1591.2292,536.5112680000001,12.75802,268.9982559999999,4.23742 99 | 2097,4.295936,.3141899999999997,.419511,3.602531999999999,371.3120059999999,1587.50835,536.973026,12.755255,268.261532,4.24039 100 | 2098,4.300304,.3151299999999999,.4180540000000001,3.607618,371.6326139999999,1583.7875,537.434784,12.75249,267.5248079999999,4.24336 101 | 2099,4.304671999999999,.3160699999999999,.4165970000000003,3.612704,371.953222,1580.06665,537.8965420000001,12.749725,266.7880839999998,4.24633 102 | 2100,4.30904,.31701,.41514,3.61779,372.27383,1576.3458,538.3583,12.74696,266.05136,4.2493 103 | -------------------------------------------------------------------------------- /emissions/rcp_6.0_data.csv: -------------------------------------------------------------------------------- 1 | year,total_forcing_wm2,n2o_forcing_wm2,ch4_forcing_wm2,co2_forcing_wm2,n2o_concentration_ppb,ch4_concentration_ppb,co2_concentration_ppm,n2o_emissions_tg,ch4_emissions_tg,c_emissions_pg 2 | 2000,1.72349,.14452,.48518,1.54279,315.85,1751.0225,368.865,11.71751,300.41073,7.8838 3 | 2001,1.759016000000003,.1468979999999993,.485364,1.572190000000006,316.5679999999998,1751.565,370.8544999999999,11.78900999999999,303.0576079999992,8.140339999999981 4 | 2002,1.794541999999993,.1492759999999995,.485548,1.601590000000009,317.2859999999998,1752.1075,372.8440000000001,11.86051,305.7044859999996,8.396879999999953 5 | 2003,1.830067999999997,.1516539999999997,.485732,1.630990000000004,318.0039999999999,1752.65,374.8334999999997,11.93200999999999,308.3513639999992,8.653419999999926 6 | 2004,1.865594000000002,.1540319999999999,.485916,1.660390000000007,318.7219999999998,1753.1925,376.8229999999999,12.00351000000001,310.9982419999997,8.909959999999899 7 | 2005,1.90112,.15641,.4861,1.68979,319.44,1753.735,378.8125,12.07501,313.64512,9.166499999999999 8 | 2006,1.938624000000004,.158684,.4873919999999998,1.718933999999997,320.1662939999999,1756.7256,380.8642999999993,12.23256199999997,315.4197060000001,9.210980000000006 9 | 2007,1.976128000000017,.1609580000000008,.4886840000000001,1.748078,320.8925879999999,1759.7162,382.9160999999995,12.39011399999998,317.1942920000001,9.255460000000014 10 | 2008,2.013632000000015,.1632320000000007,.489976,1.777222000000002,321.618882,1762.7068,384.9678999999996,12.54766599999999,318.9688780000001,9.299940000000007 11 | 2009,2.051136000000014,.1655060000000006,.4912679999999998,1.806365999999997,322.345176,1765.6974,387.0196999999998,12.705218,320.7434640000001,9.34442 12 | 2010,2.08864,.16778,.49256,1.83551,323.07147,1768.688,389.0715,12.86277,322.51805,9.3889 13 | 2011,2.127780000000001,.170007,.4930819999999999,1.863629000000003,323.784498,1770.39833,391.1003759999999,12.82257299999999,321.2804300000003,9.385679999999999 14 | 2012,2.16691999999999,.1722339999999996,.493604,1.891748,324.4975260000001,1772.10866,393.1292520000002,12.782376,320.0428100000004,9.382459999999998 15 | 2013,2.206059999999994,.174461,.494126,1.919867000000004,325.210554,1773.81899,395.158128,12.74217899999999,318.8051900000005,9.379239999999999 16 | 2014,2.245199999999997,.1766879999999995,.4946479999999999,1.947986,325.9235820000001,1775.529320000001,397.1870039999999,12.701982,317.5675700000002,9.37602 17 | 2015,2.28434,.1789149999999999,.49517,1.976105000000004,326.63661,1777.23965,399.2158800000002,12.66178499999999,316.3299500000003,9.3728 18 | 2016,2.323479999999989,.1811419999999995,.4956919999999999,2.004224000000001,327.3496380000001,1778.94998,401.2447560000001,12.621588,315.0923300000004,9.369579999999999 19 | 2017,2.362619999999993,.1833689999999999,.496214,2.032343000000004,328.062666,1780.66031,403.2736319999999,12.581391,313.8547100000005,9.36636 20 | 2018,2.401759999999996,.1855959999999994,.496736,2.060462000000001,328.7756940000002,1782.37064,405.3025080000002,12.54119399999999,312.6170900000002,9.36314 21 | 2019,2.440899999999999,.1878229999999999,.4972579999999999,2.088580999999998,329.4887220000001,1784.08097,407.3313840000001,12.500997,311.3794700000003,9.359919999999999 22 | 2020,2.48004,.19005,.49778,2.1167,330.20175,1785.7913,409.36026,12.4608,310.14185,9.3567 23 | 2021,2.517391000000003,.192228000000001,.498201,2.142402000000004,330.8974369999999,1786.80453,411.3118629999999,12.60039,311.6436229999999,9.364819999999998 24 | 2022,2.554742000000005,.1944060000000007,.498622,2.168104,331.593124,1787.81776,413.2634659999999,12.73998,313.1453959999999,9.37294 25 | 2023,2.592093000000006,.1965840000000005,.499043,2.193806000000002,332.2888109999999,1788.83099,415.2150689999999,12.87957,314.6471689999998,9.381059999999998 26 | 2024,2.629444000000007,.1987620000000003,.499464,2.219508000000005,332.9844979999998,1789.84422,417.1666719999998,13.01916,316.1489420000003,9.38918 27 | 2025,2.666795000000008,.200940000000001,.499885,2.24521,333.6801849999999,1790.85745,419.1182749999998,13.15875,317.6507150000002,9.397299999999998 28 | 2026,2.704146000000009,.2031180000000008,.500306,2.270912000000003,334.3758719999998,1791.87068,421.0698779999998,13.29834,319.1524880000002,9.405419999999999 29 | 2027,2.74149700000001,.2052960000000006,.500727,2.296613999999998,335.071559,1792.88391,423.0214809999998,13.43792999999999,320.6542610000001,9.413539999999998 30 | 2028,2.778847999999996,.2074740000000004,.501148,2.322316000000001,335.7672459999999,1793.89714,424.9730839999997,13.57751999999999,322.1560340000001,9.421659999999999 31 | 2029,2.816198999999997,.2096520000000011,.501569,2.348018000000003,336.4629329999998,1794.91037,426.9246869999997,13.71710999999999,323.657807,9.429780000000001 32 | 2030,2.85355,.21183,.50199,2.37372,337.15862,1795.9236,428.87629,13.8567,325.15958,9.437900000000001 33 | 2031,2.882753999999998,.2143619999999995,.5036790000000004,2.401147999999999,337.9766649999999,1800.396359999999,431.0584720000006,13.99976299999997,326.9926059999998,9.578140000000019 34 | 2032,2.911957999999998,.2168939999999999,.5053680000000003,2.428576,338.7947099999999,1804.869119999999,433.2406540000002,14.14282599999996,328.825632,9.718380000000025 35 | 2033,2.941161999999999,.2194259999999995,.5070570000000001,2.456004,339.6127549999999,1809.34188,435.4228360000006,14.285889,330.6586579999998,9.85862000000003 36 | 2034,2.970365999999999,.2219579999999999,.5087460000000004,2.483432000000001,340.4307999999999,1813.814639999999,437.6050180000002,14.42895199999998,332.4916840000001,9.998859999999979 37 | 2035,2.999569999999999,.2244899999999994,.5104350000000002,2.510860000000001,341.2488449999998,1818.287399999999,439.7872000000007,14.57201499999996,334.3247099999999,10.13909999999998 38 | 2036,3.028773999999999,.2270219999999998,.5121240000000005,2.538288000000001,342.0668899999998,1822.76016,441.9693820000002,14.71507800000001,336.1577359999997,10.27933999999999 39 | 2037,3.057977999999999,.2295539999999994,.5138130000000003,2.565716000000002,342.8849349999998,1827.232919999999,444.1515640000007,14.85814099999999,337.9907619999999,10.41958 40 | 2038,3.087181999999999,.2320859999999998,.5155020000000001,2.593144000000002,343.7029799999998,1831.705679999999,446.3337460000002,15.00120399999997,339.8237879999997,10.55982 41 | 2039,3.116385999999999,.2346179999999993,.5171910000000004,2.620572000000003,344.5210249999998,1836.17844,448.5159280000007,15.14426699999996,341.6568139999999,10.70006000000001 42 | 2040,3.14559,.23715,.51888,2.648,345.33907,1840.6512,450.69811,15.28733,343.48984,10.8403 43 | 2041,3.183148000000003,.2399709999999997,.5208460000000006,2.679808999999999,346.2643909999999,1846.071110000001,453.3953419999998,15.41442699999999,344.6450189999998,11.01427000000001 44 | 2042,3.220706000000007,.2427919999999997,.5228120000000001,2.711617999999994,347.1897119999999,1851.491020000001,456.0925740000002,15.54152399999998,345.8001979999997,11.18824000000001 45 | 2043,3.258263999999997,.2456129999999996,.5247780000000004,2.74342699999999,348.115033,1856.91093,458.7898059999998,15.66862099999997,346.955377,11.36221 46 | 2044,3.295822000000001,.2484339999999996,.5267440000000008,2.775236,349.040354,1862.330840000001,461.4870380000002,15.79571799999997,348.1105559999999,11.53618 47 | 2045,3.333380000000005,.2512549999999996,.5287100000000002,2.807044999999995,349.9656749999999,1867.750750000001,464.1842699999997,15.92281500000001,349.2657349999997,11.71015 48 | 2046,3.37093800000001,.2540759999999995,.5306760000000006,2.838853999999991,350.8909959999999,1873.170660000002,466.8815020000002,16.04991200000001,350.4209139999996,11.88412 49 | 2047,3.408496,.2568969999999995,.5326420000000001,2.870663,351.816317,1878.59057,469.5787339999997,16.177009,351.5760929999999,12.05808999999999 50 | 2048,3.446054000000004,.2597179999999994,.5346080000000004,2.902471999999996,352.741638,1884.010480000001,472.2759660000002,16.30410599999999,352.7312719999998,12.23205999999999 51 | 2049,3.483612000000008,.2625389999999994,.5365740000000008,2.934280999999991,353.6669589999999,1889.430390000001,474.9731980000006,16.43120299999998,353.8864509999996,12.40602999999999 52 | 2050,3.52117,.26536,.53854,2.96609,354.59228,1894.8503,477.67043,16.5583,355.04163,12.58 53 | 2051,3.559590999999998,.2684009999999999,.5401190000000002,3.002360999999993,355.6044400000003,1899.30436,480.9668299999994,16.68778600000005,355.9302749999999,12.77859999999998 54 | 2052,3.598011999999997,.2714420000000004,.5416980000000002,3.038631999999993,356.6166000000001,1903.75842,484.2632299999996,16.81727200000003,356.8189199999999,12.97719999999998 55 | 2053,3.636432999999997,.274483,.5432770000000002,3.074902999999992,357.6287600000003,1908.21248,487.5596299999997,16.94675800000002,357.7075649999999,13.17579999999998 56 | 2054,3.674853999999996,.2775240000000005,.5448560000000002,3.111173999999991,358.6409200000001,1912.66654,490.8560299999999,17.07624400000006,358.5962099999999,13.37439999999998 57 | 2055,3.713274999999996,.2805650000000002,.5464350000000002,3.147444999999991,359.6530800000003,1917.1206,494.1524300000001,17.20573000000005,359.4848549999999,13.57299999999998 58 | 2056,3.751695999999995,.2836059999999998,.5480140000000002,3.18371599999999,360.66524,1921.57466,497.4488299999994,17.33521600000003,360.3734999999999,13.77159999999998 59 | 2057,3.790116999999995,.2866470000000003,.5495930000000002,3.219986999999989,361.6774000000003,1926.02872,500.7452299999995,17.46470200000002,361.2621449999999,13.97019999999998 60 | 2058,3.828537999999995,.2896879999999999,.5511720000000002,3.256258000000003,362.68956,1930.48278,504.0416299999997,17.594188,362.1507899999999,14.16879999999998 61 | 2059,3.866958999999994,.2927290000000005,.5527510000000002,3.292529000000002,363.7017200000003,1934.93684,507.3380299999999,17.72367400000005,363.0394349999999,14.36739999999998 62 | 2060,3.90538,.29577,.55433,3.3288,364.71388,1939.3909,510.63443,17.85316,363.92808,14.566 63 | 2061,3.959116999999992,.2989620000000004,.5550709999999999,3.368775000000014,365.7939720000002,1941.63439,514.5529759999999,17.958461,363.5284009999999,14.75706999999994 64 | 2062,4.01285399999999,.3021539999999998,.555812,3.408750000000012,366.8740639999999,1943.87788,518.4715219999998,18.063762,363.1287219999999,14.94813999999997 65 | 2063,4.066590999999988,.3053460000000001,.5565529999999999,3.44872500000001,367.954156,1946.121370000001,522.3900679999997,18.16906300000002,362.7290429999998,15.13920999999993 66 | 2064,4.120327999999986,.3085379999999995,.557294,3.488700000000009,369.0342480000002,1948.364860000001,526.3086139999996,18.27436400000002,362.3293639999998,15.33027999999996 67 | 2065,4.174064999999985,.3117299999999998,.5580349999999998,3.528675000000007,370.1143399999999,1950.60835,530.2271599999995,18.37966500000002,361.9296849999998,15.52134999999998 68 | 2066,4.227801999999983,.3149220000000001,.5587759999999999,3.568650000000005,371.194432,1952.85184,534.1457059999993,18.48496600000001,361.5300059999998,15.71241999999995 69 | 2067,4.281538999999981,.3181139999999996,.5595169999999998,3.608625000000004,372.2745240000002,1955.09533,538.0642519999992,18.59026700000001,361.1303269999999,15.90348999999998 70 | 2068,4.335275999999993,.3213059999999999,.5602579999999999,3.648600000000002,373.3546159999999,1957.33882,541.982798,18.69556800000001,360.7306479999999,16.09455999999994 71 | 2069,4.389012999999991,.3244980000000002,.560999,3.688575,374.434708,1959.582310000001,545.9013439999999,18.80086900000001,360.3309689999999,16.28562999999997 72 | 2070,4.44275,.32769,.56174,3.72855,375.5148,1961.8258,549.81989,18.90617,359.93129,16.4767 73 | 2071,4.491690000000006,.330868999999999,.560854,3.770336999999998,376.609821,1959.65979,554.2635840000003,18.95823200000001,357.9291400000002,16.58150000000001 74 | 2072,4.540630000000007,.3340479999999992,.559968,3.812123999999997,377.7048420000001,1957.49378,558.7072779999999,19.010294,355.9269900000008,16.68629999999999 75 | 2073,4.589570000000009,.3372269999999995,.5590820000000001,3.853910999999997,378.7998629999997,1955.327769999999,563.1509720000013,19.06235600000001,353.9248400000006,16.7911 76 | 2074,4.638510000000011,.3404059999999989,.5581960000000001,3.895697999999996,379.8948839999998,1953.161759999999,567.5946660000009,19.114418,351.9226900000003,16.89589999999998 77 | 2075,4.687450000000013,.3435849999999991,.55731,3.937484999999995,380.9899049999999,1950.995749999999,572.0383600000005,19.16648000000001,349.920540000001,17.00069999999999 78 | 2076,4.73639,.3467639999999994,.556424,3.979271999999995,382.084926,1948.829739999999,576.4820540000001,19.218542,347.9183900000007,17.10549999999998 79 | 2077,4.785330000000002,.3499429999999988,.5555380000000001,4.021058999999994,383.1799470000001,1946.663729999999,580.9257480000015,19.27060400000001,345.9162400000005,17.21029999999999 80 | 2078,4.834270000000004,.353121999999999,.5546519999999999,4.062845999999993,384.2749679999997,1944.497719999999,585.3694420000011,19.322666,343.9140900000002,17.3151 81 | 2079,4.883210000000005,.3563009999999993,.553766,4.104632999999993,385.3699889999998,1942.331709999999,589.8131360000007,19.374728,341.9119400000009,17.41989999999998 82 | 2080,4.93215,.35948,.55288,4.14642,386.46501,1940.1657,594.25683,19.42679,339.90979,17.5247 83 | 2081,4.964479000000004,.3624460000000003,.5481839999999991,4.182072000000005,387.5044529999996,1928.063340000001,598.3960230000012,19.42635,332.9186210000007,17.22779000000003 84 | 2082,4.996808000000009,.3654120000000001,.543488,4.217724000000018,388.5438959999997,1915.96098,602.5352160000002,19.42591,325.9274519999999,16.93088000000012 85 | 2083,5.029137000000013,.3683780000000008,.538791999999999,4.253376000000017,389.5833389999998,1903.858619999999,606.6744090000011,19.42547,318.9362830000009,16.63397000000009 86 | 2084,5.061466000000003,.3713440000000006,.5340959999999999,4.289028000000016,390.6227819999999,1891.756260000002,610.8136020000002,19.42503,311.9451140000001,16.33706000000006 87 | 2085,5.093795000000007,.3743100000000004,.529399999999999,4.324680000000015,391.6622249999996,1879.653900000001,614.9527950000011,19.42459,304.9539450000011,16.04015000000004 88 | 2086,5.126124000000011,.3772760000000002,.5247039999999998,4.360332000000014,392.7016679999997,1867.55154,619.0919880000001,19.42415,297.9627760000003,15.74324000000001 89 | 2087,5.158453000000002,.3802420000000009,.5200079999999989,4.395984000000013,393.7411109999998,1855.44918,623.231181000001,19.42371,290.9716069999995,15.4463300000001 90 | 2088,5.190782000000006,.3832080000000007,.5153119999999998,4.431636000000012,394.7805539999995,1843.346819999999,627.3703740000019,19.42327,283.9804380000005,15.14942000000008 91 | 2089,5.22311100000001,.3861740000000005,.5106159999999988,4.467288000000011,395.8199969999996,1831.244460000002,631.509567000001,19.42283,276.9892689999997,14.85251000000005 92 | 2090,5.25544,.38914,.50592,4.50294,396.85944,1819.1421,635.64876,19.42239,269.9981,14.5556 93 | 2091,5.278036999999998,.3917869999999999,.4995399999999997,4.530959000000003,397.8000249999998,1802.167509999999,639.0562010000003,19.408294,267.5945630000006,14.49351000000001 94 | 2092,5.300633999999995,.3944340000000004,.4931599999999996,4.558978000000003,398.7406099999998,1785.192920000001,642.4636420000006,19.394198,265.1910260000004,14.43142 95 | 2093,5.323231,.397081,.4867799999999995,4.586997000000004,399.6811949999999,1768.218329999996,645.871083,19.380102,262.7874890000003,14.36932999999999 96 | 2094,5.345827999999997,.3997280000000005,.4803999999999995,4.615016000000004,400.6217799999997,1751.243739999998,649.2785240000003,19.366006,260.3839520000001,14.30724000000001 97 | 2095,5.368424999999995,.4023750000000001,.4740199999999994,4.643035000000005,401.5623649999998,1734.26915,652.6859650000006,19.35191,257.980415,14.24515 98 | 2096,5.391022,.4050219999999998,.4676399999999994,4.671054000000005,402.5029499999998,1717.294560000002,656.093406,19.337814,255.5768779999999,14.18306000000001 99 | 2097,5.413618999999997,.4076690000000003,.4612599999999993,4.699073000000006,403.4435349999999,1700.319969999997,659.5008470000002,19.323718,253.1733410000006,14.12097 100 | 2098,5.436216000000002,.4103159999999999,.4548799999999993,4.727092000000006,404.3841199999999,1683.345379999999,662.9082880000005,19.309622,250.7698040000005,14.05887999999999 101 | 2099,5.458812999999999,.4129630000000004,.4484999999999992,4.755111000000007,405.3247049999998,1666.370790000001,666.3157289999999,19.295526,248.3662670000003,13.99679 102 | 2100,5.48141,.41561,.44212,4.78313,406.26529,1649.3962,669.72317,19.28143,245.96273,13.9347 103 | -------------------------------------------------------------------------------- /emissions/rcp_8.5_data.csv: -------------------------------------------------------------------------------- 1 | year,total_forcing_wm2,n2o_forcing_wm2,ch4_forcing_wm2,co2_forcing_wm2,n2o_concentration_ppb,ch4_concentration_ppb,co2_concentration_ppm,n2o_emissions_tg,ch4_emissions_tg,c_emissions_pg 2 | 2000,1.72349,.14452,.48518,1.54279,315.85,1751.0225,368.865,11.71767,300.43783,7.8838 3 | 2001,1.760074000000003,.1468979999999993,.485364,1.572190000000006,316.5679999999998,1751.565,370.8544999999999,11.78916999999998,308.0562900000004,8.140339999999981 4 | 2002,1.796658000000008,.1492759999999995,.485548,1.601590000000009,317.2859999999998,1752.1075,372.8440000000001,11.86067,315.6747500000001,8.396879999999953 5 | 2003,1.833241999999998,.1516539999999997,.485732,1.630990000000004,318.0039999999999,1752.65,374.8334999999997,11.93216999999999,323.2932099999998,8.653419999999926 6 | 2004,1.869826000000003,.1540319999999999,.485916,1.660390000000007,318.7219999999998,1753.1925,376.8229999999999,12.00367,330.9116700000013,8.909959999999899 7 | 2005,1.90641,.15641,.4861,1.68979,319.44,1753.735,378.8125,12.07517,338.53013,9.166499999999999 8 | 2006,1.956017999999986,.1586760000000007,.488324,1.719894000000004,320.1642259999999,1758.72298,380.9148320000004,12.22241400000001,344.7579339999993,9.327079999999967 9 | 2007,2.005625999999992,.1609420000000004,.490548,1.749997999999998,320.8884519999999,1763.71096,383.0171639999999,12.36965800000002,350.9857379999994,9.487660000000005 10 | 2008,2.055233999999999,.163208,.492772,1.780101999999999,321.612678,1768.69894,385.1194960000003,12.51690200000002,357.2135419999995,9.648239999999987 11 | 2009,2.104841999999991,.1654740000000006,.494996,1.810206000000001,322.336904,1773.68692,387.2218280000006,12.66414599999996,363.4413459999996,9.808819999999969 12 | 2010,2.15445,.16774,.49722,1.84031,323.06113,1778.6749,389.32416,12.81139,369.66915,9.9694 13 | 2011,2.205472999999998,.1704270000000001,.5027059999999999,1.876913000000002,323.9064580000002,1793.174510000001,391.9697660000002,13.03179799999998,376.5850859999991,10.21686 14 | 2012,2.256495999999999,.173114,.5081920000000011,1.913516000000001,324.751786,1807.67412,394.6153720000002,13.252206,383.5010220000004,10.46431999999999 15 | 2013,2.307518999999999,.1758009999999999,.5136780000000005,1.950119000000001,325.5971140000001,1822.173730000002,397.2609780000003,13.47261399999996,390.4169579999998,10.71178000000003 16 | 2014,2.358542,.1784880000000006,.519164,1.986722,326.442442,1836.673340000001,399.9065840000003,13.69302199999998,397.3328939999992,10.95924000000002 17 | 2015,2.409565000000001,.1811750000000005,.5246499999999994,2.023325,327.2877700000001,1851.17295,402.5521900000003,13.91343000000001,404.2488299999986,11.20670000000001 18 | 2016,2.460588000000001,.1838620000000004,.5301360000000006,2.059927999999999,328.133098,1865.672560000003,405.1977960000004,14.13383799999997,411.1647659999999,11.45416 19 | 2017,2.511611000000002,.1865490000000003,.535622,2.096530999999999,328.9784260000001,1880.172170000002,407.8434020000004,14.35424599999999,418.0807019999993,11.70161999999999 20 | 2018,2.562633999999989,.1892360000000002,.5411079999999995,2.133133999999998,329.823754,1894.671780000001,410.4890079999996,14.57465400000001,424.9966379999987,11.94907999999998 21 | 2019,2.613656999999989,.1919230000000001,.5465940000000007,2.169736999999998,330.6690820000001,1909.17139,413.1346139999996,14.79506199999997,431.9125739999999,12.19654000000003 22 | 2020,2.66468,.19461,.55208,2.20634,331.51441,1923.671,415.78022,15.01547,438.82851,12.444 23 | 2021,2.725845000000007,.1978680000000006,.5594030000000014,2.248317999999998,332.5589809999999,1944.505250000002,419.0856830000002,15.20775000000003,444.8397899999982,12.65500000000003 24 | 2022,2.787010000000009,.2011260000000004,.566726000000001,2.290295999999998,333.6035519999998,1965.339500000002,422.3911459999999,15.40003000000002,450.8510699999988,12.86600000000004 25 | 2023,2.848175000000012,.2043840000000001,.5740490000000005,2.332273999999998,334.6481230000002,1986.173750000002,425.6966089999996,15.59231,456.8623499999994,13.07700000000006 26 | 2024,2.90934,.2076420000000008,.5813720000000018,2.374251999999998,335.6926940000001,2007.008000000002,429.0020720000002,15.78459000000004,462.8736299999982,13.28800000000001 27 | 2025,2.970505000000003,.2109000000000005,.5886950000000013,2.416229999999999,336.737265,2027.842250000002,432.3075349999999,15.97687000000002,468.8849099999989,13.49900000000002 28 | 2026,3.031670000000005,.2141580000000003,.5960180000000008,2.458207999999985,337.7818359999999,2048.676500000001,435.6129979999996,16.16915,474.8961899999995,13.71000000000004 29 | 2027,3.092835000000008,.2174160000000001,.6033410000000003,2.500185999999985,338.8264070000002,2069.510750000001,438.9184610000002,16.36143000000004,480.9074699999983,13.92100000000005 30 | 2028,3.154000000000011,.2206740000000007,.6106640000000016,2.542163999999985,339.8709780000002,2090.345000000001,442.2239239999999,16.55371000000002,486.9187499999989,14.13200000000006 31 | 2029,3.215164999999999,.2239320000000005,.6179870000000012,2.584141999999986,340.9155490000001,2111.179250000001,445.5293869999996,16.74599000000001,492.9300299999995,14.34300000000002 32 | 2030,3.27633,.22719,.62531,2.62612,341.96012,2132.0135,448.83485,16.93827,498.94131,14.554 33 | 2031,3.347971000000001,.2308870000000001,.6342649999999992,2.673463000000012,343.1675850000006,2158.736600000004,452.89491,17.13457299999999,507.6517260000001,14.84175999999991 34 | 2032,3.419612000000001,.2345839999999999,.6432199999999995,2.72080600000001,344.3750500000006,2185.459699999999,456.9549699999998,17.33087599999999,516.3621420000018,15.12951999999996 35 | 2033,3.491253,.2382809999999997,.6521749999999997,2.768149000000008,345.5825150000005,2212.182800000002,461.0150299999996,17.52717899999999,525.0725579999998,15.41727999999989 36 | 2034,3.562894,.2419779999999996,.66113,2.815492000000006,346.7899800000005,2238.905900000005,465.0750899999994,17.72348199999999,533.7829740000016,15.70503999999994 37 | 2035,3.634535,.2456750000000003,.6700850000000003,2.862835000000004,347.9974450000004,2265.629000000001,469.135150000001,17.91978499999999,542.4933899999996,15.99279999999999 38 | 2036,3.706175999999999,.2493720000000001,.6790400000000005,2.910178000000002,349.2049100000004,2292.352100000004,473.1952100000008,18.11608799999999,551.2038060000014,16.28055999999992 39 | 2037,3.777816999999999,.253069,.6879950000000008,2.957521,350.4123750000003,2319.075199999999,477.2552700000006,18.31239099999999,559.9142219999994,16.56831999999997 40 | 2038,3.849457999999998,.2567659999999998,.6969500000000011,3.004864000000012,351.6198400000003,2345.798300000002,481.3153300000004,18.50869399999999,568.6246380000011,16.85607999999991 41 | 2039,3.921098999999998,.2604629999999997,.7059050000000013,3.05220700000001,352.8273050000003,2372.521400000005,485.3753900000002,18.70499699999999,577.3350539999992,17.14383999999995 42 | 2040,3.99274,.26416,.7148600000000001,3.09955,354.03477,2399.2445,489.43545,18.9013,586.04547,17.4316 43 | 2041,4.069625000000002,.2681070000000005,.7254680000000029,3.153594999999996,355.3532580000001,2433.318520000001,494.5461840000007,19.02195399999999,595.1198930000028,17.76650000000006 44 | 2042,4.146510000000006,.2720539999999989,.7360760000000006,3.207639999999998,356.671746,2467.392540000001,499.6569180000024,19.142608,604.194316000001,18.10140000000001 45 | 2043,4.223395000000011,.2760009999999991,.7466840000000019,3.261685,357.9902340000003,2501.466560000001,504.7676520000023,19.263262,613.2687390000028,18.43630000000007 46 | 2044,4.300280000000015,.2799479999999992,.7572919999999996,3.315730000000002,359.3087220000002,2535.540580000001,509.8783860000021,19.383916,622.343162000001,18.77120000000002 47 | 2045,4.377164999999991,.2838949999999993,.7679000000000009,3.36977499999999,360.6272100000001,2569.614600000001,514.989120000002,19.50457,631.4175850000029,19.10610000000008 48 | 2046,4.454049999999995,.2878419999999995,.7785080000000022,3.423819999999992,361.9456980000004,2603.688620000001,520.0998540000019,19.625224,640.4920080000011,19.44100000000003 49 | 2047,4.530934999999999,.2917889999999996,.7891159999999999,3.477864999999994,363.2641860000003,2637.762640000001,525.2105880000017,19.745878,649.5664310000029,19.77590000000009 50 | 2048,4.607820000000004,.2957359999999998,.7997240000000012,3.531909999999996,364.5826740000002,2671.836660000001,530.3213220000016,19.86653200000001,658.6408540000011,20.11080000000004 51 | 2049,4.684705000000008,.2996829999999999,.8103320000000025,3.585954999999998,365.9011620000001,2705.910680000001,535.4320560000015,19.98718600000001,667.7152769999993,20.44569999999999 52 | 2050,4.76159,.30363,.82094,3.64,367.21965,2739.9847,540.54279,20.10784,676.7897,20.7806 53 | 2051,4.839350000000024,.3075899999999994,.8305860000000003,3.699670999999995,368.569297,2773.599679999999,546.840556000001,20.206165,683.6256479999993,21.11226000000011 54 | 2052,4.917110000000008,.3115500000000004,.8402320000000003,3.759342000000004,369.918944,2807.214659999998,553.1383220000007,20.30449000000002,690.4615959999992,21.44392000000005 55 | 2053,4.99487000000002,.3155099999999997,.8498780000000004,3.819012999999998,371.268591,2840.829640000011,559.4360880000004,20.402815,697.2975439999991,21.7755800000001 56 | 2054,5.072630000000004,.319469999999999,.8595240000000004,3.878683999999993,372.618238,2874.444620000009,565.7338540000001,20.50113999999999,704.133491999999,22.10724000000005 57 | 2055,5.150390000000016,.3234300000000001,.8691700000000004,3.938355000000001,373.967885,2908.059600000008,572.0316199999997,20.59946500000001,710.9694399999989,22.4389000000001 58 | 2056,5.228150000000028,.3273899999999994,.8788160000000005,3.998025999999996,375.317532,2941.674580000006,578.3293859999994,20.69779,717.8053879999989,22.77056000000005 59 | 2057,5.305910000000011,.3313500000000005,.8884620000000005,4.057697000000005,376.667179,2975.289560000005,584.6271520000009,20.79611500000001,724.6413359999988,23.1022200000001 60 | 2058,5.383670000000023,.3353099999999998,.8981080000000006,4.117367999999999,378.016826,3008.904540000003,590.9249180000006,20.89444,731.4772839999987,23.43388000000004 61 | 2059,5.461430000000007,.3392699999999991,.9077540000000006,4.177038999999994,379.366473,3042.519520000002,597.2226840000003,20.99276500000002,738.3132319999986,23.7655400000001 62 | 2060,5.53919,.34323,.9174,4.23671,380.71612,3076.1345,603.52045,21.09109,745.14918,24.0972 63 | 2061,5.61520299999998,.3471210000000013,.9240180000000002,4.298653999999999,382.0672280000003,3100.755119999994,610.8761669999985,21.17258400000003,748.6422020000009,24.32490000000001 64 | 2062,5.691215999999969,.3510120000000008,.9306359999999998,4.360597999999996,383.4183360000002,3125.375739999996,618.2318839999989,21.25407800000002,752.1352240000006,24.55259999999998 65 | 2063,5.767228999999986,.3549030000000002,.9372540000000011,4.422541999999993,384.769444,3149.996359999997,625.5876009999993,21.33557200000001,755.6282460000011,24.78030000000001 66 | 2064,5.843241999999975,.3587940000000014,.9438720000000007,4.484486000000004,386.1205520000003,3174.616979999999,632.9433179999996,21.41706600000001,759.1212680000008,25.00799999999998 67 | 2065,5.919254999999993,.3626850000000008,.9504900000000003,4.546430000000001,387.4716600000002,3199.237599999993,640.299035,21.49856000000003,762.6142900000004,25.23570000000001 68 | 2066,5.995267999999982,.3665760000000002,.9571079999999998,4.608373999999998,388.822768,3223.858219999995,647.6547519999986,21.58005400000002,766.107312000001,25.46339999999998 69 | 2067,6.071280999999971,.3704670000000014,.9637260000000012,4.670318000000009,390.1738760000003,3248.478839999996,655.0104689999989,21.66154800000001,769.6003340000007,25.69110000000001 70 | 2068,6.147293999999988,.3743580000000009,.9703440000000008,4.732261999999992,391.5249840000001,3273.099459999998,662.3661859999993,21.743042,773.0933560000012,25.91879999999998 71 | 2069,6.223306999999977,.3782490000000003,.9769620000000003,4.794206000000003,392.876092,3297.720079999999,669.7219029999997,21.82453600000002,776.5863780000009,26.1465 72 | 2070,6.29932,.38214,.98358,4.85615,394.2272,3322.3407,677.07762,21.90603,780.0794,26.3742 73 | 2071,6.371358999999984,.3859559999999993,.9879719999999992,4.916902999999991,395.5746730000001,3339.090499999998,685.1880880000026,22.00320700000003,784.2060219999994,26.50829000000002 74 | 2072,6.443398000000002,.3897719999999998,.9923640000000002,4.977655999999996,396.9221459999999,3355.840299999996,693.2985560000016,22.10038400000002,788.3326439999992,26.64238000000003 75 | 2073,6.515436999999991,.3935879999999994,.9967559999999995,5.038408999999987,398.2696190000001,3372.590099999994,701.4090240000005,22.19756100000004,792.4592659999989,26.77647000000005 76 | 2074,6.587476000000009,.3974039999999999,1.001148000000001,5.099161999999993,399.617092,3389.339899999999,709.5194920000031,22.29473800000002,796.5858879999987,26.91056 77 | 2075,6.659514999999999,.4012199999999995,1.00554,5.159914999999998,400.9645649999998,3406.089699999997,717.629960000002,22.39191500000001,800.7125100000003,27.04465000000002 78 | 2076,6.731553999999988,.405036,1.009931999999999,5.220667999999989,402.312038,3422.839499999995,725.740428000001,22.48909200000003,804.8391320000001,27.17874000000003 79 | 2077,6.803593000000006,.4088519999999995,1.014324,5.281420999999995,403.6595109999998,3439.5893,733.8508959999999,22.58626900000002,808.9657539999998,27.31283000000005 80 | 2078,6.875631999999996,.412668,1.018716,5.342174,405.0069840000001,3456.339099999997,741.9613640000025,22.68344600000003,813.0923759999996,27.44692000000001 81 | 2079,6.947670999999985,.4164839999999996,1.023108000000001,5.402926999999991,406.3544569999999,3473.088899999995,750.0718320000015,22.78062300000002,817.2189979999994,27.58101000000002 82 | 2080,7.01971,.4203,1.0275,5.46368,407.70193,3489.8387,758.1823000000001,22.8778,821.3456200000001,27.7151 83 | 2081,7.091902000000005,.424105,1.031362,5.521705999999995,409.0674709999998,3504.714019999999,766.8445409999986,22.99315900000002,826.2818500000012,27.79666000000003 84 | 2082,7.164094000000006,.4279099999999998,1.035223999999999,5.579731999999993,410.433012,3519.589340000002,775.5067820000004,23.108518,831.2180800000006,27.87822000000003 85 | 2083,7.236286000000007,.4317149999999996,1.039086000000001,5.637758000000005,411.7985530000001,3534.464660000001,784.1690230000022,23.22387700000002,836.1543099999999,27.95978000000002 86 | 2084,7.308478000000008,.4355200000000004,1.042948000000001,5.695784000000003,413.1640940000002,3549.339980000001,792.8312640000004,23.339236,841.0905400000011,28.04134000000002 87 | 2085,7.380670000000009,.4393250000000002,1.046810000000001,5.753810000000001,414.5296349999999,3564.2153,801.4935049999985,23.45459500000001,846.0267700000004,28.12290000000002 88 | 2086,7.452861999999982,.44313,1.050672,5.811836,415.895176,3579.090620000003,810.1557460000004,23.569954,850.9630000000016,28.20446000000001 89 | 2087,7.525053999999983,.4469349999999999,1.054534,5.869861999999998,417.2607170000001,3593.965940000002,818.8179870000022,23.68531300000001,855.8992300000009,28.28602000000001 90 | 2088,7.597245999999984,.4507399999999997,1.058396,5.927887999999996,418.6262579999998,3608.841260000001,827.4802280000004,23.80067199999999,860.8354600000002,28.36758000000003 91 | 2089,7.669437999999985,.4545449999999995,1.062258,5.985913999999994,419.9917989999999,3623.71658,836.1424689999985,23.916031,865.7716900000014,28.44914000000003 92 | 2090,7.74163,.45835,1.06612,6.04394,421.35734,3638.5919,844.80471,24.03139,870.7079199999999,28.5307 93 | 2091,7.806289000000007,.4621130000000004,1.068878,6.098787000000016,422.7322209999998,3649.801170000002,853.9116759999997,24.10727399999999,872.3935230000002,28.55934 94 | 2092,7.870948000000013,.4658760000000006,1.071636,6.153634000000011,424.1071019999999,3661.010440000002,863.0186420000027,24.18315799999999,874.0791260000001,28.58798 95 | 2093,7.935607000000019,.4696390000000008,1.074394,6.208481000000006,425.4819829999997,3672.219710000001,872.1256080000021,24.25904199999999,875.764729,28.61662 96 | 2094,8.000265999999996,.473402000000001,1.077152,6.263328000000016,426.8568639999999,3683.428980000001,881.2325740000015,24.334926,877.4503319999999,28.64526 97 | 2095,8.064925000000002,.4771650000000003,1.07991,6.318175000000011,428.231745,3694.63825,890.3395400000009,24.41081,879.1359350000002,28.6739 98 | 2096,8.129584000000008,.4809280000000005,1.082668,6.373022000000006,429.6066259999998,3705.847519999999,899.4465060000002,24.486694,880.8215380000001,28.70254 99 | 2097,8.194243000000014,.4846910000000006,1.085426,6.427869000000015,430.981507,3717.056790000002,908.5534719999996,24.562578,882.507141,28.73118 100 | 2098,8.25890200000002,.4884540000000008,1.088184,6.482716000000011,432.3563879999997,3728.266060000002,917.6604380000026,24.638462,884.1927439999999,28.75982 101 | 2099,8.323560999999998,.4922170000000001,1.090941999999999,6.537563000000006,433.7312689999999,3739.475330000001,926.767404000002,24.71434600000001,885.8783469999998,28.78846 102 | 2100,8.38822,.49598,1.0937,6.59241,435.10615,3750.6846,935.87437,24.79023,887.56395,28.8171 103 | -------------------------------------------------------------------------------- /emissions_parser.py: -------------------------------------------------------------------------------- 1 | import pandas as pd 2 | import numpy as np 3 | from constants import * 4 | 5 | 6 | def emissions(run_start_year, run_end_year, dt, rcp, add_start = 0, 7 | add_end = 0, c_add = 0, ch4_add = 0, n2o_add = 0): 8 | """ 9 | Take annual emissions from a RCP scenario and return 10 | emissions by specified start date, end date, and time step 11 | """ 12 | run_years = run_end_year - run_start_year + 1 13 | rcp_emissions = pd.read_csv('emissions/rcp_'+rcp+'_data.csv', sep=',') 14 | historic_emissions = pd.read_csv('emissions/historical_ghgs.csv', sep=',') 15 | emissions = rcp_emissions.append(historic_emissions, ignore_index=True) 16 | emissions.sort(columns='year', inplace=True) 17 | emissions.reset_index(inplace=True) 18 | if add_start > 0: 19 | emissions.loc[( 20 | (emissions['year'] >= add_start) & (emissions['year'] <= add_end), 21 | 'c_emissions_pg')] = emissions['c_emissions_pg'] + c_add 22 | emissions.loc[( 23 | (emissions['year'] >= add_start) & (emissions['year'] <= add_end), 24 | 'ch4_emissions_tg')] = emissions['ch4_emissions_tg'] + ch4_add 25 | emissions.loc[( 26 | (emissions['year'] >= add_start) & (emissions['year'] <= add_end), 27 | 'n2o_emissions_tg')] = emissions['n2o_emissions_tg'] + n2o_add 28 | 29 | total_years = emissions.shape[0] 30 | subset = emissions[int(run_start_year - 1765):int(run_end_year - 1765 + 1)] 31 | subset.reset_index(inplace=True) 32 | date = np.array([np.arange(0, run_years, dt)]).T 33 | columns = ['date'] 34 | df = pd.DataFrame(date, columns=columns) 35 | steps = df.shape[0] 36 | 37 | for t in range(0,int(steps)): 38 | df.ix[t, 'year'] = subset['year'][int(df['date'][t])] 39 | df.ix[t, 'co2_pg'] = subset['c_emissions_pg'][int(df['date'][t])] * dt * C_TO_CO2 40 | df.ix[t, 'ch4_tg'] = subset['ch4_emissions_tg'][int(df['date'][t])] * dt 41 | df.ix[t, 'n2o_tg'] = subset['n2o_emissions_tg'][int(df['date'][t])] * dt 42 | df.ix[t, 'hist_forcing_wm2'] = subset['hist_forcing_wm2'][int(df['date'][t])] 43 | df.ix[t, 'co2_forcing_rcp'] = subset['co2_forcing_wm2'][int(df['date'][t])] 44 | df.ix[t, 'ch4_forcing_rcp'] = subset['ch4_forcing_wm2'][int(df['date'][t])] 45 | df.ix[t, 'n2o_forcing_rcp'] = subset['n2o_forcing_wm2'][int(df['date'][t])] 46 | df.ix[t, 'total_forcing_rcp'] = subset['total_forcing_wm2'][int(df['date'][t])] 47 | df.ix[t, 'rcp_co2_ppm'] = subset['co2_concentration_ppm'][int(df['date'][t])] 48 | df.ix[t, 'rcp_ch4_ppb'] = subset['ch4_concentration_ppb'][int(df['date'][t])] 49 | df.ix[t, 'rcp_n2o_ppb'] = subset['n2o_concentration_ppb'][int(df['date'][t])] 50 | 51 | df['rcp_co2_ppm'].fillna(CO2_PPM_1750, inplace=True) 52 | df['rcp_ch4_ppb'].fillna(CH4_PPB_1750, inplace=True) 53 | df['rcp_n2o_ppb'].fillna(N2O_PPB_1750, inplace=True) 54 | 55 | return df -------------------------------------------------------------------------------- /heat_diffusion.py: -------------------------------------------------------------------------------- 1 | import pandas as pd 2 | import numpy as np 3 | 4 | #Model Variables 5 | LAYER_HEIGHT = 100. 6 | TOTAL_HEIGHT = 3700. 7 | 8 | #Model Constants 9 | HEAT_CAPACITY = 3985. * 1024.5 # J m^-3 K^-1 10 | KAPPA = 5.5 * 10**-5 #m^2 s^-1 11 | OCEAN_PERCENT = 0.71 12 | 13 | 14 | def diffeqs(df, dt, fradfor, clim_sens): 15 | """ 16 | Differential equation for flux down. 17 | """ 18 | steps = df.shape[0] 19 | df.ix[0, 'fluxdown'] = ( 20 | (((fradfor - clim_sens * df['tocean']) / HEAT_CAPACITY) * dt)[0] 21 | ) 22 | df['fluxdown'] = ( 23 | (KAPPA * (df['tocean'].shift(1) - df['tocean']) / LAYER_HEIGHT) * dt 24 | ) 25 | df.ix[0, 'fluxdown'] = ( 26 | (((fradfor - clim_sens * df['tocean']) / HEAT_CAPACITY) * dt)[0] 27 | ) 28 | 29 | df['dtocean'] = (df['fluxdown'].diff(periods = -1) / LAYER_HEIGHT) * dt 30 | 31 | df.ix[(steps - 1), 'dtocean'] = ( 32 | (df['fluxdown'] / LAYER_HEIGHT * dt)[steps - 1] 33 | ) 34 | return df 35 | 36 | 37 | def continuous_diffusion_model(results, run_years, dt, clim_sens): 38 | """ 39 | Implement the continuous diffusion model 40 | used in Myhrvold and Cairdira (2011). 41 | """ 42 | z = np.array([np.arange(0, (TOTAL_HEIGHT + LAYER_HEIGHT), LAYER_HEIGHT)]).T 43 | columns = ['z'] 44 | df = pd.DataFrame(z, columns=columns) 45 | df['tocean'] = 0 46 | df['dtocean'] = 0 47 | df['fluxdown'] = 0 48 | fradfor = results['total_forcing'][0] 49 | df = diffeqs(df, dt, fradfor, clim_sens) 50 | 51 | for t in range(0,int(run_years / dt)): 52 | fradfor = results['total_forcing'][t] 53 | df['tocean'] += dt * df['dtocean'] * 365 * 24 * 60 * 60 54 | df = diffeqs(df, dt, fradfor, clim_sens) 55 | results.ix[t, 't_os'] = df.ix[0, 'tocean'] 56 | 57 | results['t_eq'] = results['total_forcing'] / clim_sens 58 | results['t_s'] = ( 59 | results['t_os'] * OCEAN_PERCENT + 60 | results['t_eq'] * (1 - OCEAN_PERCENT) 61 | ) 62 | 63 | return results -------------------------------------------------------------------------------- /mitigation_efficacy_analysis.py: -------------------------------------------------------------------------------- 1 | import pandas as pd 2 | import numpy as np 3 | 4 | from constants import * 5 | from simmod_controller import run_simmod 6 | 7 | run_start_year = 1765. #Run start year 8 | run_end_year = 2100. #Inclusive of end year 9 | dt = 1 #/ 100. #years 10 | c_sens = 1.25 #Climate sensativity (T = F / LAMBDA) 11 | rcp = '8.5' #RCP scenario 12 | carbon_model = 'pulse response' #'pulse response', 'box diffusion', or 'BEAM' 13 | normalize_2000_conc = True #Normalize concentrations to historical year-2000 values 14 | c_add = -1. 15 | ch4_add = -C_TO_CO2 * 1000. / 34. #Convert to pg co2, divide by 100-year GWP 16 | n2o_add = -C_TO_CO2 * 1000. / 298. #Convert to pg co2, divide by 100-year GWP 17 | 18 | def test_co2_reduction(run_start_year, run_end_year, dt, rcp, c_sens, duration, c_add): 19 | base_run = run_simmod(run_start_year, run_end_year, dt, rcp) 20 | results = base_run[['year']].copy() 21 | for t in range(2001,2101): 22 | diffs = run_simmod( 23 | run_start_year, run_end_year, dt, rcp, 24 | c_sens, t, t + duration, c_add, 0, 0 25 | )[['year', 't_s']] 26 | diffs['t_s'] = diffs['t_s'] - base_run['t_s'] 27 | diffs.rename(columns={'t_s': 't_s'+str(t)}, inplace=True) 28 | results['t_s'+str(t)] = diffs['t_s'+str(t)] 29 | print 'co2 run year',t,'duration',duration 30 | results.to_csv('Results/co2_mit_eff_results_'+rcp+'_'+str(duration)+'.csv') 31 | 32 | 33 | def test_ch4_reduction(run_start_year, run_end_year, dt, rcp, c_sens, duration, ch4_add): 34 | base_run = run_simmod(run_start_year, run_end_year, dt, rcp) 35 | results = base_run[['year']].copy() 36 | for t in range(2001,2101): 37 | diffs = run_simmod( 38 | run_start_year, run_end_year, dt, rcp, 39 | c_sens, t, t + duration, 0, ch4_add, 0 40 | )[['year', 't_s']] 41 | diffs['t_s'] = diffs['t_s'] - base_run['t_s'] 42 | diffs.rename(columns={'t_s': 't_s'+str(t)}, inplace=True) 43 | results['t_s'+str(t)] = diffs['t_s'+str(t)] 44 | print 'ch4 run year',t,'duration',duration 45 | results.to_csv('Results/ch4_mit_eff_results_'+rcp+'_'+str(duration)+'.csv') 46 | 47 | 48 | def test_n2o_reduction(run_start_year, run_end_year, dt, rcp, c_sens, duration, n2o_add): 49 | base_run = run_simmod(run_start_year, run_end_year, dt, rcp) 50 | results = base_run[['year']].copy() 51 | for t in range(2001,2101): 52 | diffs = run_simmod( 53 | run_start_year, run_end_year, dt, rcp, 54 | c_sens, t, t + duration, 0, 0, n2o_add 55 | )[['year', 't_s']] 56 | diffs['t_s'] = diffs['t_s'] - base_run['t_s'] 57 | diffs.rename(columns={'t_s': 't_s'+str(t)}, inplace=True) 58 | results['t_s'+str(t)] = diffs['t_s'+str(t)] 59 | print 'n2o run year',t,'duration',duration 60 | results.to_csv('Results/n2o_mit_eff_results_'+rcp+'_'+str(duration)+'.csv') 61 | 62 | for duration in range(0, 51, 1): 63 | #test_co2_reduction(run_start_year, run_end_year, dt, rcp, c_sens, duration, c_add) 64 | test_ch4_reduction(run_start_year, run_end_year, dt, rcp, c_sens, duration, ch4_add) 65 | test_n2o_reduction(run_start_year, run_end_year, dt, rcp, c_sens, duration, n2o_add) 66 | -------------------------------------------------------------------------------- /radiative_forcing.py: -------------------------------------------------------------------------------- 1 | import pandas as pd 2 | import numpy as np 3 | from constants import * 4 | 5 | 6 | def calc_radiative_forcing(concentrations): 7 | """ 8 | Translate GHG concentrations into radiative forcing using IPCC 9 | simplified forcing functions for CO2, CH4, and N2O 10 | """ 11 | concentrations['co2_forcing'] = ( 12 | 5.35 * np.log(concentrations['co2_ppm'] / CO2_PPM_1750) 13 | ) 14 | 15 | concentrations['ch4_forcing'] = ( 16 | 0.036 * (np.sqrt(concentrations['ch4_ppb']) - np.sqrt(CH4_PPB_1750)) - 17 | (func(concentrations['ch4_ppb'], N2O_PPB_1750) - func(CH4_PPB_1750, N2O_PPB_1750)) 18 | ) * CH4_IND_FORCING_SCALAR 19 | 20 | concentrations['n2o_forcing'] = ( 21 | 0.12 * (np.sqrt(concentrations['n2o_ppb']) - np.sqrt(N2O_PPB_1750)) - 22 | (func(CH4_PPB_1750, concentrations['n2o_ppb']) - func(CH4_PPB_1750, N2O_PPB_1750)) 23 | ) 24 | 25 | concentrations['total_forcing_ghg'] = ( 26 | concentrations['co2_forcing'] + 27 | concentrations['ch4_forcing'] + 28 | concentrations['n2o_forcing'] 29 | ) 30 | 31 | concentrations['rcp_nonghg_forcing'] = ( 32 | concentrations['total_forcing_rcp'] - 33 | (concentrations['co2_forcing_rcp'] + 34 | concentrations['ch4_forcing_rcp'] + 35 | concentrations['n2o_forcing_rcp']) 36 | ) 37 | 38 | concentrations['historic_nonghg_forcings'] = ( 39 | concentrations['hist_forcing_wm2'] - concentrations['total_forcing_ghg'] 40 | ) 41 | 42 | concentrations.loc[concentrations['year'] < 2000, 'rcp_nonghg_forcing'] = concentrations['historic_nonghg_forcings'] 43 | 44 | concentrations['rcp_nonghg_forcing'].fillna(0., inplace=True) 45 | concentrations['total_forcing'] = ( 46 | concentrations['total_forcing_ghg'] + 47 | concentrations['rcp_nonghg_forcing'] 48 | ) 49 | 50 | concentrations['total_forcing_rcp'].fillna(-9999, inplace=True) 51 | concentrations.loc[concentrations['total_forcing_rcp'] == -9999, 'total_forcing_rcp'] = ( 52 | concentrations['total_forcing_ghg'] 53 | ) 54 | 55 | return concentrations 56 | 57 | 58 | def func(ch4, n2o): 59 | """ 60 | IPCC simplified function for calculating CH4/N2O spectral overlap 61 | """ 62 | val = ( 63 | 0.47 * np.log(1 + 2.01 * 10**-5 * (ch4 * n2o)**0.75 + 64 | 5.31 * 10**-15 * ch4 * (ch4 * n2o)**1.52) 65 | ) 66 | return val -------------------------------------------------------------------------------- /seq_rate_sat_years_analysis.py: -------------------------------------------------------------------------------- 1 | import pandas as pd 2 | import numpy as np 3 | 4 | from constants import * 5 | from simmod_controller import run_simmod 6 | 7 | INIT_YEAR = 2016 #Initial year of reductions (inclusive) 8 | END_YEAR = 2100 #End year of reductions (inclusive) 9 | 10 | run_start_year = 1765. #Run start year 11 | run_end_year = 2100. #Inclusive of end year 12 | dt = 1 #/ 100. #years 13 | rcp = '2.6' #RCP scenario 14 | carbon_model = 'pulse response' #'pulse response', 'box diffusion', or 'BEAM' 15 | normalize_2000_conc = True #Normalize concentrations to historical year-2000 values 16 | c_sens = 1.25 #Climate sensativity (T = F / LAMBDA) 17 | 18 | def test_co2_reduction(run_start_year, run_end_year, dt, rcp, c_sens): 19 | base_run = run_simmod(run_start_year, run_end_year, dt, rcp, c_sens) 20 | results = base_run[['year']].copy() 21 | for co2_reduc in range(0,205,5): 22 | co2_reduc = co2_reduc / 100. 23 | for end_year in range (2016, 2101, 1): 24 | print co2_reduc, 25 | print end_year 26 | diffs = ( 27 | run_simmod(run_start_year, run_end_year, dt, rcp, c_sens, 28 | INIT_YEAR, end_year, co2_reduc, 0, 0)[['year', 't_s']] 29 | ) 30 | diffs['t_s'] = diffs['t_s'] - base_run['t_s'] 31 | #diffs.rename(columns={'t_s': 't_s'+str(co2_reduc)}, inplace=True) 32 | results.ix[(end_year - 1765), 't_s'+str(co2_reduc)] = diffs['t_s'][END_YEAR - 1765] 33 | results.to_csv('Results/co2_sat_target_year_'+rcp+'.csv') 34 | 35 | test_co2_reduction(run_start_year, run_end_year, dt, '2.6', c_sens) 36 | test_co2_reduction(run_start_year, run_end_year, dt, '4.5', c_sens) 37 | test_co2_reduction(run_start_year, run_end_year, dt, '6.0', c_sens) 38 | test_co2_reduction(run_start_year, run_end_year, dt, '8.5', c_sens) 39 | 40 | #def worker(): 41 | # """worker function""" 42 | # print 'Worker' 43 | # return 44 | # 45 | #if __name__ == '__main__': 46 | # jobs = [] 47 | # for i in range(5): 48 | # p = multiprocessing.Process(target=test_co2_reduction) 49 | # jobs.append(p) 50 | # p.start() 51 | 52 | #results = run_simmod(run_start_year, run_end_year, dt, rcp, add_type = 'continuous', add_year = 2000, c_add = 100) 53 | #results.to_csv('results/simmod_run_'+rcp+' '+carbon_model+'.csv') 54 | #print results[['year', 'co2_pg']][1990-1765:999999] 55 | 56 | #run_start_year = 1765. #Run start year 57 | #run_end_year = 2100. #Inclusive of end year 58 | #dt = 1 #/ 100. #years 59 | #rcp = '8.5' #RCP scenario 60 | #carbon_model = 'pulse response' #'pulse response', 'box diffusion', or 'BEAM' 61 | #normalize_2000_conc = True #Normalize concentrations to historical year-2000 values 62 | #c_sens = 0.825 63 | ##1.25 for 3 C 64 | ##0.825 for 4.5 C 65 | ##2.473 for 1.5 C 66 | # 67 | #base_run = run_simmod(run_start_year, run_end_year, dt, rcp, c_sens) 68 | #results = base_run[['year']].copy() 69 | # 70 | #co2_reduc = 91 / 100. 71 | # 72 | #diffs = ( 73 | # run_simmod(run_start_year, run_end_year, dt, rcp, c_sens, 74 | # INIT_YEAR, END_YEAR, co2_reduc, 0, 0)[['year', 't_s']] 75 | # ) 76 | #diffs['t_s'] = diffs['t_s'] - base_run['t_s'] 77 | # 78 | ##print diffs[['year', 't_s']][285:] 79 | #print diffs[['year', 't_s']][285:286] 80 | #print diffs[['year', 't_s']][310:311] 81 | #print diffs[['year', 't_s']][335:] 82 | 83 | 84 | 85 | 86 | -------------------------------------------------------------------------------- /seq_rate_start_year_analysis.py: -------------------------------------------------------------------------------- 1 | import pandas as pd 2 | import numpy as np 3 | 4 | from constants import * 5 | from simmod_controller import run_simmod 6 | 7 | INIT_YEAR = 2016 #Initial year of reductions (inclusive) 8 | END_YEAR = 2100 #End year of reductions (inclusive) 9 | 10 | run_start_year = 1765. #Run start year 11 | run_end_year = 2100. #Inclusive of end year 12 | dt = 1 #/ 100. #years 13 | carbon_model = 'pulse response' #'pulse response', 'box diffusion', or 'BEAM' 14 | normalize_2000_conc = True #Normalize concentrations to historical year-2000 values 15 | c_sens = 1.25 #Climate sensativity (T = F / LAMBDA) 16 | 17 | def test_co2_reduction(run_start_year, run_end_year, dt, rcp): 18 | base_run = run_simmod(run_start_year, run_end_year, dt, rcp) 19 | results = base_run[['year']].copy() 20 | for co2_reduc in range(0,205,5): 21 | co2_reduc = co2_reduc / 100. 22 | diffs = ( 23 | run_simmod(run_start_year, run_end_year, dt, rcp, c_sens, 24 | INIT_YEAR, END_YEAR, co2_reduc, 0, 0)[['year', 't_s']] 25 | ) 26 | diffs['t_s'] = diffs['t_s'] - base_run['t_s'] 27 | diffs.rename(columns={'t_s': 't_s'+str(co2_reduc)}, inplace=True) 28 | results['t_s'+str(co2_reduc)] = diffs['t_s'+str(co2_reduc)] 29 | print co2_reduc 30 | results.to_csv('Results/co2_target_year_'+rcp+'.csv') 31 | 32 | test_co2_reduction(run_start_year, run_end_year, dt, '2.6') 33 | test_co2_reduction(run_start_year, run_end_year, dt, '4.5') 34 | test_co2_reduction(run_start_year, run_end_year, dt, '6.0') 35 | test_co2_reduction(run_start_year, run_end_year, dt, '8.5') 36 | 37 | #results = run_simmod(run_start_year, run_end_year, dt, rcp, c_sens, INIT_YEAR, END_YEAR, 2, 0, 0) 38 | #print results[['year', 't_s']][1990-1765:999999] 39 | #results.to_csv('results/simmod_run_'+rcp+' '+carbon_model+'.csv') 40 | #print results[['year', 'co2_pg']][1990-1765:999999] -------------------------------------------------------------------------------- /simmod_controller.py: -------------------------------------------------------------------------------- 1 | import pandas as pd 2 | import numpy as np 3 | 4 | from constants import * 5 | from emissions_parser import emissions 6 | from concs_pulse_decay import pulse_decay_runner 7 | from beam_carbon.beam import BEAMCarbon 8 | beam = BEAMCarbon() 9 | from radiative_forcing import calc_radiative_forcing 10 | from heat_diffusion import continuous_diffusion_model 11 | 12 | #Model Parameters 13 | run_start_year = 1765. #Run start year 14 | run_end_year = 2100. #Inclusive of end year 15 | dt = 1 #/ 100. #years 16 | rcp = '8.5' #RCP scenario 17 | carbon_model = 'pulse response' #'pulse response', 'box diffusion', or 'BEAM' 18 | normalize_2000_conc = True #Normalize concentrations to historical year-2000 values 19 | c_sens = 1.25 #Climate sensativity (T = F / LAMBDA) 20 | 21 | #BEAM Model Settings (when relevant) 22 | SUBSTEPS = 100 #Break each timestep into this many substeps 23 | INIT_MAT = 596. #In GtC; 596 = preindustrial; 809 = 2005 24 | INIT_MUP = 713. #In GtC; 713 = preindustrial; 725 = 2005 25 | INIT_MLO = 35625. #In GtC; 35625 = preindustrial; 35641 = 2005 26 | 27 | #Ocean Box Diffusion Model Settings (when relevant) 28 | MIXING = 'probable' #options 'fast', 'slow', or 'probable' 29 | DZ = 100 #meters - thickness of each layer in the deep ocean 30 | 31 | 32 | def run_simmod(run_start_year, run_end_year, dt, rcp, c_sens = c_sens, add_start = 0, 33 | add_end = 0, c_add = 0, ch4_add = 0, n2o_add = 0): 34 | """ 35 | Run the various parts of SimMod and export images and CSV files. 36 | """ 37 | run_years = (run_end_year - run_start_year + 1) 38 | emission_vals = emissions(run_start_year, run_end_year, dt, rcp, 39 | add_start, add_end, c_add, ch4_add, n2o_add) 40 | conc = pulse_decay_runner(run_years, dt, emission_vals) 41 | 42 | if carbon_model == 'BEAM': 43 | beam._initial_carbon = np.array([596., 713., 35625.]) 44 | beam.intervals = SUBSTEPS 45 | beam.time_step = dt 46 | beam.emissions = emission_vals['co2_pg'] / C_TO_CO2 47 | beam_results = pd.melt(beam.run()[0:1]) 48 | conc['co2_ppm'] = beam_results['value'] * PGC_TO_MOL * 1e6 / MOLES_IN_ATMOSPHERE 49 | 50 | if carbon_model == 'box diffusion': 51 | box_diffusion_results = box_diffusion_model( 52 | emission_vals, 53 | dt, 54 | DZ, 55 | MIXING 56 | ) 57 | conc['co2_ppm'] = box_diffusion_results['co2ppm'] 58 | 59 | if normalize_2000_conc == True: 60 | conc['co2_ppm'] = ( 61 | conc['co2_ppm'] - 62 | conc.loc[conc['year'] == 2000, 'co2_ppm'].min() + 63 | emission_vals.loc[emission_vals['year'] == 2000, 'rcp_co2_ppm'].min() 64 | ) 65 | conc['ch4_ppb'] = ( 66 | conc['ch4_ppb'] - 67 | conc.loc[conc['year'] == 2000, 'ch4_ppb'].min() + 68 | emission_vals.loc[emission_vals['year'] == 2000, 'rcp_ch4_ppb'].min() 69 | ) 70 | conc['n2o_ppb'] = ( 71 | conc['n2o_ppb'] - 72 | conc.loc[conc['year'] == 2000, 'n2o_ppb'].min() + 73 | emission_vals.loc[emission_vals['year'] == 2000, 'rcp_n2o_ppb'].min() 74 | ) 75 | 76 | forcing = calc_radiative_forcing(conc) 77 | warming = continuous_diffusion_model(forcing, run_years, dt, c_sens) 78 | return warming 79 | 80 | results = run_simmod(run_start_year, run_end_year, dt, rcp, c_sens) 81 | results.to_csv('results/simmod_run_'+rcp+' '+carbon_model+'.csv') --------------------------------------------------------------------------------