Code structure
MPTRAC is a Lagrangian particle transport model implemented in C. This page is a guide to the main source files and interfaces, rather than a replacement for the Doxygen API reference.
Core library and data
src/mptrac.hdeclares the public API, constants, and data structures.src/mptrac.cimplements the core library routines.ctl_tholds simulation control parameters;atm_tdescribes the particle state;met_tstores meteorological fields;clim_tcontains climatological data; andcache_tholds runtime and interpolation caches.
Main workflow
The trac.c
application is the main trajectory driver. The
high-level interface describes the
mptrac_* entry points for allocation, initialization, input,
meteorological access, timestep execution, output, and cleanup.
A typical simulation reads its configuration, climatology, initial particles, and meteorological fields; advances the particles through the selected transport and physical processes; and writes the requested outputs. Optional processes include diffusion, convection, sedimentation, chemistry, deposition, and mixing.
Tools and utilities
Standalone applications include atm_init, atm_split,
atm_select, and atm_stat for particle data, plus met_map,
met_prof, and met_zm for meteorological diagnostics.
For end-to-end usage, see the User manual.
Parallel execution
MPTRAC supports independent MPI simulations and spatial domain decomposition, with OpenMP CPU threading and optional OpenACC GPU offloading. The Parallelization chapter documents the supported modes and domain-decomposition exchange paths.