Skip to content
Jonathan Lambrechts edited this page Aug 26, 2015 · 5 revisions

Tutorial

This series of screencasts will guide you to generate a mesh of the Great Barrier Reef (Australia) continental shelf using QGIS and GMSH. No previous knowledge of those softwares is required but both are supposed to be installed as well as the qgis gmsh plugin.

1. Coastlines

The domain boundaries are described by QGIS vector layers. The first step is to obtain the coastlines. They are extracted from the GSHHG database. The shape files used in this tutorial can be downloaded from this direct link.

Coastlines screencast (Click on the picture to start the youtube video.)

2. Shelf break

The continental shelf break constitutes the eastern boundary of the domain. The bathymetry is extracted from the ETOPO1 database. The netcdf file used in this tutorial can be downloaded from this direct link. The shelf break, chosen as the 200m isobath, is obtained with QGIS.

Coastlines screencast (Click on the picture to start the youtube video.)

3. External Boundary

We close the domain on the northern and southern boundary. The plugin will detect duplicated points if they have the exact same position. To ensure this, the QGIS snapping options are enabled. Different physical tags (in this case north, south, coast, shelf, and islands) can be assigned to the different lines by adding a properties physical to those features. Those tags will be transfered to the final mesh and can be used to define the boundary conditions.

External boundary screencast (Click on the picture to start the youtube video.)

4. Mesh

Now we define a raster layer to specify the mesh size. In this case, we chose element sizes proportional to the square root of the bathymetry l = 300 * sqrt(max(-h, 1)), which in the QGIS raster calculator language reads:

300 * sqrt(("bathymetry@1" > -1) * 1  + ("bathymetry@1" <= -1) *  (-"bathymetry@1")).

The mesh projection (in this case UTM zone 55 south) is determined by the projection of the mesh size layer. The unit of the element sizes is the unit of the projected space (in this case meters).

Finally, the qgis-gmsh plugin is used to:

  • generate the geometry (.geo) input file for GMSH,
  • call GMSH to generate the mesh,
  • convert the resulting mesh to shape files and load it into QGIS.

External boundary screencast (Click on the picture to start the youtube video.)

Clone this wiki locally