Skip to content

Massive-Parallel Trajectory Calculations (MPTRAC) is a Lagrangian particle dispersion model for the analysis of atmospheric transport processes in the free troposphere and stratosphere.



Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

Massive-Parallel Trajectory Calculations

Massive-Parallel Trajectory Calculations (MPTRAC) is a Lagrangian particle dispersion model for the analysis of atmospheric transport processes in the free troposphere and stratosphere.


release (latest by date) commits since latest release (by SemVer) last commit code size in bytes top language codacy codecov tests mkdocs doxygen license doi


  • MPTRAC calculates air parcel trajectories by solving the kinematic equation of motion using given horizontal wind and vertical velocity fields.
  • Mesoscale diffusion and sub-grid scale wind fluctuations are simulated using the Langevin equation to add stochastic perturbations to the trajectories.
  • Additional modules are implemented to simulate convection, sedimentation, exponential decay, gas and aqueous phase chemistry, wet and dry deposition.
  • Meteo data pre-processing code to calculate boundary layer, convective available potential energy, geopotential heights, potential vorticity, and tropopause data.
  • Various output methods for particle, ensemble, gridded, sample, and station data. Gnuplot interface for direct visualization.
  • MPI-OpenMP-OpenACC hybrid parallelization for efficient use from single workstations to HPC and GPU systems.
  • Distributed open source under the terms and conditions of the GNU GPL.

Getting started


This README file describes the installation of MPTRAC on a Linux system.

The following software dependencies are mandatory:

Optionally, the following software is required to enable further capabilities of MPTRAC:

Some of the software is provided along with the MPTRAC repository, please see next section.


Start by downloading the MPTRAC source code from the git repository:

git clone

To update an existing installation, please use:

git pull

Several libraries provided along with MPTRAC can be compiled and installed by running the build script:

cd mptrac/libs

Next, change to the source directory and edit the Makefile according to your needs.

cd mptrac/src
emacs Makefile

In particular, you might want to check:

  • Edit the LIBDIR and INCDIR paths to point to the directories where the GSL and netCDF libraries are located on your system.

  • By default, the MPTRAC binaries will be linked statically, i.e., they can be copied and used on other machines. However, sometimes static compilations causes problems, e.g., in combination with dynamically compiled GSL and netCDF libraries or when using MPI and OpenACC. In this case, disable the STATIC flag and remember to set the LD_LIBRARY_PATH to include the libraries.

  • To make use of the MPI parallelization of MPTRAC, the MPI flag needs to be enabled. Further steps will require an MPI library such as OpenMPI to be available. To make use of the OpenACC parallelization, the GPU flag needs to be enabled. The NVIDIA HPC SDK is required to compile the GPU code. The OpenMP parallelization of MPTRAC is always enabled.

Next, try to compile the code:


To run the test cases to check the installation, please use:

make check

Run the example

A simple example is provided, illustrating how to simulate the dispersion of volcanic ash from the eruption of the Puyehue-Cordón Caulle volcano, Chile, in June 2011.

The example can be found in the project directory. The project directory can also be used to store results of other simulation and experiments with MPTRAC. The simulation is controlled by a shell script:

cd mptrac/projects/example

Please see the script on how to invoke MPTRAC programs such as atm_init and atm_split to initialize trajectory seeds and trac to calculate the trajectories.

The script generates a number of plots of the simulation output at different time steps after the eruption by means of the gnuplot graphing tool. These plots should look similar to the output already provided in the repository.

This is an example showing the particle position and grid output on 6th and 8th of June 2011:

Further information

More detailed information for users and developers is provided in the user manual and the doxygen manual.

These are the main references for citing the MPTRAC model in scientific publications:

  • Hoffmann, L., Baumeister, P. F., Cai, Z., Clemens, J., Griessbach, S., Günther, G., Heng, Y., Liu, M., Haghighi Mood, K., Stein, O., Thomas, N., Vogel, B., Wu, X., and Zou, L.: Massive-Parallel Trajectory Calculations version 2.2 (MPTRAC-2.2): Lagrangian transport simulations on graphics processing units (GPUs), Geosci. Model Dev., 15, 2731–2762,, 2022.

  • Hoffmann, L., T. Rößler, S. Griessbach, Y. Heng, and O. Stein, Lagrangian transport simulations of volcanic sulfur dioxide emissions: Impact of meteorological data products, J. Geophys. Res. Atmos., 121, 4651-4673,, 2016.

  • You can cite the source code of MPTRAC by using the DOI This DOI represents all versions, and will always resolve to the latest one. Specific DOIs for each release of MPTRAC can be found on the Zenodo web site.

Please see the citation file for further information.


We are interested in sharing MPTRAC for operational and research applications. Please do not hesitate to contact us, if you have any further questions or need support.


MPTRAC is distributed under the GNU General Public License v3.0.


Dr. Lars Hoffmann

Jülich Supercomputing Centre, Forschungszentrum Jülich