Model output data
MPTRAC currently supports ten different types of model output: particle output, grid output, mass budget output, radionuclide deposition output, CSI output, ensemble output, profile output, sample output, station output, and VTK output. By default, these output functions generate data in ASCII table format, which is human-readable and compatible with various data analysis and visualization tools. This format is ideal for quick inspection and post-processing, making it accessible for a wide range of users.
However, for large-scale simulations or when handling extensive datasets, the ASCII format may become inefficient. To address this, MPTRAC offers the option to perform file I/O in more efficient formats such as binary or netCDF. These formats are particularly useful for managing large volumes of data, and they enable smoother integration with other tools and models, such as the CLaMS model for atmospheric studies.
Additionally, MPTRAC provides the capability to pipe output data directly to visualization tools, such as the graphing utility Gnuplot, for real-time analysis and visualization. This flexibility allows users to tailor the output format to the needs of their simulation and analysis, improving both performance and usability.
Particle data
The most comprehensive output of MPTRAC is the particle data output. Particle data output files can be generated at user-defined time intervals, which need to be integer multiples of the model time step. The particle data output files are the most comprehensive type of output because they contain the time, location, and the values of all user-defined quantities of each individual air parcel.
The air parcel output is configured using the ATM_* control
parameters. The air parcel output file is set with the parameters
ATM_TYPE and ATM_TYPE_OUT, where ATM_TYPE defines the file
format for reading and ATM_TYPE_OUT defines the writing file
format. However, if ATM_TYPE_OUT is not explicitly set in the
control file, ATM_TYPE sets the file format for reading and writing.
The default MPTRAC output filename pattern for time-resolved particle
output is <ATM_BASENAME>_YYYY_MM_DD_HH_MM_SS.<ext>, i.e. output file
names include seconds explicitly.
Particle files contain times, positions, and configured quantities, including ensemble and particle IDs when configured. They are particle-state output, not complete numerical checkpoints: persistent turbulent velocities, random generator state, internal timestep and output scheduling state, ground deposition inventories, and other diagnostic history are not all stored. Continuing from a particle file therefore need not reproduce an uninterrupted simulation exactly, especially with stochastic or history-dependent processes.
If configured, aoa is a reference-contact timestamp in the same time
coordinate as the particle time (seconds since 2000-01-01 00:00 UTC).
Its output unit is seconds; elapsed age is particle observation time minus
aoa. Grid and ensemble means of aoa remain mean timestamps, rather than
elapsed ages; their standard deviations are spreads in seconds.
For ASCII particle data, the second column contains the log-pressure altitude
where \(p\) is pressure, \(H_0 = 7.0\,\mathrm{km}\) is a fixed scale height, and \(P_0 = 1013.25\,\mathrm{hPa}\) is a fixed reference pressure. Conversely, ASCII input is converted to the internal pressure coordinate using \(p = P_0 \exp(-z / H_0)\). This log-pressure altitude is derived from pressure and is not a geometric or geopotential height. Binary and netCDF particle files store pressure directly.
| ATM_TYPE | output format |
|---|---|
| 0 | ASCII (default) |
| 1 | binary |
| 2 | netcdf |
| 3 | netcdf (CLaMS: trajectory and position file) |
| 4 | netcdf (CLaMS: position file) |
CLaMS position and trajectory output require the configured zeta_d quantity
for the diagnosed ZETA coordinate, including the final initialization file.
Diabatic trajectory output additionally requires zeta. MPTRAC reports an
error if a required quantity is absent.
The one-dimensional time coordinate in a CLaMS trajectory file and its
final initialization file gives the common output snapshot time. Particle
release times are not represented by that coordinate.
Gridded data
To manage the potentially large size of particle output — especially when simulating many air parcels — MPTRAC supports gridded output as an efficient alternative for analysis. This output is generated by integrating the mass of all particles within a regular grid defined by longitude × latitude × log-pressure height.
From the total mass in each grid cell and the corresponding air density, the column density and volume mixing ratio of the tracer are computed. If each particle is already assigned a volume mixing ratio, the system instead calculates and reports the mean volume mixing ratio per grid cell.
For more targeted analyses, users can limit output to a single
vertical layer to obtain total column values, or to a specific
longitude band to compute zonal means. The grid output is configured
using the GRID_* control parameters. Gridded data can be written in
either ASCII or netCDF format, depending on the setting of the
GRID_TYPE parameter. Time-resolved grid output files follow the
pattern <GRID_BASENAME>_YYYY_MM_DD_HH_MM_SS.<ext>.
Geographic rectangular output grids (GRID_*, CSI_*, and PROF_*) use
longitudes from -180° to 180°; a global grid may span the full range.
Regional grids crossing the dateline are not supported by these bounds.
This restriction does not change the longitude convention of meteorological
input grids or domain decomposition.
With GRID_KERNEL, reported quantity means and standard deviations use
kernel weights normalized by their sum in each cell. The particle count
remains unweighted, while column density uses the weighted mass sum.
Cells with no positive total kernel weight have undefined quantity statistics.
Kernels describe relative vertical sensitivity: input weights are scaled to
max(K)=1, linearly interpolated between tabulated heights, and held at the
nearest endpoint value outside that range. Uniform positive rescaling of the
input kernel cancels in the normalization. Rescaling the internal weights
would leave weighted means and population standard deviations unchanged, but
would scale weighted mass sums, column densities, and implicit VMR. Their
values therefore depend on the normalized kernel shape and amplitude, not
the absolute scale of the supplied weights. Such column densities do not by
themselves represent an absolutely calibrated instrument response. The same normalized
amplitude affects kernel-weighted Sample VMR and CSI forecasts.
GRID_SPARSE=1 writes only ASCII cells with positive implicit mass-derived
VMR; it does not mean all cells containing particles. A populated cell with
zero mass, or with other quantities but no positive implicit VMR, is omitted.
Without meteorological data, implicit VMR may be unavailable, so standalone
atm2grid can omit populated cells in sparse ASCII output. NetCDF grid output
does not apply this sparse filter.
| GRID_TYPE | output format |
|---|---|
| 0 | ASCII (default) |
| 1 | netcdf |
Mass budget data
The mass budget output provides a compact time series of the tracer mass in
the active air parcels and the cumulative mass losses tracked by the chemistry,
deposition, and decay modules. It is enabled with BUDGET_BASENAME;
BUDGET_DT_OUT controls the output interval in seconds and defaults to 86400.
All time steps are appended to <BUDGET_BASENAME>.tab. The output requires the
particle quantity m.
Each row contains time, ensemble ID, number of active air parcels, total mass,
the six optional mloss_* sums, total tracked mass loss, and accounted mass.
Unavailable mloss_* quantities are written as NaN; total tracked mass loss
sums the loss quantities that are available. Accounted mass is the sum of the
current mass and total tracked mass loss. With NENS > 0, the file contains an
additional row for each ensemble; ensemble ID -999 denotes the total over all
active air parcels. Domain-decomposed runs write the local budget of each
subdomain. Global budgets can be obtained by summing the corresponding columns
across subdomain files.
Radionuclide deposition data
The radionuclide deposition output contains cumulative ground inventories for
Pb-210, Be-7, Cs-137, and aerosol-bound I-131. Values are activity densities
in Bq m\(^{-2}\) at the output validity time. When RADIO_DECAY=1, both airborne
and deposited activities use the same radionuclide half-lives. The horizontal
grid is defined by the GRID_* parameters; it has no vertical dimension.
Output is enabled with DEPO_BASENAME and written every DEPO_DT_OUT seconds
and additionally at T_STOP. Files follow the pattern
<DEPO_BASENAME>_YYYY_MM_DD_HH_MM_SS.<ext>.
| DEPO_TYPE | Output format | Extension |
|---|---|---|
| 0 | ASCII | .tab |
| 1 | netCDF | .nc |
ASCII files contain time, longitude, latitude, grid-cell area, and the four
activity-density fields. Blank lines separate longitude scans so that the
tables can be plotted directly with gnuplot pm3d.
| Column | Content | Unit |
|---|---|---|
| 1 | Time | s since 2000-01-01 00:00 UTC |
| 2 | Longitude | degree east |
| 3 | Latitude | degree north |
| 4 | Grid-cell area | m\(^2\) |
| 5 | Deposited Pb-210 | Bq m\(^{-2}\) |
| 6 | Deposited Be-7 | Bq m\(^{-2}\) |
| 7 | Deposited Cs-137 | Bq m\(^{-2}\) |
| 8 | Deposited aerosol-bound I-131 | Bq m\(^{-2}\) |
NetCDF files use dimensions time, lat, and lon. The activity variables
are depo_pb210, depo_be7, depo_cs137, and depo_i131; area contains
the latitude-dependent cell area. GRID_NC_LEVEL selects netCDF compression.
Deposited inventories are not stored in atmospheric restart files. After a restart, deposition output begins again from zero and represents only activity deposited during the restarted segment.
CSI data
Another type of output that we used in several studies (Hoffmann et
al., 2016; Heng et al., 2016) is the critical success index (CSI)
output. This output is produced by analyzing model and observational
data on a regular grid. The analysis is based on a 2×2 contingency
table of model predictions and observations. Here, predictions and
observations are counted as yes, if the model column density or the
observed variable exceed user-defined thresholds. Otherwise, they
would be counted as no. Next to the CSI, the counts allow us to
calculate the probability of detection (POD) and the false alarm rate
(FAR), which are additional skill scores that are often considered in
model verification. More recently, the CSI output was extended to also
include the equitable threat score (ETS), the linear and rank-order
correlation coefficients, the bias, the root mean square (RMS)
difference, and the mean absolute error. A more detailed discussion of
the skill scores is provided by Wilks (2011). The CSI output is
configured using the CSI_* control parameters.
CSI_DT_OUT selects independent verification snapshots. Each row compares
observations in the half-open window centered on that output time with the
particle state at that model time. CSI statistics do not accumulate between
outputs: observations assigned to non-output steps do not contribute to later
rows. The sampled observations therefore depend on both DT_MOD and
CSI_DT_OUT. The evaluation at T_STOP uses only its own window, not all
observations since the previous output; a window without retained verification
points produces no row. CSI, profile, and sample observations use the same
half-open window convention. When the final model step is shorter than
DT_MOD, its window and the preceding window meet at their time midpoint,
so an observation belongs to only one step.
Station matching uses the same time windows; its stat particle flag also
prevents repeat station records.
Ensemble data
Another option to condense comprehensive particle data is provided by
means of the ensemble output. This type of output requires a
user-defined specific ensemble index value to be assigned to each air
parcel. Instead of the individual air parcel data, the ensemble output
will contain the mean positions as well as the means and standard
deviations of the quantities selected for output for each set of air
parcels having the same ensemble index. The ensemble output if of
interest, if tracer dispersion from multiple point sources needs to be
quantified by means of a single model run, for instance. The ensemble
output is configured using the ENS_* control parameters. Time-resolved
ensemble output files follow the pattern
<ENS_BASENAME>_YYYY_MM_DD_HH_MM_SS.tab.
Profile data
The profile output of MPTRAC is similar to the grid output as it
creates vertical profiles from the model data on a regular
longitude × latitude horizontal grid. However, the vertical profiles
contain not only volume mixing ratios of the species of interest but
also profiles of pressure, temperature, water vapor, and ozone as
inferred from the meteorological input data. This output is compiled
with the intention to be used as input for a radiative transfer model,
in order to simulate satellite observations for the given model
output. In combination with real satellite observations, this output
can be used for model validation but also as a basis for radiance data
assimilation. The profile output is configured using the PROF_*
control parameters.
Sample data
The sample output of MPTRAC was implemented most recently. It allows
the user to extract model information on a list of given locations and
times, by calculating the column density and volume mixing ratio of
all parcels located within a user-specified horizontal search radius
and vertical height range. For large numbers of sampling locations and
air parcels, this type of output can become rather time-consuming. It
requires an efficient implementation and parallelization because it
needs to be tested at each time step of the model whether an air
parcel is located within a sampling volume or not. The numerical
effort scales linearly with both the number of air parcels and the
number of sampling volumes. The sample output was first applied in the
study of Cai et al. (2021) to sample MPTRAC data directly on
TROPOspheric Monitoring Instrument (TROPOMI) satellite
observations. The sample output is configured using the SAMPLE_*
control parameters.
For positive SAMPLE_DZ, this parameter is the vertical half-width in
kilometres around the observation's log-pressure altitude. The output file's
sixth column retains this half-width. Particle mass within the resulting
layer and the SAMPLE_DX horizontal radius gives column density in kg m⁻².
The VMR divides that column density by the atmospheric air-column mass between
the layer's pressure boundaries, clipped to local surface pressure and the
meteorological model top, and multiplies by the air-to-tracer molar-mass
ratio. This also handles layers intersecting the surface or model top.
SAMPLE_KERNEL weights tracer mass but does not change the air-column
normalization. For SAMPLE_DZ <= 0, vertical filtering is disabled and the
sample VMR is undefined (NaN).
Station data
Finally, the station output is collecting the data of air parcels that
are located within a search radius around a given location (latitude,
longitude). The vertical position is not considered here; i.e., the
information of all air parcels within the vertical column over the
station is collected. In order to avoid double counting of air parcels
over multiple time steps, the quantity STAT has been introduced that
keeps track on whether an air parcel has already been accounted for in
the station output or not. We used this type of output in studies
estimating volcanic emissions from satellite observations using the
backward-trajectory method (Hoffmann et al., 2016; Wu et al., 2017,
2018). The station output is configured using the STAT_* control
parameters.
VTK data
MPTRAC also supports outputting air parcel data in VTK (Visualization
Toolkit) format, which is commonly used for visualizing and analyzing
simulation results in 3D. The VTK output provides detailed information
about the positions and properties of air parcels at each user-defined
time step. The VTK output can be enabled by specifying the appropriate
parameters in the control file. This output includes the time,
location (longitude, latitude, and altitude), and other properties of
each air parcel, allowing for advanced visualization and
post-processing. The frequency of output is controlled by user-defined
time intervals, which must be integer multiples of the model's time
step. The VTK output is configured using the VTK_* control
parameters. Please see projects/paraview/README.md for further
instructions and examples on how to create VTK output.