Skip to content
patricev edited this page Oct 5, 2016 · 13 revisions

Plugin PostTelemac

PostTelemac_title PostTelemac_title

Summary:
1. General presentation
2. Installation
3. The PostTelemac Viewer
4. The PostTelemac tools


General presentation

PostTelemac_intro

The plugin contains three main parts :

  1. the telemac file loader. It’s here you load the selafin file you want to work with
  2. the working panel - three workings tabs are presents
    1. the first for displaying selafin file ‘s data in the qgis map canvas
    2. the second to extract and compute data from file: selafin file's data query, temporal graph creation, comparaison of selafin files, shapefile creation,...
    3. A general log to show main messages or importants errors

Installation

For Windows : Install QGis with « OSGeo4W Network installer” available here

Install QGis this way :

  1. Launch « setup.exe »
  2. Select « Advanced Install » – Click Next Button
  3. Select « Just me », « Create an icon on desktop » and « Add icon to start menu » - Click Next Button
  4. Select the internet connection you want – Click Next Button
  5. In the « Select Packages » page, select
    • In the deskptop tree item
      • Qgis : qgis desktop
    • In the Libs tree item
      • Matplotlib
      • python-shapely
      • networkx
      • scipy
      • numpy
      • ffmpeg

Click Next Button and wait for installation.

In QGis, go to the Plugins Menu\Manage and install Plugins. Then select “PostTelemac” and click “Install Plugin”


The PostTelemac Viewer

PostTelemac_viewer

This panel aims to display selafin file data in the QGis map canvas. The function are descripted below :

  1. Loading a selafin file :
    • click (1a) to load a telemac file in Qgis
    • The Selafin’CRS choser (1b).
  2. Choose the time to be seen in the map canvas here
  3. the contour viewer:
    • 3a : Choose the parameter to display in the map canvas here
    • 3b : Choose the palette here. The palettes shown here are the QGis palettes, configurables in Settings\Style Manager\color ramp
    • 3c Choose the type of classes to be used. You can choose :
      • preset classes. The presets classes are configurable in the file " User_directory\.PostTelemac\classes.txt ". Use this convention to add reset classes : " classes’name=value;value;…;value "
      • Equal interval classes : if balk if left, compute automatically min and max of the parameter.
      • Advanced classes : in development
    • 3d : The preset classes chooser
    • 3e : You can offset the classes here
    • 3f : The classes adopted by the viewer are displayed here
  4. the velocity viewer. **** It's enabled only if the name of velocity U and V are declared in "User_directory\.qgis2\python\plugins\PostTelemac\config\parametres.txt" ****
    • 4a : Chosse to display the velocity vectors here.
    • 4b :The way the velocity vectors are rendered. Three mode are choosable
      • Relative grid : you choose the number of velocity vector viewable in the height of the canvas
      • Absolute grid : you choose the space step between vectors
      • All the points : all the points are rendered
    • 4c : The norm in meters of the velocity vector (in meters)
    • 4d : the color ramp, with the same characteristics of 3c, but only with generics classes
  5. display the selafin file's mesh
  6. Choose the transparency here

The PostTelemac tools

Values tool

PostTelemac_viewer

Just click on a point in the map canvas to display the values of the parameters for this point and for the time choosen in the display tab

Temporal graph tool

PostTelemac_temporal_graph.png

This tool allows the user to plot a temporal serie. To do this :

  1. choose selection mode in (1). Selections mode are :
  • temporary point : just click on the canvas to plot the time serie of the clicked point
  • Points of active vector layer : select a point layer in the layer panel, and then click Calcul (3) to compute the time series of all the points included in the selected point layer
  1. choose the parameter to plot in (2)

Once the graph is done in (4), you can :

  • copy the values to clipboard (7)
  • specify you don't want to clear the graph by checking (6). It enables to add more graph in (4)

Spatial graph tool

Use the Profiletool plugin . Select the selafin layer in the layer panel, and then launch the plugin by clicking on (1).

A popup ask you the parameter to display. The parameter list match the parameter list in (2bis). You can add parameters by cliking on (3).

Have a look on the profile tool plugin documenation for more information.

Compare tool

PostTelemac_compare

This tool allows the user to compare two selafin files.

First load with (2) the selafin file you want to be compared with the selafin file in(1)
The characteristics of the two files are shown in (3a) for (1), an (3b) for (2). In 4 is displayed the matching parameters table for selafin 1 and 2 (based on the same parameter name).

If the mesh is the same for the two selafin files, the plugin can easily compare the data. So click on compare (5). All the plugin is now based on the data of the comparaison between 1 and 2 (display, values tool, temporal graph tool, movie, 2Shape…).

If it is not the same mesh between the two selafin files, the comparaison needs a long computational time, and prefer use this only for the comparaison of a single time step (max for exemple).

Movie tool

PostTelemac_movie

To make a movie :

  1. create a composition, with a map focused on a part of the selafin layer, and others items (text,north arrow, legend..).
  2. then go to the movie tool, and select the composition created in step a) with (1).
  3. Then select the start iteration of the movie, and the end iteration (4).
  4. the iteration step (5) let the user the possiblity to skip some iteration of the selafin file in the movie. For exemple, a value of 1 will keep in the movie all the iteration of the selafin file, and a value of 5 will keep only iterations 0,5,10,15,… in the movie
  5. you can choose also the number of frame per second in the movie (6)
  6. the (7) gives an estimation of the movie duration, computed with (4), (5) and (6) data.
  7. You can launch the movie creation by clicking on (8). Don't touch anything during the movie creation !!

Within the movie, you can add a graph with a moving line for showing the time of simulation. For so, before doing g) step, do this :

  1. create a temporal graph or a flow graph. It's this graph that will be displayed in the movie.
  2. add a image in the composer, and give it a ID's name (2bis)
  3. finaly, select the choosen name in (2) with the type of graph you want (3). this will insert the graph in place of the composer's image.

After the g) step, a first image is created in the selafin file's directory, to have a preview of the movie's appearence. At the end of the movie's creation, the movie is pasted in the selafin file's directory.

Max tool

Click (1) to generate a selafin file containing the maximum of each parameters.
The file will be pased in the selafin file directory.

2shape - contour tool

PostTelemac_shape_contour

This tool let the user extract the data displayed in the canvas to a shapefile format.

Use(1) if you want to project the selafin file in other CRS than the initial CRS of the selafin file.

Click on (3) to create the shapefile. It will be pasted in the selafin file directory. The name will be : « name of the selafin file »« parameter name »« time ».

If you want to change the part of the name « « parameter name »_« time » », fill (2) with the appropriate string.

The shapefile will be automatically loaded in qgis once the generation is terminated.

2shape - mesh tool

PostTelemac_shape_mesh

This tool let the user extract the mesh of the selafin file to a shapefile format.

Use(1) if you want to project the mesh of the selafin file in other CRS than the initial CRS of the selafin file.

Click on (3) to create the shapefile. It will be pasted in the selafin file directory. The name will be : « name of the selafin file »_« mesh ».

You can make an « hillshade » effect by cliking on (2). So you can choose z factor, Zenith and Azimuth of the light source used for the hillshade effect.

The shapefile will be automatically loaded in qgis once the generation is terminated.

2shape - point tool

PostTelemac_shape_contour

This tool let the user extract the points of the selafin file to a shapefile format.

Use(1) if you want to project the points of the selafin file in other CRS than the initial CRS of the selafin file.

Click on (4) to create the shapefile. It will be pasted in the selafin file directory. The name will be : « name of the selafin file »_«points».

You can extract all the points of the selafin file by chossing « 0 » in (2). Otherwise, you can have a grid with a horizontal spacing of (2) value if the value in (2) is > 0.

You can also choose to extract the velocity vectors by chacking (3).

The shapefile will be automatically loaded in qgis once the generation is terminated.