MECCA-based (full) Chemistry

From icon-art guide
Revision as of 12:39, 10 August 2023 by Tim R (talk | contribs)
Jump to navigation Jump to search

- work in progress -

In this configuration example a simulation with (full) MECCA-based chemistry is performed. If we talk about MECCA-based chemistry we mean a full gas phase chemistry that can be applied additionally to the existing standard parametrized chemistry from ICON-ART (explained in the article Atmospheric Chemistry, example: click here). MECCA uses the Kinetic PreProcessor (KPP) to convert the chemical equations into differential equations that can be used then e.g., in ICON-ART. MECCA already contains a comprehensive chemical mech- anism, but it also allows to create an own mechanism by changing equations or only picking a subset of equations. To perform this example, a complete reaction mechanism is created and transferred to ICON-ART.

This article teaches you...

  • the implementation of (full) MECCA-based chemistry in ICON-ART
  • the creation of a chemical mechanism and the selection of the respective desired chemical species and their reactions in MECCA
  • the implementation of not yet in MECCA implemented reactions in your mechanism
  • the creation of the to your mechanism belonging Mecca-xml data to link MECCA calculations with ICON-ART

Introductioin

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.

In this case we are going to have a look at the implementation of the fully available chemistry, meaning all in default mode available reactions will be implemented. This could also be adjusted easily if necessary and will be showed later. If we talk about "adding" MECCA chemistry to ICON-ART, it means that it is additionally calculated to the in any way calculated parametrized simplified chemistry in ICON-ART.

(Note: Adding MECCA-chemistry to ICON-ART also means that some namelist parameters will be overwritten in the runscript which means that some extra options (e.g. LINOZ-chemistry) are only available by setting them manually in the ICON-ART code.)

[In this configuration case a regular simulation with a MECCA chemistry implementation that will be applied in most cases is explained. The implementation and link to ICON-ART works with an xml-file that has to created with help of the caaba3.0-supplement. The created xml-file has to be included in the runscript as well. To get a better overview about the upcoming steps you can also check out the MECCA chemistry part in the Atmospheric Chemistry article.

Preparing the MECCA-xml-file

Step 0: Download and open the caaba3.0-supplement

Once you have downloaded the caaba3.0-supplement, you can open it in your preferred directory browser or terminal.

Step 1: Setting up the chemical mechanism

If you browse the mecca directory you can check out the gas.eqn file. Just use the text editor if you use the directory browser or use the command

vi gas.eqn

in the terminal. Once you have opened it, you can see all available reactions implemented in MECCA with their respective reaction codes which represents the full MECCA mechanism. In this configuration case we will implement a MECCA chemistry with all available reactions. That's why the gas.eqn can be left as it is.

What to do if not all reactions are wanted:

First, never edit the gas.eqn itself! Better copy and rename it for your respective chemical mechanism that you want to create, e.g. gas_Mechanism1.eqn. Afterwards you can open it and delete all reactions that are not wanted.

What to do if you want to edit existing reactions of the gas.eqn or add new reactions to your mechanism:

If a reaction of the gas.eqn is only similar to that one that you want to implement or a specific reaction is not implemented in the gas.eqn, you can make use of replacement-files. Inside the mecca directory, select the rpl directory in which you can copy and rename the example.rpl first of all. If you open it (again with the text editor or with the vi-command you can edit and add your reactions, depending on your scientific goal. If you want to edit a reaction, use the #REPLACE command as well as the number of the respective reaction (e.g. <G4110>) in the first line, then write <a> (<>, <c>,...) for your first (second, third,...) reaction which belongs to the same reaction number. For example, reaction G4110 originally looks like this in the gas.eqn:

<G4110>  CO + OH = H + CO2           : {%StTrG} (1.57E-13+cair*3.54E-33){§1.15}; {&1628}

Inside the replacement file you can change it for example like this:

#REPLACE <G4110>
<a> CO + OH = HO2 + CO2 : {%StTrG} 1.57E-13 + cair*3.54E-33 {&1628}
#ENDREPLACE