Tutorial M06: Difference between revisions

Content deleted Content added
 
(14 intermediate revisions by 3 users not shown)
Line 27:
<li>Open the file and add the additional rainfall boundary conditions as shown below:<br>
<br>
[[File:M06_bc_dbase_01aM06_bc_dbase_01b.png]]<br>
<br>
<li>Save the bc_dbase.
Line 39:
[[File:M06 Materials 001.png]]<br>
<br>
<li>For Material ID 1, 3 and 510, four numbers (y1, n1, y2, n2) are added to each row separated by commas and are applied as follows: <br>
:*Below depth y1 (m), a Manning’s n value of n1 is applied.
:*Above depth y2 (m), a Manning’s n value n2 is applied.
Line 56:
<li>Open the '''M06_001.tbc''' in a text editor.
<li>The current rainfall versus time inflows (2d_sa) are replaced in this tutorial. The base inflow and outflow (2d_bc) remain the same. Comment out the 'Read GIS SA' command by placing '!' at the beginning: <br>
<u>'''QGIS - SHP'''</u><br>
<font color="green"><tt>! Read GIS SA == gis\2d_sa_M01_001_R.shp</tt></font><br>
<u>'''QGIS - GPKG'''</u><br>
<font color="green"><tt>! Read GIS SA == 2d_sa_M01_001_R</tt></font><br>
<li>Add the following command line:<br>
<font color="blue"><tt>Global Rainfall BC </tt></font> <font color="red"><tt>== </tt></font> <font color="black"><tt>RF_FC04</tt></font><font color="green"><tt> ! Reads in global rainfall</tt></font>
Line 66 ⟶ 69:
<ol>
<li>Save a copy of '''M02_5m_001.tcf''' as '''M06_5m_001.tcf''' in the '''Module_06\TUFLOW\runs''' folder.
<li>Open the '''M06_5m_001.tcf''' in a text editor and updatemake the following reference of the TBCupdates: <br>
<font color="blue"><tt>BC Control File </tt></font> <font color="red"><tt>== </tt></font> <font color="black"><tt>..\model\M06_001.tbc</tt></font> <font color="green"><tt> ! Reference the TUFLOW Boundary Conditions Control File</tt></font> <br>
<li>Update the reference to the bc database: <br>
<font color="blue"><tt>BC Database </tt></font> <font color="red"><tt>== </tt></font> <font color="black"><tt>..\bc_dbase\bc_dbase_M06_001.csv</tt></font> <font color="green"><tt> ! Reference the Boundary Conditions Database</tt></font> <br>
<li>Update the reference to the materials file:<br>
<font color="blue"><tt>Read Materials File </tt></font> <font color="red"><tt>== </tt></font> <font color="black"><tt>..\model\materials_M06_001.csv</tt></font> <font color="green"><tt> ! Reference the Materials Definition File</tt></font> <br>
<li>A Timestep Maximum command is required in direct rainfall modelling to ensure the timestep does not get too large during periods where cells are dry (causing the model to become unstable). Include the command in the 'Time Control' section: <br>
Line 85 ⟶ 86:
<li>Save a copy of '''_run_M02_HPC.bat''' as '''_run_M06_HPC.bat''' in the '''Module_06\TUFLOW\runs''' folder.
<li>Update the batch file to reference the '''M06_5m_001.tcf''' :<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\2023-03-AA2025.1.0\TUFLOW_iSP_w64.exe"</tt></font> <br>
<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>M06_5m_001.tcf </tt></font> <br>
Line 117 ⟶ 118:
== GIS Inputs ==
Create, import and view input data:<br>
:*<u>[[Tutorial_M06_002_GIS_Inputs_QGIS | QGIS - SHP]]</u><br>
:*<u>[[Tutorial_M06_002_GIS_Inputs_QGIS_GPKG | QGIS - GPKG]]</u><br>
 
== Materials ==
Line 137 ⟶ 139:
<li>Open the '''M06_002.tbc''' in a text editor.
<li>Comment out the Global Rainfall command and add the Read GIS RF command:<br>
<u>'''QGIS - SHP'''</u><br>
<font color="green"><tt>! Global Rainfall BC == RF_FC04 </tt></font><br>
<font color="blue"><tt>Read GIS RF </tt></font> <font color="red"><tt>== </tt></font> <font color="black"><tt>gis\2d_rf_M06_polygons_002_R.shp</tt></font><font color="green"><tt> ! Reads in 2D rainfall boundaries</tt></font><br>
<u>'''QGIS - GPKG'''</u><br>
<font color="green"><tt>! Global Rainfall BC == RF_FC04 </tt></font><br>
<font color="blue"><tt>Read GIS RF </tt></font> <font color="red"><tt>== </tt></font> <font color="black"><tt>2d_rf_M06_polygons_002_R</tt></font><font color="green"><tt> ! Reads in 2D rainfall boundaries</tt></font><br>
<li>Save the TBC.
</ol>
Line 145 ⟶ 151:
<ol>
<li>Save a copy of '''M06_5m_001.tcf''' as '''M06_5m_002.tcf''' in the '''Module_06\TUFLOW\runs''' folder.
<li>Open the '''M06_5m_002.tcf''' in a text editor and updatemake the following reference of the TBCupdates: <br>
<u>'''QGIS - SHP'''</u><br>
<font color="blue"><tt>BC Control File </tt></font> <font color="red"><tt>== </tt></font> <font color="black"><tt>..\model\M06_002.tbc</tt></font> <font color="green"><tt> ! Reference the TUFLOW Boundary Conditions Control File</tt></font> <br>
<font color="blue"><tt>Read Materials File </tt></font> <font color="red"><tt>== </tt></font> <font color="black"><tt>..\model\materials_M06_002.csv</tt></font> <font color="green"><tt> ! Reference the Materials Definition 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\M06_002.gpkg </tt></font> <font color="green"><tt>! Specify the location of the GeoPackage Spatial Database</tt></font> <br>
<font color="blue"><tt>BC Control File </tt></font> <font color="red"><tt>== </tt></font> <font color="black"><tt>..\model\M06_002.tbc</tt></font> <font color="green"><tt> ! Reference the TUFLOW Boundary Conditions Control File</tt></font> <br>
<li>Update the reference to the materials file: <br>
<font color="blue"><tt>Read Materials File </tt></font> <font color="red"><tt>== </tt></font> <font color="black"><tt>..\model\materials_M06_002.csv</tt></font> <font color="green"><tt> ! Reference the Materials Definition File</tt></font> <br>
<li>Add Material Rainfall Loss (RFML) as an additional Map Output Data Type. This output is discussed in the Results section. <br>
Line 165 ⟶ 175:
<li>Open the '''M06_5m_002.tlf''' from the '''Module_06\TUFLOW\runs\log''' folder in a text editor.
<li>Review the losses applied in the materials layer:<br>
{{Video|name=Animation_M06_Check_002_01c.mp4|width=826}}<br>
<br>
[[File:Animation M06 Check 002 01b.gif]]<br>
<br>
<li>Review the hyetograph information. The TLF shows the conversion for each histogram:<br>
{{Video|name=Animation_M06_Check_002_02a.mp4|width=826}}<br>
<br>
[[File:Animation M06 Check 002 02.gif]]<br>
<br>
</ol>
 
Line 182 ⟶ 188:
== GIS Inputs ==
Create, import and view input data:<br>
:*<u>[[Tutorial_M06_003_GIS_Inputs_QGIS | QGIS - SHP]]</u><br>
:*<u>[[Tutorial_M06_003_GIS_Inputs_QGIS_GPKG | QGIS - GPKG]]</u><br>
 
== Simulation Control Files ==
===TUFLOW Rainfall Control File (TRFC) ===
The TRFC commands generate rainfall grids based on point rainfall gauges. There are three spatial interpolation methods available, this tutorial uses Inverse Distance Weighting (IDW). For more information on IDW and the other available methods, seerefer Section 7.4.3.4 ofto the <u>[https://downloadsdocs.tuflow.com/_archiveclassic-hpc/TUFLOWmanual/Releaseslatest/2018-03/TUFLOW%20Manual.2018-03.pdf 2018 TUFLOW Manual]</u> or <u>[[TUFLOW_Rainfall_Control_File_Examples | TUFLOW Rainfall Control File Examples]]</u>. <br>
The TRFC is processed during model initialisation, outputting a series of rainfall grids which are used by the simulation to vary the rainfall over the 2D domain. The rainfall grids are output to a separate folder '''RFG\<TCF name>''' in the location of the TRFC (e.g. '''Module_06\TUFLOW\model\RFG\M06_5m_003'''). This approach reduces memory usage while TUFLOW is running. <br>
 
Line 192 ⟶ 199:
<li>Create a new text file '''M06_point2grid_003.trfc''' and save it in the '''Module_06\TUFLOW\model''' folder.
<li>Add the following commands:<br>
<u>'''QGIS - SHP'''</u><br>
<font color="blue"><tt>RF Grid Format </tt></font> <font color="red"><tt>== </tt></font> <font color="black"><tt>TIF</tt></font> <font color="green"><tt> ! Sets the output grid format</tt></font> <br>
<font color="blue"><tt>RF Interpolation Method </tt></font> <font color="red"><tt>== </tt></font> <font color="black"><tt>IDW</tt></font> <font color="green"><tt> ! Sets the interpolation approach between rainfall locations </tt></font> <br>
<font color="blue"><tt>RF Grid Cell Size </tt></font> <font color="red"><tt>== </tt></font> <font color="black"><tt>25</tt></font> <font color="green"><tt> ! Sets the cell size for the generated rainfall grids</tt></font> <br>
<font color="blue"><tt>Read GIS RF Points </tt></font> <font color="red"><tt>== </tt></font> <font color="black"><tt>gis\2d_rf_M06_pt2grid_003_P.shp</tt></font> <font color="green"><tt> ! Reads the point rainfall locations in the 2d_rf file format</tt></font> <br>
<u>'''QGIS - GPKG'''</u><br>
<font color="blue"><tt>RF Grid Format </tt></font> <font color="red"><tt>== </tt></font> <font color="black"><tt>TIF</tt></font> <font color="green"><tt> ! Sets the output grid format</tt></font> <br>
<font color="blue"><tt>RF Interpolation Method </tt></font> <font color="red"><tt>== </tt></font> <font color="black"><tt>IDW</tt></font> <font color="green"><tt> ! Sets the interpolation approach between rainfall locations </tt></font> <br>
<font color="blue"><tt>RF Grid Cell Size </tt></font> <font color="red"><tt>== </tt></font> <font color="black"><tt>25</tt></font> <font color="green"><tt> ! Sets the cell size for the generated rainfall grids</tt></font> <br>
<font color="blue"><tt>Read GIS RF Points </tt></font> <font color="red"><tt>== </tt></font> <font color="black"><tt>2d_rf_M06_pt2grid_003_P</tt></font> <font color="green"><tt> ! Reads the point rainfall locations in the 2d_rf file format</tt></font> <br>
<li>Save the TRFC.</ol>
 
Line 202 ⟶ 215:
<li>Save a copy of '''M06_002.tbc''' as '''M06_003.tbc''' in the '''Module_06\TUFLOW\model''' folder.
<li>Open the '''M06_003.tbc''' in a text editor and comment out the Read GIS RF command:<br>
<u>'''QGIS - SHP'''</u><br>
<font color="green"><tt>! Read GIS RF == gis\2d_rf_M06_polygons_002_R.shp </tt></font><br>
<u>'''QGIS - GPKG'''</u><br>
<font color="green"><tt>! Read GIS RF == 2d_rf_M06_polygons_002_R </tt></font><br>
<li>Save the TBC.</ol>
 
Line 208 ⟶ 224:
<ol>
<li>Save a copy of '''M06_5m_002.tcf''' as '''M06_5m_003.tcf''' in the '''Module_06\TUFLOW\runs''' folder.
<li>Open the '''M06_5m_003.tcf''' in a text editor and updatemake the following reference of the TBCupdates: <br>
<u>'''QGIS - SHP'''</u><br>
<font color="blue"><tt>BC Control File </tt></font> <font color="red"><tt>== </tt></font> <font color="black"><tt>..\model\M06_003.tbc</tt></font> <font color="green"><tt> ! Reference the TUFLOW Boundary Conditions 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\M06_003.gpkg</tt></font> <font color="green"><tt> ! Specify the location of the GeoPackage Spatial Database</tt></font> <br>
<font color="blue"><tt>BC Control File </tt></font> <font color="red"><tt>== </tt></font> <font color="black"><tt>..\model\M06_003.tbc</tt></font> <font color="green"><tt> ! Reference the TUFLOW Boundary Conditions Control File</tt></font> <br>
<li>Include a reference to the TRFC in the 'Model Inputs' section: <br>
<font color="blue"><tt>Rainfall Control File </tt></font> <font color="red"><tt>== </tt></font> <font color="black"><tt> ..\model\M06_point2grid_003.trfc </tt></font> <font color="green"><tt> ! Reference the TUFLOW Rainfall Control File</tt></font> <br>
<li>Save the TCF.</ol>
Line 225 ⟶ 245:
:*Navigate to the '''Module_06\TUFLOW\model\RFG\M05_5m_003''' folder with rainfall grids created from the rainfall interpolation.
:*The timestep matches the one specified in the rainfall hyetographs (10 minutes). Hours are used in the rainfall grids names:<br>
<ol>[[File:M06 RFG grids 01M06_RFG_grids_01a.png]]<br>
</ol><br>
:*A total rainfall depth '''M06_5m_003_rf_total.tif''' is created, this is not used by TUFLOW during the simulation, but can be used for checking purposes.
Line 244 ⟶ 264:
:*TUFLOW log files and rainfall grids were used to check the rainfall was applied correctly.
:*Map outputs RFC, RFR, n and RFML were inspected.
:*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>
:*Alternatively, see the <u>[[TUFLOW_Example_Models#Example_Model_Catalogue | TUFLOW Example Models]]</u> to explore the full list of TUFLOW features.
<br>
 
Line 252 ⟶ 274:
<li>Open the csv. The file requires two columns, the first is time (in simulation hours) and the second is the rainfall grid.<br>
<br>
[[File:M06 griddedrainfall_01M06_griddedrainfall_01a.png]]<br>
<br>
<li>Save a copy of '''M06_5m_003.tcf''' as '''M06_5m_004.tcf'''. Change the commands to read in the grids created in the RFG folder:<br>