4.5 XF Files

XF Files are a binary echo of selected input files automatically created by TUFLOW to vastly speed up the model initialisation process next time a simulation is carried out. If the original input data has a save date later than its corresponding XF file, the original data is read and the XF file re-created. If the XF file is newer, it is used in preference to the original data.

XF files are always written to a folder named “xf” underneath where the original data resides. If the “xf” folder or a XF file is deleted, the XF files will be recreated next time a simulation is started. The name of the XF file generated is that of the source file plus additional info. Two extensions are used: .xf4 and .xf8. .xf4 refers to iSP (single precision) runs and .xf8 to iDP (double precision) runs. It is not possible to mix these (i.e. to read an .xf4 single precision file into a double precision model).

To globally switch XF files off use XF Files == OFF. They can also be switched off for individual inputs using “XF OFF” in the command (for example, see Read GIS Z Shape).

For some of the commands that generate XF files (e.g. Read Grid Zpts), it is possible to refer directly to the .xf file instead of referring to the GIS layer, for example:

Read Grid Zpts == grid.tif.d1.5m.xf4.

If different models utilise the same DEM(s), the DEM .xf file is reprocessed each time a different model is run. This can slow the model initialisation. To prevent this, the .tcf command XF Files Include in Filename adds unique text to the end of the .xf filenames for each model.

For example, if two models use the same DEMs for setting Zpt values, use this command as per below.

In Model 1’s .tcf file:

XF Files Include in Filename == M1

In Model 2’s .tcf file:

XF Files Include in Filename == M2

If the same .tcf file is being used to run both models, use the scenario name as follows.

XF Files Include in Filename == <<~s1~>>

TUFLOW will add the ~s1~ value to the end of any .xf filenames (refer to Section 13.2.2 on the automatic setting of scenarios and events as variables). Thus, when ~s1~ changes from one simulation to the next, the .xf filenames are unique to that scenario and will not need reprocessing.