tecio.TecplotSzlReader#

class tecio.TecplotSzlReader(file_name)#

Bases: TecplotReader

Reader for Tecplot .szplt files.

Keeps a live C file handle for the reader’s lifetime. Zones are constructed, and their scalar metadata resolved, on first access to zone, not at open time, so opening a file with many zones stays cheap if the caller only wants dataset-level information.

Parameters:

file_name – Path to the .szplt file.

Raises:

FileNotFoundError – If file_name does not exist.

Attributes

auxdata

Dataset-level auxiliary data.

file_type

File type enum (FULL, GRID, or SOLUTION).

num_auxdata_items

Number of dataset-level auxiliary data items.

num_vars

Number of variables in the dataset.

num_zones

Number of zones in the file.

path

Source file path.

title

Dataset title string.

var_auxdata

Per-variable auxiliary data, 0-based.

variables

Ordered list of variable name strings.

zones

Zones in this file, by 0-based index or slice.

Methods

close()

Close the file reader handle.

get_var_auxdata(var_index)

Return auxiliary data for variable var_index.

get_zone_auxdata(zone_index)

Return auxiliary data for zone zone_index.

property auxdata#

Dataset-level auxiliary data.

close()[source]#

Close the file reader handle.

property file_type#

File type enum (FULL, GRID, or SOLUTION).

property num_vars#

Number of variables in the dataset.

Queried directly. Cheaper than the base class’s default of len(self.variables), which would need zone built first.

property num_zones#

Number of zones in the file.

Queried directly. Cheaper than the base class’s default of len(self.zones), which would build every zone’s metadata.

property path#

Source file path.

property title#

Dataset title string.

property variables#

Ordered list of variable name strings.

Variable names are dataset-global in SZL, so this queries them directly rather than through any zone’s variable list.

property zones#

Zones in this file, by 0-based index or slice.