Skip to content

Commit

Permalink
embedding cloud_and_rain_partitioning.json in the notebook
Browse files Browse the repository at this point in the history
  • Loading branch information
slayoo committed Sep 24, 2024
1 parent df77130 commit 1289086
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 266 deletions.
258 changes: 0 additions & 258 deletions examples/monarch_mod37/cloud_and_rain_partitioning.json

This file was deleted.

50 changes: 42 additions & 8 deletions examples/particle_simulation_with_camp.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
},
{
"cell_type": "code",
"execution_count": 2,
"execution_count": 3,
"id": "4f8359c2",
"metadata": {},
"outputs": [],
Expand All @@ -46,7 +46,7 @@
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": 4,
"id": "b494ea6e",
"metadata": {},
"outputs": [],
Expand All @@ -61,7 +61,7 @@
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": 5,
"id": "b480e7ad",
"metadata": {},
"outputs": [],
Expand All @@ -71,7 +71,7 @@
},
{
"cell_type": "code",
"execution_count": 5,
"execution_count": 6,
"id": "a2d7bad8",
"metadata": {},
"outputs": [],
Expand All @@ -88,6 +88,42 @@
")"
]
},
{
"cell_type": "code",
"execution_count": 7,
"id": "2e492520-ba61-45bb-b9b3-5a04fb6f21df",
"metadata": {},
"outputs": [],
"source": [
"cloud_and_rain_partitioning = {\n",
" \"description\" : [\n",
" \"Partitioning of species to aqueous. Parameters are from existing wet-deposition module.\"\n",
" ],\n",
" \"pmc-data\" : [\n",
" {\n",
" \"name\" : \"MONARCH mod37\",\n",
" \"type\" : \"MECHANISM\",\n",
" \"reactions\" : [\n",
" {\n",
" \"type\" : \"HL_PHASE_TRANSFER\",\n",
" \"gas-phase species\" : \"PNA\" if item == \"HNO4\" else \"SULF\" if item == \"H2SO4\" else item,\n",
" \"aerosol phase\" : \"aqueous\",\n",
" \"aerosol-phase species\" : item + (\"_aero\" if item.startswith(\"ISOP\") or item.startswith(\"TERP\") else \"_aq\"),\n",
" \"aerosol-phase water\" : \"H2O_aq\"\n",
" } for item in (\n",
" \"NO2\", \"NO\", \"O3\", \"NO3\", \"N2O5\", \"HNO3\", \"HONO\", \"H2O2\", \"NTR\", \"ROOH\", \"FORM\", \"ALD2\",\n",
" \"ALDX\", \"CO\", \"MEPX\", \"MEOH\", \"FACD\", \"PAN\", \"PACD\", \"AACD\", \"PANX\", \"SO2\", \"CL2\", \"HOCL\",\n",
" \"FMCL\", \"HCL\", \"NH3\", \"ETOH\", \"DMS\", \"ISOP-P1\", \"ISOP-P2\", \"TERP-P1\", \"TERP-P2\", \"HNO4\", \"H2SO4\",\n",
" )\n",
" ]\n",
" }\n",
" ]\n",
"}\n",
"\n",
"with open('cloud_and_rain_partitioning.json', 'w', encoding='utf-8') as f:\n",
" json.dump(cloud_and_rain_partitioning, f, indent=4)"
]
},
{
"cell_type": "code",
"execution_count": 6,
Expand Down Expand Up @@ -568,9 +604,7 @@
"cell_type": "code",
"execution_count": 20,
"id": "47474cd3",
"metadata": {
"scrolled": false
},
"metadata": {},
"outputs": [
{
"data": {
Expand Down Expand Up @@ -5764,7 +5798,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.3"
"version": "3.9.2"
}
},
"nbformat": 4,
Expand Down

0 comments on commit 1289086

Please sign in to comment.