... | ... | @@ -23,22 +23,23 @@ The first step is to create a new shapefile (for example, `coast.shp`) with the |
|
|
|
|
|
- Open QGIS
|
|
|
- Import topography (and bathymetry) data (drag and drop the `lines.shp` from Open Street map and the `etopo.tif` into the qgis drawing area).
|
|
|
- Select `lines` in the *Layers* list.
|
|
|
- Select the entities in the area you want to mesh with a rectangle ![rect-select](/uploads/d75be8d994e117ce9419c35c4bafc155/rect-select.png) and copy them with *Ctrl+C*
|
|
|
- Delete the initial layer (right-click on it the layers list then choose *Delete*)
|
|
|
- Create a new shapefile layer of type `line`. Use the menu *layer -> create new Shapefile layer* (If you are using a virtual machine, save it in the *slim-vm* shared directory.)
|
|
|
- Select the new layer
|
|
|
- Enter the *edit mode* ![edit](/uploads/3c3afe1f36fc4ac58743b3e3aa930d95/edit.png) and paste the entities with *Ctrl+V*
|
|
|
- Add one (or more) lines ![entity](/uploads/6a86ca4b9f0504f9580c2538021acb2a/entity.png) in order to close the domain (Left-click to start adding the points of a line, right-click to end the line).
|
|
|
- Add one (or more) lines ![entity](/uploads/6a86ca4b9f0504f9580c2538021acb2a/entity.png) in order to close the domain (Left-click to start adding the points of a line, right-click to end the line). No *ID* needed, just click on *OK*.
|
|
|
- Exit the *edit mode* and save the layer
|
|
|
- Save the project (If you are using a virtual machine, put it in the *slim-vm* shared directory.)
|
|
|
|
|
|
Now add an *entity* field on each line to define a tag that will be use later to specify the boundary conditions.
|
|
|
- In *edit mode*, open table of attributes ![attr-field](/uploads/831cb5ac88fed104372113c22ab27484/attr-field.png)
|
|
|
- Add a column ![new-column](/uploads/cf8897fd6cfb6d7b272f4ed244cc8889/new-column.png), name it `entity` of type `integer`
|
|
|
- Give value `1` by default
|
|
|
- Give value `1` by default. Select *entity* (top left list), type 1 and select *Update All*.
|
|
|
- Select each open boundary line ![select](/uploads/e7ade47750c57be4bea219f949a479ef/select.png) and change the value of its *entity* field. Give as many different integers as necessary to produce the mesh and run the model. Those integers will be converted into physical tags later on.
|
|
|
- Hint : keep note of their meaning (1 : coast).
|
|
|
- Exit the *edit mode* and save the layer, then save the project
|
|
|
- Save the layer and exit the *edit mode*, then save the project
|
|
|
- Close QGIS
|
|
|
|
|
|
## Python script
|
... | ... | |