KPP directory structure

The KPP distribution will unfold a directory $KPP_HOME with the following subdirectories:

src/

Contains the KPP source code files:

KPP source code files

File

Description

kpp.c

Main program

code.c

generic code generation functions

code.h

Header file

code_c.c

Generation of C code

code_f90.c

Generation of F90 code

code_matlab.c

Generation of Matlab code

debug.c

Debugging output

gdata.h

Header file

gdef.h

Header file

gen.c

Generic code generation functions

lex.yy.c

Flex generated file

scan.h

Input for Flex and Bison

scan.l

Input for Flex

scan.y

Input for Bison

scanner.c

Evaluate parsed input

scanutil.c

Evaluate parsed input

y.tab.c

Bison generated file

y.tab.h

Bison generated header file

bin/

Contains the KPP executable. This directory should be added to the PATH environment variable.

util/

Contains different function templates useful for the simulation. Each template file has a suffix that matches the appropriate target language (Fortran90, C, or Matlab). KPP will run the template files through the substitution preprocessor (cf. List of symbols replaced by the substitution preprocessor). The user can define their own auxiliary functions by inserting them into the files.

models/

Contains the description of the chemical models. Users can define their own models by placing the model description files in this directory. The KPP distribution contains several models from atmospheric chemistry which can be used as templates for model definitions.

drv/

Contains driver templates for chemical simulations. Each driver has a suffix that matches the appropriate target language (Fortran90, C, or Matlab). KPP will run the appropriate driver through the substitution preprocessor (cf. List of symbols replaced by the substitution preprocessor). Users can also define their own driver templates here.

int/

Contains numerical solvers (integrators). The #INTEGRATOR command will force KPP to look into this directory for a definition file with suffix .def. This file selects the numerical solver etc. Each integrator template is found in a file that ends with the appropriate suffix (.f90, .c, or .m). The selected template is processed by the substitution preprocessor (cf. List of symbols replaced by the substitution preprocessor). Users can define their own numerical integration routines in the user_contributed subdirectory.

examples/

Contains several model description examples (.kpp files) which can be used as templates for building simulations with KPP.

site-lisp/

Contains the file kpp.el which provides a KPP mode for emacs with color highlighting.

ci-tests/

Contains directories defining several Continuous integration tests.

.ci-pipelines/

Hidden directory containing a YAML file with settings for automatically running the continuous integration tests on Azure DevOps Pipelines

Also contains bash scripts (ending in .sh) for running the continuous integration tests either automatically in Azure Dev Pipelines, or manually from the command line. For more information, please see Continuous integration tests.

.github/workflows

Contains configuration files for GitHub Actions that will run automatically when commits are pushed or when pull requests are opened.