View Results in SAGA

From Tuflow
Jump to navigation Jump to search

Introduction

In this section we will look at post-processing the TUFLOW results so they can be imported and viewed in SAGA. We will bring 3D surfaces (as gridded datasets) as well as point and vector data (as region objects).

TUFLOW to GIS

In order to bring the 2D results written by TUFLOW (for example a water level surface) into SAGA it is necessary to utilise a TUFLOW utility called TUFLOW_to_GIS.exe this utility can be downloaded from the TUFLOW website (TUFLOW Downloads).

There is separate wiki page on how to use the TUFLOW_to_GIS utility. This page can be found here TUFLOW to GIS.

  1. Download the TUFLOW_to_GIS utility and unzip. Take note of where this utility is located.
  2. Create an empty text file in the TUFLOW\results\M01\2d\ directory and name the file Process_Results.bat
  3. Open the text file in a text editor
  4. Add the following lines to the Process_Results.bat (these can be copied and pasted from below) and then save the batch file:
    REM Any text following "REM" is treated as a remark or comment.
    REM Process the maximums for water level, depth and velocity.
    C:\TUFLOW\Utilities\TUFLOW_to_GIS.exe -b -asc -max M01_5m_002_h.dat
    C:\TUFLOW\Utilities\TUFLOW_to_GIS.exe -b -asc -max M01_5m_002_V.dat
    C:\TUFLOW\Utilities\TUFLOW_to_GIS.exe -b -asc -max M01_5m_002_d.dat
    REM Process the depths at times 1, 2 and 3 hours.
    C:\TUFLOW\Utilities\TUFLOW_to_GIS.exe -b -asc -t1 M01_5m_002_d.dat
    C:\TUFLOW\Utilities\TUFLOW_to_GIS.exe -b -asc -t2 M01_5m_002_d.dat
    C:\TUFLOW\Utilities\TUFLOW_to_GIS.exe -b -asc -t3 M01_5m_002_d.dat
    REM Process the velocity vectors at times 1, 2 and 3 hours.
    C:\TUFLOW\Utilities\TUFLOW_to_GIS.exe -b -shp -vector -t1 M01_5m_002_V.dat
    C:\TUFLOW\Utilities\TUFLOW_to_GIS.exe -b -shp -vector -t2 M01_5m_002_V.dat
    C:\TUFLOW\Utilities\TUFLOW_to_GIS.exe -b -shp -vector -t3 M01_5m_002_V.dat
    Pause REM this keeps the Command Window open after processing
  5. Update the path to TUFLOW_to_GIS.exe if necessary.
  6. In Windows Explorer navigate to the TUFLOW\results\M01\2d\ directory and double click on the newly created batch file Process_Results.bat.
  7. A console window should appear and the batch file may process for a minute or so. When finished the output screen should look like screen image below:
    T2G M01 FinishedArc.png

    In windows explorer there should be 18 new files created, 6 .asc files and 12 files (3 conversions with 4 file created) for each of the vector sets.

    TIP: If there are not 18 files created remove the -b switches from the batch file and re-run the batch file. The TUFLOW_to_GIS utility will prompt for an input after each command line. This can be useful in determining why the process has stopped.

    T2G M01 OutputsArc.png

    Import to SAGA

    We will import the gridded surfaces to SAGA:

  8. In the Modules Library expand the Import/Export - Grids item and select Import ESRI Arc/Info Grid. To execute the module, either double click on this item or select the Execute button in the Object Properties Window.
  9. Tute M01 Res Grids Saga1.png
  10. In the dialogue, select one of the newly created .asc files.
  11. Tute M01 Res Grids Saga2.png
  12. The above to steps need to be repeated for each of the 6 grids created above.
  13. The vector files can simply be opened using the Load dialogue in SAGA. Open the M01_5m_002_V____1.00(v)_R.shp, M01_5m_002_V____2.00(v)_R.shp and M01_5m_002_V____3.00(v)_R.shp files.
  14. Tip: Multiple files can be opened at the same time using the shift and/or control keys. Only the .shp extensions need to be loaded, the remainder are automatically opened.
    Tute M01 SAGA Open Res Files.png
  15. In the Data tab of the Workspace Window, select the M01_5m_002_d_g002.50____1.00 and the M01_5m_002_V____1.00(v)_R items, right click on one of these and select Show. When prompted, select add layer to New Map
  16. Tute M01 SAGA View Res at t1.png

    This will create a new map with the depth grid at time 1 hour (M01_5m_002_d_g002.50____1.00) and the velocity vectors at time 1 hour (M01_5m_002_V____1.00(v)_R). The map window should now look something like the image below:

    Tute M01 SAGA Res at t1.png
  17. To view the other timesteps that were converted (at times 2 and 3 hours) repeat the above steps.
  18. We will next look at the maximum water level results. In the data window double click on the M01_5m_002_d_g002.50_Max (or right click and select show) and create a new map window.
  19. Conclusion

    We have covered the basics of viewing 2D TUFLOW results in SAGA. Please return to the tutorial model, module 1. In the next step we review the performance of the TUFLOW model (warnings, checks and mass balance), to return please click here