From 12890860d9b2ee9740839524080adad26f611a1b Mon Sep 17 00:00:00 2001 From: Sylwester Arabas Date: Tue, 24 Sep 2024 21:48:58 +0200 Subject: [PATCH] embedding cloud_and_rain_partitioning.json in the notebook --- .../cloud_and_rain_partitioning.json | 258 ------------------ examples/particle_simulation_with_camp.ipynb | 50 +++- 2 files changed, 42 insertions(+), 266 deletions(-) delete mode 100644 examples/monarch_mod37/cloud_and_rain_partitioning.json diff --git a/examples/monarch_mod37/cloud_and_rain_partitioning.json b/examples/monarch_mod37/cloud_and_rain_partitioning.json deleted file mode 100644 index 848f8846..00000000 --- a/examples/monarch_mod37/cloud_and_rain_partitioning.json +++ /dev/null @@ -1,258 +0,0 @@ -{ - "description" : [ - "Partitioning of species to aqueous. Parameters are from existing wet-deposition module." - ], - "pmc-data" : [ - { - "name" : "MONARCH mod37", - "type" : "MECHANISM", - "reactions" : [ - { - "type" : "HL_PHASE_TRANSFER", - "gas-phase species" : "NO2", - "aerosol phase" : "aqueous", - "aerosol-phase species" : "NO2_aq", - "aerosol-phase water" : "H2O_aq" - }, - { - "type" : "HL_PHASE_TRANSFER", - "gas-phase species" : "NO", - "aerosol phase" : "aqueous", - "aerosol-phase species" : "NO_aq", - "aerosol-phase water" : "H2O_aq" - }, - { - "type" : "HL_PHASE_TRANSFER", - "gas-phase species" : "O3", - "aerosol phase" : "aqueous", - "aerosol-phase species" : "O3_aq", - "aerosol-phase water" : "H2O_aq" - }, - { - "type" : "HL_PHASE_TRANSFER", - "gas-phase species" : "NO3", - "aerosol phase" : "aqueous", - "aerosol-phase species" : "NO3_aq", - "aerosol-phase water" : "H2O_aq" - }, - { - "type" : "HL_PHASE_TRANSFER", - "gas-phase species" : "N2O5", - "aerosol phase" : "aqueous", - "aerosol-phase species" : "N2O5_aq", - "aerosol-phase water" : "H2O_aq" - }, - { - "type" : "HL_PHASE_TRANSFER", - "gas-phase species" : "HNO3", - "aerosol phase" : "aqueous", - "aerosol-phase species" : "HNO3_aq", - "aerosol-phase water" : "H2O_aq" - }, - { - "type" : "HL_PHASE_TRANSFER", - "gas-phase species" : "HONO", - "aerosol phase" : "aqueous", - "aerosol-phase species" : "HONO_aq", - "aerosol-phase water" : "H2O_aq" - }, - { - "type" : "HL_PHASE_TRANSFER", - "gas-phase species" : "PNA", - "aerosol phase" : "aqueous", - "aerosol-phase species" : "HNO4_aq", - "aerosol-phase water" : "H2O_aq" - }, - { - "type" : "HL_PHASE_TRANSFER", - "gas-phase species" : "H2O2", - "aerosol phase" : "aqueous", - "aerosol-phase species" : "H2O2_aq", - "aerosol-phase water" : "H2O_aq" - }, - { - "type" : "HL_PHASE_TRANSFER", - "gas-phase species" : "NTR", - "aerosol phase" : "aqueous", - "aerosol-phase species" : "NTR_aq", - "aerosol-phase water" : "H2O_aq" - }, - { - "type" : "HL_PHASE_TRANSFER", - "gas-phase species" : "ROOH", - "aerosol phase" : "aqueous", - "aerosol-phase species" : "ROOH_aq", - "aerosol-phase water" : "H2O_aq" - }, - { - "type" : "HL_PHASE_TRANSFER", - "gas-phase species" : "FORM", - "aerosol phase" : "aqueous", - "aerosol-phase species" : "FORM_aq", - "aerosol-phase water" : "H2O_aq" - }, - { - "type" : "HL_PHASE_TRANSFER", - "gas-phase species" : "ALD2", - "aerosol phase" : "aqueous", - "aerosol-phase species" : "ALD2_aq", - "aerosol-phase water" : "H2O_aq" - }, - { - "type" : "HL_PHASE_TRANSFER", - "gas-phase species" : "ALDX", - "aerosol phase" : "aqueous", - "aerosol-phase species" : "ALDX_aq", - "aerosol-phase water" : "H2O_aq" - }, - { - "type" : "HL_PHASE_TRANSFER", - "gas-phase species" : "CO", - "aerosol phase" : "aqueous", - "aerosol-phase species" : "CO_aq", - "aerosol-phase water" : "H2O_aq" - }, - { - "type" : "HL_PHASE_TRANSFER", - "gas-phase species" : "MEPX", - "aerosol phase" : "aqueous", - "aerosol-phase species" : "MEPX_aq", - "aerosol-phase water" : "H2O_aq" - }, - { - "type" : "HL_PHASE_TRANSFER", - "gas-phase species" : "MEOH", - "aerosol phase" : "aqueous", - "aerosol-phase species" : "MEOH_aq", - "aerosol-phase water" : "H2O_aq" - }, - { - "type" : "HL_PHASE_TRANSFER", - "gas-phase species" : "FACD", - "aerosol phase" : "aqueous", - "aerosol-phase species" : "FACD_aq", - "aerosol-phase water" : "H2O_aq" - }, - { - "type" : "HL_PHASE_TRANSFER", - "gas-phase species" : "PAN", - "aerosol phase" : "aqueous", - "aerosol-phase species" : "PAN_aq", - "aerosol-phase water" : "H2O_aq" - }, - { - "type" : "HL_PHASE_TRANSFER", - "gas-phase species" : "PACD", - "aerosol phase" : "aqueous", - "aerosol-phase species" : "PACD_aq", - "aerosol-phase water" : "H2O_aq" - }, - { - "type" : "HL_PHASE_TRANSFER", - "gas-phase species" : "AACD", - "aerosol phase" : "aqueous", - "aerosol-phase species" : "AACD_aq", - "aerosol-phase water" : "H2O_aq" - }, - { - "type" : "HL_PHASE_TRANSFER", - "gas-phase species" : "PANX", - "aerosol phase" : "aqueous", - "aerosol-phase species" : "PANX_aq", - "aerosol-phase water" : "H2O_aq" - }, - { - "type" : "HL_PHASE_TRANSFER", - "gas-phase species" : "SO2", - "aerosol phase" : "aqueous", - "aerosol-phase species" : "SO2_aq", - "aerosol-phase water" : "H2O_aq" - }, - { - "type" : "HL_PHASE_TRANSFER", - "gas-phase species" : "SULF", - "aerosol phase" : "aqueous", - "aerosol-phase species" : "H2SO4_aq", - "aerosol-phase water" : "H2O_aq" - }, - { - "type" : "HL_PHASE_TRANSFER", - "gas-phase species" : "CL2", - "aerosol phase" : "aqueous", - "aerosol-phase species" : "CL2_aq", - "aerosol-phase water" : "H2O_aq" - }, - { - "type" : "HL_PHASE_TRANSFER", - "gas-phase species" : "HOCL", - "aerosol phase" : "aqueous", - "aerosol-phase species" : "HOCL_aq", - "aerosol-phase water" : "H2O_aq" - }, - { - "type" : "HL_PHASE_TRANSFER", - "gas-phase species" : "FMCL", - "aerosol phase" : "aqueous", - "aerosol-phase species" : "FMCL_aq", - "aerosol-phase water" : "H2O_aq" - }, - { - "type" : "HL_PHASE_TRANSFER", - "gas-phase species" : "HCL", - "aerosol phase" : "aqueous", - "aerosol-phase species" : "HCL_aq", - "aerosol-phase water" : "H2O_aq" - }, - { - "type" : "HL_PHASE_TRANSFER", - "gas-phase species" : "NH3", - "aerosol phase" : "aqueous", - "aerosol-phase species" : "NH3_aq", - "aerosol-phase water" : "H2O_aq" - }, - { - "type" : "HL_PHASE_TRANSFER", - "gas-phase species" : "ISOP-P1", - "aerosol phase" : "aqueous", - "aerosol-phase species" : "ISOP-P1_aero", - "aerosol-phase water" : "H2O_aq" - }, - { - "type" : "HL_PHASE_TRANSFER", - "gas-phase species" : "ISOP-P2", - "aerosol phase" : "aqueous", - "aerosol-phase species" : "ISOP-P2_aero", - "aerosol-phase water" : "H2O_aq" - }, - { - "type" : "HL_PHASE_TRANSFER", - "gas-phase species" : "TERP-P1", - "aerosol phase" : "aqueous", - "aerosol-phase species" : "TERP-P1_aero", - "aerosol-phase water" : "H2O_aq" - }, - { - "type" : "HL_PHASE_TRANSFER", - "gas-phase species" : "TERP-P2", - "aerosol phase" : "aqueous", - "aerosol-phase species" : "TERP-P2_aero", - "aerosol-phase water" : "H2O_aq" - }, - { - "type" : "HL_PHASE_TRANSFER", - "gas-phase species" : "DMS", - "aerosol phase" : "aqueous", - "aerosol-phase species" : "DMS_aq", - "aerosol-phase water" : "H2O_aq" - }, - { - "type" : "HL_PHASE_TRANSFER", - "gas-phase species" : "ETOH", - "aerosol phase" : "aqueous", - "aerosol-phase species" : "ETOH_aq", - "aerosol-phase water" : "H2O_aq" - } - ] - } - ] -} diff --git a/examples/particle_simulation_with_camp.ipynb b/examples/particle_simulation_with_camp.ipynb index 1201a094..112ee3d5 100644 --- a/examples/particle_simulation_with_camp.ipynb +++ b/examples/particle_simulation_with_camp.ipynb @@ -27,7 +27,7 @@ }, { "cell_type": "code", - "execution_count": 2, + "execution_count": 3, "id": "4f8359c2", "metadata": {}, "outputs": [], @@ -46,7 +46,7 @@ }, { "cell_type": "code", - "execution_count": 3, + "execution_count": 4, "id": "b494ea6e", "metadata": {}, "outputs": [], @@ -61,7 +61,7 @@ }, { "cell_type": "code", - "execution_count": 4, + "execution_count": 5, "id": "b480e7ad", "metadata": {}, "outputs": [], @@ -71,7 +71,7 @@ }, { "cell_type": "code", - "execution_count": 5, + "execution_count": 6, "id": "a2d7bad8", "metadata": {}, "outputs": [], @@ -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, @@ -568,9 +604,7 @@ "cell_type": "code", "execution_count": 20, "id": "47474cd3", - "metadata": { - "scrolled": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -5764,7 +5798,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.11.3" + "version": "3.9.2" } }, "nbformat": 4,