SWAN GIS Checking Model Setup

From TUFLOW FV Wiki
Jump to navigation Jump to search
USEFUL LINKS
Wiki Links Help Downloads
TUFLOW FV Wiki Main Page Products Support/Contact TUFLOW FV Downloads
TUFLOW FV Tutorials Requesting a Licence Tutorial Module Data
TUFLOW Classic/HPC Wiki TUFLOW FV Glossary Manuals

Introduction

This page describes how check to SWAN input and model control file prior to running our simulations. It is the fourth part of our SWAN GIS Tools step by step guide.

SWAN GIS Plugin Check Files

Where possible, the plugin automatically writes check files to help evaluate our SWAN input files. As the SWAN input files are all text files, it is difficult to directly visualize them.

The SWAN GIS plugin check files should always be viewed prior to running simulation to ensure there are no errors occurring from either the user or the plugin.

Bathymetry Check Files

When the SWAN GIS plugin builds a new SWAN model, it creates a bottom (bathymetry) grid input file for each model domain from the specified bathymetry sources. The bottom grid input file is a text file that contains the inspected elevations at the computational grid points. The SWAN input grid format is not compatible with QGIS, so to check the bathymetry has been correctly inspected from the input sources, a QGIS compatible format is exported during the model build. These files are called bathymetry check files.

Go to C:\Tutorial_Module_SWAN_GIS_Tools\Moreton_Bay_Waves\SWAN\01_geometry once the SWAN model has been built to see the bathymetry check files:
RUNNING SIMULATIONS 000.PNG

In QGIS, follow these steps to load a new mesh file:

  1. Press the 'Open Data Sources Manager' button in the QGIS toolbar
  2. Select the 'Mesh' data type in the 'Data Sources Manager'
  3. Browse to find and select the bathymetry check file\s
  4. Press the 'Add' button in the 'Data Sources Manager'

RUNNING SIMULATIONS 001.PNG

As shown, this displays the inspected bathymetry on the computational grid. The elevation values can then be checked to ensure the bathymetry input is sensible.

RUNNING SIMULATIONS 002.PNG

Wind Grid Check Files

When an ERA5 wind source is specified, the plugin directly converts the ERA5 wind data to the SWAN wind input grid format. The wind data is not interpolated by the plugin, instead, the interpolation onto the computational grid is handled by SWAN during runtime. However, to improve run times by minimizing the SWAN wind input grid file size, the plugin does subset the ERA5 data for each SWAN computational grid.

The ERA5 wind data format is compatible with QGIS, so no additional mesh file is created for visualisation. It can be useful to know the subset of ERA5 grid points that have been used to generate the SWAN wind input grid file, so the plugin outputs a points file to check this.

To load the ERA5 wind data into QGIS, follow the same steps for loading mesh data as described for our bathymetry check file.

Once loaded, the data should appear as shown below:

RUNNING SIMULATIONS 003.PNG

To cross check how our wind data has been applied to our SWAN domains, we can investigate the SWAN GIS Tools wind check files. Go to C:\Tutorial_Module_SWAN_GIS_Tools\Moreton_Bay_Waves\SWAN\02_bc_dbase once the SWAN model has been built to see the wind point check files. These end with *_WIND.csv:

RUNNING SIMULATIONS 004.PNG

To open a wind point check check file follow these steps:

  1. Press the 'Open Data Sources Manager' button in the QGIS toolbar
  2. Select the 'Delimited Text' data type in the 'Data Sources Manager'
  3. Browse to find and select the wind point check file\s
  4. Set the X Field, Y Field and Geometry CRS
  5. Press the 'Add' button in the 'Data Sources Manager'

RUNNING SIMULATIONS 005.PNG

As shown, this displays the subset of grid points used to generate the SWAN wind grid input file:

RUNNING SIMULATIONS 006.PNG

Spectral Wave Check Files

When an ERA5 wave source is specified, the plugin interpolates the spectral wave parameters at a series of points along the boundary of the outer most model. The output wave parameter time series files (TPAR) are then directly applied as the spectral wave boundary condition in the SWAN model. The boundary points are generated at a resolution equivalent to the ERA5 wave grid resolution of 0.05 degrees or 5km. This means if the outer most computational grid is coincident with the ERA5 wave grid, the ERA5 data points will be directly converted to TPAR files, otherwise interpolated values will be used at an equivalent resolution.

A wave points check file containing positional information is written for the boundary TPAR files when a model is built.

To load the ERA5 wave data into QGIS, follow the same steps for loading mesh data as described for our bathymetry check file. The following will be displayed:

RUNNING SIMULATIONS 009.PNG

To review the location of our regional model's TPAR boundary conditions go to C:\Tutorial_Module_SWAN_GIS_Tools\Moreton_Bay_Waves\SWAN\02_bc_dbase once the SWAN model has been built to see the wave point check file:

RUNNING SIMULATIONS 007.PNG

To open a wave point check check file follow these steps:

  1. Press the 'Open Data Sources Manager' button in the QGIS toolbar
  2. Select the 'Delimited Text' data type in the 'Data Sources Manager'
  3. Browse to find and select the wave point check file
  4. Set the X Field, Y Field and Geometry CRS
  5. Press the 'Add' button in the 'Data Sources Manager'

RUNNING SIMULATIONS 008.PNG

Reviewing SWAN Control Files

In the directory C:\Tutorial_Module_SWAN_GIS_Tools\Complete_Model\SWAN\03_simulation the SWAN GIS Model Builder should have created four .swn files, one for each of our model domains as shown in the image below:

SWAN CHECKS 000.PNG

Open up each of the files in your preferred text editor. You will note that the SWAN GIS Model Builder has created a fully working SWAN control file for each domain. Where applicable, model nesting commands have been included. It is recommended that you become familiar with each of the command blocks within the SWAN control files by referencing the SWAN User Manual.

Conclusion

We have now reviewed key inputs and control files required to run our SWAN models. Next we will work through the steps required to run our models in the Running Simulations section of our tutorial.