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:
Copy the command above into a new cell and run it.
Click on example below to see code.
Copy the code from the example into a new cell and run it.
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.