Tutorial M02: Difference between revisions
Content deleted Content added
| (11 intermediate revisions by 4 users not shown) | |||
Line 19:
== GIS Inputs ==
Create, import and view input data:<br>
:*<u>[[Tutorial_M02_001_GIS_Inputs_QGIS | QGIS - SHP]]</u>
:*<u>[[Tutorial_M02_001_GIS_Inputs_QGIS_GPKG | QGIS - GPKG]]</u>
== Simulation Control Files ==
Line 25 ⟶ 26:
<ol>
<li>Save a copy of '''M01_001.tgc''' as '''M02_001.tgc''' in the '''Module_02\TUFLOW\model''' folder. <br>
<li>Open the '''M02_001.tgc''' in a text editor and add the following line after the '<font color="blue"><tt>Read GRID Zpts</tt></font> <font color="red"><tt> == </tt></font> <font color="black"><tt>grid\DEM.tif</tt></font>' command. Note, the points and lines are in separate layers, but are part of the same breakline, therefore they are input on the same line with a vertical bar '|' to tell TUFLOW the layers are linked. The TUFLOW modelling convention is to list the lines first and then points.<br>
<u>'''QGIS - SHP'''</u><br>
<font color="blue"><tt>Read GIS Z Shape </tt></font> <font color="red"><tt>== </tt></font> <font color="black"><tt>gis\2d_zsh_M02_rd_crest_001_L.shp | gis\2d_zsh_M02_rd_crest_001_P.shp </tt></font> <font color="green"><tt> ! Defines the road crest</tt></font> <br>
<u>'''QGIS - GPKG'''</u><br>
As the points and lines are in separate shapefiles, but are part of the same breakline, they are input on the same line with a vertical bar '|' to tell TUFLOW the layers are linked. The TUFLOW modelling convention is to list the lines first and then points. <br>▼
<font color="blue"><tt>Read GIS Z Shape </tt></font> <font color="red"><tt>== </tt></font> <font color="black"><tt>2d_zsh_M02_rd_crest_001_L | 2d_zsh_M02_rd_crest_001_P </tt></font> <font color="green"><tt> ! Defines the road crest</tt></font> <br>
<li>Save the TGC.
</ol>
Line 34 ⟶ 37:
<ol>
<li>Save a copy of '''M01_5m_001.tcf''' as '''M02_5m_001.tcf''' in the '''Module_02\TUFLOW\runs''' folder.
<li>Open the file '''M02_5m_001.tcf''' in a text editor and
<u>'''QGIS - SHP'''</u><br>
<font color="blue"><tt>Geometry Control File </tt></font> <font color="red"><tt>== </tt></font> <font color="black"><tt>..\model\M02_001.tgc </tt></font> <font color="green"><tt> ! Reference the TUFLOW Geometry Control File</tt></font> <br>
<u>'''QGIS - GPKG'''</u><br>
<font color="blue"><tt>Spatial Database </tt></font> <font color="red"><tt>== </tt></font> <font color="black"><tt>..\model\gis\M02_001.gpkg </tt></font> <font color="green"><tt> ! Specify the location of the GeoPackage Spatial Database</tt></font> <br>
<font color="blue"><tt>Geometry Control File </tt></font> <font color="red"><tt>== </tt></font> <font color="black"><tt>..\model\M02_001.tgc </tt></font> <font color="green"><tt> ! Reference the TUFLOW Geometry Control File</tt></font><br>
<li>Save the TCF.
</ol>
Line 44 ⟶ 51:
<li>Save a copy of '''_run_M01_HPC.bat''' as'''_run_M02_HPC.bat''' in the '''Module_02\TUFLOW\runs''' folder.
<li>Open the '''_run_M02_HPC.bat''' in a text editor and update the text: <br>
<font color="blue"><tt>'''set'''</tt></font> <font color="black"><tt>exe</tt></font><font color="red"><tt>=</tt></font><font color="black"><tt>"..\..\..\exe\
<font color="blue"><tt>'''set'''</tt></font> <font color="black"><tt>run</tt></font><font color="red"><tt>=</tt></font><font color="black"><tt>start "TUFLOW" /wait</tt></font> <font color="orange"><tt> %exe%</tt></font> <font color="black"><tt> -b</tt></font> <br>
<font color="orange"><tt>%run% </tt></font> <font color="black"><tt>M02_5m_001.tcf </tt></font> <br>
Line 63 ⟶ 70:
== Check Files ==
While the model is running,
:*<u>[[Tutorial_M02_001_Check_Files_QGIS | QGIS - SHP]]</u>
:*<u>[[Tutorial_M02_001_Check_Files_QGIS_GPKG | QGIS - GPKG]]</u>
== Results ==
Line 85 ⟶ 93:
== GIS Inputs ==
Create, import and view input data:
:*<u>[[Tutorial_M02_002_GIS_Inputs_QGIS | QGIS - SHP]]</u>
:*<u>[[Tutorial_M02_002_GIS_Inputs_QGIS_GPKG | QGIS - GPKG]]</u>
== Simulation Control Files ==
Line 92 ⟶ 101:
<li>Save a copy of the '''M02_001.tgc''' as '''M02_002.tgc''' in the '''Module_02\TUFLOW\model''' folder.
<li>Open the '''M02_002.tgc''' in a text editor and add the following lines after the road crest input. <br>
<u>'''QGIS - SHP'''</u><br>
<font color="blue"><tt>Read GIS Z Shape </tt></font> <font color="red"><tt>== </tt></font> <font color="black"><tt>gis\2d_zsh_M02_fill_002_R.shp </tt></font> <font color="green"><tt> ! Defines areas of imported fill</tt></font> <br>
<font color="blue"><tt>Read GIS Z Shape </tt></font> <font color="red"><tt>== </tt></font> <font color="black"><tt>gis\2d_zsh_M02_merge_002_R.shp </tt></font> <font color="green"><tt> ! Defines areas of merging topography</tt></font> <br>
<font color="blue"><tt>Read GIS Z Shape </tt></font> <font color="red"><tt>== </tt></font> <font color="black"><tt>gis\2d_zsh_M02_cut_002_R.shp </tt></font> <font color="green"><tt> ! Defines excavation through embankment</tt></font> <br>
<font color="blue"><tt>
<u>'''QGIS - GPKG'''</u><br>
<font color="blue"><tt>Read GIS Z Shape </tt></font> <font color="red"><tt>== </tt></font> <font color="black"><tt>2d_zsh_M02_merge_002_R </tt></font> <font color="green"><tt> ! Defines areas of merging topography</tt></font> <br>
<font color="blue"><tt>Read GIS Z Shape </tt></font> <font color="red"><tt>== </tt></font> <font color="black"><tt>2d_zsh_M02_cut_002_R </tt></font> <font color="green"><tt> ! Defines excavation through embankment</tt></font> <br>
<font color="blue"><tt>Read GIS Z Shape </tt></font> <font color="red"><tt>== </tt></font> <font color="black"><tt>2d_zsh_M02_landscape_002_R | 2d_zsh_M02_landscape_002_L | 2d_zsh_M02_landscape_002_P </tt></font> <font color="green"><tt>
! Defines areas of complex landscaping</tt></font> <br>
▲As the points, lines and
<li>Add in the following line after the '<font color="blue"><tt>Read GIS Mat</tt></font>' command.<br>
<u>'''QGIS - SHP'''</u><br>
<font color="blue"><tt>Read GIS Mat </tt></font> <font color="red"><tt>== </tt></font> <font color="black"><tt>gis\2d_mat_M02_landscape_002_R.shp </tt></font> <font color="green"><tt> ! Sets the material values according to attributes in the GIS layer</tt></font> <br>
<u>'''QGIS - GPKG'''</u><br>
<font color="blue"><tt>Read GIS Mat </tt></font> <font color="red"><tt>== </tt></font> <font color="black"><tt>2d_mat_M02_landscape_002_R </tt></font> <font color="green"><tt> ! Sets the material values according to attributes in the GIS layer</tt></font> <br>
Assigns the updated materials values due to the development. As the order of commands in the TGC is critical, ensure this command is written after the original <font color="blue"><tt>Read GIS Mat</tt></font> command.
<li>Save the TGC.
Line 106 ⟶ 125:
<ol>
<li>Save a copy of '''M02_5m_001.tcf''' as '''M02_5m_002.tcf''' in the '''Module_02\TUFLOW\runs''' folder.
<li>Open the file '''M02_5m_002.tcf''' in a text editor and
<u>'''QGIS - SHP'''</u><br>
<font color="blue"><tt>Geometry Control File </tt></font> <font color="red"><tt>== </tt></font> <font color="black"><tt>..\model\M02_002.tgc </tt></font> <font color="green"><tt> ! Reference the TUFLOW Geometry Control File</tt></font> <br>
<u>'''QGIS - GPKG'''</u><br>
<font color="blue"><tt>Spatial Database </tt></font> <font color="red"><tt>== </tt></font> <font color="black"><tt>..\model\gis\M02_002.gpkg </tt></font> <font color="green"><tt> ! Specify the location of the GeoPackage Spatial Database</tt></font> <br>
<font color="blue"><tt>Geometry Control File </tt></font> <font color="red"><tt>== </tt></font> <font color="black"><tt>..\model\M02_002.tgc </tt></font> <font color="green"><tt> ! Reference the TUFLOW Geometry Control File</tt></font><br>
<li>Save the TCF.
</ol>
Line 120 ⟶ 143:
== Check Files ==
While the model is running, review the added features are specified correctly:
:*<u>[[Tutorial_M02_002_Check_Files_QGIS | QGIS - SHP]]</u>
:*<u>[[Tutorial_M02_002_Check_Files_QGIS_GPKG | QGIS - GPKG]]</u>
== Results ==
Line 129 ⟶ 153:
<li>Create a new batch file '''_M02_asc_to_asc_Level_Difference.bat''' in the '''Module_02\TUFLOW\results\grids''' folder and open it in a text editor.
<li>Input the following (Note: Utility location may differ): <br>
<font color="blue"><tt>'''set''' </tt></font> <font color="black"><tt>asc_to_asc</tt></font><font color="red"><tt>=</tt></font><font color="black"><tt>"
<li>Use the -dif flag to call the difference function. The utility then expects two grid files, it subtracts the first grid from the second. Add the following syntax below the 'set asc_to_asc' command.<br>
<font color="orange"><tt>%asc_to_asc% </tt></font> <font color="black"><tt>-b -dif M02_5m_002_h_Max.
<li>Optional is to use the -out flag to specify the name of the output grids.<br>
<font color="orange"><tt>%asc_to_asc% </tt></font> <font color="black"><tt>-b -dif -out M02_Level_Difference M02_5m_002_h_Max.
<li>Save the batch file and double click it in file explorer to run the utility.
<li>The resulting difference grids appear in the same folder location, open these in a GIS software to see the effects of the topography changes on the flood levels.
*M02_Level_Difference.
*M02_Level_Difference_wd.
<br>
[[File:
<br>
Line 147 ⟶ 171:
:*Check files were assessed to view the changes on the underlying topographic model.
:*Impact assessment was conducted using the asc_to_asc utility.
:*For further training opportunities see <u>[https://tuflow.com/training/training-course-catalogue/ TUFLOW Training Catalogue]</u> and/or contact <u>[mailto:training@tuflow.com training@tuflow.com]</u>. <br>
<br>
{{Tips Navigation
| |||