XPSWMM to TUFLOW-SWMM: Difference between revisions
Content deleted Content added
Line 546:
'''Note:''' For this demonstration, all commands will reference the datasets in the provided conversion model. Please update these references with the filenames sued in your model.<br>
=== Clean TUFLOW Control Files ===
In the process of converting a model, the <u>[[Convert_TUFLOW_Model_GIS_Format |Convert TUFLOW Model GIS Format]]</u> tool adds commands to control files. While these control files will allow the converted model to run, they have not been structured neatly. To maintain an easy to read and effective model, it is recommended to 'clean up' the TUFLOW control files. This can be done by:
:* Removing unnecessary commands.
:* Including a title at the beginning of each control file. For example, <font color="green"><tt>! TUFLOW CONTROL FILE (.TCF) defines the model simulation parameters and directs input from other data sources</tt></font>.
:* Adding headings to sections of the control file. For example, <font color="green"><tt>! MODEL INITIALIZATION</tt></font> could be used as a header for the commands required to initialize the TUFLOW SWMM model.
:* Using comments to explain the purpose of commands. For example, <font color="blue"><tt>Spatial Database </tt></font> <font color="red"><tt>== </tt></font> <font color="black"><tt> ..\model\gis\1D2D_Urban_001.gpkg </tt></font> <font color="green"><tt> ! Specify the location of the GeoPackage Spatial Database</tt></font>.<br>
:* Using relative file paths to specify the location of various files and layers in the model.
The process below demonstrates how to clean up a TCF, using the provided model conversion dataset.
<ol>
<li> In Windows File Explorer, navigate to the '''TUFLOW\runs''' folder and open the TCF into a Text Editor (Notepad++ is recommended).
<li> Add control file title and section headings: <br>
<font color="green"><tt>! TUFLOW CONTROL FILE (.TCF) defines the model simulation parameters and directs input from other data sources<br>
! MODEL INITIALIZATION <br>
! SOLUTION SCHEME <br>
! MODEL INPUTS <br>
! TIME CONTROL <br>
! OUTPUT FOLDERS <br>
! OUTPUT SETTINGS <br>
! TIME SERIES PLOT OUTPUT</tt></font>
<li> Organize the commands into these section headings. <br>
<font color="green"><tt>! MODEL INITIALIZATION</tt></font><br>
<font color="blue"><tt>Spatial Database </tt></font> <font color="red"><tt>== </tt></font> <font color="black"><tt> ..\model\gis\1D2D_Urban_001.gpkg </tt></font> <br>
<font color="blue"><tt>GPKG Projection </tt></font> <font color="red"><tt>== </tt></font> <font color="black"><tt> ??? </tt></font> <br>
<font color="blue"><tt>TIF Projection </tt></font> <font color="red"><tt>== </tt></font> <font color="black"><tt> ..\model\grid\1D2D_Urban_Grid.tif </tt></font> <br>
<font color="green"><tt>! MODEL INPUTS</tt></font><br>
<font color="blue"><tt>Geometry Control File </tt></font> <font color="red"><tt>== </tt></font> <font color="black"><tt> ..\model\1D2D_Urban_001.tgc </tt></font> <br>
<font color="blue"><tt>BC Control File </tt></font> <font color="red"><tt>== </tt></font> <font color="black"><tt> ..\model\1D2D_Urban_001.tbc </tt></font> <br>
<font color="blue"><tt>BC Database </tt></font> <font color="red"><tt>== </tt></font> <font color="black"><tt> ..\bc_dbase\1D2D_Urban_001_2d_bc_db.csv </tt></font> <br>
<font color="blue"><tt>Read Materials File </tt></font> <font color="red"><tt>== </tt></font> <font color="black"><tt> ..\model\1D2D_Urban_001_Mat.csv </tt></font> <br>
<font color="blue"><tt>Read Soils File </tt></font> <font color="red"><tt>== </tt></font> <font color="black"><tt> ..\model\1D2D_Urban_001.tsoilf </tt></font> <br>
<font color="green"><tt>! TIME CONTROL</tt></font><br>
<font color="blue"><tt>Timestep </tt></font> <font color="red"><tt>== </tt></font> <font color="black"><tt> 1.000000 </tt></font> <br>
<font color="green"><tt>! OUTPUT SETTINGS</tt></font><br>
<font color="blue"><tt>Map Output Format </tt></font> <font color="red"><tt>== </tt></font> <font color="black"><tt> XMDF </tt></font> <br>
<font color="blue"><tt>Map Output Data Types </tt></font> <font color="red"><tt>== </tt></font> <font color="black"><tt> q V d h Z0 </tt></font> <br>
<font color="blue"><tt>Map Output Interval (s) </tt></font> <font color="red"><tt>== </tt></font> <font color="black"><tt> 60.000000 </tt></font> <br>
<font color="green"><tt>! TIME SERIES PLOT OUTPUT</tt></font><br>
<font color="blue"><tt>Read GIS PO </tt></font> <font color="red"><tt>== </tt></font> <font color="black"><tt> 1D2D_Urban_001_2d_po_P </tt></font> <br>
<font color="blue"><tt>Read GIS PO </tt></font> <font color="red"><tt>== </tt></font> <font color="black"><tt> 1D2D_Urban_001_2d_po_L </tt></font> <br>
<font color="blue"><tt>Time Series Output Interval (s) </tt></font> <font color="red"><tt>== </tt></font> <font color="black"><tt> 60.000000 </tt></font> <br>
<li> In the 'Model Initialization' and 'Solution Scheme' sections, add in the commands required to run the TUFLOW model: <br>
<font color="green"><tt>! MODEL INITIALIZATION</tt></font><br>
<font color="blue"><tt>Tutorial Model </tt></font> <font color="red"><tt>== </tt></font> <font color="black"><tt> ON </tt></font> <br>
<font color="blue"><tt>GIS Format </tt></font> <font color="red"><tt>== </tt></font> <font color="black"><tt> GPKG </tt></font> <br>
<font color="green"><tt>! SOLUTION SCHEME</tt></font><br>
<font color="blue"><tt>Solution Scheme </tt></font> <font color="red"><tt>== </tt></font> <font color="black"><tt> HPC </tt></font> <br>
<font color="blue"><tt>Hardware </tt></font> <font color="red"><tt>== </tt></font> <font color="black"><tt> GPU </tt></font> <br>
<li> Set the start and end time of the model:<br>
<font color="green"><tt>! TIME CONTROL</tt></font><br>
<font color="blue"><tt>Start Time </tt></font> <font color="red"><tt>== </tt></font> <font color="black"><tt> 0</tt></font> <br>
<font color="blue"><tt>End Time </tt></font> <font color="red"><tt>== </tt></font> <font color="black"><tt> 3 </tt></font> <br>
<li> Set the model output folders:<br>
<font color="green"><tt>! OUTPUT FOLDERS</tt></font><br>
<font color="blue"><tt>Log Folder </tt></font> <font color="red"><tt>== </tt></font> <font color="black"><tt> log </tt></font> <br>
<font color="blue"><tt>Output Folder </tt></font> <font color="red"><tt>== </tt></font> <font color="black"><tt> ..\results\ </tt></font> <br>
<font color="blue"><tt>Write Check Files </tt></font> <font color="red"><tt>== </tt></font> <font color="black"><tt> ..\check\ </tt></font> <br>
<li> Add comments to explain the commands.
<li> Remove all commands not included in the headings above, they are unnecessary for a TUFLOW SWMM model.
</ol>
<br>
=== TUFLOW Control File (TCF) ===
| |||