YAMCHA is a python-based box model. Available on GitHub: YAMCHA.
Th model solves the initial value problem defined by a (complex) chemical system, using an ordinary differential solver (ODE), with a major focus on chemistry in the atmosphere. Can handle very stiff ODE problems. Derivatives and Jacobian Matrix are automatically generated by the parser, so quite user-friendly.
Support Kinetic PreProcessor (KPP) format generated from the MCM website. Alternatively, users can manually edit or create mechanisms too. Evaluated with FACSIMILE and my old IGOR-based model. Ideal for chamber, flow tube/reactor studies and well-defined ambient problems.
This model and its predecessor has been used in a number of peer-reviewed publications.
This tutorial is designed to help you get familiar with this python-based box model. It also covers a few fundamental topics in atmospheric chemistry.
This tutorial looks better on big screens (desktop/laptop, maybe tablet too, but may look messy on cellphones).
I blah a lot. But each chapter takes about 15-20min. If you don't have time for all these, I strongly suggest you go thru Chapters 1 and 2 at least.
P.s. This Python-based model is loosely based on my old IGOR-based box model, iChamber. Note the Igor-based box model and its tutorial are no longer developped or maintained.
Chapter 1. Get started! Simple nighttime NOx chemistry
Chapter 2. Let there be light! VOC-NOx photochemistry
Chapter 3. Chamber experiments
Chapter 4. Spherical chicken in vacuum: when pollution meets forest air
Chapter 5. N2O5-ClNO2: heterogeneous chemistry & Cl oxidation
Chapter 6. Ozone isopleth: EKMA plot
Chapter 7. Simple sulfur chemistry: phase-transfer & aqueous chemistry
Chapter 8. Condensational growth of aerosols
Chapter 9. SOA formation from toluene
Chapter 10. Vertical diffusion
Chapter 11. Diffusion and Chesmitry: 1-D Photochemical Model
In each Chapter, all functions/procedures are packed into one Jupyter Notebook. If you're familiar with Python, this may look very cumbersome to you, since those functions that are used repeatedly so probably can be packed into packages and loaded when needed. Since not everyone is that familar with Python, packing everything together increases the transparency and is easier for folks who are new to Python. So please bear with me.
Every model has it's own learning curve, and so is mine. But I hope all the efforts I have put into this thing over the past years made the curve less steep (the first successful attempt of this model was in 2011-2012). If you work regularly with MCM, it should take no more than a few minutes to load the mechanism and set up the model! If you work with other mechanisms, you probably have to figure out a way to load the mechanism into the model, and if you have questions please feel free to contact me.
Colab hosts Jupyter Notebooks that provides free access to computing resources, including GPUs. No setup is needed. Many commonly used Python libraries are already installed.
You can run this box model in a browser tab, as long as you have a free Google account and an internet connection.
YAMCHA is mostly developped and tested in Google Colab.
~ Publications using my 0-D Box Model ~
Y. Wang et al. (2023) J Phys Chem A. Link
DeMarsh et al. (2023) Applied Geochem. Link
Zhang et al. (2022) Chem. Link
Clifton et al. (2022) J. Adv. Model. Earth Syst. Link
S.-Y. Wang (2020). Chapter 6 in Chemistry in the Cryosphere. Link
McNamara et al. (2020) ACS Earth Space Chem. Link
H. Wang et al. (2020) J. Geophys. Res. - Atmos. Link
S.-Y. Wang et al. (2019) Proc. Natl. Acad. Sci. U.S.A. Link
S.-Y. Wang et al. (2019) Geophys. Res. Lett. Link
S.-Y. Wang and Pratt. (2017) J. Geophys. Res. - Atmos. Link
S.-Y. Wang et al. (2015) Proc. Natl. Acad. Sci. U.S.A. Link
T. Koenig et al. (2016) Atmos. Chem. Phys. Link
S. Coburn et al. (2016) Atmos. Chem. Phys. Link
B. Dix et al. (2013) Proc. Natl. Acad. Sci. U.S.A. Link
S.-Y. Wang et al. (2013) J. Geophys. Res. - Atmos. Link
~ Publications using the 1-D Model ~
~ Other application ~
S.-Y. Wang et al., AGU 2012. AGU Outstanding Student Paper Award
Demo: chamber study of OH oxidation of isoprene under high NOx condition (Paulot et al Atmos. Chem. Phys. 2009).
Multiple chemical mechanisms are tested using the box-model, including MCM v3.3.1, MOZART T1 (Emmons et al., 2020), and an updated T1 with new BVOCs chemistry (Schwantes et al. 2020)
Demo: chamber study of OH oxidation of isoprene under low NOx condition (Paulot et al. Science 2009).
Modeled using MCM v.3.3.1.
Chemical evolution of ambient forest air (isoprene, monoterpenes, aromatics) after 8 days, modeled using MCM v3.3.1. Initial condition: Hunter et al. Nature Geoscience 2017.
Each bubble is one chemical compound. Size represents concentration on a carbon basis (μgC/m3), color-coded by chemical lifetime.
Special application: 1-D photochemical model, with size-dependent aerosols (moving-bin) and secondary organic aerosol formation (kinetic gas-particle partitioning of semi-volatile organics).