Atmospheric Chemistry: Difference between revisions
(improvements on explaining simplifying chemistry) |
|||
Line 28: | Line 28: | ||
After that the following steps have to be fulfilled to create the code of your specific mechanism and to be able to execute an ICON-ART simulation with MECCA-based chemistry: |
After that the following steps have to be fulfilled to create the code of your specific mechanism and to be able to execute an ICON-ART simulation with MECCA-based chemistry: |
||
* set up a batch file: all previously set information about the mechanism can be selected and stated here (an example can be found below or also inside the supplement in <code>/caaba3.0/mecca/batch/example.bat</code>). |
* set up a batch file: all previously set information about the mechanism can be selected and stated here (an example can be found below or also inside the supplement in <code>/caaba3.0/mecca/batch/example.bat</code>). |
||
* execute <code>./ |
* execute <code>./xmecca</code> inside the folder <code>/caaba3.0/mecca</code>. Here the previously created batch file has to be selected and the Fortran files with the mechanism are created. |
||
* since the created Fortran code is only located inside Mecca and not in ICON-ART so far, a transfer has to be carried out. A script that performs this transfer can be obtained via <code>git clone https://gitlab.dkrz.de/art/mecca preproc.git</code>. |
* since the created Fortran code is only located inside Mecca and not in ICON-ART so far, a transfer has to be carried out. A script that performs this transfer can be obtained via <code>git clone https://gitlab.dkrz.de/art/mecca preproc.git</code>. |
||
* in a new directory <code>Mecca_preproc</code> has been generated and the script <code>create_icon_code4.sh</code> can be found inside of it. By executing <code>./create_icon_code4.sh -h</code> paths to the Mecca- and ICON home directories can be provided as well as a name for the XML-file that is going to be linked in the unscript later. |
* in a new directory <code>Mecca_preproc</code> has been generated and the script <code>create_icon_code4.sh</code> can be found inside of it. By executing <code>./create_icon_code4.sh -h</code> paths to the Mecca- and ICON home directories can be provided as well as a name for the XML-file that is going to be linked in the unscript later. |
Revision as of 11:36, 10 August 2023
In this article it is described how to perform different kinds of atmospheric chemistry simulations. This includes the description of simulations with a simplified chemistry and MECCA-based (full) chemistry, their nameless settings, possible modules to make use of and information about initialization data. Further, there are given some examples of typical simulation you can do with ICON-ART including atmospheric chemistry.
Simplified Chemistry
When we talk about simplified calculated chemistry in ICON-ART, we mean that the concentration of the gases we want to simulate is calculated with a parametrization. Here production and depletion rates are used to solve the differential equation
numerically and two calculate the concentration distribution. Here, describes the number concentration of a certain tracer, describes the chemical production and is the belonging life time of tracer . For the namelist settings you are able to use for atmospheric chemistry, check out the ART-namelist parameters (see ART namelists). The procedure of creating an ICON-ART simulation in Atmospheric Chemistry always comes back to switching on a namelist parameter and providing the path of the respective XML-file. How to create these for several cases, please check the examples below in the Configurations part.
To learn more about technical details of simplified chemistry, see also Weimer et. al. (2017).
Note: When enabling simplified chemistry with the switch lart_chemtracer = .TRUE.
, you can improve your runtime but the simulated concentration values are less exact compared to MECCA-based chemistry.
MECCA-based Chemistry
General Information
The MECCA(=Module Efficiently Calculating the Chemistry of the Atmosphere) based chemistry describes a full gas phase chemistry that can be applied as an extension to the parametrized Simplified Chemistry (see above). MECCA based chemistry is generally more exact in the concentration values but the overall runtime is longer compared to purely simplified chemistry simulations. MECCA itself is originally a submodule of the CAABA box model where an air parcel is described as a box and outgoing from this model all exchange processes in- and outward of the box are calculated. As MECCA is part of this model, it contains a wide collection of the most important reactions, including Ozone-, Methane-, HOx-, NOx-, Carbonhydrogen-, Halogene- and Sulfur chemistry. MECCA is available in a supplement, available to download for free and containing all auxiliaries to perform MECCA-simulations.
Including MECCA-based Chemistry in a ICON-ART Simulation
(Note: It is recommended to perform all the following steps in the shell environment.)
The above mentioned collection of the gase phase chemistry reactions can be found in the supplement in the gas.eqn
(path: caaba3.0/Mecca/gas.eqn).
Additionally it is also possible to edit existing reactions as well as creating new reactions with the help of "Replacement-files" (see an example in the Configurations part). Inside the gas.eqn
every reaction is marked with a certain code. To select the specific reactions for the machanism labels can be set to your belonging reactions or, more easily, a new Gas-Equation-file gas_Mechanism1.eqn
can be created, containing only the wanted reactions. (Note: Never edit the original gas.eqn
! Better copy it in the first place and then rename and edit it, depending on the respective scientific goal.)
After that the following steps have to be fulfilled to create the code of your specific mechanism and to be able to execute an ICON-ART simulation with MECCA-based chemistry:
- set up a batch file: all previously set information about the mechanism can be selected and stated here (an example can be found below or also inside the supplement in
/caaba3.0/mecca/batch/example.bat
). - execute
./xmecca
inside the folder/caaba3.0/mecca
. Here the previously created batch file has to be selected and the Fortran files with the mechanism are created. - since the created Fortran code is only located inside Mecca and not in ICON-ART so far, a transfer has to be carried out. A script that performs this transfer can be obtained via
git clone https://gitlab.dkrz.de/art/mecca preproc.git
. - in a new directory
Mecca_preproc
has been generated and the scriptcreate_icon_code4.sh
can be found inside of it. By executing./create_icon_code4.sh -h
paths to the Mecca- and ICON home directories can be provided as well as a name for the XML-file that is going to be linked in the unscript later. - the Mecca-XML-file is now generated and can be found in ICON in
/icon home>/runctrl examples/xml ctrl
.
Now, in the respective runscript the namelist parameter lart_mecca
has be set to .TRUE
and for cart_mecca_xml
the path to the Mecca file can be provided.
Important: As a final step, the ICON code has to be recompiled with the command ./config/dkrz/levante.intel --enable-art --enable-ecrad
and after executed make -j 8
.