TUFLOW SWMM Tutorial M03
Introduction
This tutorial, Module 3 of the TUFLOW SWMM tutorial dataset demonstrates how to add SWMM urban hydrology to a 1D / 2D SWMM stormwater pipe network, TUFLOW HPC catchment model. TUFLOW SWMM Tutorial Module 3 builds from the model created in TUFLOW SWMM Tutorial Module 2. The completed TUFLOW SWMM Module 2 model is provided in the TUFLOW_SWMM_Module_02\TUFLOW folder of the download dataset as the starting point for this tutorial. If you are not already familiar with TUFLOW SWMM linking, we recommend first completing Module 1 and 2 before this tutorial.
Project Initialization
QGIS
QGIS Version 3.34 or newer, and QGIS TUFLOW Plugin 3.9.0.49 or newer are required to access the SWMM Processing Tools described in the following sections. For installation, see Installation of TUFLOW Plugin.
Define the Coordinate Reference System (CRS), also called ‘Projection’, for the QGIS workspace:
- Open QGIS.
- Go to Project > Properties…
- In the CRS tab, type ‘WGS 84 / UTM Zone 60S’.
- Select the matching projection in the 'Predefined Coordinate Reference Systems' section.
- Click ‘Apply’ and ‘OK’.
- Ensure that the projection is set correctly by viewing the bottom right hand corner of the workspace. It should read ‘EPSG:32760’.
TUFLOW Plugin
Next we need to configure the QGIS TUFLOW Plugin settings to link with the project folder where we will build our model:
- Go to Plugins > TUFLOW > Editing > Configure / Create TUFLOW Project.
- Change the folder which contains TUFLOW to the TUFLOW_SWMM_Module_03 folder.
- Set the GIS Format to GPKG.
- Click 'OK' and save the workspace by selecting Project > Save As.
<<image>>
TUFLOW Model
Load and Style TUFLOW Model Files
Load in the project GIS layers:
- Click on the ‘Load TUFLOW Layers from TCF’ symbol from the TUFLOW Plugin toolbar.
- In File Explorer, navigate to the TUFLOW_SWMM_Module_03\TUFLOW\runs folder and select TS02_5m_001.tcf.
- In the Load Layers window, select:
- Ordering Options: Alphabetical
- Grouping Options: Group by control file
- Raster Load Options: Load Normally
- Click ‘Open’ and ‘OK’.
Style the TUFLOW layers. Suggested styling steps were provided in TUFLOW SWMM Tutorial M01. They have not been duplicated here.
Increment TUFLOW GeoPackage File
Save a copy of TS02_001.gpkg with a new name (TS03_001.gpkg). This project initialization step is recommended so prior model versions from a project are not broken as a result of changes being made to GIS inputs.
- Left click 2d_bc_M01_001_L in the QGIS Layers panel.
- Select the TUFLOW Plugin Increment Selected Layer tool.
- Set the new Output Database name to TS03_001.gpkg.
- Delete the pre-filled "Incremented Layer" entry. We do not wish to modify the version number associated with the 2d_bc file. This current exercise will not change the version number of any of the GIS layer inputs, it is simply establishing a copy of the existing Geopackage where future edits will be saved to.
- Select Remove Source Layer from Workspace.
- Select Increment Layer and Preserve Database.
- Select OK.
<<image>>
Save QGIS Project Workspace
Save the QGIS Workspace:
- Go to Project > Save As.
- Navigate to the TUFLOW_SWMM_Module_03 folder and type SWMM_M03 as the filename with the extension .qgz.
SWMM Inputs
Create SWMM GeoPackage Spatial Database
We will create a new SWMM GeoPackage database for our pipe network feature entries:
- Go to Processing > Toolbox from the top dropdown menu options to open the Processing Toolbox Panel.
- Go to TUFLOW > SWMM in the processing tool list and select 'GeoPackage - Create'. This opens the dialog shown below.
- To set the ‘CRS for GeoPackage’: Click the drop down menu and select ‘Project CRS: EPSG:32760 - WGS 84 / UTM zone 60S’.
- To set the ‘Initial SWMM Sections’: Click the …, and tick on:
- Hydrology--Raingages, Hydrology--Subcatchments
- To define the ‘GPKG filename to create’: Click the …, select ‘Save to File’. Navigate to the TUFLOW\model\swmm folder and save the GeoPackage Database as sw03_001.gpkg.
- Click 'Run'.
- Once to tool has finished, click ‘Close’.
- In File Explorer, navigate to the TUFLOW\model\swmm folder and drag and drop sw03_001.gpkg into QGIS.
- When prompted by QGIS, under 'Options', tick on 'Add layers to group', then select 'Add Layers' to open all vectors within sw03_001.gpkg. By default, all items in the available list should have been selected.
- In the QGIS Layers panel, move sw03_001.gpkg to the top of the list. This will ensure the data within this database file is displayed above all other layers in the project.
<<Video>>
GIS Data Entry
A GeoPackage called Urban_Hydrology.gpkg is provided in the TUFLOW_SWMM_Module_03\Tutorial_Data folder. It contains one SWMM input layer:
- SWMM_Subcatchments: defining the 1D SWMM urban hydrology subcatchment delineation and asociated parameters.
It also contains a TUFLOW input layer
- TUFLOW_Subcatchments: defining the remaining 2D TUFLOW catchment hydrology subcatchment delineation.
To populate the SWMM GeoPackage created in the previous section:
- In Windows Explorer, navigate to the TUFLOW_SWMM_Module_03\Tutorial_Data folder. Drag and drop the Urban_Hydrology.gpkg into QGIS.
- When prompted by QGIS, under 'Options', tick on 'Add layers to group', then select Subcatchments. Click 'Add Layers'.
- In the QGIS Layers panel, right click on the Subcatchments layer and select 'Zoom to Layer'.
- Use the 'Select Features' tool to highlight all items included in Subcatchments.
- Select 'Edit' from the top QGIS tab and 'Copy Features' from the drop down menu.
- Select the Hydrology--Subcatchments layer in the Layers panel by left clicking on it once.
- Make the Hydrology--Subcatchments layer editable by clicking the 'Toggle Editing' symbol .
- Select 'Edit' from the top QGIS tab and click 'Paste Features' from the drop down menu.
- Toggle the editing off to save the edits.
- Remove Urban_Hydrology.gpkg from QGIS.
<<Video>>
Update SWMM Hydrology Raingage
The information within Hydrology--Raingage (Note: 'Gage' is the American spelling of 'Gauge' in Oxford English) defines the pluviographs in the catchment. We will link to two different rain gages in this example.
- In the QGIS Layers panel, select (left click) Hydrology--Raingage and toggle on editing.
- Right click Hydrology--Raingage and select 'Open Attribute Table'.
- Click 'Add Feature'. Enter the following attributes (leave all other fields as NULL):
Name Form Intevl SnowCatchDeficiency Format Tseries RF_G1 Volume 0.15 1 TIMESERIES RF_FC04 RF_G2 Volume 0.15 1 TIMESERIES RF_FC07 Remaining attributes remain blank.
SWMM entries are case sensitive. If the input above uses upper case, please double check your data entry does too. - Turn off editing and save the information.
For a summary of the attributes associated with Hydrology--Raingage, refer to TUFLOW 2023-03-AD Release Notes (Table A.11) and the SWMM5 Reference Manual - Volume 1 (Hydrology).
Update SWMM Hydrology
- Inspect the attribute information within Hydrology--Subcatchments to familiarize yourself with the data. For a summary of the attributes associated with the Layer, refer to TUFLOW 2023-03-AD Release Notes (Table A.38) and the SWMM5 Reference Manual - Volume 1 (Hydrology).
<<Video>>
SWMM Options
Export SWMM INP File
We will now create a new INP file for the SWMM pipe network inputs. To do this, we need to convert sw03_001.gpkg into a SWMM INP file.
- In the Processing Toolbox, go to TUFLOW > SWMM and select 'GeoPackage - Write to SWMM inp'. This opens the dialog shown below.
- GeoPackage Input File: Navigate to the TUFLOW\model\swmm folder and select sw03_001.gpkg.
- GeoPackage Input File: Navigate to the TUFLOW\model\swmm folder and select sw03_001.gpkg.
- By default, this tool will save the SWMM inp file in the same folder location and with the same name as the GeoPackage input file. In this case, it will save sw03_001.inp to the TUFLOW\model\swmm folder.
- Click 'Run'.
- Once the tool is finished, click 'Close'.
<<Video>>
TUFLOW Boundary Updates
Comment our direct rainfall
Add SA_RF