Skip to content

Applications and workflows

Applications

The MPTRAC model comes with a number of individual programs or applications. The most important app of MPTRAC is the tool trac, which is used to conduct the trajectory calculations. The tables below give an overview of the available apps and tools by application field.

All apps and tools accept -h and --help to print a short command-line help message.

The apps met_map, met_prof, and met_zm can be used to extract global maps, vertical profiles, and zonal means from meteorological data. The app met_sample can be used to sample the meteo data at individual locations in space and time. The app met_lapse calculates lapse-rate statistics, and met_check_dt checks model time-step constraints for a given meteorological data file.

Trajectory calculations

App Purpose
trac Run forward or backward trajectory calculations.

Atmospheric particle data

App Purpose
atm_init Create atmospheric particle files with initial trajectory seeds.
atm_split Split particle sets into larger sets while retaining total mass.
atm_select Extract subsets of atmospheric particle data, such as individual trajectories.
atm_stat Calculate statistics for atmospheric particle data.
atm_dist Calculate transport deviations between trajectory sets.
atm_conv Convert atmospheric particle data between supported file formats.
atm2grid Convert atmospheric particle data to gridded output.

Meteorological data

App Purpose
met_conv Convert meteorological data between supported file formats.
met_check_dt Check model time-step constraints for meteorological data.
met_lapse Calculate lapse-rate statistics from meteorological data.
met_map Extract maps from meteorological data.
met_prof Extract vertical profiles from meteorological data.
met_sample Sample meteorological data at atmospheric particle locations.
met_spec Perform spectral analysis of meteorological temperature fields.
met_subgrid Calculate subgrid-scale wind and vertical velocity statistics.
met_zm Extract zonal means from meteorological data.
cape Add CAPE data to meteorological netCDF files.
sedi Calculate sedimentation velocities for aerosol or cloud particles.
tnat Calculate polar stratospheric cloud formation temperatures.
wind Create synthetic meteorological wind fields for test cases.

Tropopause data

App Purpose
tropo Create tropopause data sets from meteorological data.
tropo_clim Calculate climatological statistics from tropopause data.
tropo_sample Sample tropopause data at atmospheric particle locations.
tropo_zm Extract zonal means from tropopause data.

Time conversion

App Purpose
day2doy Convert a calendar date to day of year.
doy2day Convert day of year to a calendar date.
jsec2time Convert MPTRAC seconds since 2000-01-01, 00:00 UTC to UTC time.
time2jsec Convert UTC time to MPTRAC seconds since 2000-01-01, 00:00 UTC.

Please see the list of files in the Doxygen manual for the source-code reference of all apps and tools.

Workflows

The individual apps can be connected to more comprehensive simulation workflows by means of bash scripts.

This is an example showing how atm_init and atm_split are used to initialize a simulation, and trac is used to calculate the trajectories:

#! /bin/bash

# Setup...
trac=../src

# Create directories...
mkdir -p data plots

# Set time range of simulations...
t0=$($trac/time2jsec 2011 6 5 0 0 0 0)
t1=$($trac/time2jsec 2011 6 8 0 0 0 0)

# Set initial air parcel positions...
$trac/atm_init trac.ctl data/atm_init.tab \
               INIT_T0 $t0 INIT_T1 $t0 \
               INIT_Z0 10.0 INIT_Z1 10.0 \
               INIT_LON0 -72.117 INIT_LON1 -72.117 \
               INIT_LAT0 -40.59 INIT_LAT1 -40.59

# Split air parcels...
$trac/atm_split trac.ctl data/atm_init.tab data/atm_split.tab \
                SPLIT_N 10000 SPLIT_M 1e9 SPLIT_DX 30.0 SPLIT_DZ 1.0

# Calculate trajectories...
echo "data" > data/dirlist
$trac/trac data/dirlist trac.ctl atm_split.tab \
           ATM_BASENAME atm GRID_BASENAME grid

Please see the page on control parameters for more information.