... | ... | @@ -17,27 +17,27 @@ First, you need to download QGIS and topographic (and bathymetry) data to define |
|
|
|
|
|
## QGIS
|
|
|
|
|
|
Here are the steps to define the domain boundaries. At the end of this stage, a shapefile roughly closing the domain will be created.
|
|
|
|
|
|
At the end of this step, you should have a new shapefile (for example, `coast.shp`) with the coastlines and the open boundaries as straight lines.
|
|
|
The first step is to create a new shapefile (for example, `coast.shp`) with the coastlines and the open boundaries.
|
|
|
|
|
|
- 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 entity with a rectangle ![rect-select](/uploads/d75be8d994e117ce9419c35c4bafc155/rect-select.png) + "Ctrl+C"
|
|
|
- Create new shapefile layer ![shape-layer](/uploads/c330ee03379393f65df36cef925fa9fb/shape-layer.png) (with type 'line')
|
|
|
- layer -> create new Shapefile layer
|
|
|
- Select new layer
|
|
|
- Open the "edit mode" ![edit](/uploads/3c3afe1f36fc4ac58743b3e3aa930d95/edit.png) + "Ctrl+V"
|
|
|
- Add one (or more) entity ![entity](/uploads/6a86ca4b9f0504f9580c2538021acb2a/entity.png) in order to close the domain
|
|
|
- Click left to add lines, click right to stop (choose an ID)
|
|
|
- Save the project
|
|
|
- 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 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 ![shape-layer](/uploads/c330ee03379393f65df36cef925fa9fb/shape-layer.png) of type `line`. Use the menu *layer -> create new Shapefile layer* (If you are using a virtual machine, put 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).
|
|
|
- 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
|
|
|
- Select line(s) ![select](/uploads/e7ade47750c57be4bea219f949a479ef/select.png) and change entity. Give as many different integers as necessary to produce the mesh and run the model (but not too many). Those integers will be converted into physical tags later on.
|
|
|
- Hint : write the numbers on a paper sheet with their meaning (1 : coast).
|
|
|
- Save all and close QGIS
|
|
|
- If you're working on VirtualBox, move the folder containing the new shapefile to the shared folder.
|
|
|
- Add a column ![new-column](/uploads/cf8897fd6cfb6d7b272f4ed244cc8889/new-column.png), name it `entity` of type `integer`
|
|
|
- Give value `1` by default
|
|
|
- Select line(s) ![select](/uploads/e7ade47750c57be4bea219f949a479ef/select.png) and change entity. 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 : note with their meaning (1 : coast).
|
|
|
- Exit the *edit mode* and save the layer, then save the project
|
|
|
- Close QGIS
|
|
|
|
|
|
## Python script
|
|
|
|
... | ... | |