Salome HOME
fix tests with Z interpolation to the nearest bathy point: The mesh varies slightly...
[modules/hydro.git] / doc / salome / examples / h019_normalCaseManualInterpolZStrickler.py
index d5e1f10f34512d2a639e6f3e171a7a3d9fea0595..47faa3aa58e80ab4836a56b5e36724cbd71d8664 100644 (file)
@@ -7,7 +7,6 @@ import sys
 import salome
 
 salome.salome_init()
-theStudy = salome.myStudy
 
 #----------------------
 # --- HYDRO
@@ -17,7 +16,7 @@ from HYDROPy import *
 from PyQt5.QtCore import *
 from PyQt5.QtGui import *
 
-hydro_doc = HYDROData_Document.Document( theStudy._get_StudyId() )
+hydro_doc = HYDROData_Document.Document()
 
 hydro_doc.SetLocalCS( 430000, 6.35e+06 )
 
@@ -64,181 +63,181 @@ def_strickler_table_06.SetName( "def_strickler_table_06" )
 
 def_strickler_table_06.SetAttrName( "CODE_06" )
 
-def_strickler_table_06.Set( u"Pelouses et pâturages naturels", 31 )
-def_strickler_table_06.SetAttrValue( u"Pelouses et pâturages naturels", "321" )
-def_strickler_table_06.SetColor( u"Pelouses et pâturages naturels", QColor( 204, 242, 77 ) )
+def_strickler_table_06.Set( "Pelouses et pâturages naturels", 31 )
+def_strickler_table_06.SetAttrValue( "Pelouses et pâturages naturels", "321" )
+def_strickler_table_06.SetColor( "Pelouses et pâturages naturels", QColor( 204, 242, 77 ) )
 
-def_strickler_table_06.Set( u"Aéroports", 43 )
-def_strickler_table_06.SetAttrValue( u"Aéroports", "124" )
-def_strickler_table_06.SetColor( u"Aéroports", QColor( 230, 204, 230 ) )
+def_strickler_table_06.Set( "Aéroports", 43 )
+def_strickler_table_06.SetAttrValue( "Aéroports", "124" )
+def_strickler_table_06.SetColor( "Aéroports", QColor( 230, 204, 230 ) )
 
-def_strickler_table_06.Set( u"Systèmes culturaux et parcellaires complexes", 19 )
-def_strickler_table_06.SetAttrValue( u"Systèmes culturaux et parcellaires complexes", "242" )
-def_strickler_table_06.SetColor( u"Systèmes culturaux et parcellaires complexes", QColor( 255, 230, 77 ) )
+def_strickler_table_06.Set( "Systèmes culturaux et parcellaires complexes", 19 )
+def_strickler_table_06.SetAttrValue( "Systèmes culturaux et parcellaires complexes", "242" )
+def_strickler_table_06.SetColor( "Systèmes culturaux et parcellaires complexes", QColor( 255, 230, 77 ) )
 
-def_strickler_table_06.Set( u"Cultures annuelles associées à des cultures permanentes", 27 )
-def_strickler_table_06.SetAttrValue( u"Cultures annuelles associées à des cultures permanentes", "241" )
-def_strickler_table_06.SetColor( u"Cultures annuelles associées à des cultures permanentes", QColor( 255, 230, 166 ) )
+def_strickler_table_06.Set( "Cultures annuelles associées à des cultures permanentes", 27 )
+def_strickler_table_06.SetAttrValue( "Cultures annuelles associées à des cultures permanentes", "241" )
+def_strickler_table_06.SetColor( "Cultures annuelles associées à des cultures permanentes", QColor( 255, 230, 166 ) )
 
-def_strickler_table_06.Set( u"Forêt et végétation arbustive en mutation", 9 )
-def_strickler_table_06.SetAttrValue( u"Forêt et végétation arbustive en mutation", "324" )
-def_strickler_table_06.SetColor( u"Forêt et végétation arbustive en mutation", QColor( 166, 242, 0 ) )
+def_strickler_table_06.Set( "Forêt et végétation arbustive en mutation", 9 )
+def_strickler_table_06.SetAttrValue( "Forêt et végétation arbustive en mutation", "324" )
+def_strickler_table_06.SetColor( "Forêt et végétation arbustive en mutation", QColor( 166, 242, 0 ) )
 
-def_strickler_table_06.Set( u"Décharges", 21 )
-def_strickler_table_06.SetAttrValue( u"Décharges", "132" )
-def_strickler_table_06.SetColor( u"Décharges", QColor( 166, 77, 0 ) )
+def_strickler_table_06.Set( "Décharges", 21 )
+def_strickler_table_06.SetAttrValue( "Décharges", "132" )
+def_strickler_table_06.SetColor( "Décharges", QColor( 166, 77, 0 ) )
 
-def_strickler_table_06.Set( u"Végétation clairsemée", 43 )
-def_strickler_table_06.SetAttrValue( u"Végétation clairsemée", "333" )
-def_strickler_table_06.SetColor( u"Végétation clairsemée", QColor( 204, 255, 204 ) )
+def_strickler_table_06.Set( "Végétation clairsemée", 43 )
+def_strickler_table_06.SetAttrValue( "Végétation clairsemée", "333" )
+def_strickler_table_06.SetColor( "Végétation clairsemée", QColor( 204, 255, 204 ) )
 
-def_strickler_table_06.Set( u"Prairies et autres surfaces toujours en herbe à usage agricole", 33 )
-def_strickler_table_06.SetAttrValue( u"Prairies et autres surfaces toujours en herbe à usage agricole", "231" )
-def_strickler_table_06.SetColor( u"Prairies et autres surfaces toujours en herbe à usage agricole", QColor( 230, 230, 77 ) )
+def_strickler_table_06.Set( "Prairies et autres surfaces toujours en herbe à usage agricole", 33 )
+def_strickler_table_06.SetAttrValue( "Prairies et autres surfaces toujours en herbe à usage agricole", "231" )
+def_strickler_table_06.SetColor( "Prairies et autres surfaces toujours en herbe à usage agricole", QColor( 230, 230, 77 ) )
 
-def_strickler_table_06.Set( u"Périmètres irrigués en permanence", 43 )
-def_strickler_table_06.SetAttrValue( u"Périmètres irrigués en permanence", "212" )
-def_strickler_table_06.SetColor( u"Périmètres irrigués en permanence", QColor( 255, 255, 0 ) )
+def_strickler_table_06.Set( "Périmètres irrigués en permanence", 43 )
+def_strickler_table_06.SetAttrValue( "Périmètres irrigués en permanence", "212" )
+def_strickler_table_06.SetColor( "Périmètres irrigués en permanence", QColor( 255, 255, 0 ) )
 
-def_strickler_table_06.Set( u"Plans d'eau", 90 )
-def_strickler_table_06.SetAttrValue( u"Plans d'eau", "512" )
-def_strickler_table_06.SetColor( u"Plans d'eau", QColor( 128, 242, 230 ) )
+def_strickler_table_06.Set( "Plans d'eau", 90 )
+def_strickler_table_06.SetAttrValue( "Plans d'eau", "512" )
+def_strickler_table_06.SetColor( "Plans d'eau", QColor( 128, 242, 230 ) )
 
-def_strickler_table_06.Set( u"Territoires agroforestiers", 14 )
-def_strickler_table_06.SetAttrValue( u"Territoires agroforestiers", "244" )
-def_strickler_table_06.SetColor( u"Territoires agroforestiers", QColor( 242, 204, 166 ) )
+def_strickler_table_06.Set( "Territoires agroforestiers", 14 )
+def_strickler_table_06.SetAttrValue( "Territoires agroforestiers", "244" )
+def_strickler_table_06.SetColor( "Territoires agroforestiers", QColor( 242, 204, 166 ) )
 
-def_strickler_table_06.Set( u"Forêts mélangées", 10 )
-def_strickler_table_06.SetAttrValue( u"Forêts mélangées", "313" )
-def_strickler_table_06.SetColor( u"Forêts mélangées", QColor( 77, 255, 0 ) )
+def_strickler_table_06.Set( "Forêts mélangées", 10 )
+def_strickler_table_06.SetAttrValue( "Forêts mélangées", "313" )
+def_strickler_table_06.SetColor( "Forêts mélangées", QColor( 77, 255, 0 ) )
 
-def_strickler_table_06.Set( u"Glaciers et neiges éternelles", 75 )
-def_strickler_table_06.SetAttrValue( u"Glaciers et neiges éternelles", "335" )
-def_strickler_table_06.SetColor( u"Glaciers et neiges éternelles", QColor( 166, 230, 204 ) )
+def_strickler_table_06.Set( "Glaciers et neiges éternelles", 75 )
+def_strickler_table_06.SetAttrValue( "Glaciers et neiges éternelles", "335" )
+def_strickler_table_06.SetColor( "Glaciers et neiges éternelles", QColor( 166, 230, 204 ) )
 
-def_strickler_table_06.Set( u"Plages, dunes et sable", 39 )
-def_strickler_table_06.SetAttrValue( u"Plages, dunes et sable", "331" )
-def_strickler_table_06.SetColor( u"Plages, dunes et sable", QColor( 230, 230, 230 ) )
+def_strickler_table_06.Set( "Plages, dunes et sable", 39 )
+def_strickler_table_06.SetAttrValue( "Plages, dunes et sable", "331" )
+def_strickler_table_06.SetColor( "Plages, dunes et sable", QColor( 230, 230, 230 ) )
 
-def_strickler_table_06.Set( u"Zones incendiées", 65 )
-def_strickler_table_06.SetAttrValue( u"Zones incendiées", "334" )
-def_strickler_table_06.SetColor( u"Zones incendiées", QColor( 0, 0, 0 ) )
+def_strickler_table_06.Set( "Zones incendiées", 65 )
+def_strickler_table_06.SetAttrValue( "Zones incendiées", "334" )
+def_strickler_table_06.SetColor( "Zones incendiées", QColor( 0, 0, 0 ) )
 
-def_strickler_table_06.Set( u"Tissu urbain continu", 15 )
-def_strickler_table_06.SetAttrValue( u"Tissu urbain continu", "111" )
-def_strickler_table_06.SetColor( u"Tissu urbain continu", QColor( 230, 0, 77 ) )
+def_strickler_table_06.Set( "Tissu urbain continu", 15 )
+def_strickler_table_06.SetAttrValue( "Tissu urbain continu", "111" )
+def_strickler_table_06.SetColor( "Tissu urbain continu", QColor( 230, 0, 77 ) )
 
-def_strickler_table_06.Set( u"Chantiers", 17 )
-def_strickler_table_06.SetAttrValue( u"Chantiers", "133" )
-def_strickler_table_06.SetColor( u"Chantiers", QColor( 255, 77, 255 ) )
+def_strickler_table_06.Set( "Chantiers", 17 )
+def_strickler_table_06.SetAttrValue( "Chantiers", "133" )
+def_strickler_table_06.SetColor( "Chantiers", QColor( 255, 77, 255 ) )
 
-def_strickler_table_06.Set( u"Estuaires", 98 )
-def_strickler_table_06.SetAttrValue( u"Estuaires", "522" )
-def_strickler_table_06.SetColor( u"Estuaires", QColor( 166, 255, 230 ) )
+def_strickler_table_06.Set( "Estuaires", 98 )
+def_strickler_table_06.SetAttrValue( "Estuaires", "522" )
+def_strickler_table_06.SetColor( "Estuaires", QColor( 166, 255, 230 ) )
 
-def_strickler_table_06.Set( u"Marais maritimes", 74 )
-def_strickler_table_06.SetAttrValue( u"Marais maritimes", "421" )
-def_strickler_table_06.SetColor( u"Marais maritimes", QColor( 204, 204, 255 ) )
+def_strickler_table_06.Set( "Marais maritimes", 74 )
+def_strickler_table_06.SetAttrValue( "Marais maritimes", "421" )
+def_strickler_table_06.SetColor( "Marais maritimes", QColor( 204, 204, 255 ) )
 
-def_strickler_table_06.Set( u"Forêts de conifères", 13 )
-def_strickler_table_06.SetAttrValue( u"Forêts de conifères", "312" )
-def_strickler_table_06.SetColor( u"Forêts de conifères", QColor( 0, 166, 0 ) )
+def_strickler_table_06.Set( "Forêts de conifères", 13 )
+def_strickler_table_06.SetAttrValue( "Forêts de conifères", "312" )
+def_strickler_table_06.SetColor( "Forêts de conifères", QColor( 0, 166, 0 ) )
 
-def_strickler_table_06.Set( u"Surfaces essentiellement agricoles, interrompues par des espaces naturels importants", 16 )
-def_strickler_table_06.SetAttrValue( u"Surfaces essentiellement agricoles, interrompues par des espaces naturels importants", "243" )
-def_strickler_table_06.SetColor( u"Surfaces essentiellement agricoles, interrompues par des espaces naturels importants", QColor( 230, 204, 77 ) )
+def_strickler_table_06.Set( "Surfaces essentiellement agricoles, interrompues par des espaces naturels importants", 16 )
+def_strickler_table_06.SetAttrValue( "Surfaces essentiellement agricoles, interrompues par des espaces naturels importants", "243" )
+def_strickler_table_06.SetColor( "Surfaces essentiellement agricoles, interrompues par des espaces naturels importants", QColor( 230, 204, 77 ) )
 
-def_strickler_table_06.Set( u"Tourbières", 65 )
-def_strickler_table_06.SetAttrValue( u"Tourbières", "412" )
-def_strickler_table_06.SetColor( u"Tourbières", QColor( 77, 77, 255 ) )
+def_strickler_table_06.Set( "Tourbières", 65 )
+def_strickler_table_06.SetAttrValue( "Tourbières", "412" )
+def_strickler_table_06.SetColor( "Tourbières", QColor( 77, 77, 255 ) )
 
-def_strickler_table_06.Set( u"Extraction de matériaux", 19 )
-def_strickler_table_06.SetAttrValue( u"Extraction de matériaux", "131" )
-def_strickler_table_06.SetColor( u"Extraction de matériaux", QColor( 166, 0, 204 ) )
+def_strickler_table_06.Set( "Extraction de matériaux", 19 )
+def_strickler_table_06.SetAttrValue( "Extraction de matériaux", "131" )
+def_strickler_table_06.SetColor( "Extraction de matériaux", QColor( 166, 0, 204 ) )
 
-def_strickler_table_06.Set( u"Réseaux routier et ferroviaire et espaces associés", 35 )
-def_strickler_table_06.SetAttrValue( u"Réseaux routier et ferroviaire et espaces associés", "122" )
-def_strickler_table_06.SetColor( u"Réseaux routier et ferroviaire et espaces associés", QColor( 204, 0, 0 ) )
+def_strickler_table_06.Set( "Réseaux routier et ferroviaire et espaces associés", 35 )
+def_strickler_table_06.SetAttrValue( "Réseaux routier et ferroviaire et espaces associés", "122" )
+def_strickler_table_06.SetColor( "Réseaux routier et ferroviaire et espaces associés", QColor( 204, 0, 0 ) )
 
-def_strickler_table_06.Set( u"Mers et océans", 99 )
-def_strickler_table_06.SetAttrValue( u"Mers et océans", "523" )
-def_strickler_table_06.SetColor( u"Mers et océans", QColor( 230, 242, 255 ) )
+def_strickler_table_06.Set( "Mers et océans", 99 )
+def_strickler_table_06.SetAttrValue( "Mers et océans", "523" )
+def_strickler_table_06.SetColor( "Mers et océans", QColor( 230, 242, 255 ) )
 
-def_strickler_table_06.Set( u"Equipements sportifs et de loisirs", 40 )
-def_strickler_table_06.SetAttrValue( u"Equipements sportifs et de loisirs", "142" )
-def_strickler_table_06.SetColor( u"Equipements sportifs et de loisirs", QColor( 255, 230, 255 ) )
+def_strickler_table_06.Set( "Equipements sportifs et de loisirs", 40 )
+def_strickler_table_06.SetAttrValue( "Equipements sportifs et de loisirs", "142" )
+def_strickler_table_06.SetColor( "Equipements sportifs et de loisirs", QColor( 255, 230, 255 ) )
 
-def_strickler_table_06.Set( u"Forêts de feuillus", 9 )
-def_strickler_table_06.SetAttrValue( u"Forêts de feuillus", "311" )
-def_strickler_table_06.SetColor( u"Forêts de feuillus", QColor( 128, 255, 0 ) )
+def_strickler_table_06.Set( "Forêts de feuillus", 9 )
+def_strickler_table_06.SetAttrValue( "Forêts de feuillus", "311" )
+def_strickler_table_06.SetColor( "Forêts de feuillus", QColor( 128, 255, 0 ) )
 
-def_strickler_table_06.Set( u"Vergers et petits fruits", 25 )
-def_strickler_table_06.SetAttrValue( u"Vergers et petits fruits", "222" )
-def_strickler_table_06.SetColor( u"Vergers et petits fruits", QColor( 242, 166, 77 ) )
+def_strickler_table_06.Set( "Vergers et petits fruits", 25 )
+def_strickler_table_06.SetAttrValue( "Vergers et petits fruits", "222" )
+def_strickler_table_06.SetColor( "Vergers et petits fruits", QColor( 242, 166, 77 ) )
 
-def_strickler_table_06.Set( u"Végétation sclérophylle", 10 )
-def_strickler_table_06.SetAttrValue( u"Végétation sclérophylle", "323" )
-def_strickler_table_06.SetColor( u"Végétation sclérophylle", QColor( 166, 230, 77 ) )
+def_strickler_table_06.Set( "Végétation sclérophylle", 10 )
+def_strickler_table_06.SetAttrValue( "Végétation sclérophylle", "323" )
+def_strickler_table_06.SetColor( "Végétation sclérophylle", QColor( 166, 230, 77 ) )
 
-def_strickler_table_06.Set( u"Landes et broussailles", 12 )
-def_strickler_table_06.SetAttrValue( u"Landes et broussailles", "322" )
-def_strickler_table_06.SetColor( u"Landes et broussailles", QColor( 166, 255, 128 ) )
+def_strickler_table_06.Set( "Landes et broussailles", 12 )
+def_strickler_table_06.SetAttrValue( "Landes et broussailles", "322" )
+def_strickler_table_06.SetColor( "Landes et broussailles", QColor( 166, 255, 128 ) )
 
-def_strickler_table_06.Set( u"Tissu urbain discontinu", 32 )
-def_strickler_table_06.SetAttrValue( u"Tissu urbain discontinu", "112" )
-def_strickler_table_06.SetColor( u"Tissu urbain discontinu", QColor( 255, 0, 0 ) )
+def_strickler_table_06.Set( "Tissu urbain discontinu", 32 )
+def_strickler_table_06.SetAttrValue( "Tissu urbain discontinu", "112" )
+def_strickler_table_06.SetColor( "Tissu urbain discontinu", QColor( 255, 0, 0 ) )
 
-def_strickler_table_06.Set( u"Cours et voies d'eau", 88 )
-def_strickler_table_06.SetAttrValue( u"Cours et voies d'eau", "511" )
-def_strickler_table_06.SetColor( u"Cours et voies d'eau", QColor( 0, 204, 242 ) )
+def_strickler_table_06.Set( "Cours et voies d'eau", 88 )
+def_strickler_table_06.SetAttrValue( "Cours et voies d'eau", "511" )
+def_strickler_table_06.SetColor( "Cours et voies d'eau", QColor( 0, 204, 242 ) )
 
-def_strickler_table_06.Set( u"Oliveraies", 26 )
-def_strickler_table_06.SetAttrValue( u"Oliveraies", "223" )
-def_strickler_table_06.SetColor( u"Oliveraies", QColor( 230, 166, 0 ) )
+def_strickler_table_06.Set( "Oliveraies", 26 )
+def_strickler_table_06.SetAttrValue( "Oliveraies", "223" )
+def_strickler_table_06.SetColor( "Oliveraies", QColor( 230, 166, 0 ) )
 
-def_strickler_table_06.Set( u"Vignobles", 24 )
-def_strickler_table_06.SetAttrValue( u"Vignobles", "221" )
-def_strickler_table_06.SetColor( u"Vignobles", QColor( 230, 128, 0 ) )
+def_strickler_table_06.Set( "Vignobles", 24 )
+def_strickler_table_06.SetAttrValue( "Vignobles", "221" )
+def_strickler_table_06.SetColor( "Vignobles", QColor( 230, 128, 0 ) )
 
-def_strickler_table_06.Set( u"Rizières", 42 )
-def_strickler_table_06.SetAttrValue( u"Rizières", "213" )
-def_strickler_table_06.SetColor( u"Rizières", QColor( 230, 230, 0 ) )
+def_strickler_table_06.Set( "Rizières", 42 )
+def_strickler_table_06.SetAttrValue( "Rizières", "213" )
+def_strickler_table_06.SetColor( "Rizières", QColor( 230, 230, 0 ) )
 
-def_strickler_table_06.Set( u"Zones portuaires", 45 )
-def_strickler_table_06.SetAttrValue( u"Zones portuaires", "123" )
-def_strickler_table_06.SetColor( u"Zones portuaires", QColor( 230, 204, 204 ) )
+def_strickler_table_06.Set( "Zones portuaires", 45 )
+def_strickler_table_06.SetAttrValue( "Zones portuaires", "123" )
+def_strickler_table_06.SetColor( "Zones portuaires", QColor( 230, 204, 204 ) )
 
-def_strickler_table_06.Set( u"Zones industrielles ou commerciales et installations publiques", 30 )
-def_strickler_table_06.SetAttrValue( u"Zones industrielles ou commerciales et installations publiques", "121" )
-def_strickler_table_06.SetColor( u"Zones industrielles ou commerciales et installations publiques", QColor( 204, 77, 242 ) )
+def_strickler_table_06.Set( "Zones industrielles ou commerciales et installations publiques", 30 )
+def_strickler_table_06.SetAttrValue( "Zones industrielles ou commerciales et installations publiques", "121" )
+def_strickler_table_06.SetColor( "Zones industrielles ou commerciales et installations publiques", QColor( 204, 77, 242 ) )
 
-def_strickler_table_06.Set( u"Marais salants", 73 )
-def_strickler_table_06.SetAttrValue( u"Marais salants", "422" )
-def_strickler_table_06.SetColor( u"Marais salants", QColor( 230, 230, 255 ) )
+def_strickler_table_06.Set( "Marais salants", 73 )
+def_strickler_table_06.SetAttrValue( "Marais salants", "422" )
+def_strickler_table_06.SetColor( "Marais salants", QColor( 230, 230, 255 ) )
 
-def_strickler_table_06.Set( u"Marais intérieurs", 60 )
-def_strickler_table_06.SetAttrValue( u"Marais intérieurs", "411" )
-def_strickler_table_06.SetColor( u"Marais intérieurs", QColor( 166, 166, 255 ) )
+def_strickler_table_06.Set( "Marais intérieurs", 60 )
+def_strickler_table_06.SetAttrValue( "Marais intérieurs", "411" )
+def_strickler_table_06.SetColor( "Marais intérieurs", QColor( 166, 166, 255 ) )
 
-def_strickler_table_06.Set( u"Espaces verts urbains", 25 )
-def_strickler_table_06.SetAttrValue( u"Espaces verts urbains", "141" )
-def_strickler_table_06.SetColor( u"Espaces verts urbains", QColor( 255, 166, 255 ) )
+def_strickler_table_06.Set( "Espaces verts urbains", 25 )
+def_strickler_table_06.SetAttrValue( "Espaces verts urbains", "141" )
+def_strickler_table_06.SetColor( "Espaces verts urbains", QColor( 255, 166, 255 ) )
 
-def_strickler_table_06.Set( u"Lagunes littorales", 95 )
-def_strickler_table_06.SetAttrValue( u"Lagunes littorales", "521" )
-def_strickler_table_06.SetColor( u"Lagunes littorales", QColor( 0, 255, 166 ) )
+def_strickler_table_06.Set( "Lagunes littorales", 95 )
+def_strickler_table_06.SetAttrValue( "Lagunes littorales", "521" )
+def_strickler_table_06.SetColor( "Lagunes littorales", QColor( 0, 255, 166 ) )
 
-def_strickler_table_06.Set( u"Roches nues", 45 )
-def_strickler_table_06.SetAttrValue( u"Roches nues", "332" )
-def_strickler_table_06.SetColor( u"Roches nues", QColor( 204, 204, 204 ) )
+def_strickler_table_06.Set( "Roches nues", 45 )
+def_strickler_table_06.SetAttrValue( "Roches nues", "332" )
+def_strickler_table_06.SetColor( "Roches nues", QColor( 204, 204, 204 ) )
 
-def_strickler_table_06.Set( u"Terres arables hors périmètres d'irrigation", 31 )
-def_strickler_table_06.SetAttrValue( u"Terres arables hors périmètres d'irrigation", "211" )
-def_strickler_table_06.SetColor( u"Terres arables hors périmètres d'irrigation", QColor( 255, 255, 168 ) )
+def_strickler_table_06.Set( "Terres arables hors périmètres d'irrigation", 31 )
+def_strickler_table_06.SetAttrValue( "Terres arables hors périmètres d'irrigation", "211" )
+def_strickler_table_06.SetColor( "Terres arables hors périmètres d'irrigation", QColor( 255, 255, 168 ) )
 
-def_strickler_table_06.Set( u"Zones intertidales", 75 )
-def_strickler_table_06.SetAttrValue( u"Zones intertidales", "423" )
-def_strickler_table_06.SetColor( u"Zones intertidales", QColor( 166, 166, 230 ) )
+def_strickler_table_06.Set( "Zones intertidales", 75 )
+def_strickler_table_06.SetAttrValue( "Zones intertidales", "423" )
+def_strickler_table_06.SetColor( "Zones intertidales", QColor( 166, 166, 230 ) )
 
 
 def_strickler_table_06.Update()
@@ -447,95 +446,95 @@ CLC_decoupe.SetZLevel( 13 )
 if not(CLC_decoupe.ImportSHP( os.path.join(HYDRO_SAMPLES, 'HYDRO', 'CLC_decoupe.shp') )):
   raise ValueError('problem while loading LandCoverMap shape')
 attr_values = []
-attr_values.append( u"124" )
-attr_values.append( u"133" )
-attr_values.append( u"511" )
-attr_values.append( u"241" )
-attr_values.append( u"132" )
-attr_values.append( u"142" )
-attr_values.append( u"141" )
-attr_values.append( u"522" )
-attr_values.append( u"131" )
-attr_values.append( u"324" )
-attr_values.append( u"312" )
-attr_values.append( u"311" )
-attr_values.append( u"313" )
-attr_values.append( u"335" )
-attr_values.append( u"521" )
-attr_values.append( u"322" )
-attr_values.append( u"411" )
-attr_values.append( u"421" )
-attr_values.append( u"422" )
-attr_values.append( u"523" )
-attr_values.append( u"223" )
-attr_values.append( u"321" )
-attr_values.append( u"331" )
-attr_values.append( u"512" )
-attr_values.append( u"231" )
-attr_values.append( u"212" )
-attr_values.append( u"213" )
-attr_values.append( u"332" )
-attr_values.append( u"122" )
-attr_values.append( u"243" )
-attr_values.append( u"242" )
-attr_values.append( u"211" )
-attr_values.append( u"244" )
-attr_values.append( u"111" )
-attr_values.append( u"112" )
-attr_values.append( u"412" )
-attr_values.append( u"222" )
-attr_values.append( u"221" )
-attr_values.append( u"333" )
-attr_values.append( u"323" )
-attr_values.append( u"334" )
-attr_values.append( u"121" )
-attr_values.append( u"423" )
-attr_values.append( u"123" )
+attr_values.append( "124" )
+attr_values.append( "133" )
+attr_values.append( "511" )
+attr_values.append( "241" )
+attr_values.append( "132" )
+attr_values.append( "142" )
+attr_values.append( "141" )
+attr_values.append( "522" )
+attr_values.append( "131" )
+attr_values.append( "324" )
+attr_values.append( "312" )
+attr_values.append( "311" )
+attr_values.append( "313" )
+attr_values.append( "335" )
+attr_values.append( "521" )
+attr_values.append( "322" )
+attr_values.append( "411" )
+attr_values.append( "421" )
+attr_values.append( "422" )
+attr_values.append( "523" )
+attr_values.append( "223" )
+attr_values.append( "321" )
+attr_values.append( "331" )
+attr_values.append( "512" )
+attr_values.append( "231" )
+attr_values.append( "212" )
+attr_values.append( "213" )
+attr_values.append( "332" )
+attr_values.append( "122" )
+attr_values.append( "243" )
+attr_values.append( "242" )
+attr_values.append( "211" )
+attr_values.append( "244" )
+attr_values.append( "111" )
+attr_values.append( "112" )
+attr_values.append( "412" )
+attr_values.append( "222" )
+attr_values.append( "221" )
+attr_values.append( "333" )
+attr_values.append( "323" )
+attr_values.append( "334" )
+attr_values.append( "121" )
+attr_values.append( "423" )
+attr_values.append( "123" )
 types = []
-types.append( u"Aéroports" )
-types.append( u"Chantiers" )
-types.append( u"Cours et voies d'eau" )
-types.append( u"Cultures annuelles associées à des cultures permanentes" )
-types.append( u"Décharges" )
-types.append( u"Equipements sportifs et de loisirs" )
-types.append( u"Espaces verts urbains" )
-types.append( u"Estuaires" )
-types.append( u"Extraction de matériaux" )
-types.append( u"Forêt et végétation arbustive en mutation" )
-types.append( u"Forêts de conifères" )
-types.append( u"Forêts de feuillus" )
-types.append( u"Forêts mélangées" )
-types.append( u"Glaciers et neiges éternelles" )
-types.append( u"Lagunes littorales" )
-types.append( u"Landes et broussailles" )
-types.append( u"Marais intérieurs" )
-types.append( u"Marais maritimes" )
-types.append( u"Marais salants" )
-types.append( u"Mers et océans" )
-types.append( u"Oliveraies" )
-types.append( u"Pelouses et pâturages naturels" )
-types.append( u"Plages, dunes et sable" )
-types.append( u"Plans d'eau" )
-types.append( u"Prairies et autres surfaces toujours en herbe à usage agricole" )
-types.append( u"Périmètres irrigués en permanence" )
-types.append( u"Rizières" )
-types.append( u"Roches nues" )
-types.append( u"Réseaux routier et ferroviaire et espaces associés" )
-types.append( u"Surfaces essentiellement agricoles, interrompues par des espaces naturels importants" )
-types.append( u"Systèmes culturaux et parcellaires complexes" )
-types.append( u"Terres arables hors périmètres d'irrigation" )
-types.append( u"Territoires agroforestiers" )
-types.append( u"Tissu urbain continu" )
-types.append( u"Tissu urbain discontinu" )
-types.append( u"Tourbières" )
-types.append( u"Vergers et petits fruits" )
-types.append( u"Vignobles" )
-types.append( u"Végétation clairsemée" )
-types.append( u"Végétation sclérophylle" )
-types.append( u"Zones incendiées" )
-types.append( u"Zones industrielles ou commerciales et installations publiques" )
-types.append( u"Zones intertidales" )
-types.append( u"Zones portuaires" )
+types.append( "Aéroports" )
+types.append( "Chantiers" )
+types.append( "Cours et voies d'eau" )
+types.append( "Cultures annuelles associées à des cultures permanentes" )
+types.append( "Décharges" )
+types.append( "Equipements sportifs et de loisirs" )
+types.append( "Espaces verts urbains" )
+types.append( "Estuaires" )
+types.append( "Extraction de matériaux" )
+types.append( "Forêt et végétation arbustive en mutation" )
+types.append( "Forêts de conifères" )
+types.append( "Forêts de feuillus" )
+types.append( "Forêts mélangées" )
+types.append( "Glaciers et neiges éternelles" )
+types.append( "Lagunes littorales" )
+types.append( "Landes et broussailles" )
+types.append( "Marais intérieurs" )
+types.append( "Marais maritimes" )
+types.append( "Marais salants" )
+types.append( "Mers et océans" )
+types.append( "Oliveraies" )
+types.append( "Pelouses et pâturages naturels" )
+types.append( "Plages, dunes et sable" )
+types.append( "Plans d'eau" )
+types.append( "Prairies et autres surfaces toujours en herbe à usage agricole" )
+types.append( "Périmètres irrigués en permanence" )
+types.append( "Rizières" )
+types.append( "Roches nues" )
+types.append( "Réseaux routier et ferroviaire et espaces associés" )
+types.append( "Surfaces essentiellement agricoles, interrompues par des espaces naturels importants" )
+types.append( "Systèmes culturaux et parcellaires complexes" )
+types.append( "Terres arables hors périmètres d'irrigation" )
+types.append( "Territoires agroforestiers" )
+types.append( "Tissu urbain continu" )
+types.append( "Tissu urbain discontinu" )
+types.append( "Tourbières" )
+types.append( "Vergers et petits fruits" )
+types.append( "Vignobles" )
+types.append( "Végétation clairsemée" )
+types.append( "Végétation sclérophylle" )
+types.append( "Zones incendiées" )
+types.append( "Zones industrielles ou commerciales et installations publiques" )
+types.append( "Zones intertidales" )
+types.append( "Zones portuaires" )
 if CLC_decoupe.ImportDBF( os.path.join(HYDRO_SAMPLES, 'HYDRO', 'CLC_decoupe.dbf'), 'CODE_06', attr_values, types ) != CLC_decoupe.DBFStatus_OK:
   raise ValueError('problem while loading LandCoverMap data base')
 
@@ -596,7 +595,7 @@ garonne_1_riveDroite.SetName("garonne_1_riveDroite")
 garonne_1_riveGauche.SetName("garonne_1_riveGauche")
 
 # Export of the calculation case
-garonne_1_entry = garonne_1.Export( theStudy._get_StudyId() )
+garonne_1_entry = garonne_1.Export()
 
 #----------------------
 # --- Geometry
@@ -609,65 +608,85 @@ import math
 import SALOMEDS
 from salome.hydrotools.controls import controlGeomProps
 
-geompy = geomBuilder.New(theStudy)
+geompy = geomBuilder.New()
 
-print "Entry:", garonne_1_entry
+print("Entry:", garonne_1_entry)
 HYDRO_garonne_1 = salome.IDToObject( str( garonne_1_entry ) )
-print "Geom shape:", HYDRO_garonne_1
-print "Geom shape name:", HYDRO_garonne_1.GetName()
+print("Geom shape:", HYDRO_garonne_1)
+print("Geom shape name:", HYDRO_garonne_1.GetName())
+
 
 # --- manual definition: geometrical faces
-[riveGauche,litMineur,riveDroite] = geompy.ExtractShapes(HYDRO_garonne_1, geompy.ShapeType["FACE"], True)
-
-# --- manual definition: useful groups of edges
-garonne_1_litMineur_Outer = geompy.CreateGroup(HYDRO_garonne_1, geompy.ShapeType["EDGE"])
-geompy.UnionIDs(garonne_1_litMineur_Outer, [7, 9])
-garonne_1_domaineEtendu_Outer = geompy.CreateGroup(HYDRO_garonne_1, geompy.ShapeType["EDGE"])
-geompy.UnionIDs(garonne_1_domaineEtendu_Outer, [7, 9, 14, 16, 18, 20, 22, 24, 27, 30, 32, 33])
-
-aval = geompy.CreateGroup(HYDRO_garonne_1, geompy.ShapeType["EDGE"])
-geompy.UnionIDs(aval, [7])
-amont = geompy.CreateGroup(HYDRO_garonne_1, geompy.ShapeType["EDGE"])
-geompy.UnionIDs(amont, [9])
+
+[garonne_litMineur,garonne_riveDroite,garonne_riveGauche] = geompy.SubShapeAll(HYDRO_garonne_1, geompy.ShapeType["FACE"])
+
+controlGeomProps(geompy, garonne_riveGauche,  29149.36918,  35948828.352061)
+controlGeomProps(geompy, garonne_litMineur,   30337.548492,  3488480.304388)
+controlGeomProps(geompy, garonne_riveDroite,  32012.343241, 25998769.23615)
+
+# --- manual identification of all useful edge groups (boundary conditions)
+
+allEdgesIds = geompy.SubShapeAllIDs(HYDRO_garonne_1, geompy.ShapeType["EDGE"])
+print("allEdgesIds", allEdgesIds)
+
+(isDone, ClosedFreeBoundary, OpenFreeBoundary) = geompy.GetFreeBoundary(HYDRO_garonne_1)
+geompy.addToStudyInFather(HYDRO_garonne_1, ClosedFreeBoundary[0], "ClosedFreeBoundary")
+
+freeBoundary = geompy.ExtractShapes(ClosedFreeBoundary[0], geompy.ShapeType["EDGE"], True)
+freeBoundaryIds = [ geompy.GetSubShapeID(HYDRO_garonne_1, freeBoundary[i]) for i in range(len(freeBoundary)) ]
+print("freeBoundaryIds", freeBoundaryIds)
+
+[litMineur_droite] = geompy.GetSharedShapesMulti([garonne_riveDroite, garonne_litMineur], geompy.ShapeType["EDGE"], True)
+[litMineur_gauche] = geompy.GetSharedShapesMulti([garonne_riveGauche, garonne_litMineur], geompy.ShapeType["EDGE"], True)
+geompy.addToStudyInFather(HYDRO_garonne_1, litMineur_droite, "litMineur_droite")
+geompy.addToStudyInFather(HYDRO_garonne_1, litMineur_gauche, "litMineur_gauche")
+rives = [litMineur_droite, litMineur_gauche]
+rivesIds = [ geompy.GetSubShapeID(HYDRO_garonne_1, rives[i]) for i in range(len(rives)) ]
+print("rivesIds", rivesIds)
+
+edges_litMineur = geompy.GetSharedShapesMulti([HYDRO_garonne_1, garonne_litMineur], geompy.ShapeType["EDGE"], True)
+edges_riveGauche = geompy.GetSharedShapesMulti([HYDRO_garonne_1, garonne_riveGauche], geompy.ShapeType["EDGE"], True)
+edges_riveDroite = geompy.GetSharedShapesMulti([HYDRO_garonne_1, garonne_riveDroite], geompy.ShapeType["EDGE"], True)
+edges_litMineurIds = [ geompy.GetSubShapeID(HYDRO_garonne_1, edges_litMineur[i]) for i in range(len(edges_litMineur)) ]
+edges_riveGaucheIds = [ geompy.GetSubShapeID(HYDRO_garonne_1, edges_riveGauche[i]) for i in range(len(edges_riveGauche)) ]
+edges_riveDroiteIds = [ geompy.GetSubShapeID(HYDRO_garonne_1, edges_riveDroite[i]) for i in range(len(edges_riveDroite)) ]
+
+print("edges_litMineurIds", edges_litMineurIds) 
+print("edges_riveGaucheIds", edges_riveGaucheIds)
+print("edges_riveDroiteIds", edges_riveDroiteIds)
+
+sectionsIds = [Id for Id in edges_litMineurIds if Id not in rivesIds]
+print("sectionsIds", sectionsIds)
 SectionsGaronne = geompy.CreateGroup(HYDRO_garonne_1, geompy.ShapeType["EDGE"])
-geompy.UnionIDs(SectionsGaronne, [7, 9])
+geompy.UnionIDs(SectionsGaronne, sectionsIds)
+geompy.addToStudyInFather(HYDRO_garonne_1, SectionsGaronne, "SectionsGaronne")
+
+bordGaucheDomaineIds = [Id for Id in freeBoundaryIds if Id in edges_riveGaucheIds]
+bordDroiteDomaineIds = [Id for Id in freeBoundaryIds if Id in edges_riveDroiteIds]
+print("bordGaucheDomaineIds", bordGaucheDomaineIds)
+print("bordDroiteDomaineIds", bordDroiteDomaineIds)
 bordGaucheDomaine = geompy.CreateGroup(HYDRO_garonne_1, geompy.ShapeType["EDGE"])
-geompy.UnionIDs(bordGaucheDomaine, [27, 30, 32, 33])
+geompy.UnionIDs(bordGaucheDomaine, bordGaucheDomaineIds)
+geompy.addToStudyInFather(HYDRO_garonne_1, bordGaucheDomaine, "bordGaucheDomaine")
 bordDroiteDomaine = geompy.CreateGroup(HYDRO_garonne_1, geompy.ShapeType["EDGE"])
-geompy.UnionIDs(bordDroiteDomaine, [14, 16, 18, 20, 22, 24])
+geompy.UnionIDs(bordDroiteDomaine, bordDroiteDomaineIds)
+geompy.addToStudyInFather(HYDRO_garonne_1, bordDroiteDomaine, "bordDroiteDomaine")
 
-# --- publications dans l'étude
-geompy.addToStudyInFather( HYDRO_garonne_1, riveGauche, 'riveGauche' )
-geompy.addToStudyInFather( HYDRO_garonne_1, litMineur, 'litMineur' )
-geompy.addToStudyInFather( HYDRO_garonne_1, riveDroite, 'riveDroite' )
-geompy.addToStudyInFather( HYDRO_garonne_1, aval, 'aval' )
-geompy.addToStudyInFather( HYDRO_garonne_1, amont, 'amont' )
-geompy.addToStudyInFather( HYDRO_garonne_1, SectionsGaronne, 'SectionsGaronne' )
-geompy.addToStudyInFather( HYDRO_garonne_1, bordGaucheDomaine, 'bordGaucheDomaine' )
-geompy.addToStudyInFather( HYDRO_garonne_1, bordDroiteDomaine, 'bordDroiteDomaine' )
-
-# --- basic properties control: edges length, surfaces
-
-controlGeomProps(geompy, riveGauche,  29149.36918,  35948828.352061)
-controlGeomProps(geompy, litMineur,   30337.548492,  3488480.304388)
-controlGeomProps(geompy, riveDroite,  32012.343241, 25998769.23615)
+amont = geompy.GetEdgeNearPoint(HYDRO_garonne_1, geompy.MakeVertex(46757.861314, 25833.234752, 0))
+aval = geompy.GetEdgeNearPoint(HYDRO_garonne_1, geompy.MakeVertex(39078.979127, 32588.627279, 0))
+geompy.addToStudyInFather(HYDRO_garonne_1, amont, "amont")
+geompy.addToStudyInFather(HYDRO_garonne_1, aval, "aval")
 
 #----------------------
 # --- Meshing
 #----------------------
 
-med_file = r'/tmp/garonne_1.med'
-try:
-  os.remove(med_file)
-except OSError:
-  pass
-
-
 import  SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
 from salome.hydrotools.controls import controlMeshStats, controlSubMeshStats
+import tempfile
 
-smesh = smeshBuilder.New(theStudy)
+smesh = smeshBuilder.New()
 
 # --- algorithms and hypothesis
 garonne_1 = smesh.Mesh(HYDRO_garonne_1)
@@ -683,8 +702,8 @@ NETGEN_2D_Parameters.SetUseSurfaceCurvature( 1 )
 NETGEN_2D_Parameters.SetFuseEdges( 1 )
 NETGEN_2D_Parameters.SetQuadAllowed( 0 )
 
-algo2D_litMineur = garonne_1.Quadrangle(algo=smeshBuilder.QUAD_MA_PROJ,geom=litMineur)
-algo1D_litMineur = garonne_1.Segment(geom=litMineur)
+algo2D_litMineur = garonne_1.Quadrangle(algo=smeshBuilder.QUAD_MA_PROJ,geom=garonne_litMineur)
+algo1D_litMineur = garonne_1.Segment(geom=garonne_litMineur)
 hypo1D_litMineur = algo1D_litMineur.LocalLength(100,None,1e-07)
 subMesh_litMineur = algo1D_litMineur.GetSubMesh()
 smesh.SetName(subMesh_litMineur, "litMineur")
@@ -702,55 +721,61 @@ isDone = garonne_1.Compute()
 isDone = garonne_1.SplitQuadObject( garonne_1, 1 )
 isDone = garonne_1.ReorientObject( garonne_1 )
 
+# --- geometrical groups of faces
+riveGauche_1 = garonne_1.GroupOnGeom(garonne_riveGauche,'riveGauche',SMESH.FACE)
+litMineur_1 = garonne_1.GroupOnGeom(garonne_litMineur,'litMineur',SMESH.FACE)
+riveDroite_1 = garonne_1.GroupOnGeom(garonne_riveDroite,'riveDroite',SMESH.FACE)
+
 # --- geometrical groups of edges
-garonne_1_litMineur_Outer_1 = garonne_1.GroupOnGeom(garonne_1_litMineur_Outer,'garonne_1_litMineur_Outer',SMESH.EDGE)
-garonne_1_domaineEtendu_Outer_1 = garonne_1.GroupOnGeom(garonne_1_domaineEtendu_Outer,'garonne_1_domaineEtendu_Outer',SMESH.EDGE)
-aval_1 = garonne_1.GroupOnGeom(aval,'aval',SMESH.EDGE)
-amont_1 = garonne_1.GroupOnGeom(amont,'amont',SMESH.EDGE)
+
+ClosedFreeBoundary_1 = garonne_1.GroupOnGeom(ClosedFreeBoundary[0],'ClosedFreeBoundary',SMESH.EDGE)
+litMineur_droite_1 = garonne_1.GroupOnGeom(litMineur_droite,'litMineur_droite',SMESH.EDGE)
+litMineur_gauche_1 = garonne_1.GroupOnGeom(litMineur_gauche,'litMineur_gauche',SMESH.EDGE)
+SectionsGaronne_1 = garonne_1.GroupOnGeom(SectionsGaronne,'SectionsGaronne',SMESH.EDGE)
 bordGaucheDomaine_1 = garonne_1.GroupOnGeom(bordGaucheDomaine,'bordGaucheDomaine',SMESH.EDGE)
 bordDroiteDomaine_1 = garonne_1.GroupOnGeom(bordDroiteDomaine,'bordDroiteDomaine',SMESH.EDGE)
-SectionsGaronne_2 = garonne_1.GroupOnGeom(SectionsGaronne,'SectionsGaronne',SMESH.EDGE)
-
-# --- geometrical groups of faces
-riveGauche_1 = garonne_1.GroupOnGeom(riveGauche,'riveGauche',SMESH.FACE)
-litMineur_2 = garonne_1.GroupOnGeom(litMineur,'litMineur',SMESH.FACE)
-riveDroite_1 = garonne_1.GroupOnGeom(riveDroite,'riveDroite',SMESH.FACE)
+amont_1 = garonne_1.GroupOnGeom(amont,'amont',SMESH.EDGE)
+aval_1 = garonne_1.GroupOnGeom(aval,'aval',SMESH.EDGE)
 
 # --- geometrical groups of nodes
-garonne_1_litMineur_Outer_2 = garonne_1.GroupOnGeom(garonne_1_litMineur_Outer,'garonne_1_litMineur_Outer',SMESH.NODE)
-garonne_1_domaineEtendu_Outer_2 = garonne_1.GroupOnGeom(garonne_1_domaineEtendu_Outer,'garonne_1_domaineEtendu_Outer',SMESH.NODE)
-riveGauche_2 = garonne_1.GroupOnGeom(riveGauche,'riveGauche',SMESH.NODE)
-litMineur_3 = garonne_1.GroupOnGeom(litMineur,'litMineur',SMESH.NODE)
-riveDroite_2 = garonne_1.GroupOnGeom(riveDroite,'riveDroite',SMESH.NODE)
-aval_2 = garonne_1.GroupOnGeom(aval,'aval',SMESH.NODE)
-amont_2 = garonne_1.GroupOnGeom(amont,'amont',SMESH.NODE)
+
+garonne_1_litMineur_2 = garonne_1.GroupOnGeom(garonne_litMineur,'garonne_1_litMineur',SMESH.NODE)
+garonne_1_riveDroite_2 = garonne_1.GroupOnGeom(garonne_riveDroite,'garonne_1_riveDroite',SMESH.NODE)
+garonne_1_riveGauche_2 = garonne_1.GroupOnGeom(garonne_riveGauche,'garonne_1_riveGauche',SMESH.NODE)
+ClosedFreeBoundary_2 = garonne_1.GroupOnGeom(ClosedFreeBoundary[0],'ClosedFreeBoundary',SMESH.NODE)
+litMineur_droite_2 = garonne_1.GroupOnGeom(litMineur_droite,'litMineur_droite',SMESH.NODE)
+litMineur_gauche_2 = garonne_1.GroupOnGeom(litMineur_gauche,'litMineur_gauche',SMESH.NODE)
+SectionsGaronne_2 = garonne_1.GroupOnGeom(SectionsGaronne,'SectionsGaronne',SMESH.NODE)
 bordGaucheDomaine_2 = garonne_1.GroupOnGeom(bordGaucheDomaine,'bordGaucheDomaine',SMESH.NODE)
 bordDroiteDomaine_2 = garonne_1.GroupOnGeom(bordDroiteDomaine,'bordDroiteDomaine',SMESH.NODE)
-SectionsGaronne_3 = garonne_1.GroupOnGeom(SectionsGaronne,'SectionsGaronne',SMESH.NODE)
+amont_2 = garonne_1.GroupOnGeom(amont,'amont',SMESH.NODE)
+aval_2 = garonne_1.GroupOnGeom(aval,'aval',SMESH.NODE)
 
 garonne_1.SetAutoColor( 1 )
-garonne_1.ExportMED( med_file, 0, SMESH.MED_V2_2, 1, None ,1)
+tmpdir = tempfile.mkdtemp()
+print("tmpdir=",tmpdir)
+fichierMaillage = os.path.join(tmpdir, 'garonne_1.med')
+garonne_1.ExportMED(fichierMaillage, 0, SMESH.MED_V2_2, 1, None ,1)
 
 controlMeshStats(garonne_1, 3888, 475, 7597)
-controlSubMeshStats(litMineur_2, 2384)
+controlSubMeshStats(litMineur_1, 2384)
 controlSubMeshStats(riveDroite_1, 2342)
 controlSubMeshStats(riveGauche_1, 2871)
 
 if salome.sg.hasDesktop():
-  salome.sg.updateObjBrowser(1)
+  salome.sg.updateObjBrowser()
 
 #----------------------
 # --- Z interpolation with HYDRO
 #----------------------
 
-from salome.hydrotools.interpolZ import interpolZ, createZfield2
+from salome.hydrotools.interpolZ import interpolZ
 from salome.hydrotools.controls import controlStatZ
 
 # --- case name in HYDRO
 nomCas = 'garonne_1'
 
 # --- med file 2D(x,y) of the case produced by SMESH
-fichierMaillage = med_file
 
 # --- dictionary [med group name] = region name
 dicoGroupeRegion= dict(litMineur  = 'garonne_1_litMineur',
@@ -759,19 +784,25 @@ dicoGroupeRegion= dict(litMineur  = 'garonne_1_litMineur',
                        )
 # --- value to use for Z when the node is not in a region (used to detect problems)
 zUndef = 90
+# --- interpolation Method: 0 = nearest point on bathymetry (default), 1 = linear interpolation
+interpolMethod = 0
+# --- produce a 3D mesh (Z set to its value instead of 0
+m3d = True
 
 # --- Z interpolation on the bathymety/altimetry on the mesh nodes
-statz = interpolZ(nomCas, fichierMaillage, dicoGroupeRegion, zUndef)
+statz = interpolZ(nomCas, fichierMaillage, dicoGroupeRegion, zUndef, interpolMethod, m3d)
 #print statz
 refstatz = {'riveDroite': (10.88, 32.61, 24.17, 5.12, 17.57, 31.33, 0.25),
-            'riveGauche': (7.72, 71.86, 24.51, 12.18, 12.90, 60.36, 0.25),
-             'litMineur': (2.06, 25.41, 13.93, 4.33, 8.47, 21.78)}
+            'riveGauche': (7.72, 71.86, 24.51, 12.18, 12.90, 60.36, 0.4),
+            'litMineur': (2.06, 25.41, 13.93, 4.33, 8.47, 21.78)}
 controlStatZ(statz, refstatz)
 
 # --- add a field on nodes of type double with z values, named "BOTTOM"
-createZfield2(fichierMaillage)
-
-# --- create a field on nodes of type double with srtickler coefficient values, named "BOTTOM_FRICTION"
+#createZfield2(fichierMaillage)
+# --- create a field on nodes of type double with srtickler coefficient values, named "BOTTOM FRICTION"
 from salome.hydrotools.interpolS import assignStrickler
 
-assignStrickler(nomCas, '/tmp/garonne_1F.med', '/tmp/garonne_1S.med')
+fichierFieldZ = os.path.join(tmpdir, 'garonne_1F.med')
+fichierFieldStrickler = os.path.join(tmpdir, 'garonne_1S.med')
+
+assignStrickler(nomCas, fichierFieldZ, fichierFieldStrickler)