tecio.TecplotZoneReader#

class tecio.TecplotZoneReader(zone_index, title, zone_type, solution_time, strand_id, datapacking)#

Bases: ABC

Read-only handle to one zone’s metadata in an open Tecplot file.

This is the common base for TecplotOrderedZoneReader and TecplotFEZoneReader. Only properties that mean the same thing for every zone topology live here, dimensions, node maps, and everything else that’s specific to one topology live on the corresponding subclass instead, so accessing e.g. .node_map on an ordered zone is a plain AttributeError rather than a silent None.

Scalar metadata (title, zone type, solution time, strand ID, datapacking) is resolved once at construction and frozen. The variable list and aux data stay lazily loaded on first access, since either can be large enough that eagerly building them for every zone in a file would be wasteful.

Parameters:
  • zone_index – 0-based zone index within the dataset.

  • title – Zone title.

  • zone_type – The zone’s ZoneType.

  • solution_time – Solution time, 0.0 for static data.

  • strand_id – Strand ID, 0 for static data.

  • datapacking – On-disk value layout. SZL and every PLT version from v107 onward always supply BLOCK, those formats have no packing distinction on disk; the field exists purely so code can treat every zone uniformly regardless of source format. The legacy PLT v75 format is the one exception: it genuinely stores some zones interleaved by node/element (POINT/FEPOINT), reported here as POINT.

Attributes

auxdata

Zone-level auxiliary data.

datapacking

On-disk value layout for this zone.

solution_time

Solution time, 0.0 for static data.

strand_id

Strand ID, 0 for static data.

title

Zone title string.

variables

Variables in this zone, by 0-based index or exact name.

zone_index

0-based zone index within the dataset.

zone_type

The zone's ZoneType.

Methods

get_array(key)

Return variable data array(s) for this zone.

is_enabled()

True unless the zone reports itself disabled.

property auxdata#

Zone-level auxiliary data.

property datapacking#

On-disk value layout for this zone.

get_array(key)[source]#

Return variable data array(s) for this zone.

A single key (0-based index or exact name) returns one array. A list of exact names returns a tuple of arrays in the order given:

p = zone.get_array("p")
x, y, z = zone.get_array(["x", "y", "z"])
Returns:

One array (or None only if the variable is passive) for a scalar key; a tuple of such arrays for a list of names.

Raises:
is_enabled()[source]#

True unless the zone reports itself disabled.

Only SZL can report False here; PLT and DAT have no such flag.

Returns:

bool –

True whenever called in the base class. SZL may report False,

but all other file formats will report True.

property solution_time#

Solution time, 0.0 for static data.

property strand_id#

Strand ID, 0 for static data.

property title#

Zone title string.

property variables#

Variables in this zone, by 0-based index or exact name.

property zone_index#

0-based zone index within the dataset.

property zone_type#

The zone’s ZoneType.