tecio.cli.tecmerge#
Merge zones from multiple Tecplot data files into a single output file.
Post-processing workflows commonly produce results distributed across multiple files.
tecmerge collects all zones from an arbitrary number of input files into a single
output, reconciling variable lists across sources by taking their union and writing any
variable absent from a given source as passive. Input files may be specified explicitly
or via a quoted glob pattern and may be any mix of supported formats. When merging
time-step sequences, solution times and strand IDs can be assigned automatically from a
start time and either a fixed interval or an end time.
- Usage:
tecmerge [-h] --output PATH [--force] [--title STRING] [--assign-time-strands]
[-start VALUE] [-delta VALUE | -end VALUE] [-strand ID] FILE [FILE ...]
- Positional Arguments:
FILE [FILE ...]One or more input Tecplot files (
.plt,.szplt, or.dat). Glob patterns are expanded by the tool — quote the pattern to prevent premature shell expansion (e.g."step_*.szplt"). Files are merged in the order given or matched.
- Options:
-o PATH,--output PATHOutput file path. Required. The extension controls the output format:
.szplt,.plt, or.dat.-f,--forceOverwrite the output file if it already exists. Without this flag the command exits with an error rather than silently clobbering an existing file.
--title STRINGDataset title to write to the output file. Defaults to the title of the first input file.
--assign-time-strandsAssign evenly-spaced solution times and a strand ID to all zones, treating each input file as one time step. Requires
-startand either-deltaor-end.-start VALUESolution time of the first input file. Used with
--assign-time-strands.-delta VALUEConstant time increment between successive input files. Mutually exclusive with
-end.-end VALUESolution time of the last input file. The time step is computed as
(end - start) / (N - 1)whereNis the number of input files. Mutually exclusive with-delta.-strand INTStrand ID to assign to all zones when using
--assign-time-strands. Defaults to1.
- Returns:
A new Tecplot file written to the output path containing all zones from every input file. Variables absent from a source file are written as passive. Exit code is
0on success and non-zero if any input file cannot be read, the output file already exists and--forceis not set, or conflicting time-strand options are supplied.
Examples
Merge two files explicitly:
$ tecmerge part1.szplt part2.szplt -o combined.szplt
Merge a sequence matched by a glob pattern:
$ tecmerg "results_*.szplt" -o combined.szplt
Merge a time series and assign solution time metadata:
$ tecmerge --assign-time-strands -start 0.0 -delta 0.1 \\
"step_*.szplt" -o transient.szplt
Call directly from a Python session:
import tecio.cli.tecmerge.main as tecmerge
tecmerge(["part1.szplt", "part2.szplt", "--output", "combined.szplt"])
See also
tecio.cli.tecextract: Extract a zone/variable subset from a single file — the inverse of merging.tecio.cli.tecsplit: Split a file into separate grid and solution files.tecio.cli.tecslice: Extract planar slices from volumetric zone data.
Functions
|
Merge zones from multiple Tecplot files into one. |