{
"cells": [
{
"cell_type": "markdown",
"id": "basic-appearance",
"metadata": {},
"source": [
"# Generate metrics in Table 7.SM.7\n",
"\n",
"The script that pre-dated this notebook, and the calculations that now exist in `src/ar6/metrics`, were originally provided by Bill Collins (University of Reading, UK). \n",
"\n",
"I have modified them slightly and added documentation.\n",
"\n",
"Theme Song: Low Tide
\n",
"Artist: Isis, Aereogramme
\n",
"Album: In The Fishtank 14
\n",
"Released: 2006"
]
},
{
"cell_type": "code",
"execution_count": 1,
"id": "c3a85738",
"metadata": {},
"outputs": [],
"source": [
"from fair.forcing.ghg import meinshausen\n",
"\n",
"from tqdm.notebook import tqdm\n",
"import pandas as pd\n",
"import numpy as np\n",
"\n",
"from ar6.metrics.halogen_generic import halogen_analytical\n",
"from ar6.metrics.co2 import co2_analytical\n",
"from ar6.metrics.ch4 import ch4_analytical\n",
"from ar6.metrics.n2o import n2o_analytical\n",
"from ar6.metrics.gasser import carbon_cycle_adjustment"
]
},
{
"cell_type": "markdown",
"id": "aa9a4d1d",
"metadata": {},
"source": [
"## Grab raw data, and define output tables"
]
},
{
"cell_type": "code",
"execution_count": 2,
"id": "d86f0c0b",
"metadata": {},
"outputs": [],
"source": [
"# Input data file\n",
"# note, this is a file that has been cleaned up and standardised by Bill Collins\n",
"# original file is from Hodnebrog et al. 2020, Reviews of Geophysics\n",
"# https://agupubs.onlinelibrary.wiley.com/doi/full/10.1029/2019RG000691\n",
"# supplementary table S1\n",
"halo_file = \"../data_input/Hodnebrog_et_al_2020_revgeo/hodnebrog20.csv\""
]
},
{
"cell_type": "code",
"execution_count": 3,
"id": "180eb0c9",
"metadata": {},
"outputs": [],
"source": [
"# extract raw data\n",
"halo = np.genfromtxt(\n",
" halo_file,\n",
" delimiter=',',\n",
" comments='£', # seemed to work better than None\n",
" names=True,\n",
" dtype=\"U30, U20, U20, U30, f8, f8, f8\",\n",
" usecols = (0, 1, 2, 3, 4, 5, 6)\n",
")"
]
},
{
"cell_type": "code",
"execution_count": 4,
"id": "e2865e18",
"metadata": {},
"outputs": [],
"source": [
"# Allocate output table\n",
"num_halo = np.size(halo)\n",
"names = ['Name', 'CASRN', 'Acronym', 'Formula', 'Lifetime',\n",
" 'Radiative_efficiency', 'AGWP20', 'GWP20', 'AGWP100', 'GWP100', 'AGWP500', 'GWP500',\n",
" 'AGTP50', 'GTP50', 'AGTP100', 'GTP100', 'CGTP50', 'CGTP100']\n",
"formats = np.concatenate((np.repeat('U30',4), np.repeat('f8', 14)))\n",
"table = np.zeros(\n",
" num_halo+3,\n",
" dtype={\n",
" 'names': names,\n",
" 'formats': formats\n",
" }\n",
")"
]
},
{
"cell_type": "markdown",
"id": "fe0f6532",
"metadata": {},
"source": [
"## Define baseline GHG concentrations"
]
},
{
"cell_type": "code",
"execution_count": 5,
"id": "0e24bf03",
"metadata": {},
"outputs": [],
"source": [
"co2 = 409.9\n",
"ch4 = 1866.3\n",
"n2o = 332.1"
]
},
{
"cell_type": "markdown",
"id": "29299b6d",
"metadata": {},
"source": [
"## For non-CO2 gases, the metrics require a carbon cycle adjustment\n",
"\n",
"This has to be calculated using a numerical convolution, and we define a timestep of 0.1 years as well as our longest time horizon of interest"
]
},
{
"cell_type": "code",
"execution_count": 6,
"id": "fadf0db0",
"metadata": {},
"outputs": [],
"source": [
"ts_per_year = 10\n",
"H_max = 500 # years"
]
},
{
"cell_type": "markdown",
"id": "31eb4fa3",
"metadata": {},
"source": [
"## First let's get the metrics for CO2"
]
},
{
"cell_type": "code",
"execution_count": 7,
"id": "94b45755",
"metadata": {},
"outputs": [],
"source": [
"rf_co2, agwp_co2, agtp_co2, iagtp_co2 = co2_analytical(\n",
" np.linspace(0, H_max, H_max * ts_per_year + 1),\n",
" d=np.array([3.424102092311, 285.003477841911]),\n",
" #q=np.array([0.443767728883447, 0.319591049742508]), # this is what is in Zeb's file sent 25 Feb\n",
" q = np.array([0.443767728883447, 0.313998206372015]), # this is what Bill used\n",
" co2=co2, n2o=n2o,\n",
" a=np.array([0.2173, 0.2240, 0.2824, 0.2763]),\n",
" alpha_co2=np.array([0, 394.4, 36.54, 4.304]),\n",
" co2_ra = 0.05\n",
")"
]
},
{
"cell_type": "code",
"execution_count": 8,
"id": "070db06a",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"('Carbon dioxide', '', '', 'CO2', nan, 1.33449857e-05, 2.43362466e-14, 1., 8.94651231e-14, 1., 3.13800615e-13, 1., 4.27703608e-16, 1., 3.94597382e-16, 1., 0., 0.)"
]
},
"execution_count": 8,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# Save to first row of output\n",
"table[0]['Name'] = 'Carbon dioxide'\n",
"table[0]['Formula'] = 'CO2'\n",
"table[0]['Lifetime'] = np.nan\n",
"table[0]['Radiative_efficiency'] = meinshausen(np.array([co2+0.001, 1866.3, n2o]), np.array([co2, 1866.3, n2o]), scale_F2x=False)[0] * 1.05\n",
"table[0]['AGWP20'] = agwp_co2[20 * ts_per_year]\n",
"table[0]['GWP20'] = 1.\n",
"table[0]['AGWP100'] = agwp_co2[100 * ts_per_year]\n",
"table[0]['GWP100'] = 1.\n",
"table[0]['AGWP500'] = agwp_co2[500 * ts_per_year]\n",
"table[0]['GWP500'] = 1.\n",
"table[0]['AGTP50'] = agtp_co2[50 * ts_per_year]\n",
"table[0]['GTP50'] = 1.\n",
"table[0]['AGTP100'] = agtp_co2[100 * ts_per_year]\n",
"table[0]['GTP100'] = 1.\n",
"table[0]"
]
},
{
"cell_type": "markdown",
"id": "fa58d412",
"metadata": {},
"source": [
"## Then CH4"
]
},
{
"cell_type": "code",
"execution_count": 9,
"id": "c74b1f15",
"metadata": {},
"outputs": [],
"source": [
"rf_ch4, agwp_ch4, agtp_ch4, iagtp_ch4 = ch4_analytical(\n",
" np.linspace(0, H_max, H_max * ts_per_year + 1),\n",
" d=np.array([3.424102092311, 285.003477841911]),\n",
" #q=np.array([0.443767728883447, 0.319591049742508]), # this is what is in Zeb's file sent 25 Feb\n",
" q = np.array([0.443767728883447, 0.313998206372015]), # this is what Bill used\n",
" co2=co2, ch4=ch4, n2o=n2o,\n",
" ch4_ra = -0.14,\n",
" alpha_ch4 = 11.8,\n",
" ch4_o3=1.4e-4,\n",
" ch4_h2o=0.00004\n",
")"
]
},
{
"cell_type": "markdown",
"id": "270bae51",
"metadata": {},
"source": [
"### For non-CO2 metrics, calculate the carbon cycle adjustment\n",
"\n",
"This is quite slow, because every timestep has to be calculated"
]
},
{
"cell_type": "code",
"execution_count": 10,
"id": "2172b197",
"metadata": {},
"outputs": [],
"source": [
"rf_cc, agwp_cc, agtp_cc = carbon_cycle_adjustment(\n",
" np.linspace(0, H_max, H_max * ts_per_year + 1),\n",
" agtp_ch4,\n",
" co2=co2,\n",
" n2o=n2o,\n",
" co2_ra = 0.05,\n",
" d = np.array([3.424102092311, 285.003477841911]),\n",
" #q=np.array([0.443767728883447, 0.319591049742508]), # this is what is in Zeb's file sent 25 Feb\n",
" q = np.array([0.443767728883447, 0.313998206372015]), # this is what Bill used\n",
")"
]
},
{
"cell_type": "code",
"execution_count": 11,
"id": "8460ba99",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"('Methane', '', '', 'CH4', 11.8, 0.00038864, 1.97607794e-12, 81.19896117, 2.49242801e-12, 27.85921399, 2.49553803e-12, 7.95262314, 4.72554957e-15, 11.04865493, 2.12177589e-15, 5.3770653, 2732.01949364, 3323.33972966)"
]
},
"execution_count": 11,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# Save to second row of output\n",
"table[1]['Name'] = 'Methane'\n",
"table[1]['Formula'] = 'CH4'\n",
"table[1]['Lifetime'] = 11.8\n",
"table[1]['Radiative_efficiency'] = meinshausen(np.array([co2, ch4+1, n2o]), np.array([co2, ch4, n2o]), scale_F2x=False)[1] * 0.86\n",
"table[1]['AGWP20'] = agwp_ch4[20 * ts_per_year] + agwp_cc[20 * ts_per_year]\n",
"table[1]['GWP20'] = (agwp_ch4[20 * ts_per_year]+agwp_cc[20 * ts_per_year])/agwp_co2[20 * ts_per_year]\n",
"table[1]['AGWP100'] = agwp_ch4[100 * ts_per_year] + agwp_cc[100 * ts_per_year]\n",
"table[1]['GWP100'] = (agwp_ch4[100 * ts_per_year]+agwp_cc[100 * ts_per_year])/agwp_co2[100 * ts_per_year]\n",
"table[1]['AGWP500'] = agwp_ch4[500 * ts_per_year] + agwp_cc[500 * ts_per_year]\n",
"table[1]['GWP500'] = (agwp_ch4[500 * ts_per_year]+agwp_cc[500 * ts_per_year])/agwp_co2[500 * ts_per_year]\n",
"table[1]['AGTP50'] = agtp_ch4[50 * ts_per_year] + agtp_cc[50 * ts_per_year]\n",
"table[1]['GTP50'] = (agtp_ch4[50 * ts_per_year]+agtp_cc[50 * ts_per_year])/agtp_co2[50 * ts_per_year]\n",
"table[1]['AGTP100'] = agtp_ch4[100 * ts_per_year] + agtp_cc[100 * ts_per_year]\n",
"table[1]['GTP100'] = (agtp_ch4[100 * ts_per_year]+agtp_cc[100 * ts_per_year])/agtp_co2[100 * ts_per_year]\n",
"### and also CGTP for methane\n",
"rf_cc, agwp_cc, agtp_cc = carbon_cycle_adjustment(\n",
" np.linspace(0, H_max, H_max * ts_per_year + 1),\n",
" iagtp_ch4,\n",
" co2=co2,\n",
" n2o=n2o,\n",
" co2_ra = 0.05,\n",
" d = np.array([3.424102092311, 285.003477841911]),\n",
" #q=np.array([0.443767728883447, 0.319591049742508]), # this is what is in Zeb's file sent 25 Feb\n",
" q = np.array([0.443767728883447, 0.313998206372015]), # this is what Bill used\n",
")\n",
"table[1]['CGTP50'] = (iagtp_ch4[50 * ts_per_year]+agtp_cc[50 * ts_per_year])/agtp_co2[50 * ts_per_year]\n",
"table[1]['CGTP100'] = (iagtp_ch4[100 * ts_per_year]+agtp_cc[100 * ts_per_year])/agtp_co2[100 * ts_per_year]\n",
"table[1]"
]
},
{
"cell_type": "markdown",
"id": "5817d79a",
"metadata": {},
"source": [
"## Then, N2O"
]
},
{
"cell_type": "code",
"execution_count": 12,
"id": "5fee10e6",
"metadata": {},
"outputs": [],
"source": [
"rf_n2o, agwp_n2o, agtp_n2o, iagtp_n2o = n2o_analytical(\n",
" np.linspace(0, H_max, H_max * ts_per_year + 1),\n",
" d=np.array([3.424102092311, 285.003477841911]),\n",
" #q=np.array([0.443767728883447, 0.319591049742508]), # this is what is in Zeb's file sent 25 Feb\n",
" q = np.array([0.443767728883447, 0.313998206372015]), # this is what Bill used\n",
" co2=co2, ch4=ch4, n2o=n2o\n",
")\n",
"rf_cc, agwp_cc, agtp_cc = carbon_cycle_adjustment(\n",
" np.linspace(0, H_max, H_max * ts_per_year + 1),\n",
" agtp_n2o,\n",
" co2=co2,\n",
" n2o=n2o,\n",
" co2_ra = 0.05,\n",
" d = np.array([3.424102092311, 285.003477841911]),\n",
" #q=np.array([0.443767728883447, 0.319591049742508]), # this is what is in Zeb's file sent 25 Feb\n",
" q = np.array([0.443767728883447, 0.313998206372015]), # this is what Bill used\n",
")"
]
},
{
"cell_type": "code",
"execution_count": 13,
"id": "82c07d4f",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"(array([3.56285141e-13, 3.55958424e-13, 3.55632006e-13, ...,\n",
" 3.63427728e-15, 3.63094461e-15, 3.62761499e-15]),\n",
" array([0.00000000e+00, 3.56121758e-14, 7.11916948e-14, ...,\n",
" 3.84389442e-11, 3.84393074e-11, 3.84396703e-11]),\n",
" array([0.00000000e+00, 4.58785456e-15, 9.04056787e-15, ...,\n",
" 1.29540136e-14, 1.29489266e-14, 1.29438418e-14]),\n",
" array([0.00000000e+00, 2.30535424e-16, 9.13066332e-16, ...,\n",
" 2.59046361e-11, 2.59059313e-11, 2.59072259e-11]))"
]
},
"execution_count": 13,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"rf_n2o, agwp_n2o, agtp_n2o, iagtp_n2o"
]
},
{
"cell_type": "code",
"execution_count": 14,
"id": "17b5e555",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"('Nitrous oxide', '', '', 'N2O', 109., 0.00319551, 6.65001314e-12, 273.25549608, 2.44553474e-11, 273.35062615, 4.07045635e-11, 129.71473478, 1.24163669e-13, 290.30306731, 9.19268626e-14, 232.96369098, 0., 0.)"
]
},
"execution_count": 14,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# Save to third row of output\n",
"table[2]['Name'] = 'Nitrous oxide'\n",
"table[2]['Formula'] = 'N2O'\n",
"table[2]['Lifetime'] = 109\n",
"table[2]['Radiative_efficiency'] = meinshausen(np.array([co2, ch4, n2o+1]), np.array([co2, ch4, n2o]), scale_F2x=False)[2] * 1.07\n",
"table[2]['AGWP20'] = agwp_n2o[20 * ts_per_year] + agwp_cc[20 * ts_per_year]\n",
"table[2]['GWP20'] = (agwp_n2o[20 * ts_per_year]+agwp_cc[20 * ts_per_year])/agwp_co2[20 * ts_per_year]\n",
"table[2]['AGWP100'] = agwp_n2o[100 * ts_per_year] + agwp_cc[100 * ts_per_year]\n",
"table[2]['GWP100'] = (agwp_n2o[100 * ts_per_year]+agwp_cc[100 * ts_per_year])/agwp_co2[100 * ts_per_year]\n",
"table[2]['AGWP500'] = agwp_n2o[500 * ts_per_year] + agwp_cc[500 * ts_per_year]\n",
"table[2]['GWP500'] = (agwp_n2o[500 * ts_per_year]+agwp_cc[500 * ts_per_year])/agwp_co2[500 * ts_per_year]\n",
"table[2]['AGTP50'] = agtp_n2o[50 * ts_per_year] + agtp_cc[50 * ts_per_year]\n",
"table[2]['GTP50'] = (agtp_n2o[50 * ts_per_year]+agtp_cc[50 * ts_per_year])/agtp_co2[50 * ts_per_year]\n",
"table[2]['AGTP100'] = agtp_n2o[100 * ts_per_year] + agtp_cc[100 * ts_per_year]\n",
"table[2]['GTP100'] = (agtp_n2o[100 * ts_per_year]+agtp_cc[100 * ts_per_year])/agtp_co2[100 * ts_per_year]\n",
"table[2]"
]
},
{
"cell_type": "markdown",
"id": "ea891c82",
"metadata": {},
"source": [
"## Now the halogens - this will take a while"
]
},
{
"cell_type": "markdown",
"id": "07742760",
"metadata": {},
"source": [
"### CFC11 and CFC12 need a 12% rapid adjustment\n",
"\n",
"See section 7.3. Although CFC11 is assessed to be 13% for ERF, we use 12% here."
]
},
{
"cell_type": "code",
"execution_count": 15,
"id": "cc773b11",
"metadata": {
"scrolled": false
},
"outputs": [
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "2388b24953854e1f9af38f413da86788",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
" 0%| | 0/642 [00:00, ?it/s]"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"Chlorofluorocarbons\n",
"Trichlorofluoromethane\n",
"Dichlorodifluoromethane\n",
"Chlorotrifluoromethane\n",
"1:2-Difluoro-1:1:2:2-tetrachlo\n",
"2:2-Difluoro-1:2:2:2-tetrachlo\n",
"1:1:2-Trichloro-1:2:2-trifluor\n",
"1:1:1-Trichloro-2:2:2-trifluor\n",
"1:2-Dichloro-1:1:2:2-tetrafluo\n",
"1:1-Dichloro-1:2:2:2-tetrafluo\n",
"1-Chloro-1:1:2:2:2-pentafluoro\n",
"(E)-1:2-Dichlorohexafluorocycl\n",
"(Z)-1:2-Dichlorohexafluorocycl\n",
"1:2-dichloro-1:2-difluoroethen\n",
"1:1-dichloro-2:2-difluoroethen\n",
"1:1:2-trichloro-2-fluoroethene\n",
"Chlorotrifluoroethylene\n",
"\n",
"Hydrochlorofluorocarbons\n",
"Dichlorofluoromethane\n",
"Chlorodifluoromethane\n",
"Chlorofluoromethane\n",
"1:1:2:2-Tetrachloro-1-fluoroet\n",
"1:1:2-Trichloro-2:2-difluoroet\n",
"1:1:2-Trichloro-1:2-difluoroet\n",
"2:2-Dichloro-1:1:1-trifluoroet\n",
"1:2-Dichloro-1:1:2-trifluoroet\n",
"2-Chloro-1:1:1:2-tetrafluoroet\n",
"1-Chloro-1:1:2:2-tetrafluoroet\n",
"1:2-Dichloro-1:2-difluoroethan\n",
"1:1-Dichloro-2:2-difluoroethan\n",
"1:1-Dichloro-1:2-difluoroethan\n",
"2-Chloro-1:1:1-trifluoroethane\n",
"1:2-Dichloro-1-difluoroethane\n",
"1:1-Dichloro-1-fluoroethane\n",
"1-Chloro-1:1-difluoroethane\n",
"3:3-Dichloro-1:1:1:2:2-pentafl\n",
"1:3-Dichloro-1:1:2:2:3-pentafl\n",
"(E)-1-Chloro-3:3:3-trifluoropr\n",
"(Z)-1-Chloro-3:3:3-trifluoropr\n",
"(E/Z)-1-chloro-2-fluoro-ethene\n",
"\n",
"Hydrofluorocarbons\n",
"Trifluoromethane\n",
"Difluoromethane\n",
"Fluoromethane\n",
"1:1:1:2:2-Pentafluoroethane\n",
"1:1:2:2-Tetrafluoroethane\n",
"1:1:1:2-Tetrafluoroethane\n",
"1:1:2-Trifluoroethane\n",
"1:1:1-Trifluoroethane\n",
"1:2-Difluoroethane\n",
"1:1-Difluoroethane\n",
"Fluoroethane\n",
"1:1:1:2:2:3:3-Heptafluoropropa\n",
"1:1:1:2:3:3:3-Heptafluoropropa\n",
"1:1:1:2:2:3-Hexafluoropropane\n",
"1:1:1:2:3:3-Hexafluoropropane\n",
"1:1:1:3:3:3-Hexafluoropropane\n",
"1:1:2:2:3-Pentafluoropropane\n",
"1:1:1:2:2-Pentafluoropropane\n",
"1:1:2:3:3-Pentafluoropropane\n",
"1:1:1:2:3-Pentafluoropropane\n",
"1:1:1:3:3-Pentafluoropropane\n",
"1:1:1-Trifluoropropane\n",
"2:2-Difluoropropane\n",
"1:1:1:2:2:3:3:4:4-Nonafluorobu\n",
"1:1:1:3:3-Pentafluorobutane\n",
"1:1:1:2:2:3:4:5:5:5-Decafluoro\n",
"trifluoroethylene\n",
"1:1-Difluoroethene\n",
"Fluoroethene\n",
"(Z)-1:2:3:3:3-Pentafluoroprop-\n",
"(E)-1:2:3:3:3-Pentafluoroprop-\n",
"(Z)-1:3:3:3-Tetrafluoroprop-1-\n",
"(E)-1:3:3:3-Tetrafluoroprop-1-\n",
"2:3:3:3-Tetrafluoroprop-1-ene\n",
"(E)-1:1:1:4:4:4-Hexafluorobut-\n",
"(Z)-1:1:1:4:4:4-Hexafluorobut-\n",
"3:3:3-Trifluoroprop-1-ene\n",
"3:3:4:4:4-Pentafluorobut-1-ene\n",
"3:3:4:4:5:5:6:6:6-Nonafluorohe\n",
"3:3:4:4:5:5:6:6:7:7:8:8:8-Trid\n",
"3:3:4:4:5:5:6:6:7:7:8:8:9:9:10\n",
"1-Propene: 3:3:3-trifluoro-2-(\n",
"1:1:2:2:3:3-hexafluorocyclopen\n",
"1:1:2:2:3:3:4-heptafluorocyclo\n",
"1:3:3:4:4:5:5-heptafluorocyclo\n",
"(4R:5R)-1:1:2:2:3:3:4:5-octafl\n",
"1-Butene: 1:3:4:4:4-pentafluor\n",
"1-Pentene: 3:3:4:4:5:5:5-hepta\n",
"1:3:3:4:4-pentafluorocyclobute\n",
"3:3:4:4-tetrafluorocyclobutene\n",
"3-Fluoro-1-propene\n",
"1-Fluorohexane\n",
"Fluorobenzene\n",
"\n",
"Chlorocarbons and Hydrochloroc\n",
"1:1:1-Trichloroethane\n",
"Tetrachloromethane\n",
"Chloromethane\n",
"Dichloromethane\n",
"Trichloromethane\n",
"Chloroethane\n",
"1:1-Dichloroethane\n",
"1:2-Dichloroethane\n",
"1:1:2-Trichloroethane\n",
"1:1:1:2-Tetrachloroethane\n",
"1:1:2:2-Tetrachloroethane\n",
"1:1:2-Trichloroethene\n",
"1:1:2:2-Tetrachloroethene\n",
"2-Chloropropane\n",
"Chloromethyl benzene\n",
"3-Chloro-1-propene\n",
"1-Chloro-4-methylbenzene\n",
"3:4-Dichloro-1-butene\n",
"1-Chloro-3-methylbenzene\n",
"2:3-Dichloropropene\n",
"1-Chloro-2-methylbenzene\n",
"1:2-Dichloropropene\n",
"1-Chloropentane\n",
"1-Chlorobutane\n",
"1-Chloro-2-methylpropane\n",
"Chloroethene\n",
"1:2-Dichloroethene (E)\n",
"Hexachloro-1:3-butadiene\n",
"1:3-Dichloropropene (E)\n",
"1:3-Dichloropropene (Z)\n",
"1:3-Dichloropropane\n",
"Chlorobenzene\n",
"1:4-Dichlorobenzene\n",
"1:3-Dichlorobenzene\n",
"1:2-Dichlorobenzene\n",
"1:2-Dichloroethylene (Z)\n",
"Hexachloro-1:3-cyclopentadiene\n",
"3-Chloro-1-propyne\n",
"\n",
"Bromocarbons: Hydrobromocarbon\n",
"Bromomethane\n",
"Dibromomethane\n",
"Bromodifluoromethane\n",
"Dibromodifluoromethane\n",
"Bromochlorodifluoromethane\n",
"Bromotrifluoromethane\n",
"2-Bromo-1:1:1-trifluoroethane\n",
"2-Bromo-2-chloro-1:1:1-trifluo\n",
"2-Bromo-1:1:1:2-tetrafluoroeth\n",
"1:2-Dibromo-1:1:2:2-tetrafluor\n",
"Tribromomethane\n",
"Bromochloromethane\n",
"Bromoethane\n",
"1:2-Dibromoethane\n",
"1-Bromopropane\n",
"2-Bromopropane\n",
"Bromomethyl benzene\n",
"3-Bromo-1-propene\n",
"Bromine Nitrate\n",
"Bromoethene\n",
"\n",
"Fully Fluorinated Species\n",
"Nitrogen trifluoride\n",
"Pentadecafluorotriethylamine\n",
"Perfluorotripropylamine\n",
"Heptacosafluorotributylamine\n",
"Perfluorotripentylamine\n",
"Heptafluoroisobutyronitrile\n",
"Sulfur hexafluoride\n",
"(Trifluoromethyl)sulfur pentaf\n",
"Sulfuryl fluoride\n",
"Tetrafluoromethane\n",
"Hexafluoroethane\n",
"Octafluoropropane\n",
"Hexafluorocyclobutene\n",
"Pentafluoro-2-(trifluoromethyl\n",
"Octafluorocyclobutane\n",
"Decafluorobutane\n",
"Octafluorocyclopentene\n",
"Dodecafluoropentane\n",
"Hexafluorobenzene\n",
"Tetradecafluorohexane\n",
"Hexadecafluoroheptane\n",
"Octadecafluorooctane\n",
"Perfluorodecalin (mixed)\n",
"Perfluorodecalin (cis)\n",
"Perfluorodecalin (trans)\n",
"Perfluoroethene\n",
"Perfluoropropene\n",
"Hexafluorobuta-1:3-diene\n",
"Octafluoro-1-butene\n",
"Octafluoro-2-buene\n",
"\n",
"Halogenated Alcohols and Ether\n",
"(Difluoromethoxy)trifluorometh\n",
"(Difluoromethoxy)difluorometha\n",
"Trifluoro(methoxy)methane\n",
"1:1:1:2-Tetrafluoro-2-(trifluo\n",
"2-Chloro-1-(difluoromethoxy)-1\n",
"2-Chloro-2-(difluoromethoxy)-1\n",
"2-(Difluoromethoxy)-1:1:1:2-te\n",
"1:1:1-Trifluoro-2-(trifluorome\n",
"1:1:1:2:2-Pentafluoro-2-methox\n",
"1:1-Difluoro-2-(trifluorometho\n",
"2-(Difluoromethoxy)-1:1:1-trif\n",
"2:2:3:3:3-Pentafluoropropan-1-\n",
"1:1:2:2-Tetrafluoro-1-methoxye\n",
"1:1:1-Trifluoro-2-methoxyethan\n",
"1:1:2:2-Tetrafluoro-1-(trifluo\n",
"3:3:3-Trifluoropropan-1-ol\n",
"1:1:1:2:2-Pentafluoro-2-(1:1:2\n",
"2-(Difluoromethoxy)-1:1:1:3:3:\n",
"1:1:1:2:2-Pentafluoro-2-(2:2:2\n",
"1:1:1:3:3:3-Hexafluoro-2-(fluo\n",
"1:1:1:2:2:3:3-Heptafluoro-3-me\n",
"1-(2:2-Difluoroethoxy)-1:1:2:2\n",
"1:1:2:2-Tetrafluoro-1-(2:2:2-t\n",
"1:1:1:2:3:3:3-Heptafluoro-2-me\n",
"1:1:1:2:3:3-Hexafluoro-3-metho\n",
"Bis(2:2:2-trifluoroethyl)ether\n",
"1-(2:2-Difluoroethoxy)-1:1:2:2\n",
"3-(Difluoromethoxy)-1:1:2:2-te\n",
"1:1:2:2:3:3-Hexafluoro-1-metho\n",
"1:1:1:3:3:3-Hexafluoro-2-metho\n",
"1:1:1:2:2-Pentafluoro-3-methox\n",
"1-Ethoxy-1:1:2:2-tetrafluoroet\n",
"4:4:4-Trifluorobutan-1-ol\n",
"1:1:1:3:3:3-Hexafluoro-2-(trif\n",
"2:2:3:3:4:4:5:5-Octafluorocycl\n",
"1-(Difluoromethoxy)-2-((difluo\n",
"1:1:1:2:2:3:3:4:4-Nonafluoro-4\n",
"na\n",
"na\n",
"1-Ethoxy-1:1:2:2:3:3:4:4:4-non\n",
"na\n",
"3-Methoxyperfluoro(2-methylpen\n",
"3-Ethoxyperfluoro(2-methylhexa\n",
"Bis(difluoromethoxy)difluorome\n",
"1:2-Bis(difluoromethoxy)-1:1:2\n",
"1:1:1:3:3:3-Hexafluoropropan-2\n",
"1-(Difluoromethoxy)-2-(2-(difl\n",
"1:1:3:3:4:4:6:6:7:7:9:9:10:10:\n",
"(2:2:2-Trifluoroethoxy)ethene\n",
"2-Ethoxy-3:3:4:4:5-pentafluoro\n",
"Difluoro(methoxy)methane\n",
"1:1:2:2-Tetrafluoro-1:2-dimeth\n",
"1:1:2:2-Tetrafluoro-1-methoxy-\n",
"3:3:4:4:6:6:7:7:9:9:10:10-Dode\n",
"1:1:1:2:3:3-Hexafluoro-3-(trif\n",
"1-(Difluoromethoxy)-1:1:2:3:3:\n",
"3:3:4:4:5:5:6:6:7:7:7-Undecafl\n",
"3:3:4:4:5:5:6:6:7:7:8:8:9:9:9-\n",
"3:3:4:4:5:5:6:6:7:7:8:8:9:9:10\n",
"2-Chloro-1:1:2-trifluoro-1-met\n",
"1-(Difluoro(trifluoromethoxy)m\n",
"1:1:2-Trifluoro-2-(trifluorome\n",
"Perfluoroethyl formate\n",
"2:2:2-Trifluoroethyl formate\n",
"1:1:1:3:3:3-Hexafluoropropan-2\n",
"Vinyl 2:2:2-trifluoroacetate\n",
"Ethyl 2:2:2-trifluoroacetate\n",
"Allyl 2:2:2-trifluoroacetate\n",
"Methyl 2:2:2-trifluoroacetate\n",
"2:2:3:3:4:4:4-Heptafluorobutan\n",
"1:1:2-Trifluoro-2-(trifluorome\n",
"1-Ethoxy-1:1:2:3:3:3-hexafluor\n",
"1:1:1:2:2:3:3-Heptafluoro-3-(1\n",
"2:2:3:3-Tetrafluoropropan-1-ol\n",
"2:2:3:4:4:4-Hexafluorobutan-1-\n",
"1:1:2:2-Tetrafluoro-3-methoxyp\n",
"1:1:1:2:2:4:5:5:5-Nonafluoro-4\n",
"3:3:3-Trifluoropropanal\n",
"4:4:4-Trifluorobutanal\n",
"2-Fluoroethanol\n",
"2:2-Difluoroethanol\n",
"2:2:2-Trifluoroethanol\n",
"1:1:3:3:4:4:6:6:7:7:9:9:10:10:\n",
"Methyl-perfluoroheptene-ethers\n",
"1:1:1-Trifluoropropan-2-one\n",
"1:1:1-Trifluorobutan-2-one\n",
"2:2:2-Trifluoroethanal\n",
"2:2:3:3:3-Pentafluoropropanal\n",
"2:2:3:3:4:4:4-Heptafluorobutan\n",
"2:2:3:3:4:4:5:5:5-Nonafluorope\n",
"2-Propenoyl chloride\n",
"Acetyl chloride\n",
"1-chloro-2-ethoxyethane\n",
"2-Chloroethanol\n",
"2-(chloromethyl)oxirane\n",
"1-Chloropropan-2-one\n",
"1-chloro-2-(2-chloroethoxy)eth\n",
"2-chloroethyl vinyl ether\n",
"(Chlorometoxy)ethane\n",
"Chloro(methoxy)methane\n",
"Ethyl carbonochloridate\n",
"1-Fluoropropan-2-one\n",
"1:1:1:3:3:3-hexafluoropropan-2\n",
"Trifluoroacetic acid\n",
"Trifluoroacetic anhydride\n",
"Methacryloyl chloride\n",
"\n",
"Hydrocarbons\n",
"Ethane\n",
"Benzene\n",
"Methylbenzene\n",
"1:2-Dimethylbenzene\n",
"1:3-Dimethylbenzene\n",
"1:4-Dimethylbenzene\n",
"Propane\n",
"Butane\n",
"2-Methylpropane\n",
"1-Butene\n",
"1-Nonene\n",
"(1S:5S)-2:6:6-trimethylbicyclo\n",
"(1S:5S)-6:6-dimethyl-2-methyle\n",
"(4R)-1-methyl-4-prop-1-en-2-yl\n",
"1-Methyl-4-(1-methylethenyl)-c\n",
"3:7:7-Trimethyl-bicyclo[4.1.0]\n",
"3:7:7-Trimethyl-bicyclo[4.1.0]\n",
"7-Methyl-3-methylene-1:6-octad\n",
"1-Ethyl-2-methylbenzene2\n",
"1-Ethyl-4-methylbenzene\n",
"1:3-Butadiene\n",
"Pentane\n",
"2-Methylbutane\n",
"2-Methyl-1:3-butadiene\n",
"Heptane\n",
"Naphtalene\n",
"Octane\n",
"Ethylbenzene\n",
"Decane\n",
"Hexadecane\n",
"Pentadecane\n",
"1-ethenyl-3-methylbenzene\n",
"1:2-Propadiene\n",
"Ethyne\n",
"4-Vinylcyclohexene\n",
"4-Methyl-1-pentene\n",
"3-Methylpentane\n",
"3-Methylhexane\n",
"3-Methyl-1-butene\n",
"1-Ethyl-3-methylbenzene\n",
"2:4:4-Trimethyl-1-pentene\n",
"2:3-Dimethylbutane\n",
"2:2:4-Trimethyl-2-pentene\n",
"2:2-Dimethylbutane\n",
"2-Methyl-1-pentene\n",
"2-Methyl-1-butene\n",
"2-Butene\n",
"1:2:3:5-Tetramethylbenzene\n",
"1:2:3:4-Tetramethylbenzene\n",
"1:2:3:4-Tetrahydronaphthalene\n",
"1-Pentene\n",
"1-Octene\n",
"1-Hexene\n",
"1-Butyne\n",
"Hexane\n",
"1-Heptene\n",
"Nonane\n",
"Tridecane\n",
"Undecane\n",
"2-Pentene (Z)\n",
"4-Methyl-2-pentene (Z)\n",
"(1-Methylethyl)benzene\n",
"Cyclodecane\n",
"Cycloheptane\n",
"Cycloheptene\n",
"Cyclohexene\n",
"Cyclooctane\n",
"Cyclopentane\n",
"Cyclopentene\n",
"Cyclopropane\n",
"Ethyl benzene\n",
"Ethene\n",
"Propylbenzene\n",
"2:2:4-trimethylpentane\n",
"Propyne\n",
"(1-Methylpropyl)benzene\n",
"(1:1-Dimethylethyl)benzene\n",
"2-Pentene (E)\n",
"\n",
"Alcohols: ethers and other oxy\n",
"2:4:6-Trimethyl-1:3:5-Trioxane\n",
"Cyclohexanol\n",
"Cyclohexanone\n",
"Acetone\n",
"Acetaldehyde\n",
"1-Penten-3-ol\n",
"3-Methylbutanal\n",
"2-Pentanone\n",
"Pentanal\n",
"2:3-Dimethylfuran\n",
"2:5-Dimethylfuran\n",
"3:3-Dimethyl-2-pentanol\n",
"4-Methylpenanoic acid\n",
"Methyl 2-methylbutanoate\n",
"Methyl 2:2-dimethylpropanoate\n",
"4-hydroxy-4-methyl-2-pentanone\n",
"4-Penten-1-ol\n",
"Acetic acid\n",
"2-Propenal\n",
"Benzaldehyde\n",
"Benzylalcohol\n",
"Methoxymethane\n",
"Ethanol\n",
"Ethyl formate\n",
"1-Hydroxy-2-propanone\n",
"Etheneoxyethane\n",
"2-Butanone\n",
"Formic acid dimer\n",
"Furan\n",
"Furfuryl alcohol\n",
"2:3-Butanedione\n",
"2:6-Dimethoxyphenol\n",
"2-Hexanol\n",
"4-Methyl-1-pentanol\n",
"2-Methylfuran\n",
"2-Nonanone\n",
"3:5:5-trimethylcyclohex-2-en-1\n",
"2-Pentylfuran\n",
"1-Methyl-4-(1-methylethenyl)-7\n",
"3-methylphenol\n",
"5-methyl-2-(1-methylethyl)-cyc\n",
"2-methyl-3-pentanone\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"Ethyl methyl ether\n",
"Methyl butyl ether\n",
"3-Pentanol\n",
"5-Methyl-2-hexanone\n",
"Methyl methacrylate\n",
"Ethyl Prop-2-enoate\n",
"Methyl propanoate\n",
"Acetic acid ethyl ether\n",
"2-Methyl propanoic acid\n",
"Methyl salicylate\n",
"Methoxyethene\n",
"Propanal\n",
"3-Methoxyphenol\n",
"2-Methoxyphenol\n",
"3-Methylfuran\n",
"5-Nonanol\n",
"2-Propenoic acid\n",
"2-Oxopropanal\n",
"1:3:3-trimethyl-2-oxabicyclo[2\n",
"Ethyl benzoate\n",
"Furfural\n",
"(2E)-3:7-dimethyl-2:6-octadien\n",
"2-Hydroxyacetaldehyde\n",
"Ethandial\n",
"Hexyl acetate\n",
"Octanoic acid\n",
"Isopentyl acetate\n",
"Methyl-3-oxobutanoate\n",
"Phenol\n",
"4_methyl-1:3-dioxolan-2-one\n",
"Pentenoic acid\n",
"2-Propenol\n",
"Acetic anhydride\n",
"3-Methyl-2-pentanone\n",
"(3-hydroxy-2:2:4-trimethylpent\n",
"2-Methyl-2-propenal\n",
"2-Methyl-1-propanal\n",
"2-Methoxyethanol\n",
"2-Hexanone\n",
"2-Ethyl-1-hexanol\n",
"2-Ethoxyethyl acetate\n",
"2-Butoxyethanol\n",
"1:4-Dioxane\n",
"2-Methyloxirane\n",
"2-Ethyloxirane\n",
"1-Propanol\n",
"1-Hexanol\n",
"1-Hexanoic acid\n",
"1-Heptanol\n",
"Butyl acetate\n",
"Butanal\n",
"Butanoic acid\n",
"Diethylketone\n",
"Diisopropyl ether\n",
"Dimethoxymethane\n",
"Dimethyl carbonate\n",
"1-(3-methoxypropoxy)propan-1-o\n",
"Dipropyl ether\n",
"Ethyl butyrate\n",
"Ethylene oxide\n",
"2-ethoxy-2-methylpropane\n",
"1:2-Dimethoxyethane\n",
"3-methyl-1-butanol\n",
"Isopropyl acetate\n",
"Methyl acetate\n",
"Methyl acrylate\n",
"Methyl benzoate\n",
"Methyl formate\n",
"Methyl isobutyl ketone\n",
"Methyl isobutyrate\n",
"3-methyl-2-butanone\n",
"n-Amyl acetate\n",
"Butanol\n",
"Vinyl acetate\n",
"2-Phenyl-oxirane\n",
"2-methyl-2-propanol\n",
"2-Methoxy-2-methylbutane\n",
"tert-Butyl acetate\n",
"tert-Butyl methyl ether\n",
"Propargyl alcohol\n",
"Propyl acetate\n",
"Propylene glycol\n",
"2-Butanol\n",
"Neopentyl alcohol\n",
"Octafluorotetrahydrofuran\n",
"Crotonaldehyde\n",
"Methyl vinyl ketone\n",
"trans-Crotonaldehyde\n",
"allyl ether\n",
"allyl ethyl ether\n",
"(Z)-2-hexen-1-ol\n",
"(E)-3-hexen-1-ol\n",
"\n",
"Iodocarbons and hydroiodocarbo\n",
"Diiodomethane\n",
"Iodoethane\n",
"Iodomethane\n",
"3-Iodo-1-propene\n",
"2-Iodopropane\n",
"2-Iodo-2-methylpropane\n",
"\n",
"Nitriles: amines and other nit\n",
"Acetonitrile\n",
"Peroxyacetyl nitrate\n",
"Diethylamine\n",
"N-Butylamine\n",
"Diisopropylamine\n",
"Triethylamine\n",
"Dimethylamine\n",
"Ethylamine\n",
"Ethylenediamine\n",
"Hydrazine\n",
"Isocyanic acid\n",
"Isopropylamine\n",
"Trimethylamine\n",
"N:N-Diethylaniline\n",
"Nitrous acid\n",
"2-Methylbenzenamine\n",
"Piperidine\n",
"2-Methylaziridine\n",
"Pentan-2-amine\n",
"2-Vinylpyridine\n",
"Prop-2-enenitrile\n",
"N:N-diethyl formamide\n",
"Benzonitrile\n",
"Phenylamine\n",
"Pentyl nitrate\n",
"3-isothiocyanato-1-propene\n",
"2-Hydroxy-2-methylpropanenitri\n",
"4-Methylpyridine\n",
"3-Methylpyridine\n",
"2-Methylpyridine\n",
"2-Nitropropane\n",
"2:4-Diisocyanate-1-methylbenze\n",
"1-Nitropropane\n",
"1:1-Dimethylhydrazine\n",
"Cadaverine\n",
"Chloropicrin\n",
"Cyanogenchloride\n",
"Cyanogen\n",
"Propanenitrile\n",
"3-Butenenitrile\n",
"Ethyl nitrite\n",
"2-Methyl-2-propenenitrile\n",
"Methylamine\n",
"Methylhydrazine\n",
"Morpholine\n",
"n-Butyl isocyanate\n",
"Nitric acid\n",
"Nitric oxide\n",
"Nitrogen dioxide\n",
"Nitromethane\n",
"Nitrobenzene\n",
"Nitrosyl chloride\n",
"Methyl nitrite\n",
"Pyridine\n",
"Trifluoronitrosomethane\n",
"2-Methyl-2-butanamine\n",
"Quinoline\n",
"Dimethylcarbamoyl chloride\n",
"\n",
"Sulfur containing compounds\n",
"Carbon disulfide\n",
"Dimethyl disulfide\n",
"Dimethyl sulfate\n",
"Dimethyl sulfide\n",
"Dimethyl sulfoxide\n",
"Methyl isothiocyanate\n",
"Methanethiol\n",
"Benzenethiol\n",
"2-Methyl-1-propanethiol\n",
"Carbonyl Sulfide\n",
"Diethyl sulfate\n",
"Diethyl sulfide\n",
"Thiirane\n",
"Ethyl mercaptan\n",
"Sulfur dioxide\n",
"Sulfur trioxide\n",
"Thiophene\n",
"Thiophosgene\n",
"Tetrahydrothiophene\n",
"Methanesulfonyl chloride\n",
"Perchloromethyl mercaptan\n",
"\n",
"Silicon containing compounds\n",
"hexamethyldisiloxane\n",
"octamethyltrisiloxane\n",
"decamethyltetrasiloxane\n",
"dodecamethylpentasiloxane\n",
"hexamethylcyclotrisiloxane\n",
"octamethylcyclotetrasiloxane\n",
"decamethylcyclopentasiloxane\n",
"dodecamethylcyclohexasiloxane\n",
"Dichlorosilane\n",
"Methyltrichlorosilane\n",
"Silane\n",
"\n",
"Other compounds\n",
"Chlorine Nitrate\n",
"Dinitrogen pentoxide\n",
"Peroxynitric acid\n",
"Chlorine peroxide\n",
"Ammonia\n",
"Arsine\n",
"Trichloroborone\n",
"Trifluoroborone\n",
"Diborane\n",
"Dichloromethylphosphine\n",
"Carbon monoxide\n",
"Germane\n",
"Hydrogen cyanide\n",
"Hydrogen peroxide\n",
"Hydrogen sulfide\n",
"Iron pentacarbonyl\n",
"Nickel carbonyl\n",
"Phosphoric trichloride\n",
"Titanium tetrachloride\n",
"Tungsten hexafluoride\n",
"Carbonyl Fluoride\n",
"\n"
]
}
],
"source": [
"i_out=3\n",
"for ispec in tqdm(np.arange(0, num_halo)):\n",
" name = halo[ispec]['Name']\n",
" alpha = halo[ispec]['Lifetime_yr']\n",
" re = halo[ispec]['RE_W_m2_ppb1']\n",
" if (halo[ispec]['Acronym']=='CFC-11' or halo[ispec]['Acronym'] == 'CFC-12'):\n",
" cfc_ra = 0.12\n",
" else:\n",
" cfc_ra = 0\n",
" mass = halo[ispec]['Molar_mass']\n",
" print(name)\n",
" table[i_out]['Name'] = name\n",
" table[i_out]['CASRN'] = halo[ispec]['CASRN']\n",
" table[i_out]['Acronym'] = halo[ispec]['Acronym']\n",
" table[i_out]['Formula'] = halo[ispec]['Formula']\n",
" table[i_out]['Lifetime'] = alpha\n",
" table[i_out]['Radiative_efficiency'] = re * (1 + cfc_ra)\n",
" if not np.isnan(alpha):\n",
"# Pulse\n",
" rf, agwp, agtp, iagtp = halogen_analytical(\n",
" np.linspace(0, H_max, H_max * ts_per_year + 1),\n",
" alpha,\n",
" re,\n",
" mass,\n",
" d=np.array([3.424102092311, 285.003477841911]),\n",
" #q=np.array([0.443767728883447, 0.319591049742508]), # this is what is in Zeb's file sent 25 Feb\n",
" q = np.array([0.443767728883447, 0.313998206372015]), # this is what Bill used\n",
" halogen_ra = cfc_ra\n",
" )\n",
" rf_cc, agwp_cc, agtp_cc = carbon_cycle_adjustment(\n",
" np.linspace(0, H_max, H_max * ts_per_year + 1),\n",
" agtp,\n",
" co2=co2,\n",
" n2o=n2o,\n",
" co2_ra = 0.05,\n",
" d = np.array([3.424102092311, 285.003477841911]),\n",
" #q=np.array([0.443767728883447, 0.319591049742508]), # this is what is in Zeb's file sent 25 Feb\n",
" q = np.array([0.443767728883447, 0.313998206372015]), # this is what Bill used\n",
" )\n",
" table[i_out]['AGWP20'] = (agwp[20 * ts_per_year]+agwp_cc[20 * ts_per_year])\n",
" table[i_out]['GWP20'] = (agwp[20 * ts_per_year]+agwp_cc[20 * ts_per_year])/agwp_co2[20 * ts_per_year]\n",
" table[i_out]['AGWP100'] = (agwp[100 * ts_per_year]+agwp_cc[100 * ts_per_year])\n",
" table[i_out]['GWP100'] = (agwp[100 * ts_per_year]+agwp_cc[100 * ts_per_year])/agwp_co2[100 * ts_per_year]\n",
" table[i_out]['AGWP500'] = (agwp[500 * ts_per_year]+agwp_cc[500 * ts_per_year])\n",
" table[i_out]['GWP500'] = (agwp[500 * ts_per_year]+agwp_cc[500 * ts_per_year])/agwp_co2[500 * ts_per_year]\n",
" table[i_out]['AGTP50'] = (agtp[50 * ts_per_year]+agtp_cc[50 * ts_per_year])\n",
" table[i_out]['GTP50'] = (agtp[50 * ts_per_year]+agtp_cc[50 * ts_per_year])/agtp_co2[50 * ts_per_year]\n",
" table[i_out]['AGTP100'] = (agtp[100 * ts_per_year]+agtp_cc[100 * ts_per_year])\n",
" table[i_out]['GTP100'] = (agtp[100 * ts_per_year]+agtp_cc[100 * ts_per_year])/agtp_co2[100 * ts_per_year]\n",
"# Step\n",
" if alpha < 20.:\n",
" rf_cc, agwp_cc, agtp_cc = carbon_cycle_adjustment(\n",
" np.linspace(0, H_max, H_max * ts_per_year + 1),\n",
" iagtp,\n",
" co2=co2,\n",
" n2o=n2o,\n",
" co2_ra = 0.05,\n",
" d = np.array([3.424102092311, 285.003477841911]),\n",
" #q=np.array([0.443767728883447, 0.319591049742508]), # this is what is in Zeb's file sent 25 Feb\n",
" q = np.array([0.443767728883447, 0.313998206372015]), # this is what Bill used\n",
" )\n",
" table[i_out]['CGTP50'] = (iagtp[50 * ts_per_year]+agtp_cc[50 * ts_per_year])/agtp_co2[50 * ts_per_year]\n",
" table[i_out]['CGTP100'] = (iagtp[100 * ts_per_year]+agtp_cc[100 * ts_per_year])/agtp_co2[100 * ts_per_year]\n",
" else:\n",
" table[i_out]['CGTP50'] = np.nan \n",
" table[i_out]['CGTP100'] = np.nan\n",
" i_out += 1"
]
},
{
"cell_type": "markdown",
"id": "17a82174",
"metadata": {},
"source": [
"## Save the table, overwriting Bill's original\n",
"\n",
"- Formal comparison to be done offline\n",
"- Remembering that CGTP values and metrics for CFC-11 and CFC-12 are both wrong in the March 2021 version\n",
"- One other thing to watch out for is that the radiative efficiencies of CO2, CH4 and N2O are too small to be expressed as 3 dp sensibly and will need to be hand-edited later in the final table."
]
},
{
"cell_type": "code",
"execution_count": 23,
"id": "8b5f33e3",
"metadata": {},
"outputs": [],
"source": [
"fmt = '%30s'+', %20s'*2+', %30s'+', %5.3f'*2+ ', %7.5e, %5.3f'*5+', %5.3f, %5.3f'"
]
},
{
"cell_type": "code",
"execution_count": 24,
"id": "9b55a399",
"metadata": {},
"outputs": [],
"source": [
"np.savetxt(\n",
" \"../data_input/ghg_properties/metrics_supplement.csv\",\n",
" table[:i_out],\n",
" delimiter=',',\n",
" fmt=fmt,\n",
" header=','.join(table.dtype.names)\n",
")"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "68ab9e5d",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.10"
}
},
"nbformat": 4,
"nbformat_minor": 5
}