Go to most recent revision | Blame | Last modification | View Log | Download | RSS feed
.TH tracal
.SH NAME
.B tracal - simple calculations with trajectory files
.SH SYNOPSIS
.B tracal
.I inpfile
.I outfile
.I expression
.SH DESCRIPTION
Simple calculation on the input trajectory file
.I inpfile
; the output is written to the output trajectory file
.I outfile
and the expression for the calculation is given in
.I expression.
.SH PARAMETERS
.TP 15
.I inpfile
input trajectory file
.TP 15
.I outfile
output trajectory file (can be the same as inpfile).
.TP 15
.I expression
arithmetic expression, e.g. 'DIFF=PS-p' to get difference between surface pressure (PS) and the pressure height of the trajectory (p). Note that the variable names must exactly match to the column names in the trajectory file.
The mathematical expression can contain previously defined variables, numbers (e.g., 1.5 or 1.5e-6), arithmetic operators (+, -, *, /, ^), and a number of mathematical functions (sin, cos, tan, sqrt, exp, log, ln, abs, ang, real, imag, conjg, complex). The expression can also use nested levels of parentheses for grouping. There are two predefined variables that are available to the user — the constant pi=3.14159265358979 and the imaginary unit i.
.SH EXAMPLES
.TP 5
.B [1] tracal inp out 'agl=z-zb'
caculates the difference between air parcel height (z) and surface height (zb). The result is saved in an new column (agl).
.SH AUTHOR
Written by Michael Sprenger and Heini Wernli (August 2012); the evaluation of the arithmetic expression is based on the string manipulation routines by 'Dr. George Benthien' (http://gbenthien.net/index.html).