View Results in SAGA

From Tuflow
Revision as of 10:16, 15 September 2011 by tuflow>Par (Created page with "<ol> ==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 dataset...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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 ArcGIS it is necessary to utilise a TUFLOW utility called TUFLOW_to_GIS.exe this utility can be downloaded from the TUFLOW website Download TUFLOW utilities.

    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 and then save:
    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_003_h.dat
    C:\TUFLOW\Utilities\TUFLOW_to_GIS.exe -b -asc -max M01_5m_003_V.dat
    C:\TUFLOW\Utilities\TUFLOW_to_GIS.exe -b -asc -max M01_5m_003_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_003_d.dat
    C:\TUFLOW\Utilities\TUFLOW_to_GIS.exe -b -asc -t2 M01_5m_003_d.dat
    C:\TUFLOW\Utilities\TUFLOW_to_GIS.exe -b -asc -t3 M01_5m_003_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_003_V.dat
    C:\TUFLOW\Utilities\TUFLOW_to_GIS.exe -b -shp -vector -t2 M01_5m_003_V.dat
    C:\TUFLOW\Utilities\TUFLOW_to_GIS.exe -b -shp -vector -t3 M01_5m_003_V.dat
    Pause REM this keeps the Command Window open after processing
  5. In Windows Explorer navigate to the TUFLOW\results\M01\2d\ directory and double click on the newly created batch file Process_Results.bat.
  6. 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:

  7. 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.
  8. Tute M01 Res Grids Saga1.png
  9. In the dialogue, select one of the newly created .asc files.
  10. Tute M01 Res Grids Saga2.png
  11. The above to steps need to be repeated for each of the 6 grids created above.
  12. The vector files can simply be opened using the Load dialogue in SAGA. Open the M01_5m_003_V____1.00(v)_R.shp, M01_5m_003_V____2.00(v)_R.shp and M01_5m_003_V____3.00(v)_R.shp files.
  13. 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
  14. In the Data tab of the Workspace Window, select the M01_5m_003_d_g002.50____1.00 and the M01_5m_003_V____1.00(v)_R items, right click on one of these and select Show. When prompted, select add layer to New Map
  15. Tute M01 SAGA View Res at t1.png

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

    Tute M01 SAGA Res at t1.png