Run TUFLOW From a Batch-file: Difference between revisions
Content deleted Content added
Ellis Symons (talk | contribs) |
No edit summary |
||
| (2 intermediate revisions by 2 users not shown) | |||
Line 9:
* Package a TUFLOW model
* Post process results after simulation has finished.
Batch files are executed by double clicking the created .bat file from Windows Explorer.<br>
For Linux users, it is recommended to refer to
<u>[https://learn.microsoft.com/en-us/windows/wsl/install How to install Linux on Windows with WSL]</u>.
<ol>
==Simple batch file==
Line 84 ⟶ 86:
===Automatically Create Folders in a TUFLOW model===
The use of the -acf (automatically create folders) switch prevents the dialog prompt from appearing when encountering non-existent folders (
An example is:<br>
<pre>start "TUFLOW" "C:\TUFLOW\Releases\2020-10-AE\TUFLOW_iSP_w64.exe" -acf "C:\TUFLOW\Tutorial_Wiki\TUFLOW\runs\M01_5m_001.tcf"</pre>
Line 100 ⟶ 102:
Additional optional flags can be added to the base '''-c''' switch, in any combination, including:<br>
;* “a” (all);<br>
: The addition of the “a” flag (e.g. -ca) copies all files of the same name for all input files (
;*“L” (list);<br>
: The addition of the “L” flag will output the files used by TUFLOW into a .tcl (TUFLOW Copy List) file but not copy the files to a destination folder. This can be useful if scripting the copying of models. To run the copy list the character “L” needs to be specified after the -c input argument. This works for all copy options, for example, the following are all valid; -cL, -caL, -capL. The .tcl file produced is output in the same directory as the .tcf and takes the simulation name.
Line 125 ⟶ 127:
<li>The Check MI Save Date will need to be set to WARNING or OFF in the .tcf file if the –ca option has not been used as the .tab and other files will not have been copied.
<li>There is a limit of 1,000 characters (including spaces) on pathnames. As very long pathnames can result due to the above approach, if the number of characters exceeds 1,000, problems may occur.
<li>The -c switch automatically invokes the -t (
<li>The -b option still applies if several models wish to be copied using a batch (.bat) file.
</ol><br>
Line 168 ⟶ 170:
<pre>start "TUFLOW" "C:\TUFLOW\Releases\2020-10-AE\TUFLOW_iSP_w64.exe" -pmAllini package.ini "C:\TUFLOW\Tutorial_Wiki\TUFLOW\runs\M01_5m_001.tcf"</pre>
====INI files with Events and Scenarios====
An example of .ini file to overwrite the default base and destination folders, and specify events/scenarios for models with events/scenarios in filenames.<br>
The model scenario and event options are required only if there are files that use the event or scenario variables in file names. This option does not limit the files that TUFLOW will package by scenario or event.
| |||