12 - 2.3   Swapping Data Files

You can exchange any loaded data file for another by using the Swap Files dialog, accessible from Project>Swap Files. Unlike Changing Grid Solution Data, Swap Files temporarily substitutes one file for another, such that all references to the original file refer instead to the new file. This is particularly useful for plots in the Plot Gallery and for XY Freestyle plots, which are tied to a specific data set. It is also useful for choosing different files for some kinds of comparison plots without losing track of the original data sets used for the comparison

swap_files.png

The Swap Files dialog shows a list of the files currently active in your project and, to the right of this, a list of corresponding replacement files. Initially, the swap files are listed as “no swap,” indicating that the original file is active. A single scroll bar controls both lists in sync, and highlighting a file in one list also highlights it in the other.

Files you swap in should be basically similar to the original files. That is, in general, they should have the same entity and variable names, grid IJK limits, and spatial dimensions. The swapped-in file will replace the original file in the current session, including in the Plot Gallery and XY Freestyle plots, which refer to specific data sets by name. Differences in variable names can be handled by Aliases. Differences in entity names are not resolved, however, and may result in an empty plot. Also, 3D grid views are calibrated to a specific area, and if a replacement grid is on a different coordinate system, the data may no longer be in that same area and the plot may again appear empty.

To swap in a different file for a designated file, use one of the following techniques. You may swap as many or as few files as you like; you do not need to swap all files.

Browse to individual files - Highlight the data set that you want to replace and click Browse swap file. A file browser for the appropriate data type (grid or XY) appears, in the directory of the selected file, with the filename extension filter set the same as the original file. Either may be changed if you wish to load a file from a different directory or of a different type. The selected file appears in the Swap file list after loading.

 If loading a VDB case, click Browse VDB case instead. Choose the case folder inside the top-level VDB folder.

Files in a different folder - To handle varying simulator runs where the new results are in a different folder from the current ones, use the Folder button to browse to the new file location, then click Search Names. Files in the selected folder will be swapped in for currently-loaded files if their names match exactly.

Files with altered names - When a new simulator run uses slightly different filenames than the current names, but the new files are in the same folder as the current ones, you can use the Find Pattern and Replace Pattern fields, and the Search Patterns button, to perform a search-and-replace operation on the filenames. Each filename in the Current file list is examined and, if it contains the Find Pattern, that text is replaced with the Replace Pattern. If a file of that name exists in the same folder as the current file, that file is swapped in.

Note that no wildcards (* or ?) are permitted. Since all matches of the Find Pattern are replaced, be sure to enter enough characters to prevent ambiguity; for example, if you want to change XYZ_March1_2012 to XYZ_March2_2012, searching for 1 and replacing it with 2 will change the year to 2022 as well as the date to 2, causing no files to match; instead, search for 1_ and replace with 2_. Since only files that actually exist will be swapped in, an ambiguous replacement will generally cause the desired files not to be found. In general, make the find and replace strings as specific as possible.

To undo the highlighted swap-in substitution, click Remove swap file. The entry in the Swap File list changes back to “no swap.” You can also simply swap the original file back in by browsing to it.

When swapping in new files, Tecplot RS automatically sets the options for you; you do not have the ability to set the options (such as grid smoothing) you set when you originally loaded the file. In general, the same options are used to load the swapped-in file as were used when loading the original file, with the following exceptions:

• If a grid file being swapped in already has a corresponding .rsgrid solution file, it will be used; otherwise, a new one is created using the same smoothing options as the file being replaced.

• If solution data are in files separate from the grid, only the defaults will be loaded (that is, those that match the grid name—the same ones that are selected automatically in the standard grid loading dialog).

• Auxiliary files such as streamlines, faults, or survey wells are loaded if they have the same base name as the swap file and the file being replaced also loaded these data.

If the automatic behaviors are not what you want, after doing the swap you can change the loader settings using the standard loader dialogs.

The selected files are not actually swapped in until you click OK. This may take some time depending on the size of the swapped-in files.

note00200.pngSaving the project after a swap records the swapped-in files. If you want to retain the original project, either choose not to save changes, or save the project under a different name.