pykpp Example Gallery¶

This gallery houses examples on how to use pykpp to do various analyses. This includes downloading and visualizing the data.

Some examples require some features of pykpp that are not required for minimal functionality. To install all the necessary libaries for any example, run the command below (use –user if not an admin):

python -m pip install --user https://github.com/barronh/pykpp/archive/main.zip

In notebooks (e.g., on Google Colab), this can be done live with the command below (may require kernel restart):

%pip install --user https://github.com/barronh/pykpp/archive/main.zip

To run an example in a notebook:

  1. Copy the command above into a new cell and run it.

  2. Click on example below to see code.

  3. Copy the code from the example into a new cell and run it.

Simple Chemistry Example

Simple Chemistry Example

Zombie Apocalypse

Zombie Apocalypse

Typical Summer Day¶

This example application is based on the Knote et al. (2015) simulation of a typical summer day with CB05. The example here uses the “Summer” PBL and temperature profile. At present, the example uses the a relatively “clean” initial environment (NOx(t=0) = 1ppb).

Where possible, the inputs are as described in the publication, but has been adapted for pykpp. The model uses initial conditions, temperature, PBL and deposition rates as described in the publications. The emissions were produced from the NEI using a similar process as described in the paper, but may be somewhat different.

Figures showing the inputs and outputs are distributed with the example and will be remade if you run the example (python summerclean.py). physical.pdf shows the input diurnal profiles of temperature, pressure, NOx emissions, and photolysis. chemical_ozone.pdf shows the output diurnal profiles of ozone, hydroxyl radical and hydroperoxy radical concentrations. chemical_nox.pdf shows the output diurnal profiles of NO, NO2 and the sum.

[1] Knote, C., Tuccella, P., Curci, G., Emmons, L., Orlando, J. J., Madronich, S., Baró, R., Jiménez-Guerrero, P., Luecken, D., Hogrefe, C., Forkel, R., Werhahn, J., Hirtl, M., Pérez, J. L., San José, R., Giordano, L., Brunner, D., Yahya, K., Zhang, Y., Influence of the choice of gas-phase mechanism on predictions of key gaseous pollutants during the AQMEII phase-2 intercomparison, Atmospheric Environment, Volume 115, August 2015, Pages 553-568, ISSN 1352-2310, http://dx.doi.org/10.1016/j.atmosenv.2014.11.066.

pykpp Tutorial

pykpp Tutorial

Download all examples in Python source code: auto_examples_python.zip

Download all examples in Jupyter notebooks: auto_examples_jupyter.zip

Gallery generated by Sphinx-Gallery

pykpp

Navigation

Table of Contents

  • pykpp User’s Guide
  • pykpp Example Gallery
    • Simple Chemistry Example
    • Zombie Apocalypse
    • Typical Summer Day
  • pykpp package

Related Topics

  • Documentation overview
    • Previous: pykpp User’s Guide
    • Next: Simple Chemistry Example

Quick search

©2023, Barron H. Henderson. | Powered by Sphinx 7.0.1 & Alabaster 0.7.16 | Page source