Difference between revisions of "Tutorial M06"
(18 intermediate revisions by 3 users not shown) | |||
Line 22: | Line 22: | ||
<li>Navigate to the '''Module_06\Tutorial_Data''' folder. Copy the '''rainfall_stations.csv''' and paste it in the ''' Module_06\TUFLOW\bc_dbase''' folder. This file contains the rainfall hyetographs. | <li>Navigate to the '''Module_06\Tutorial_Data''' folder. Copy the '''rainfall_stations.csv''' and paste it in the ''' Module_06\TUFLOW\bc_dbase''' folder. This file contains the rainfall hyetographs. | ||
<li>Open the file, there are 4 columns labelled ‘RF_FC04’ to ‘RF_FC07’. Part 1 references 'RF_FC04', the remaining hyetographs are used in Part 2. <br> | <li>Open the file, there are 4 columns labelled ‘RF_FC04’ to ‘RF_FC07’. Part 1 references 'RF_FC04', the remaining hyetographs are used in Part 2. <br> | ||
− | <br>[[File: | + | <br>[[File:M06_hyetograph_c.png]]<br> |
<br> | <br> | ||
<li>Save a copy of the '''bc_dbase.csv''' as '''bc_dbase_M06_001.csv'''. | <li>Save a copy of the '''bc_dbase.csv''' as '''bc_dbase_M06_001.csv'''. | ||
− | <li>Open the file and add the additional rainfall boundary conditions:<br> | + | <li>Open the file and add the additional rainfall boundary conditions as shown below:<br> |
<br> | <br> | ||
− | [[File: | + | [[File:M06_bc_dbase_01b.png]]<br> |
<br> | <br> | ||
<li>Save the bc_dbase. | <li>Save the bc_dbase. | ||
Line 39: | Line 39: | ||
[[File:M06 Materials 001.png]]<br> | [[File:M06 Materials 001.png]]<br> | ||
<br> | <br> | ||
− | <li>For Material ID 1, 3 and | + | <li>For Material ID 1, 3 and 10, 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. | :*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. | :*Above depth y2 (m), a Manning’s n value n2 is applied. | ||
Line 56: | Line 56: | ||
<li>Open the '''M06_001.tbc''' in a text editor. | <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> | <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> | ||
− | <font color="green"><tt>! Read GIS SA == gis\2d_sa_M01_001_R.shp</tt></font> | + | <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> | <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> | <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: | Line 69: | ||
<ol> | <ol> | ||
<li>Save a copy of '''M02_5m_001.tcf''' as '''M06_5m_001.tcf''' in the '''Module_06\TUFLOW\runs''' folder. | <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 | + | <li>Open the '''M06_5m_001.tcf''' in a text editor and make the following reference updates: <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> | <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> | ||
− | |||
<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> | <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> | ||
− | |||
<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> | <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 | + | <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> |
− | <font color="blue"><tt>Timestep Maximum </tt></font> <font color="red"><tt>== </tt></font> <font color="black"><tt>5</tt></font> <font color="green"><tt> ! Specifies a maximum timestep of 5 seconds</tt></font> <br> | + | <font color="blue"><tt>Timestep Maximum </tt></font> <font color="red"><tt>== </tt></font> <font color="black"><tt>2.5</tt></font> <font color="green"><tt> ! Specifies a maximum timestep of 2.5 seconds</tt></font> <br> |
<li>Add Cumulative Rainfall (RFC), Rainfall Rate (RFR) and Manning's n (n) as additional Map Output Data Types. These outputs are discussed in the Results section. <br> | <li>Add Cumulative Rainfall (RFC), Rainfall Rate (RFR) and Manning's n (n) as additional Map Output Data Types. These outputs are discussed in the Results section. <br> | ||
<font color="blue"><tt>Map Output Data Types </tt></font> <font color="red"><tt>== </tt></font> <font color="black"><tt> h V d dt RFC RFR n </tt></font> <font color="green"><tt> ! Outputs water levels, velocities, depths, minimum timestep, cumulative rainfall, rainfall rate, manning's n</tt></font> <br> | <font color="blue"><tt>Map Output Data Types </tt></font> <font color="red"><tt>== </tt></font> <font color="black"><tt> h V d dt RFC RFR n </tt></font> <font color="green"><tt> ! Outputs water levels, velocities, depths, minimum timestep, cumulative rainfall, rainfall rate, manning's n</tt></font> <br> | ||
Line 85: | Line 86: | ||
<li>Save a copy of '''_run_M02_HPC.bat''' as '''_run_M06_HPC.bat''' in the '''Module_06\TUFLOW\runs''' folder. | <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> | <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\ | + | <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-A</tt></font><font color="red"><tt>F</tt></font><font color="black"><tt>\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="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> | <font color="orange"><tt>%run% </tt></font> <font color="black"><tt>M06_5m_001.tcf </tt></font> <br> | ||
Line 101: | Line 102: | ||
<li>Review the hyetograph information. When using the direct rainfall approach, a rainfall depth fallen in a particular increment of time is input. TUFLOW converts this depth per time increment to a flow (m<sup>3</sup>/s) and applies this flow at each cell. The TLF shows this conversion:<br> | <li>Review the hyetograph information. When using the direct rainfall approach, a rainfall depth fallen in a particular increment of time is input. TUFLOW converts this depth per time increment to a flow (m<sup>3</sup>/s) and applies this flow at each cell. The TLF shows this conversion:<br> | ||
<br> | <br> | ||
− | [[File: | + | [[File:M06_histogram_conversion_a.png]]<br> |
<br> | <br> | ||
</ol> | </ol> | ||
Line 117: | Line 118: | ||
== GIS Inputs == | == GIS Inputs == | ||
Create, import and view input data:<br> | Create, import and view input data:<br> | ||
− | :*<u>[[Tutorial_M06_002_GIS_Inputs_QGIS | QGIS]]</u><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 == | == Materials == | ||
Line 137: | Line 139: | ||
<li>Open the '''M06_002.tbc''' in a text editor. | <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> | <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="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> | <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. | <li>Save the TBC. | ||
</ol> | </ol> | ||
Line 145: | Line 151: | ||
<ol> | <ol> | ||
<li>Save a copy of '''M06_5m_001.tcf''' as '''M06_5m_002.tcf''' in the '''Module_06\TUFLOW\runs''' folder. | <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 | + | <li>Open the '''M06_5m_002.tcf''' in a text editor and make the following reference updates: <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> | <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> | <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> | <li>Add Material Rainfall Loss (RFML) as an additional Map Output Data Type. This output is discussed in the Results section. <br> | ||
Line 165: | Line 175: | ||
<li>Open the '''M06_5m_002.tlf''' from the '''Module_06\TUFLOW\runs\log''' folder in a text editor. | <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> | <li>Review the losses applied in the materials layer:<br> | ||
− | + | {{Video|name=Animation_M06_Check_002_01c.mp4|width=826}}<br> | |
− | |||
− | <br> | ||
<li>Review the hyetograph information. The TLF shows the conversion for each histogram:<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> | ||
</ol> | </ol> | ||
Line 182: | Line 188: | ||
== GIS Inputs == | == GIS Inputs == | ||
Create, import and view input data:<br> | Create, import and view input data:<br> | ||
− | :*<u>[[Tutorial_M06_003_GIS_Inputs_QGIS | QGIS]]</u><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 == | == Simulation Control Files == | ||
===TUFLOW Rainfall Control File (TRFC) === | ===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, | + | 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, refer to the <u>[https://docs.tuflow.com/classic-hpc/manual/latest/ 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> | 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: | Line 199: | ||
<li>Create a new text file '''M06_point2grid_003.trfc''' and save it in the '''Module_06\TUFLOW\model''' folder. | <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> | <li>Add the following commands:<br> | ||
− | <font color="blue"><tt>RF Grid Format </tt></font> <font color="red"><tt>== </tt></font> <font color="black"><tt> | + | <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 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>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> | <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> | <li>Save the TRFC.</ol> | ||
Line 202: | Line 215: | ||
<li>Save a copy of '''M06_002.tbc''' as '''M06_003.tbc''' in the '''Module_06\TUFLOW\model''' folder. | <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> | <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> | <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> | <li>Save the TBC.</ol> | ||
Line 208: | Line 224: | ||
<ol> | <ol> | ||
<li>Save a copy of '''M06_5m_002.tcf''' as '''M06_5m_003.tcf''' in the '''Module_06\TUFLOW\runs''' folder. | <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 | + | <li>Open the '''M06_5m_003.tcf''' in a text editor and make the following reference updates: <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> | <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: <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> | <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> | <li>Save the TCF.</ol> | ||
Line 225: | Line 245: | ||
:*Navigate to the '''Module_06\TUFLOW\model\RFG\M05_5m_003''' folder with rainfall grids created from the rainfall interpolation. | :*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> | :*The timestep matches the one specified in the rainfall hyetographs (10 minutes). Hours are used in the rainfall grids names:<br> | ||
− | <ol>[[File: | + | <ol>[[File:M06_RFG_grids_01a.png]]<br> |
</ol><br> | </ol><br> | ||
− | :*A total rainfall depth '''M06_5m_003_rf_total. | + | :*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. |
<ol> | <ol> | ||
<br> | <br> | ||
Line 252: | Line 272: | ||
<li>Open the csv. The file requires two columns, the first is time (in simulation hours) and the second is the rainfall grid.<br> | <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> | <br> | ||
− | [[File: | + | [[File:M06_griddedrainfall_01a.png]]<br> |
<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> | <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> |
Latest revision as of 10:53, 31 October 2024
Introduction
In this module, a direct rainfall model is built. The tutorial demonstrates three ways of modelling rainfall for a direct rainfall approach.
- Part 1: Global Rainfall - apply uniform rainfall to all active cells.
- Part 2: Rainfall Polygons - apply rainfall to active cells within digitised polygons and losses within the materials layer.
- Part 3: Gridded Rainfall - apply rainfall temporally and spatially using a TUFLOW Rainfall Control File (TRFC).
The GIS layers are:
- TBC layers:
- 2d_rf: polygons are assigned a rainfall gauge and spatial and temporal adjustment factors.
- TRFC layers:
- 2d_rf: points are specified reflecting rainfall gauge locations. Rainfall is interpolated and a series of rainfall grids are generated.
Module 6 builds from the model created in Module 2. The completed Module 2 model is provided in the Module_06\TUFLOW folder.
Part 1 - Global Rainfall
Boundary Condition Database (bc_dbase)
Update the bc_dbase with a reference to the new rainfall hyetographs:
- Navigate to the Module_06\Tutorial_Data folder. Copy the rainfall_stations.csv and paste it in the Module_06\TUFLOW\bc_dbase folder. This file contains the rainfall hyetographs.
- Open the file, there are 4 columns labelled ‘RF_FC04’ to ‘RF_FC07’. Part 1 references 'RF_FC04', the remaining hyetographs are used in Part 2.
- Save a copy of the bc_dbase.csv as bc_dbase_M06_001.csv.
- Open the file and add the additional rainfall boundary conditions as shown below:
- Save the bc_dbase.
Materials
Surface roughness or bed resistance values (e.g. Manning’s n) are assigned to material IDs. Depth varying roughness values are used in direct rainfall models to reflect the bed roughness at shallow depths.
- Copy the materials_M06_001.csv file from the Module_06\Tutorial_Data folder into the Module_06\TUFLOW\model folder. Depth varying roughness values are applied to three of the Material IDs within the study area:
- For Material ID 1, 3 and 10, four numbers (y1, n1, y2, n2) are added to each row separated by commas and are applied as follows:
- 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.
- Between y1 and y2, the Manning’s n value is interpolated between n1 and n2. The default interpolation method uses a curved fit so that the n values transition gradually.
- For example, for Material ID 1, for depths of water below 0.03m a Manning's n value of 0.10 is applied. For depths of water greater than 0.1m, a Manning's n value of 0.06 is applied. Between 0.03 to 0.1m, a Manning's n value is interpolated between 0.1 and 0.06:
- For Material ID 2 and 4, the Manning’s n value specified in the second column will be applied at all depths, i.e. a value of 0.022 for Material ID 2.
Simulation Control Files
TUFLOW Boundary Control File (TBC)
- Save a copy of M01_001.tbc as M06_001.tbc in the Module_06\TUFLOW\model folder.
- Open the M06_001.tbc in a text editor.
- 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:
QGIS - SHP
! Read GIS SA == gis\2d_sa_M01_001_R.shp
QGIS - GPKG
! Read GIS SA == 2d_sa_M01_001_R
- Add the following command line:
Global Rainfall BC == RF_FC04 ! Reads in global rainfall - Save the TBC.
The Global Rainfall BC command applies a rainfall depth to every active cell within the 2d_code layer based on the input hyetograph. In this case it is the 'RF_FC04' hyetograph specified in the rainfall_stations.csv. The input hyetograph must be in mm verse time, and is applied using a stepped approach. The stepped approach holds the rainfall constant for the time interval (i.e. the rainfall has a histogram stair-step shape). This means, for example, the second rainfall value in the time-series is applied as a constant rainfall from the first time value to the second time value. As with all rainfall boundaries, the first and last rainfall entries should be set to zero, otherwise these rainfall values are applied as a constant rainfall if the simulation starts before or extends beyond the first and last time values in the rainfall time-series.
TUFLOW Control File (TCF)
- Save a copy of M02_5m_001.tcf as M06_5m_001.tcf in the Module_06\TUFLOW\runs folder.
- Open the M06_5m_001.tcf in a text editor and make the following reference updates:
BC Control File == ..\model\M06_001.tbc ! Reference the TUFLOW Boundary Conditions Control File
BC Database == ..\bc_dbase\bc_dbase_M06_001.csv ! Reference the Boundary Conditions Database
Read Materials File == ..\model\materials_M06_001.csv ! Reference the Materials Definition File
- 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:
Timestep Maximum == 2.5 ! Specifies a maximum timestep of 2.5 seconds
- Add Cumulative Rainfall (RFC), Rainfall Rate (RFR) and Manning's n (n) as additional Map Output Data Types. These outputs are discussed in the Results section.
Map Output Data Types == h V d dt RFC RFR n ! Outputs water levels, velocities, depths, minimum timestep, cumulative rainfall, rainfall rate, manning's n
- A Map Cutoff Depth is useful for direct rainfall modelling where there is a need to differentiate between very shallow sheet flow and flooding. Include the following command in the ! OUTPUT SETTINGS section:
Map Cutoff Depth == 0.05 ! Sets map cutoff depth of 0.05 meters
- Save the TCF.
Running the Simulation
- Save a copy of _run_M02_HPC.bat as _run_M06_HPC.bat in the Module_06\TUFLOW\runs folder.
- Update the batch file to reference the M06_5m_001.tcf :
set exe="..\..\..\exe\2023-03-AF\TUFLOW_iSP_w64.exe"
set run=start "TUFLOW" /wait %exe% -b
%run% M06_5m_001.tcf
- Save the batch file and double click it in file explorer to run the simulation.
Troubleshooting
See tips on common mistakes and troubleshooting steps if the model doesn't run:
Check Files
While the model is running, review the added features are specified correctly:
- Open the M06_5m_001.tlf from the Module_06\TUFLOW\runs\log folder in a text editor.
- Review the hyetograph information. When using the direct rainfall approach, a rainfall depth fallen in a particular increment of time is input. TUFLOW converts this depth per time increment to a flow (m3/s) and applies this flow at each cell. The TLF shows this conversion:
Results
When the model is finished, review the results:
Part 2 - Rainfall Polygons
The second part of this module introduces:
- Polygons in a 2d_rf file to distribute multiple hyetographs across the catchment.
- Initial and continuing rainfall losses in the materials file.
GIS Inputs
Create, import and view input data:
Materials
Rainfall losses applied through the materials file remove the loss depth from the rainfall before it is applied as a boundary on the 2D cells.
- Save a copy of materials_M06_001.csv as materials_M06_002.csv in the Module_06\TUFLOW\model folder.
- Open the materials_M06_002.csv in a spreadsheet program.
- Update the Rainfall Losses column for Material 1D 1 (pasture) and 10 (vegetated creek) with an initial loss of 20mm and continuing loss of 5mm/hr:
- Save the materials file.
Simulation Control Files
TUFLOW Boundary Control File (TBC)
- Save a copy of M06_001.tbc as M06_002.tbc in the Module_06\TUFLOW\model folder.
- Open the M06_002.tbc in a text editor.
- Comment out the Global Rainfall command and add the Read GIS RF command:
QGIS - SHP
! Global Rainfall BC == RF_FC04
Read GIS RF == gis\2d_rf_M06_polygons_002_R.shp ! Reads in 2D rainfall boundaries
QGIS - GPKG
! Global Rainfall BC == RF_FC04
Read GIS RF == 2d_rf_M06_polygons_002_R ! Reads in 2D rainfall boundaries
- Save the TBC.
TUFLOW Control File (TCF)
- Save a copy of M06_5m_001.tcf as M06_5m_002.tcf in the Module_06\TUFLOW\runs folder.
- Open the M06_5m_002.tcf in a text editor and make the following reference updates:
QGIS - SHP
BC Control File == ..\model\M06_002.tbc ! Reference the TUFLOW Boundary Conditions Control File
Read Materials File == ..\model\materials_M06_002.csv ! Reference the Materials Definition File
QGIS - GPKG
Spatial Database == ..\model\gis\M06_002.gpkg ! Specify the location of the GeoPackage Spatial Database
BC Control File == ..\model\M06_002.tbc ! Reference the TUFLOW Boundary Conditions Control File
Read Materials File == ..\model\materials_M06_002.csv ! Reference the Materials Definition File
- Add Material Rainfall Loss (RFML) as an additional Map Output Data Type. This output is discussed in the Results section.
Map Output Data Types == h V d dt RFC RFR n RFML ! Outputs water levels, velocities, depths, minimum timestep, cumulative rainfall, rainfall rate, material based rainfall loss - Save the TCF.
Running the Simulation
Update the batch file created in the first part of Module 6 to reference the M06_5m_002.tcf file. Save the batch file and double click it in file explorer to run the simulation.
Troubleshooting
See tips on common mistakes and troubleshooting steps if the model doesn't run:
Check Files
While the model is running, review the added features are specified correctly:
- Open the M06_5m_002.tlf from the Module_06\TUFLOW\runs\log folder in a text editor.
- Review the losses applied in the materials layer:
- Review the hyetograph information. The TLF shows the conversion for each histogram:
Results
When the model is finished, review the results:
Part 3 - Rainfall Control File
GIS Inputs
Create, import and view input data:
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, refer to the TUFLOW Manual or TUFLOW Rainfall Control File Examples.
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.
- Create a new text file M06_point2grid_003.trfc and save it in the Module_06\TUFLOW\model folder.
- Add the following commands:
QGIS - SHP
RF Grid Format == TIF ! Sets the output grid format
RF Interpolation Method == IDW ! Sets the interpolation approach between rainfall locations
RF Grid Cell Size == 25 ! Sets the cell size for the generated rainfall grids
Read GIS RF Points == gis\2d_rf_M06_pt2grid_003_P.shp ! Reads the point rainfall locations in the 2d_rf file format
QGIS - GPKG
RF Grid Format == TIF ! Sets the output grid format
RF Interpolation Method == IDW ! Sets the interpolation approach between rainfall locations
RF Grid Cell Size == 25 ! Sets the cell size for the generated rainfall grids
Read GIS RF Points == 2d_rf_M06_pt2grid_003_P ! Reads the point rainfall locations in the 2d_rf file format
- Save the TRFC.
TUFLOW Boundary Control File (TBC)
- Save a copy of M06_002.tbc as M06_003.tbc in the Module_06\TUFLOW\model folder.
- Open the M06_003.tbc in a text editor and comment out the Read GIS RF command:
QGIS - SHP
! Read GIS RF == gis\2d_rf_M06_polygons_002_R.shp
QGIS - GPKG
! Read GIS RF == 2d_rf_M06_polygons_002_R
- Save the TBC.
TUFLOW Control File (TCF)
- Save a copy of M06_5m_002.tcf as M06_5m_003.tcf in the Module_06\TUFLOW\runs folder.
- Open the M06_5m_003.tcf in a text editor and make the following reference updates:
QGIS - SHP
BC Control File == ..\model\M06_003.tbc ! Reference the TUFLOW Boundary Conditions Control File
QGIS - GPKG
Spatial Database == ..\model\gis\M06_003.gpkg ! Specify the location of the GeoPackage Spatial Database
BC Control File == ..\model\M06_003.tbc ! Reference the TUFLOW Boundary Conditions Control File
- Include a reference to the TRFC in the Model Inputs section:
Rainfall Control File == ..\model\M06_point2grid_003.trfc ! Reference the TUFLOW Rainfall Control File
- Save the TCF.
Running the Simulation
Update the batch file to reference the M06_5m_003.tcf file. Save the batch file and double click it in file explorer to run the simulation.
Troubleshooting
See tips on common mistakes and troubleshooting steps if the model doesn't run:
Check Files
While the model is running, review the added features are specified correctly:
- 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:
- 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.
Results
When the model is finished, review the results:
Conclusion
- Direct rainfall approach was used in three ways - applied globally, to separate polygons using 2d_rf layer and varying temporally and spatially using a TUFLOW Rainfall Control (TRFC).
- Depth varying material values were used.
- Rainfall losses were applied in the materials layer.
- TUFLOW log files and rainfall grids were used to check the rainfall was applied correctly.
- Map outputs RFC, RFR, n and RFML were inspected.
Gridded Rainfall (Optional)
The rainfall grids created from the rainfall interpolation and located in the Module_06\TUFLOW\model\RFG\M06_5m_003 folder can be used by the Read Grid RF command in the TCF to apply the rainfall to the model, rather than regenerate the rainfall grids using the TRFC file (as long as the input files remain unchanged). The command references a csv file containing links to the rainfall grids.
- Navigate to the Module_06\Tutorial_Data folder. Copy the M06_004_rf.csv into the Module_06\TUFLOW\bc_dbase folder.
- Open the csv. The file requires two columns, the first is time (in simulation hours) and the second is the rainfall grid.
- 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:
! Rainfall Control File == ..\model\M06_point2grid_003.trfc ! Reference the Rainfall Control File
Read Grid RF == ..\bc_dbase\M06_004_rf.csv
- Save the TCF, update the batch file and run the model.
- Compare the results with the Part 3 results.
- Check the run times in the _ TUFLOW Simulations.log from the TUFLOW\runs folder. For large models, the initialisation time is faster with the gridded rainfall set up.
Up |
---|
Back to Tutorial Introduction Main Page |