2 Copyright (C) 2015-2016 EDF
4 This file is part of SALOME HYDRO module.
6 SALOME HYDRO module is free software: you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation, either version 3 of the License, or
9 (at your option) any later version.
11 SALOME HYDRO module is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with SALOME HYDRO module. If not, see <http://www.gnu.org/licenses/>.
19 #########################################
21 #########################################
24 .. |stricklerTable_1| image:: /../_static/stricklerTable_1.png
27 .. |importLandCoverMap| image:: /../_static/importLandCoverMap.png
30 .. |importLandCoverMap_2| image:: /../_static/importLandCoverMap_2.png
33 .. |importLandCoverMap_3| image:: /../_static/importLandCoverMap_3.png
36 .. |casLandCoverMap| image:: /../_static/casLandCoverMap.png
39 .. |BottomFriction| image:: /../_static/BottomFriction.png
43 Import of a Land Cover Map
44 ===========================
46 The previous example "garonne_1" is taken to add a map of the Strickler coefficients.
47 The map can be downloaded and modified in qgis. The *Corine Land Cover* overlap a large territory
48 and are very detailed.
50 **Note:** To simplify handle of Corine Land Cover maps in SALOME-HYDRO,
51 It is recomended to cut them into qgis in order to restrict them as much as possible to the field of study.
52 We will define a cutting polygon covering the field of study, making sure that no zone is lost when cutting
53 (A cuted map is provided with this tutorial). The map includes a database which gives, for each zone,
54 the associated land type code, according to the *Corine Land Cover* nomenclature.
56 Before importing the map, you must have a table defining the *Corine Land Cover* codes, the colour representation
57 of the zone types and the associated Strickler coefficients.
59 A default table is available in SALOME-HYDRO, visible in the study tree, in the *STRICKLER TABLES* section, with the name
60 *Strickler table_1*. The table can be edited with the context menu *Edit Strickler table*.
61 Most fields are editable,
62 **in particular the Strickler coefficients that will have to be adapted in any case for a realistic study**.
66 The *Attribute Name* field must match the field type field in the database associated with
67 the imported *Corine Land Cover*: *CODE_06* corresponds to the 2006 maps, *CODE_12* to the 2012 maps.
68 This field is not editable in the above dialog box. FIXME: pas clair
70 In the example provided, the map is from 2006, another Strickler table is needed.
71 These tables are saved in editable text files.
72 We load a 2006 table provided in the installation directory of the SALOME HYDRO application
73 With the *Import Strickler* command from the context menu of the topic *TABLES STRICKLER* ::
75 <appli_xxx>/share/salome/resources/hydro/def_strickler_table_06.txt
77 You must delete the previous table *Strickler table_1*, so that the new table is correctly used
78 When importing the Land Cover Map (context menu *Delete*).
80 We can now load the Land Cover Map.
81 To do this, we use the *Import land cover map from file (s)* command in the context menu section
84 <appli_xxx>/bin/salome/test/HYDRO/HYDRO/CLC_decoupe.shp
86 The map already contains a large number of black polygons (more than 600) whose outline can be seen by selecting them.
87 FIXME: La découpe déborde très largement de la zone d'étude. On voit les zones "oubliées" lors de la découpe dans qgis,
88 sur les bords. Elles sont hors de la zone d'étude.
92 In practice, we select all polygons (<crtl> A in the list), before pressing the *Next>* button.
93 There are several attributes found in the imported database. We select the attribute that interests us,
94 the zone type: *CODE_06*, before pressing the *Next>* button.
95 The zone codes are well associated with their definition provided in the new Strickler table.
97 |importLandCoverMap_2|
99 We press the *Finish* button. The treatment takes few seconds.
100 The Land Cover Map is not displayed automatically: *show* command in the context menu of the object *CLC_decoupe*
101 In the *LAND COVER MAPS* section. One can see the calculation under the card, in transparency.
103 |importLandCoverMap_3|
105 Creation, edition of Land Cover Map
106 ===================================
108 It is possible to create a Land Cover Map from scratch, using polygons created from SALOME-HYDRO
111 The context menu of the Land Cover Map offers options for editing zones:
112 adding, removing, cutting, grouping, changing the type.
114 We do not detail these operations here.
116 Use of Land Cover Map in calculation case
117 =========================================
119 To use the Land Cover Map, the computation case must be edited.
120 We edit the *garonne_1* calculation case with the *edit calculation case* command in the context menu of the calculation case.
121 You must go to the *Land Cover map* tab with the *Next>* buttons and select the Land Cover Map and
126 We continue with the *Next>* and *Finish* buttons to validate the case.
128 Creating a Strickler field at mesh nodes
129 ========================================
131 TELEMAC can use a field of Strickler coefficients at the nodes of the mesh. This field has the name *BOTTOM FRICTION*.
132 This field is added to the MED file of the mesh, such as the elevation field at the nodes.
134 You have to manually adapt the script below:
136 It is necessary to copy the script below and to adapt it according to the case of computation
137 and file names for input and output.
138 It is possible to use the same MED file as input and output.
140 .. literalinclude:: ../interpolStrickler.py
143 We can see the result field with the MED module, as for the elevation field.
149 :ref:`ref_casParticuliers`