Loading Data

Tecplot Focus can load data from files on your local machine or accessible from a network file share using modules called loaders, each of which understands data in a particular format. A number of loaders are provided with Tecplot Focus for commonly-used CFD and general scientific and engineering formats as well as various Tecplot formats. See Loading Data Using a Loader.

Loading Data Using a Loader

Use the File→Load Data command to load a data file using the Load Data dialog, shown below.

load data files

Normally, this dialog works slightly differently on Windows and non-Windows platforms. The controls at the bottom of the dialog are different. For example, this is the lower portion of the dialog as seen on CentOS Linux.

load data files linux

On Windows, you can switch to this version of the Load Data dialog by choosing Options→Use Extended Load Data Dialog. Using this version of the dialog on Windows may be slower to navigate depending on your network; however, you may want to try it if you regularly load multiple data files from more than one directory.

On any platform, you may use the Load Data dialog to navigate to the file you wish to open, or simply type or paste the filename or the full pathname of the file in the File Name field.

If the file you are loading is a Tecplot-format file, you may also load it by simply dragging it from your file manager (e.g. Windows Explorer or Mac Finder) into the Tecplot Focus workspace, bypassing the Load Data dialog entirely. You can also load data files via the macro language; refer to $!READDATASET in the Scripting Guide for details.

The Files of Type menu below the file list allows you to choose a data loader corresponding to the format of data file that you wish to load, or you may select All Files to see all the files in the directory and have Tecplot Focus automatically choose a loader for you if possible. When you choose a loader, the file list changes to show only files that can be loaded by that loader.

If the name of the file you are trying to load has a non-standard extension, type the extension in the File Name field like "*.foo", then press Enter to show all files having this filename extension. You may also enter "*.*" to show all files regardless of their extension, or choose All Files from the Files of Type menu to have Tecplot Focus try to determine which loader is needed.
  • If the chosen loader needs only a single file, simply navigate to and select the file you want to load in the file list and click Open.

  • If the chosen loader supports or requires loading more than one file at once, or you are choosing from All Files or All Supported Files, you may select multiple files. On Windows (using the standard version of the Load Data dialog), you can choose additional files by holding down Control or Shift while clicking the second and subsequent files in the dialog, then clicking Open.

    On other platforms (or on Windows using the extended version of the Load Data dialog), the Add to List button becomes enabled. Select each file to be loaded and click Add to List to add it to the Additional Files list. You may choose files from more than one directory. You may also remove selected files from the list by clicking the Remove All or Remove Selected button. Click Open to open all the files using the loader you chose.

    When using All Files or All Supported Files, all of the files should be in the same format. If the loader for that format cannot load multiple files, you must load them individually, appending the second and subsequent files.

  • Some file formats are very flexible, so you may need to specify exactly how the data was written in order for Tecplot Focus to load it correctly. Some loaders always display an options dialog, since they are needed almost every time. Others only display an options dialog when you request it. On Windows (using the standard dialog), click the menu triangle next to the Open button and choose Open With Advanced Options instead of clicking Open after selecting your file(s). On non-Windows platforms (or when using the extended dialog on Windows), an Advanced Options checkbox becomes enabled and may be selected before clicking Open. The loader’s options dialog is then displayed before loading the selected file(s).

Available file formats include:

Loading by Position

In most CFD data formats, it is valid to have multiple variables with the same name. When loading such a file, Tecplot Focus warns you that this situation exists and offers to load the variables by position: each variable will be identified by the order in which it appears in the file rather than by its name. This may make some aspects of working with the data different or more complicated.

For example, when manipulating data using equations, you must use the V# syntax to refer to such duplicate variables, rather than the {VariableName} syntax, as the latter cannot uniquely identify the variable. (See Data Alteration through Equations.) Macros and Python scripts may also be affected.

When possible, we advise obtaining a data file with a unique and consistent name for each variable, for example by adjusting your solver’s configuration.

Appending or Replacing Data

You may append new data to your dataset at any time by choosing File→Load Data. You cannot append a grid file that contains only FE connectivity data without appending a solution file along with it. In addition, to append a solution file you must also append a grid file at the same time. In this case, the grid file must be loaded before the solution file.

Some loaders allow you to choose how you wish to append or replace data.

load data file warning complex

Depending on the circumstances, you may have the following choices:

Replace Data in Active Frame and Reset Style

The new data is loaded in place of the existing data. The plot styles are reset to their defaults, as if the new data was loaded immediately after starting up Tecplot Focus.

Replace Data in Active Frame and Retain Style

The new data is loaded in place of the existing data. The plot styles in effect for the existing data are applied to the new data as best as possible and in some cases some style settings may need to be turned off or reassigned. The configuration option $!COMPATIBILITY USENAMESFORVARIABLEASSIGNMENTS, when set to TRUE will make style settings match variable assignments based on the variable names, regardless of their position in the old and new datasets. If $!COMPATIBILITY USENAMESFORVARIABLEASSIGNMENTS is set to FALSE then the variable offsets from the old style assignments will be used with the new data regardless of the old and new variable names. This option works best when the incoming data is similar to the existing data.

Replace Data in All Shared Frames and Retain Style

This is the same as "Replace Data in Active Frame and Retain Style" except the same operations and rules are applied to all frames that share the same dataset with the active frame.

Append Data to All Shared Frames

The active dataset is shared among multiple frames. Choose this option to append the newly loaded data in all the frames. Default plot styles are used.

Append Data to Active Frame

Choose this option to append the newly loaded data in the current frame.

Replace

When loading a layout, replaces the existing layout with the new one.

Append

When loading a layout, creates new frames for the dataset referenced in the new layout.

Cancel

Do not load the data and return to the Tecplot Focus workspace.

Loading and Combining Variables from Multiple Files

In Tecplot Focus, you can load multiple data files in two different ways:

  • All at once by choosing all the files in the Load Data Files dialog.

  • By appending data to the data that has already been loaded.

The Variable Load and Combine dialog appears when loading multiple data files in certain formats, whether you load the files all at once or append new data to previously-loaded data, if the names of the variables in the data files do not match. The dialog allows you tell Tecplot Focus which variables (if any) have the same meanings across the files, as well as which variables should not be loaded at all.

variable load and combine

This feature works only with data in the following formats:

  • Tecplot - text (.dat), binary (.plt), and subzone (.szplt)

  • CGNS

  • EnSight

  • Excel

  • HDF and HDF5

  • Text (using the Text Spreadsheet or General Text loader)

  • TRIX

  • VTK

The Variable Load and Combine dialog appears only when the files you are loading do not all contain exactly the same variable names (or, when appending, if the variable names in the file being loaded do not exactly match those of the data already loaded). When all variable names match in the files being loaded, this dialog does not appear; instead, Tecplot assumes that all the variables have the same meaning in all the files.

If a file you are loading or appending has multiple variables with the same name, Tecplot Focus asks if you want to load them by position. See Loading by Position. When loading by position, you cannot combine variables (and do not need to).

The dialog allows you to indicate that variables with different names have the same meaning (referred to as combining the variables) in two different ways.

  • Select variables having the same meaning, one in each list, then click Combine.

  • Apply a previously-defined variable alias file that indicates which variable names have the same meaning.

The two methods can also be used together. For example, you might first apply a variable alias file that deals with the most common equivalent variables in your typical data sets, then clean up any remaining variables (uncommon variables, or variables that don’t always have a well-defined meaning) by hand.

The dialog has the following parts:

  • The Available Variables list initially displays all the variables declared in the files you are loading. As you choose variables to combine or load, they move to the Variables to Load list. Any variables remaining in the Available Variables list when you click OK are not loaded.

  • The Variables to Load list displays variables that are slated to be loaded in the current load operation. If you are appending data, variables that have already been loaded in previous load operations also appear here. Variables are colored according to the following rules:

    Black

    Variable is not combined; it is either already loaded, or will be loaded

    Blue

    Variable appears under the same name in multiple files and has been automatically combined

    Green

    Variable has different names in different files and has been combined by the user, either using the Combine button or by applying a variable alias file

  • The Add Selected button moves a variable from the Available Variables list to the Variables to Load list, adding it to the set of variables that will be loaded in the current operation. The added variable’s name appears in black. By default, variables that are unique to one file are not loaded.

  • The Add All button moves all variables listed in the Available Variables list to the Variables to Load list, indicating that you want to load all of them in the current operation. The variable names appear in black.

  • The Combine button combines the variable selected in the Available Variables list with the variable selected in the Variables to Load list, indicating that the variables have the same meaning. The variable is given a name derived from both the selected variables, and this name appears in the Variables to Load list and is colored green. See Combining Variables Manually.

  • The Remove button removes the selected variable from the Variables to Load list, if possible. If the variable is already part of the current data set (that is, you are appending data, and the variable is from a previous load operation), it cannot be removed.

    When removing a combined variable, all the original variables that were combined are separated and moved back to the Available Variables list, again except for any which have already been loaded from a previous operation.

  • The Apply button applies a variable alias file to the variables being loaded, combining variables if they are defined in the file as having the same meaning as another variable. See Creating and Using a Variable Alias File.

  • Click OK to proceed with loading after setting up the variable combining the way you want it.

Variables that have the same name are automatically combined, as this is almost always what you will want to have happen. They appear in blue in the Variables to Load list. If you do not want this to happen, load the files one at a time and, before loading the file with duplicate variable names, rename the existing variables you do not want to combine with newly-loaded variables of the same name. (You can rename variables by double-clicking them in the Data Set Information dialog.

Combining Variables Manually

To combine two variables manually, telling Tecplot Focus that they have the same meaning, you select the first variable in the Available Variables list and the second in the Variables to Load list, then click the Combine button. The combined variable is added to the Variables to Load list and given a name consisting of both original variable names separated by a semicolon.

If the variables to be combined are in the Available Variables list, as may be the case when loading all the files at once instead of appending, select one in the Available Variables list and click Add Selected to select it to be loaded. Then combine them as above.

If there are more than two variables that have the same meaning, combine the first two, then select the combined variable in the Variables to Load list and combine it with the next variable having the same meaning in the Available Variables list as above.

You may combine multiple sets of variables at a time. If you select more than one variable in the Available Variables list, and the same number in the Variables to Load list, clicking Combine combines the first selected variable from the Available Variables list with the first selected variable from the Variables to Load list, the second with the second, and so on.

You may not combine variables from the same file.

Creating and Using a Variable Alias File

The variable_aliases.txt file found in the Tecplot Focus installation directory lists sets of variables that should be considered equivalent. See Custom Files loaded on Startup for information about how variable aliases are loaded.

The variable_aliases.txt file must begin with a !VA 1 line to indicate that it is a variable alias file (format version 1). On subsequent lines, the character indicates the beginning of a comment; everything following the on a line is ignored. Variable aliases are specified by listing the equivalent names on a line separated by semicolons. For example:

#!VA 1
p;press;pressure
t;temp;temperature # temperature variables in Celsius
m;mach
a;alpha;aoa # angle of attack in radians
b;beta;aos # angle of sideslip in radians

Variable names found in this file are case-insensitive. Excess whitespace is ignored.

When you click Apply, Tecplot Focus combines variables as indicated in variable_aliases.txt. Where two or more files contain variables whose names appear on the same line, these variables are combined, and the resulting Tecplot Focus variable is given a name containing the original variable names (as they appear in the datasets being loaded) separated by semicolons. The new variables then appear in the Variables to Load list in the dialog.

For example, if you load two files with the variables "P" and "Pressure," and the lines shown above appear in the variable_aliases.txt file, when you click Apply, these two variables appear in the Variables to Load list as a single variable called either "P;Pressure" or "Pressure;P" depending on the order in which the files were loaded.

If multiple lines in variable_aliases.txt might apply to the data sets being loaded, these conflicts are resolved based on the order in which the files are loaded. For example, if you load three files containing variables "M," "Mach," and "Mass," in that order, and variable_aliases.txt contains lines equating "M" with "Mach" and also "M" with "Mass," the resulting data set would have a variable named "M;Mach" and a second variable "Mass." Because the file containing the variable "Mach" was loaded before the file containing the variable "Mass," "M" was combined with "Mach" when that file was loaded and cannot also be combined with "Mass."

You may change the names of combined variables after loading the data by double-clicking the variable in the Data Set Information dialog (Data Set → Data Set Info).

All Files and All Supported Files

choose loader

With All Files and All Supported Files, Tecplot Focus tries to automatically choose a loader based on the names of the files you select.

With All Files, you see literally all of the files in the directory you’re browsing. With All Supported Files, you see the files that Tecplot Focus knows it can load using any of the installed loaders, based on the files' names, but excluding other files. Either choice allows you to load files without having to specify in advance what loader will be used.

These options are particularly useful if you regularly work with multiple data file formats, or (in the case of All Files) if your data files often have unconventional names, such as a nonstandard or absent filename extension.

If the names of the selected files unambiguously indicate a single data file format, the appropriate loader is automatically chosen and the data is loaded without further ado. If more than one loader might be able to open the files, or if the files chosen do not have names that are recognized as belonging to a particular loader, the Choose Loader dialog appears. This dialog may recommend one or more loaders in a "Suggested Loaders" section at the top of the list. Choose the loader to be used, then click OK.

All selected files must be in the same format.

DEM Loader

The DEM Loader allows you to load Digital Elevation Map files that have the same file format as the U.S. Geological Survey’s standard DEM format. The DEM Loader will not accept Spatial Data Transfer Standard (SDTS) formatted data.

DEM files are available on the Web for a number of states within the U.S. For more information, refer to www.webgis.com/terr_us1deg.html

The DEM Loader first launches a multi-file selection dialog. After choosing one or more DEM files to load, you are presented with a simple dialog where you can set the I and J-skipping. For large DEM files, you may want to set both of these to be 10 or more.

DXF Loader

The DXF Loader add-on can import AutoCAD® DXF™ (drawing interchange) files. When importing a file, Tecplot Focus creates an appropriate geometry for each of the following entity types:

  • Text

  • Lines

  • Arcs

  • Circles

  • Points

  • Solid

  • 3D faces

When importing a DXF file, no zones are created. Instead, the geometries representing each entity type are simply added to the frame. Be aware that a typical DXF file can contain several thousand geometries, and these are all included when you save a layout file.

Load DXF File Dialog

The Load DXF File dialog has a variety of features. You can select any of the following:

import dxf
Import

Select any or all geometries to import: Text, Lines, Arcs, Circles, Points, Solids, 3D Faces.

Font

Select the font to use for text. (See Font Folders and Fallback for more information on how fonts work with Tecplot Focus.)

Attach Imported Items to Zone

Specify a zone to which all imported geometries will be attached. Clicking the Select Zone button produces a menu of zone options.

Polylines/Import as 2D

All lines and polylines are stored with three coordinates in DXF files. If you select this option, the loader will add 2D line geometries for all lines and polylines in the DXF file (the third coordinate will be ignored).

Polylines/Import as 3D

If you select this option, the loader will add 3D line geometries for all lines and polylines in the DXF file. To view a 3D DXF file, create or load a 3D zone, import your DXF file, then choose Fit Everything from the View menu.

Hide Invisible Layers

If this option is checked, objects in layers that are "off" in the DXF file will be imported with the background color.

DXF Loader Limitations

The DXF Loader does not create any field data. Loading a DXF file only adds geometries to your existing frame.

Since most geometries in Tecplot Focus are 2D, best results will be obtained by loading "flat" DXF files, such as maps.

Binary AutoCAD® DWG™ are not supported in this release.

Excel Loader

The Excel Loader can read numeric data from .xls files for Microsoft® Excel® version 5.0 or higher.

The Excel Loader is available for Windows platforms only.

The Excel Loader is intended primarily for users who record experimental or simulation data using Excel. Your Excel file must contain only values (no equations). We recommend the use of the Excel add-on from the Util/Excel folder as an easier method to open Excel data with Tecplot Focus (see Excel Add-In). Use the Text Spreadsheet loader for delimited files (Text Spreadsheet Loader).

If your spreadsheet is arranged as Table Format or Carpet Format, the Excel Loader is a point-and-click operation. Once you have selected an Excel file to load, the Excel Loader leads you through a series of dialogs, prompting you to specify a variety of attributes, including the data format in the Excel spreadsheet, the variables to be read, and zone information.

Refer to Excel Add-In for instructions on loading Excel data into Tecplot Focus from Excel.

Spreadsheet Data Formats

The Excel Loader will automatically identify blocks of data in Table Format or Carpet Format. The loader will list blocks of data in standard notation for Microsoft Excel. For example, a block found on worksheet sheet1, cells A1-D8, is listed as follows: (sheet1! A1:D8).

If you select a user-defined format (or if the loader did not identify any carpet or table blocks), you will be prompted to enter the names and number of variables, and one or more zones and associated properties. You will also need to enter the location of the field data in the spreadsheet for each zone.

Table Format

Use Table format for data that will be plotted in line plots (i.e. data with an independent and one or more dependent variables). Many spreadsheets containing data to be plotted in 2D or 3D Cartesian plots will also satisfy the conditions of table format.

A table formatted dataset has the following characteristics:

  • The dataset is arranged in one or more adjacent columns.

  • Each column is the same length.

  • Each cell contains numeric data.

  • The first row is a header row containing the variable name for its corresponding column.

  • The spreadsheet dataset is imported as a single I-ordered zone in POINT format with N variables, where N is the number of columns in the table.

The block of data must be surrounded by empty cells, text-filled cells, or table boundaries. The loader will not recognize a block of data as being in table format if any cell adjacent to the block contains a number.

The block of data can contain no empty cells. An empty cell will prevent the loader from recognizing the block. You can satisfy this condition by filling blank cells with 0.0.

Figure 1 shows a block of data in table format in Excel.

importr excel table format
Figure 1. ​A block of data in table format.

Carpet Format

Use carpet format for spreadsheet data to be plotted in a 2D or 3D Cartesian plot. The carpet formatted dataset, shown in Figure 2, has the following characteristics:

  • The spreadsheet dataset is imported as an IJ-ordered zone. See XY and Polar Line Plots.

    In Figure 2, the spreadsheet is imported as I=4 and J=4. The three variables are X, Y, and V. In the spreadsheet cell 2B is index 1, 1, cell 3B is index 2, 1.

  • The top row in the block contains the values of the X-variable, the first column of the block contains the values of the Y-variable, and the V-values are the interior data. This format is useful if your dataset was generated from a function f, such that f(X, Y) = V.

  • The block is a rectangular arrangement of numeric data in the spreadsheet, with a blank cell in the upper left hand corner.

  • There must be no blank cells within the block of data. An empty cell will prevent the loader from recognizing the block. You can satisfy this condition by filling blank cells with 0.0.

  • The block of data must be surrounded by empty cells, text-filled cells, or table boundaries. The loader will not recognize a block of data as being in carpet format if any cell adjacent to the block is filled with a number.

import excel carpet format
Figure 2. This carpet table shows values as a simple arithmetic function of X and Y.

Other Formats

The Other format option gives you a great deal of flexibility in loading data into Tecplot Focus. A series of dialogs leads you through the process of describing your data, similar to the way you would specify this information in a Tecplot-format ASCII file.

Default format

The Excel Loader offers a semiautomatic option that requires only that you specify the upper left and lower right corners of your data block. Once you’ve specified those corners, it handles the data in the same way that Tecplot Focus handles an unformatted block in an ASCII file. It assumes one zone of I-ordered data in POINT format.

Custom format

Using the Custom format option, you can specify characteristics of your dataset. Custom format has the following features:

  • It allows you to work with spreadsheets containing blank cells or text cells.

  • For XY, IJ, and IJK-ordered data, specify the boundaries of the block to load, and how many data points there are within that block (IMax, JMax, KMax).

  • For finite element data, the number of data points is implied by the number of nodes and number of elements.

  • Allows you to load blocks of cells that you delimit interactively.

  • It is the only option for loading finite element, IJK-ordered, or zone data from Excel. If you want to read data from an Excel spreadsheet into more than one zone, you must use custom format. By default, all data read is put into a single I-ordered zone.

Excel Loader Restrictions

A block of data is a rectangular group of numbers in the spreadsheet. The Excel Loader places the following restrictions on blocks:

  • Carpet and table format (which the loader detects and loads automatically) are narrowly defined. All other formats must be loaded on the user-defined pathway.

  • Numeric cells within each block should contain only numbers or numeric characters such as +, -, and so forth. A cell containing X=34 is interpreted by the loader as text, because it begins with text.

  • Cells containing formulas (therefore displaying calculated values) will be skipped by the loader. You can convert the formulas to values within Excel, by pasting your table using the "Paste Special" function, with "values only" selected.

  • The spreadsheet file must have been written by Excel Version 5.0 or higher. For newer versions of Excel (Office 2007 and later) that save in .xslx format by default, please switch to the older .xsl format when saving your file.

General Text Loader

The General Text Loader add-on allows you to read ASCII text data files in a variety of formats. You can specify variable and dataset title information or indicate specific places to read them from in your data file. Instruction settings for reading a type of file can be saved and restored so they do not have to be entered again each time a new file of the same type is loaded.

The following options are available:

import general text
Filename

The name of the file to be loaded. This is automatically filled in with the name of the file selected in the Load Data dialog, but may be changed using the Browse buton.

Titles

Launches the Dataset Title dialog, which allows you to specify dataset title properties.

Variables

Launches the Variable Import Instructions dialog which allows you to specify dataset variable properties.

Data

Launches the General Text Loader: Data dialog which allows you to specify dataset field properties.

General Filters

Launches the General Text Loader: Filters dialog which allows you to specify general filters when reading your file.

Configuration File List

This list shows available configuration files. Configuration files can be edited using a text editor, although this is not usually necessary and is not recommended. The format of these files is listed on the Configuration page.

Load

Loads a single configuration file from any location.

Save

Saves a single configuration file to any location.

Rename

Renames a configuration file.

Delete

Deletes a configuration file.

New

Creates a new, untitled configuration file.

Data Preview
View Raw Data

This displays the data exactly how it looks in the file without any processing.

View Processed Data

This displays the processed and filtered data that will be loaded.

View Options

Launches the General Text Loader: View Options dialog.

Dataset Title

The Dataset Title dialog allows you to specify options for General Text Loader titles.

general text loader dataset titles
Use Title

Manually enter the dataset title, rather than have General Text Loader scan the file for it.

Use line number

Enter the line number of the dataset title in the file. The General Text Loader skips white space on the line until text, and then reads until the delimiter indicated is found. To include spaces in the title, enclose them in double quotes.

Use first line containing keyword

Enter a keyword for the dataset title line. The title will read the first line containing this keyword (case insensitive). General Text Loader searches for a title on this line in the following order, (unless the delimiter is specified as fixed):

  1. First, it will look for any text enclosed in double quotes. If it finds this, then the enclosed text will be read as the title.

  2. If no text in double quotes is found, the first non-white space text after the keyword ending with the indicated delimiter will be used.

Text Delimiter

The text delimiter indicates when the end of text has been reached. You can set it to one of the following:

Auto

Space, tab, comma, semicolon.

Fixed

Each width number of characters on the line is a token field. White space is removed from the beginning and end of the field.

Width

If the delimiter is fixed, enter the width of each field here.

Variable Import Instructions

The Variable Import Instructions dialog of the General Text Loader allows you to scan for the location of the variable names in the data file, and enter which variables to load.

general text loader var import
Scan for variable names

Specify the following:

Start line

Enter the starting line of variable names in the file.

End line

Enter the ending line of the variable names in the file. This is typically the same as the starting line.

Delimiter

The delimiter indicates when the end of each variable name has been reached. You can set it to one of the following:

Auto

Space, tab, comma, semicolon.

Fixed

Each 'width=n' number characters on the line is a variable. White space is removed from the beginning and end of the field. For example, if the line length is 60 and the width is ten, the columns 1-10, 11-20, 21-30, and so forth, are variable names. Spaces are removed from the beginning and end of the variable names.

Width

If the delimiter is fixed, enter the width of each field here.

Enter Variable Names

Select this option to enter a list of variable names in the dialog box. Variable names should be separated by carriage returns.

Select Variables to Load

Launches the Variable to Load dialog.

general text loader variables to load
Variables to Skip

Displays a list of variables that will be skipped.

Variables to Load

Displays a list of variables that will be loaded.

Use the Move, Move All, Remove, or Remove All buttons to edit the "Variables to Load" list.

General Text Loader: Data

The Data Import Instructions dialog of the General Text Loader allows you to specify the location of the data names in the data file, and what data to load.

general text loader data import
Start Identification
First all-numeric line

Select if the data begins at the first line of a file that contains only numbers. If you have specified multiple zones, all non-numeric lines will be skipped at the beginning of each zone.

First line after line with keyword

Select if the data begins at the first non-blank line after the line containing the specified keyword. The keyword is case insensitive.

Start at line number

Select to specify the line number where the data begins. Blank lines are ignored in the data section.

End Identification
All lines up to first non-numeric line

Select if the data ends at the first non-blank line containing any text.

Stop at line number

Select to specify the line number where the data ends.

All lines up to line with keyword

Select if the data ends at the first line before the line with the specified keyword. The keyword is case insensitive.

End of file

Select if the data ends at the end of file.

Data Identification
Point format

In this format all values of all variables are given for the first point, then the second point, etc.

Block format

In this format all values for the first variable are given, then all values for the second variable, etc.

Data value delimiter

The data value delimiter indicates when the end of a data value has been reached. You can set it to one of the following:

Auto

Space, tab, comma, semicolon.

Fixed

Each 'width=n' number characters on the line is a token field. White space is removed from the beginning and end of the field. For example, if the line length is 60 and the width is ten, the columns 1-10, 11-20, 21-30, and so on, are token fields.

Width

If the delimiter is 'fixed', enter the width of each field here.

Data Dimension

If the data dimensions are entered, General Text Loader adds zones as necessary depending on the number of data points found in the file. There must be an equal number of data points for each zone (equal to the product of the IJK dimensions).

Auto-Calculate IMAX

The I-dimension is calculated based on the number of data points found. J and K-max are set to one.

Specify Dimensions

Specify the I, J, and K-dimensions for the data. There must be enough data points found in the file to match the indicated dimensions.

Allow Multiple Zones

If checked, General Text Loader will attempt to read more than one zone from the data file.

Zone ends on line with keyword

If Allow multiple zones is selected and Auto-calculate IMax is selected, then you must enter a keyword here to mark the end of one zone and the beginning of the next. Zones are ended when a line containing this text is found.

Ignore non-numeric tokens

If checked, then any non-numeric information in the data sections is ignored. If not checked, General Text Loader displays an error if any non-numeric data is found in the data section.

General Text Loader: Filters

Use the General Filters dialog of the General Text Loader to filter the data file.

general text loader general filters
Ignore All Lines Starting With

If checked, all lines beginning with the entered string are ignored.

Ignore All Lines Containing

If checked, all lines containing the indicated text are ignored.

Ignore Character Column Position(s)

If checked, then the entered columns are ignored when scanning the file. Columns are entered as a single number or a hyphenated range, one or more of which may be separated by commas.

If there are tabs in the data file, they are not expanded in this filter. For example, if column 1 is a tab and you wish to skip column 2, you should enter 2, even though a text editor will show more than one space after expanding the tab.
Ignore Specific Lines

If checked, entered lines are ignored when scanning the file. Lines are entered as a single number or a hyphenated range, one or more of which may be separated by commas. You may also use "end" to specify the last line of the file.

Specify Values for Blanked Cell

If checked, you can specify a value which the loader uses for blank cells.

This option is only available if the data delimiter is a comma or semicolon. You can change the data value delimiter using the Data Import Instructions dialog.

General Text Loader: View Options

The View Options dialog of the General Text Loader allows you to specify the data display.

general text loader view options
General Options
Limit lines displayed

Limits the number of lines displayed in the preview window. For large files, you may want to set this to a number less than the total number of lines. The fewer number of lines, the faster the preview display.

Do not limit

If you select this toggle, the entire file will be displayed in preview mode.

Auto Process

If selected, General Text Loader automatically refreshes all information about the file whenever any loader settings are changed. For very large files (multi-megabyte), this option is not recommended, since re-scanning a large file can be time consuming.

Processed Data
Show variable names and data

If selected, variable names and processed data will be displayed in the preview window.

Show variable names only

If selected, only variable names will be displayed in the preview window.

Show all non-processed lines

If selected, all lines which will not be loaded will be displayed in the preview window.

Show data in columns

Shows the data in columns where each column is a variable.

Show data in blocks

Shows the data in blocks where each block is a variable.

General Text Loader Configuration File

A configuration file contains all of the instructions that tell the General Text Loader how to load a particular type of text file. This information is collected from the dialog fields and written to a file when you click Save on the main dialog. The configuration file format is similar to the Tecplot macro language. Configuration files for the general text loader are ASCII text files which use a command set that can describe all loading instructions. Normally you do not need to edit these files, as they are automatically written by the loader when you select New on the main dialog.

Editing these configuration files by hand is not recommended.

General Text Loader CONFIGFNAME Command

When reading a dataset using General Text Loader, instead of specifying individual parameters in $!READDATASET, you may use the CONFIGFNAME command. This consists of:

CONFIGFNAME = <string>
VERSION = <integer>
# version of the template file (default is 100)
# Note: changing the version number may cause unpredictable behavior
TITLE
{
   SEARCH = [NONE|LINE|KEYWORD] # default = NONE
     NAME = <string>
# default = "New Dataset", ignored if SEARCH is not NONE
     LINE = <integer> # 1-based, ignored if SEARCH is not LINE
  KEYWORD = <string> # ignored if SEARCH is not KEYWORD
DELIMITER = [AUTO|TAB|SPACE|SEMICOLON|COMMA|FIXED]
    WIDTH = <integer> # Valid only if DELIMITER = FIXED
}

VARIABLES
{
    SEARCH = [NONE|LINE]
     NAMES = <string> # ignored if SEARCH is SCAN
                       # <string> is a comma separated string
    LOADED = <all|n1,n2,...nn> # list of variables to be loaded
 STARTLINE = <integer> # 1-based, ignored if SEARCH=NONE, default = 1
 {
   STARTID = [FIRSTNUMERICLINE | LINE | KEYWORD]
   {
     KEYWORD = <string> # ignored if STARTID is not KEYWORD

     ENDLINE = <integer> # 1-based, ignored if SEARCH=NONE, default = 1
   DELIMITER = [AUTO|TAB|SPACE|SEMICOLON|COMMA|FIXED]
       WIDTH = <integer> # Valid only if DELIMITER = FIXED
   }
   DATA
   {
     IGNORENONNUMERICTOKENS = <boolean> # default = TRUE
     IMPORT
     LINE = <integer>
     # 1-based, ignored if STARTIDENTIFICATION is not LINE
   }
   ENDID = [FIRSTNONNUMERICLINE | LINE | KEYWORD]
   {
     KEYWORD = <string> # ignored if ENDID is not KEYWORD
        LINE = <integer> # 1-based, ignored if ENDID is not LINE
   }
      FORMAT = [POINT|BLOCK] # default POINT
   DELIMITER = [AUTO|TAB|SPACE|SEMICOLON|COMMA|FIXED]
       WIDTH = <integer> # Valid only if DELIMITER = FIXED
 }

 DIMENSION
 {
    AUTO=<boolean> # default = TRUE
    IMAX=<integer> # ignored if AUTO = TRUE, default = 1
    JMAX=<integer> # ignored if AUTO = TRUE, default = 1
    KMAX=<integer> # ignored if AUTO = TRUE, default = 1
    USEMULTIPLEZONES = <boolean> # ignored if AUTO = TRUE, default false
    KEYWORD=<string> # ignored if USEMULTIPLEZONES = FALSE
 }
}
GLOBALFILTERS # filters are applied cumulatively, so lines matching
# any of the criteria are filtered
{
COMMENT = <string> # ignore lines beginning with <string>
NUMBER = <integer> # ignore all lines starting with line number
<integer>
KEYWORD = <string> # ignore all containing <string> (case insensitive)
COLUMNS = <list> #<list> is a comma separated list of number ranges
# example: "1-80,100-end", etc. Must be in double quotes
ROWS = <list> # same as above
USEBLANKCELLVALUE = <boolean> # if TRUE, then the value of blank cells
is BLANKCELLVALUE
BLANKCELLVALUE = <double> # blank cell value. Ignored if
USEBLANKCELLVALUE is FALSE
}

Where <string> is a file name or file path. Settings will be loaded from the file name specified in <string>. This command is only allowed in conjunction with the $!READDATASET command as described below. It may not be used inside a configuration file.

For example, instead of:

$!READDATASET '"C:\test.txt" "VERSION=100 FILEEXT=\"*.txt\"
FILEDESC=\"general text\" "+""+"TITLE{SEARCH=NONE NAME=\"New
Dataset\" LINE=1 DELIMITER=AUTO WIDTH=10
}"+""+"VARIABLES{"+"SEARCH=LINE LOADED= All STARTLINE=1 ENDLINE=3
DELIMITER=SEMICOLON WIDTH=5
}"+""+"DATA"+"{"+"IGNORENONNUMERICTOKENS=TRUE
IMPORT"+"{"+"STARTID=LINE {"+"LINE=4
}"+""+"ENDID=FIRSTNONNUMERICLINE {"+"LINE=1 }"+""+"FORMAT=IJKPOINT
DELIMITER=AUTO WIDTH=1 }"+""+"DIMENSION"+"{"+"AUTO=TRUE
CREATEMULTIPLEZONES=FALSE
}"+"}"+"GLOBALFILTERS{"+"USEBLANKCELLVALUE=TRUE
BLANKCELLVALUE=0.000000 }"'
DATASETREADER = 'General Text Loader'

Using the CONFIGFNAME command, you can write:

$!READDATASET ' "myfile.dat"
"CONFIGFNAME=c:\config_files\myconfig.lgc" '
# contains all of the instructions in the example above
DATASETREADER='General Text Loader'

Components of the Configuration File

All General Text Loader configuration files must start with the line:

#!TECPLOT_LOADGEN
Instruction Syntax

Each instruction file contains commands which describe the loading instructions.

Comments

Any text following # to the end of the line is ignored.

String Format

The <string> parameter must be enclosed in double quotes. You can include a double quote character in the string by preceding it with a backslash \. For example:

  • "This is a normal string"

  • "This is a \"quote\" inside a string"

List Format

The <list> parameter type is defined as one or more number ranges, separated by commas, enclosed in double quotes. A number range may be a single number or two numbers separated by a dash. Optionally, you may use "end" to indicate the last valid number. For example:

  • "1"

  • "1,2-7,3"

  • "10-end,3,2-5"

Command List

The commands in the file may appear in any order, and any command may be divided into any number of lines (that is, all white space, including carriage returns, is ignored).

HDF Loader

The HDF Loader add-on can load 1D, 2D, and 3D Scientific Data Sets (SDS) from HDF files.[1] When a dataset from an HDF file is imported, the file is scanned and a list of all SDS in the file is displayed in the Scientific Data Sets to load portion of the HDF Loader dialog. Select one or more SDS to import. Every SDS that you select must have the same dimension. A rectangular I, IJ, or IJK-ordered zone (for 1, 2, or 3D data, respectively) is created for each SDS that you select to load.

The HDF Loader dialog has the following options:

import hdf
Scientific Data Sets to load

Select one or more SDS’s to load. Each SDS that you select must have the same rank (dimension).

I-Skip

Select the I-Skip value. A skip value of one loads every data point, a skip value of two loads every second data point, and so on.

J-Skip

Select the J-Skip value.

K-Skip

Select the K-Skip value.

Select File

Select an HDF file.

Attributes

Displays attributes of each SDS found, such as number type, rank, label, and so on.

You may also click Select File to choose a different file.

HDF Loader Limitations

The HDF Loader can import only Scientific Data Sets from HDF files, and these are imported in a manner similar to NCSA’s own HDF viewer. The way in which the data file is interpreted cannot be altered in this release of the loader.

HDF5 Loader

import hdf5

The HDF5 loader add-on allows you to import general HDF5 files into Tecplot Focus. The loader provides a mechanism for importing generic data from multiple HDF5 datasets or groups. The HDF5 loader will load datasets within user selected groups, load one or more user selected datasets to one zone, load multiple user selected datasets to multiple zones, execute macros after data has been loaded, create implicit X, Y, and Z grid vectors as needed, sub-sample loaded data, and reference user selected vectors for X, Y, and Z grids. Datasets must be ordered data. The HDF5 library used is version 1.12.0.

Data Selection

One or more files may be opened if all selected files have an identical hierarchy. Hierarchy information for the selected HDF5 files is displayed in the form: /group/[group]…/dataset - the dimension of each dataset is displayed immediately following the dataset name. In this window, one or more datasets or groups may be selected for loading.

Importing/Loading Data

Loading Multiple Datasets to One Zone (default)

Loading multiple datasets to one zone is the default method of importing HDF5 files. Using this method, the HDF5 loader will create one zone with N variables, where N is the number of HDF5 datasets selected. Selected datasets may have one to three dimensions. The dimension of loaded Tecplot Focus variables will match the I, J, and K values of the selected datasets. Variable names are assigned the corresponding names of selected datasets. All selected datasets must have equivalent dimensions.

To import your data, select one or more datasets from the Available Datasets window. All selected datasets must be identical in dimension; dataset dimensions are shown immediately to the right of dataset names in the Available Datasets window.

Loading Multiple Datasets to Separate Zones

Using this method, the HDF5 loader will create N zones, where N is the number of datasets selected in the Available Datasets window. Each zone contains one variable per selected dataset where each dataset must have one to three dimensions. The I, J, and K values of each Tecplot Focus zone will match the dimensionality of each selected dataset. Variable and zone names are automatically assigned. Dimensionality may vary between selected datasets.

To import your data using this method, select the "Load to Separate Zones" toggle. Select one or more datasets from the Available Datasets window. One zone will be created for each selected dataset and each zone will contain exactly one variable (unless you selected Create Implicit Grid Values or Reference Data Grids).

Loading Datasets by Group

Using this method, the HDF5 loader will create N zones with M variables, where N is the number of groups selected in the Available Datasets window and M is the number of datasets in each group. The I, J, and K indices of the Tecplot Focus variables will be equivalent to the respective dimension of selected datasets. Datasets in any selected group must be equal in dimension; however, datasets may be unequal in dimension between groups. When selecting multiple groups, all groups must contain an equal number of datasets and dataset names must be identical between groups. The HDF5 loader will only load datasets within the root directory or within a subgroup, i.e., the HDF5 loader will not load data within nested groups.

To import your data using this method, select the "Load Datasets by Group" toggle. Press Select File to open a HDF5 file. Select one or more groups from the Available Datasets window; all groups must contain an equal number of datasets where all datasets have identical names between groups. The number of selected groups determines the number of zones that load into Tecplot Focus. Zone names will match the name of the corresponding group. Variable names will match the respective dataset name. Each zone will include as many variables as datasets per selected groups.

Additional Options

Additional options may be specified when loading HDF5 data into Tecplot Focus. These options include: Using Macros, Sub-Sampling Data, Referencing Data Grids, and Grid Generation.

Using Macros

Macros may be defined within a HDF5 vector and placed in any group. Each character string in the selected vector must be a valid one-line Tecplot macro. Macros are executed in the order encountered after all data are loaded.

To run a macro defined as a character vector in your HDF5 file, select the "Run Macros in Selected Group" toggle. Select the macro you want to execute from the Select Macro pull-down menu. Your macro will run after your data has been successfully loaded into Tecplot Focus.

Sub-Sampling Data

The HDF5 loader will sub-sample the first, second, and third dimensions of loaded datasets respectively as defined by the user. The default skip-value is 1. When specifying non-unitary skip values, the dimensionality of all selected datasets must be equivalent. Datasets will be sub-sampled using the user defined I-Skip, J-Skip, and/or K-Skip values – skip values must be whole numbers.

To sub-sample data in the first, and/or second, and/or third dimensions of selected datasets, change the respective I-Skip, and/or J-Skip, and/or K-Skip values located in the HDF5 loader dialog. If the skip-values are non-unitary then selected datasets must have equivalent dimensions.

Referencing Data Grids

The HDF5 loader allows users to specify X, and/or Y, and/or Z grid vectors. Selected vectors are used for plotting all zones. Vectors are of dimension 1 and length M. The X grid vector length must be equal to the first dimension of selected datasets, the Y grid vector length must be equal to the second dimension of selected datasets, and the Z grid vector length must be equal to the third dimension of selected datasets. The number of selected grid vectors must equal the rank of selected datasets.

import hdf5 reference grid

To define the grid vectors, first toggle off "Create Implicit Grid Values" option, then click the Reference Data Grids button. In the Select Refernce Grid Vectors dialog that appears, select the vector you want to use as the corresponding grid using the menus. You MUST toggle on "Use Data Grids". The number of grid vectors you specify must equal the rank of selected datasets.

Grid Generation

The HDF5 loader can automatically create X, Y, and Z grid vectors as necessary for selected datasets. Grid vectors will be of length equal to the corresponding dimension.

To automatically create X, Y, and Z grid vectors, accept the default setting of "Create Implicit Grid Values" in the HDF5 loader dialog. The grid vectors will be created upon loading your data into Tecplot Focus.

PLY Loader

Use this loader[2] to load 3D triangular surface files with the .ply extension. This format is often used to store surfaces generated from tessellation of 3D range measurement data. Files may be either ASCII or binary, but must contain both vertex and face elements (sections). This loader is included in your Tecplot Focus installation.

Tecplot Data Loader

This section describes the process for loading Tecplot-format data files with the extensions .dat for ASCII files and .plt for binary files. Some other products that write Tecplot binary files use the filename extension .bin or .tec, and these are also recognized by the Tecplot-Format loader. (Refer to the Data Format Guide for information on outputting data into Tecplot Focus file format.)

There are four ways to create and work with Tecplot-format data files:

Generate a Tecplot-format ASCII data file

Read the file into Tecplot Focus and work without conversion. If the dataset is altered, save it as an ASCII data file. This method works well for smaller datasets where the convenience of an ASCII file outweighs any inefficiencies.

Generate a Tecplot-format ASCII data file and convert it to a binary file with Tecplot Focus

Read it into Tecplot Focus, then save it as a binary data file, then work with the binary file. Once you have saved a binary version, you can delete the ASCII version. This works well for large datasets where ASCII inefficiencies are noticeable. See Data File Writing.

Generate a Tecplot-format ASCII data file, then convert it to a binary file with Preplot

Preplot, a utility program included with Tecplot Focus, converts ASCII to binary Tecplot-format data files. Once the binary file is created, delete the ASCII version to save space. This works well for identifying problems with data files, since Preplot’s error messages include precise details. This method also works well in batch processing, or if the ASCII data files are generated on another machine. (See the Data Format Guide for a description of Preplot.)

Generate a Tecplot-format binary data file

Read the binary data file into Tecplot Focus and work without conversion. You must use routines provided by Tecplot as part of the TecIO library to write Tecplot-format binary files from C or FORTRAN programs. (See the Data Format Guide for complete details.)

Tecplot Data File Loading

The Tecplot Data Loader (accessed via File→Load Data) allows you to load ASCII (.dat) and binary (.plt) Tecplot-format data files. For both kinds of files, Tecplot Focus supports full data files, grid files, and solution files, where the file types are defined as follows:

Full

Full files contain both grid and solution data. Data files produced for Tecplot products versioned 2006 and earlier are treated as full data files. Full files can be loaded in any order.

Grid

Grid files contain static data for all zones. They have at least one variable or FE connectivity; they may contain both variables and connectivity simultaneously.

Solution

Solution files contain time-varying data for all zones in the file.

You may load more than one Tecplot format file at a time by selecting multiple files in the Load Data dialog. In fact, this is required when loading solution data because the corresponding grid file must be loaded at the same time.

Loading Grid and Solution Data Files

When you are loading grid and/or solution files, please keep the following in mind:

  • Each solution file must be read in after the grid file it is associated with has been loaded.

  • If you load multiple grid and solution files into Tecplot Focus, the order the files are listed will be used to determine which grid is used for which solution file(s). For example, if you load a set of grid and solution files in the following order:

    • Grid A

    • Solution A

    • Solution B

    • Solution C

    • Grid B

    • Solution D

Grid A will be shared for Solution Files A, B, and C. Grid B will be used for Solution File D.

You may select multiple files to load by holding the Shift key. However, the order is not always preserved with this method. We strongly recommend that you use the Add to List button when loading grid and solution data to make sure the files are added in the order you require.
  • You may load a grid file with variables or variables and connectivity without loading a solution file. However, you may not load a grid file that contains only FE connectivity data.

Tecplot Layout Loader

The Tecplot Layout loader is used for loading Tecplot layouts (.lay) and layout packages (.lpk). Layouts include only links to the original data files; layout packages include the subset of data needed to view the layout. See Layout Files, Layout Package Files, Stylesheets for more details on creating these files.

Usually it is most convenient to load these kinds of files using the Welcome screen, the File→Open Layout or File→Recent Layouts commands, or double-clicking the file in your file manager (e.g. Windows Explorer). However, you can also load layouts and layout packages by choosing File→Load Data and selecting this loader in the Load Data dialog.

This loader has no options; simply choose the desired .lay or .lpk file, and it will be opened.

Text Spreadsheet Loader

The Text Spreadsheet Loader add-on allows you import simple data from ASCII files. Select the delimiter and I-skip (if necessary) from the Simple Spreadsheet File Loader dialog.

import text spreadsheet

the Text Spreadsheet Loader dialog has the following options:

Filename

Enter the path to the file you would like to load.

Delimiter

Choose whether your data is separated by a comma, space, or tab.

I-Skip

Select an I-skip value. A value of 1 loads all values, a value of 2 loads every other value, and so on.

The Text Spreadsheet Loader can read ASCII files of the following format (blank lines are ignored):

Variable 1, Variable 2, ..., Variable N
datapoint1,datapoint2, ..., datapoint N
.
.
.
datapoint1,datapoint2, ..., datapointN

Here is an example of a valid ASCII spreadsheet file:

Month, Rainfall
1, 15.0
2, 21.0
3, 21.0
4, 32.0
5, 10.3
6, 5.1
7, 2.3
8, 0.2
9, 1.4
10, 8.3
11, 12.2
12, 15.4

Text Spreadsheet Loader Limitation

The first line must contain all of the variable names. See How to Create a Plot

Overwriting Data Files

Tecplot Focus employs load-on-demand to allow you to start working with your data as soon as possible. With load-on-demand, after you load a data file, the actual loading of individual variables may be deferred until the variables are actually needed. Depending on available memory, some variables may even be loaded, then unloaded, and then loaded again.

Load-on-demand requires that Tecplot Focus keep the data file(s) being used open while you are using them to create plots, which may present problems if you need to update the data files during this time.

If you have a workflow that requires a Tecplot Focus data file be overwritten while it is in use (most likely to simulate real-time data acquisition or a similar process), the following is suggested as a possible solution.

lod flow

In this example, the cycle on the top illustrates the method used for Tecplot Focus to update flow.plt and the cycle on the bottom illustrates the method used by the application that generates the data to update flow.plt. Both systems are checking for the existence of read.lock. If you are using a macro in Tecplot Focus to do this, then you can use the extended macro command, query.fileexists, to determine if the file exists. If the file exists, Tecplot Focus will disconnect from flow.plt, copy flownew.plt to flow.plt, and delete read.lock. If read.lock exists and the application that generates the data has an update for flow.plt, the application should either wait a few seconds and try-again or skip the data set (this is determined by the application, not Tecplot Focus). If the file does not exist, the application that generated the data is free to copy new data to flownew.plt.

If you use a macro in Tecplot Focus, you can use the capabilities of extendmcr to query for file existence. Disconnecting from flow.plt can be done in a number of ways, one of which is to issue a $!NEWLAYOUT command. This will completely disconnect Tecplot Focus from the dataset and thus from the associated data file.

The file read.lock is like a baton. If it exists, then flownew.plt is said to be "owned" by Tecplot Focus. If it does not exist, then flownew.plt is said to be "owned" by the data producing application. flow.plt is always owned by Tecplot Focus.

One minor issue not addressed in the above example is what the data producing application should do if the data is being read by Tecplot Focus. It can either block (wait) until Tecplot Focus is finished or discard the current solution and go back to generating another one.


1. The HDF Loader uses the public-domain HDF API code library from the National Center for Supercomputing Applications (NCSA), University of Illinois, Urbana-Champaign.
2. Copyright for Third Party Library. This loader utilizes a modified version of a library written by Greg Turk while at Stanford University. The copyright for this library is: Copyright © 1994 The Board of Trustees of The Leland Stanford Junior University. All rights reserved. Permission to use, copy, modify and distribute this software and its documentation for any purpose is hereby granted without fee, provided that the above copyright notice and this permission notice appear in all copies of this software and that you do not sell the software. The software is provided "as is" and without warranty of any kind, express, implied or otherwise, including without limitation, any warranty of merchantability or fitness for a particular purpose.