mirror of https://gitlab.com/pamhyr/pamhyr2
Compare commits
17 Commits
Test_scena
...
master
| Author | SHA1 | Date |
|---|---|---|
|
|
bdaa38ea5c | |
|
|
713732b1dd | |
|
|
f053539cdd | |
|
|
fc6916bb3e | |
|
|
97c26cb4fb | |
|
|
10c98bb96e | |
|
|
7c2d9891d0 | |
|
|
3c3ac1f1df | |
|
|
80af278a0f | |
|
|
f254eaee25 | |
|
|
5adb0bdee5 | |
|
|
64c99d46d4 | |
|
|
0f0defb36f | |
|
|
1e1ee67d4b | |
|
|
5bc514c565 | |
|
|
1da3461dfe | |
|
|
dd5eecb1e2 |
16
README.md
16
README.md
|
|
@ -3,7 +3,7 @@
|
||||||
Pamhyr is a free and open source graphical user interface for 1D hydro-sedimentary
|
Pamhyr is a free and open source graphical user interface for 1D hydro-sedimentary
|
||||||
modelling of rivers.
|
modelling of rivers.
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
## Features
|
## Features
|
||||||
|
|
||||||
|
|
@ -20,9 +20,9 @@ modelling of rivers.
|
||||||
+ Run Mage 8 on a study and visualize results
|
+ Run Mage 8 on a study and visualize results
|
||||||
|
|
||||||
Let see the
|
Let see the
|
||||||
[documentation](https://gitlab.irstea.fr/theophile.terraz/pamhyr/-/wikis/home)
|
[documentation](https://gitlab.com/pamhyr/pamhyr2/-/wikis/home)
|
||||||
([:fr:](https://gitlab.irstea.fr/theophile.terraz/pamhyr/-/wikis/home-fr),
|
([:fr:](https://gitlab.com/pamhyr/pamhyr2/-/wikis/home-fr),
|
||||||
[:gb:](https://gitlab.irstea.fr/theophile.terraz/pamhyr/-/wikis/home-en))
|
[:gb:](https://gitlab.com/pamhyr/pamhyr2/-/wikis/home-en))
|
||||||
for more details.
|
for more details.
|
||||||
|
|
||||||
## Install
|
## Install
|
||||||
|
|
@ -30,11 +30,11 @@ for more details.
|
||||||
### GNU/Linux
|
### GNU/Linux
|
||||||
|
|
||||||
See documentation:
|
See documentation:
|
||||||
- [French :fr:](https://gitlab.irstea.fr/theophile.terraz/pamhyr/-/wikis/home/fr/Install%20on%20GNULinux)
|
- [French :fr:](https://gitlab.com/pamhyr/pamhyr2/-/wikis/home/fr/Install%20on%20GNULinux)
|
||||||
- [English :gb:](https://gitlab.irstea.fr/theophile.terraz/pamhyr/-/wikis/home/en/Install%20on%20GNULinux)
|
- [English :gb:](https://gitlab.com/pamhyr/pamhyr2/-/wikis/home/en/Install%20on%20GNULinux)
|
||||||
|
|
||||||
### Windows
|
### Windows
|
||||||
|
|
||||||
See documentation:
|
See documentation:
|
||||||
- [French :fr:](https://gitlab.irstea.fr/theophile.terraz/pamhyr/-/wikis/home/fr/Install%20on%20Windows)
|
- [French :fr:](https://gitlab.com/pamhyr/pamhyr2/-/wikis/home/fr/Install%20on%20Windows)
|
||||||
- [English :gb:](https://gitlab.irstea.fr/theophile.terraz/pamhyr/-/wikis/home/en/Install%20on%20Windows)
|
- [English :gb:](https://gitlab.com/pamhyr/pamhyr2/-/wikis/home/en/Install%20on%20Windows)
|
||||||
|
|
|
||||||
|
|
@ -63,8 +63,6 @@ class InternalMeshing(AMeshingTool):
|
||||||
gl = reach.compute_guidelines()
|
gl = reach.compute_guidelines()
|
||||||
profiles = reach.profiles[limites[0]:limites[1]+1]
|
profiles = reach.profiles[limites[0]:limites[1]+1]
|
||||||
|
|
||||||
print(profiles)
|
|
||||||
|
|
||||||
# we make sure that the lines are in the left-to-right order
|
# we make sure that the lines are in the left-to-right order
|
||||||
guide_list = [
|
guide_list = [
|
||||||
x.name
|
x.name
|
||||||
|
|
@ -72,38 +70,30 @@ class InternalMeshing(AMeshingTool):
|
||||||
if x.name in gl[0]
|
if x.name in gl[0]
|
||||||
]
|
]
|
||||||
|
|
||||||
gl1 = [""] + guide_list
|
guide_list = ["un"] + guide_list + ["np"]
|
||||||
gl2 = guide_list + [""]
|
max_values = [0] * (len(guide_list) - 1)
|
||||||
max_values = [0] * (len(guide_list) + 1)
|
max_values_index = [0] * (len(guide_list) - 1)
|
||||||
max_values_index = [0] * (len(guide_list) + 1)
|
|
||||||
# we work between each couple of guidelines
|
# we work between each couple of guidelines
|
||||||
for j, p in enumerate(profiles):
|
for j, p in enumerate(profiles):
|
||||||
index1 = 0
|
|
||||||
index2 = p.named_point_index(guide_list[0])
|
|
||||||
if index2 - index1 > max_values[0]:
|
|
||||||
max_values[0] = index2 - index1
|
|
||||||
max_values_index[0] = j
|
|
||||||
for i in range(len(guide_list) - 1):
|
for i in range(len(guide_list) - 1):
|
||||||
index1 = p.named_point_index(guide_list[i])
|
index1 = p.named_point_index(guide_list[i])
|
||||||
index2 = p.named_point_index(guide_list[i+1])
|
index2 = p.named_point_index(guide_list[i+1])
|
||||||
if index2 - index1 > max_values[i + 1]:
|
if index2 - index1 > max_values[i]:
|
||||||
max_values[i + 1] = index2 - index1
|
max_values[i] = index2 - index1
|
||||||
max_values_index[i + 1] = j
|
max_values_index[i] = j
|
||||||
index1 = p.named_point_index(guide_list[-1])
|
|
||||||
index2 = len(p) - 1
|
|
||||||
if index2 - index1 > max_values[-1]:
|
|
||||||
max_values[-1] = index2 - index1
|
|
||||||
max_values_index[-1] = j
|
|
||||||
|
|
||||||
for i in range(len(max_values)):
|
for i in range(len(max_values)):
|
||||||
for isect in range(max_values_index[i], len(profiles)-1):
|
for isect in range(max_values_index[i], len(profiles)-1):
|
||||||
self.compl_sect(profiles[isect],
|
self.compl_sect(profiles[isect],
|
||||||
profiles[isect+1],
|
profiles[isect+1],
|
||||||
gl1[i], gl2[i])
|
guide_list[i],
|
||||||
|
guide_list[i+1])
|
||||||
|
|
||||||
for isect in reversed(range(0, max_values_index[i])):
|
for isect in reversed(range(0, max_values_index[i])):
|
||||||
self.compl_sect(profiles[isect+1],
|
self.compl_sect(profiles[isect+1],
|
||||||
profiles[isect],
|
profiles[isect],
|
||||||
gl1[i], gl2[i])
|
guide_list[i],
|
||||||
|
guide_list[i+1])
|
||||||
|
|
||||||
def interpolate_transversal_step(self,
|
def interpolate_transversal_step(self,
|
||||||
reach,
|
reach,
|
||||||
|
|
@ -124,11 +114,13 @@ class InternalMeshing(AMeshingTool):
|
||||||
d = 1.0/float(np[i]+1)
|
d = 1.0/float(np[i]+1)
|
||||||
ptr0 = ptr
|
ptr0 = ptr
|
||||||
for j in range(np[i]):
|
for j in range(np[i]):
|
||||||
p = reach.profiles[ptr0].copy()
|
p = ProfileXYZ(reach=reach, status=reach._status)
|
||||||
# RATIO entre les deux sections initiales
|
# RATIO entre les deux sections initiales
|
||||||
dj = float(j+1)*d
|
dj = float(j+1)*d
|
||||||
ptr += 1 # next profile, original
|
ptr += 1 # next profile, original
|
||||||
for k in range(len(reach.profiles[ptr0].points)):
|
for k in range(len(reach.profiles[ptr0].points)):
|
||||||
|
p.add()
|
||||||
|
p.points[k].name = reach.profiles[ptr0].points[k].name
|
||||||
p.points[k].x = reach.profiles[ptr0].points[k].x + \
|
p.points[k].x = reach.profiles[ptr0].points[k].x + \
|
||||||
dj*(reach.profiles[ptr].points[k].x -
|
dj*(reach.profiles[ptr].points[k].x -
|
||||||
reach.profiles[ptr0].points[k].x)
|
reach.profiles[ptr0].points[k].x)
|
||||||
|
|
@ -153,19 +145,11 @@ class InternalMeshing(AMeshingTool):
|
||||||
# len1 and 2: number of intervals
|
# len1 and 2: number of intervals
|
||||||
# len1: target len
|
# len1: target len
|
||||||
|
|
||||||
if tag1 == '': # left end point
|
start1 = sect1.named_point_index(tag1)
|
||||||
start1 = 0
|
start2 = sect2.named_point_index(tag1)
|
||||||
start2 = 0
|
|
||||||
else:
|
|
||||||
start1 = sect1.named_point_index(tag1)
|
|
||||||
start2 = sect2.named_point_index(tag1)
|
|
||||||
|
|
||||||
if tag2 == '': # right end point
|
end1 = sect1.named_point_index(tag2)
|
||||||
end1 = sect1.nb_points-1
|
end2 = sect2.named_point_index(tag2)
|
||||||
end2 = sect2.nb_points-1
|
|
||||||
else:
|
|
||||||
end1 = sect1.named_point_index(tag2)
|
|
||||||
end2 = sect2.named_point_index(tag2)
|
|
||||||
|
|
||||||
len1 = end1 - start1
|
len1 = end1 - start1
|
||||||
len2 = end2 - start2
|
len2 = end2 - start2
|
||||||
|
|
@ -201,10 +185,6 @@ class InternalMeshing(AMeshingTool):
|
||||||
for i in range(len1-len2):
|
for i in range(len1-len2):
|
||||||
p = sect2.point(start2).copy()
|
p = sect2.point(start2).copy()
|
||||||
sect2.insert_point(start2, p)
|
sect2.insert_point(start2, p)
|
||||||
if tag1 == '': # left end point
|
|
||||||
sect2.point(start2).name = ''
|
|
||||||
if tag2 == '': # left end point
|
|
||||||
sect2.point(start2+1).name = ''
|
|
||||||
len2 += 1
|
len2 += 1
|
||||||
elif ltot1 < 0.0001:
|
elif ltot1 < 0.0001:
|
||||||
sect2.add_npoints(len1-len2)
|
sect2.add_npoints(len1-len2)
|
||||||
|
|
@ -268,8 +248,10 @@ class InternalMeshing(AMeshingTool):
|
||||||
p = sect2.point(start2+len2).copy()
|
p = sect2.point(start2+len2).copy()
|
||||||
sect2.insert_point(start2+len2, p)
|
sect2.insert_point(start2+len2, p)
|
||||||
sect2.point(start2+len2).name = ''
|
sect2.point(start2+len2).name = ''
|
||||||
sect2.point(start2).name = tag1
|
if tag1 != "un":
|
||||||
sect2.point(start2+len2).name = tag2
|
sect2.point(start2).name = tag1
|
||||||
|
if tag2 != "np":
|
||||||
|
sect2.point(start2+len2).name = tag2
|
||||||
sect2.modified()
|
sect2.modified()
|
||||||
|
|
||||||
def update_rk(self, reach,
|
def update_rk(self, reach,
|
||||||
|
|
@ -302,6 +284,8 @@ class InternalMeshing(AMeshingTool):
|
||||||
sgn = -1.0
|
sgn = -1.0
|
||||||
else:
|
else:
|
||||||
sgn = sign(reach.profiles[-1].rk - reach.profiles[0].rk)
|
sgn = sign(reach.profiles[-1].rk - reach.profiles[0].rk)
|
||||||
|
if abs(sgn) < 0.5:
|
||||||
|
sgn = 1.0
|
||||||
|
|
||||||
reach.profiles[origin].rk = origin_value
|
reach.profiles[origin].rk = origin_value
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -45,7 +45,7 @@ class AddFile(SQLSubModel):
|
||||||
self._path = path
|
self._path = path
|
||||||
self._text = text
|
self._text = text
|
||||||
|
|
||||||
AddFile._id_cnt = max(id, AddFile._id_cnt+1)
|
AddFile._id_cnt = max(self.id + 1, AddFile._id_cnt + 1)
|
||||||
|
|
||||||
def __getitem__(self, key):
|
def __getitem__(self, key):
|
||||||
value = None
|
value = None
|
||||||
|
|
|
||||||
|
|
@ -53,7 +53,8 @@ class BoundaryCondition(SQLSubModel):
|
||||||
self._header = []
|
self._header = []
|
||||||
self._types = [float, float]
|
self._types = [float, float]
|
||||||
|
|
||||||
BoundaryCondition._id_cnt = max(BoundaryCondition._id_cnt + 1, self.id)
|
BoundaryCondition._id_cnt = max(BoundaryCondition._id_cnt + 1,
|
||||||
|
self.id + 1)
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def _db_create(cls, execute):
|
def _db_create(cls, execute):
|
||||||
|
|
|
||||||
|
|
@ -54,7 +54,7 @@ class BoundaryConditionAdisTS(SQLSubModel):
|
||||||
self._types = [self.time_convert, float]
|
self._types = [self.time_convert, float]
|
||||||
|
|
||||||
BoundaryConditionAdisTS._id_cnt = max(
|
BoundaryConditionAdisTS._id_cnt = max(
|
||||||
BoundaryConditionAdisTS._id_cnt + 1, self.id)
|
BoundaryConditionAdisTS._id_cnt + 1, self.id + 1)
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def _db_create(cls, execute):
|
def _db_create(cls, execute):
|
||||||
|
|
|
||||||
|
|
@ -53,7 +53,7 @@ class D90AdisTS(SQLSubModel):
|
||||||
|
|
||||||
D90AdisTS._id_cnt = max(
|
D90AdisTS._id_cnt = max(
|
||||||
D90AdisTS._id_cnt + 1,
|
D90AdisTS._id_cnt + 1,
|
||||||
self.id
|
self.id + 1
|
||||||
)
|
)
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
|
|
|
||||||
|
|
@ -49,7 +49,7 @@ class D90AdisTSSpec(SQLSubModel):
|
||||||
self._d90 = None
|
self._d90 = None
|
||||||
self._enabled = True
|
self._enabled = True
|
||||||
|
|
||||||
D90AdisTSSpec._id_cnt = max(D90AdisTSSpec._id_cnt + 1, self.id)
|
D90AdisTSSpec._id_cnt = max(D90AdisTSSpec._id_cnt + 1, self.id + 1)
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def _db_create(cls, execute):
|
def _db_create(cls, execute):
|
||||||
|
|
|
||||||
|
|
@ -57,7 +57,7 @@ class DIFAdisTS(SQLSubModel):
|
||||||
|
|
||||||
DIFAdisTS._id_cnt = max(
|
DIFAdisTS._id_cnt = max(
|
||||||
DIFAdisTS._id_cnt + 1,
|
DIFAdisTS._id_cnt + 1,
|
||||||
self.id
|
self.id + 1
|
||||||
)
|
)
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
|
|
|
||||||
|
|
@ -51,7 +51,7 @@ class DIFAdisTSSpec(SQLSubModel):
|
||||||
self._c = None
|
self._c = None
|
||||||
self._enabled = True
|
self._enabled = True
|
||||||
|
|
||||||
DIFAdisTSSpec._id_cnt = max(DIFAdisTSSpec._id_cnt + 1, self.id)
|
DIFAdisTSSpec._id_cnt = max(DIFAdisTSSpec._id_cnt + 1, self.id + 1)
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def _db_create(cls, execute):
|
def _db_create(cls, execute):
|
||||||
|
|
|
||||||
|
|
@ -41,7 +41,7 @@ class Friction(SQLSubModel):
|
||||||
else:
|
else:
|
||||||
self.id = id
|
self.id = id
|
||||||
|
|
||||||
Friction._id_cnt = max(self.id, Friction._id_cnt+1)
|
Friction._id_cnt = max(self.id + 1, Friction._id_cnt + 1)
|
||||||
|
|
||||||
self._name = name
|
self._name = name
|
||||||
self._edge = None
|
self._edge = None
|
||||||
|
|
|
||||||
|
|
@ -44,7 +44,7 @@ class Profile(object):
|
||||||
else:
|
else:
|
||||||
self.id = id
|
self.id = id
|
||||||
|
|
||||||
Profile._id_cnt = max(self.id, Profile._id_cnt+1)
|
Profile._id_cnt = max(self.id + 1, Profile._id_cnt + 1)
|
||||||
|
|
||||||
self._num = int(num)
|
self._num = int(num)
|
||||||
self._code1 = int(code1)
|
self._code1 = int(code1)
|
||||||
|
|
@ -89,12 +89,23 @@ class Profile(object):
|
||||||
return self.points[index]
|
return self.points[index]
|
||||||
|
|
||||||
def named_point(self, name):
|
def named_point(self, name):
|
||||||
return next((p for p in self.points if p.name == name), None)
|
if name == "un":
|
||||||
|
return self.points[0]
|
||||||
|
elif name == "np":
|
||||||
|
return self.points[-1]
|
||||||
|
else:
|
||||||
|
return next((p for p in self.points if p.name == name), None)
|
||||||
|
|
||||||
def named_point_index(self, name):
|
def named_point_index(self, name):
|
||||||
return next(
|
if name == "un":
|
||||||
(p for p in enumerate(self.points) if p[1].name == name), None
|
return 0
|
||||||
)[0]
|
elif name == "np":
|
||||||
|
return len(self.points) - 1
|
||||||
|
else:
|
||||||
|
return next(
|
||||||
|
(p for p in enumerate(self.points) if p[1].name == name),
|
||||||
|
None
|
||||||
|
)[0]
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def reach(self):
|
def reach(self):
|
||||||
|
|
|
||||||
|
|
@ -900,14 +900,12 @@ class ProfileXYZ(Profile, SQLSubModel):
|
||||||
self.point(i+1).z = 0.5 * self.point(i).z + 0.5 * self.point(i+2).z
|
self.point(i+1).z = 0.5 * self.point(i).z + 0.5 * self.point(i+2).z
|
||||||
|
|
||||||
def copy(self):
|
def copy(self):
|
||||||
p = ProfileXYZ(self.id,
|
p = ProfileXYZ(name=self.name,
|
||||||
self.name,
|
rk=self.rk,
|
||||||
self.rk,
|
reach=self.reach,
|
||||||
self.reach,
|
nb_point=0,
|
||||||
self.num,
|
code1=0, code2=0,
|
||||||
0,
|
status=self.reach._status)
|
||||||
0, 0,
|
|
||||||
self._status)
|
|
||||||
for i, k in enumerate(self.points):
|
for i, k in enumerate(self.points):
|
||||||
p.insert_point(i, k.copy())
|
p.insert_point(i, k.copy())
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -52,7 +52,7 @@ class BasicHS(SQLSubModel):
|
||||||
self._enabled = True
|
self._enabled = True
|
||||||
self._data = []
|
self._data = []
|
||||||
|
|
||||||
BasicHS._id_cnt = max(BasicHS._id_cnt + 1, self.id)
|
BasicHS._id_cnt = max(BasicHS._id_cnt + 1, self.id + 1)
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def _db_create(cls, execute):
|
def _db_create(cls, execute):
|
||||||
|
|
|
||||||
|
|
@ -59,7 +59,7 @@ class HydraulicStructure(SQLSubModel):
|
||||||
|
|
||||||
HydraulicStructure._id_cnt = max(
|
HydraulicStructure._id_cnt = max(
|
||||||
HydraulicStructure._id_cnt + 1,
|
HydraulicStructure._id_cnt + 1,
|
||||||
self.id
|
self.id + 1
|
||||||
)
|
)
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
|
|
|
||||||
|
|
@ -395,7 +395,10 @@ class InitialConditions(SQLSubModel):
|
||||||
strickler = 25.0
|
strickler = 25.0
|
||||||
|
|
||||||
if not compute_discharge:
|
if not compute_discharge:
|
||||||
discharge = data_discharge[profile.rk]
|
if profile.rk in data_discharge:
|
||||||
|
discharge = data_discharge[profile.rk]
|
||||||
|
else:
|
||||||
|
discharge = 0.0
|
||||||
else:
|
else:
|
||||||
discharge = (
|
discharge = (
|
||||||
# ((width * 0.8)
|
# ((width * 0.8)
|
||||||
|
|
@ -461,7 +464,10 @@ class InitialConditions(SQLSubModel):
|
||||||
strickler = 25.0
|
strickler = 25.0
|
||||||
|
|
||||||
if not compute_height:
|
if not compute_height:
|
||||||
height = data_height[profile.rk]
|
if profile.rk in data_height:
|
||||||
|
height = data_height[profile.rk]
|
||||||
|
else:
|
||||||
|
height = 0.0
|
||||||
else:
|
else:
|
||||||
if abs(incline) <= 0:
|
if abs(incline) <= 0:
|
||||||
height = 0.0
|
height = 0.0
|
||||||
|
|
@ -513,7 +519,10 @@ class InitialConditions(SQLSubModel):
|
||||||
for profile in profiles:
|
for profile in profiles:
|
||||||
|
|
||||||
if not compute_discharge:
|
if not compute_discharge:
|
||||||
d = data_discharge[profile.rk]
|
if profile.rk in data_discharge:
|
||||||
|
d = data_discharge[profile.rk]
|
||||||
|
else:
|
||||||
|
d = 0.0
|
||||||
else:
|
else:
|
||||||
d = discharge
|
d = discharge
|
||||||
elevation = interp(profile.rk,
|
elevation = interp(profile.rk,
|
||||||
|
|
|
||||||
|
|
@ -58,7 +58,7 @@ class InitialConditionsAdisTS(SQLSubModel):
|
||||||
|
|
||||||
InitialConditionsAdisTS._id_cnt = max(
|
InitialConditionsAdisTS._id_cnt = max(
|
||||||
InitialConditionsAdisTS._id_cnt + 1,
|
InitialConditionsAdisTS._id_cnt + 1,
|
||||||
self.id
|
self.id + 1
|
||||||
)
|
)
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
|
|
|
||||||
|
|
@ -53,7 +53,7 @@ class ICAdisTSSpec(SQLSubModel):
|
||||||
self._rate = None
|
self._rate = None
|
||||||
self._enabled = True
|
self._enabled = True
|
||||||
|
|
||||||
ICAdisTSSpec._id_cnt = max(ICAdisTSSpec._id_cnt + 1, self.id)
|
ICAdisTSSpec._id_cnt = max(ICAdisTSSpec._id_cnt + 1, self.id + 1)
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def _db_create(cls, execute):
|
def _db_create(cls, execute):
|
||||||
|
|
|
||||||
|
|
@ -55,7 +55,7 @@ class LateralContribution(SQLSubModel):
|
||||||
self._types = [float, float]
|
self._types = [float, float]
|
||||||
|
|
||||||
LateralContribution._id_cnt = max(
|
LateralContribution._id_cnt = max(
|
||||||
LateralContribution._id_cnt + 1, self.id)
|
LateralContribution._id_cnt + 1, self.id + 1)
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def _db_create(cls, execute):
|
def _db_create(cls, execute):
|
||||||
|
|
|
||||||
|
|
@ -31,11 +31,12 @@ class Edge(object):
|
||||||
self._status = status
|
self._status = status
|
||||||
|
|
||||||
if id == -1:
|
if id == -1:
|
||||||
type(self)._id_cnt += 1
|
|
||||||
self.id = type(self)._id_cnt
|
self.id = type(self)._id_cnt
|
||||||
else:
|
else:
|
||||||
self.id = id
|
self.id = id
|
||||||
|
|
||||||
|
type(self)._id_cnt = max(self.id + 1, type(self)._id_cnt + 1)
|
||||||
|
|
||||||
self._name = name
|
self._name = name
|
||||||
|
|
||||||
self.node1 = node1
|
self.node1 = node1
|
||||||
|
|
|
||||||
|
|
@ -30,11 +30,12 @@ class Node(object):
|
||||||
self._status = status
|
self._status = status
|
||||||
|
|
||||||
if id == -1:
|
if id == -1:
|
||||||
type(self)._id_cnt += 1
|
|
||||||
self.id = type(self)._id_cnt
|
self.id = type(self)._id_cnt
|
||||||
else:
|
else:
|
||||||
self.id = id
|
self.id = id
|
||||||
|
|
||||||
|
type(self)._id_cnt = max(self.id + 1, type(self)._id_cnt + 1)
|
||||||
|
|
||||||
self._name = name
|
self._name = name
|
||||||
self.pos = Point(x, y)
|
self.pos = Point(x, y)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -52,7 +52,7 @@ class OutputRKAdists(SQLSubModel):
|
||||||
self._enabled = True
|
self._enabled = True
|
||||||
|
|
||||||
OutputRKAdists._id_cnt = max(
|
OutputRKAdists._id_cnt = max(
|
||||||
OutputRKAdists._id_cnt + 1, self.id)
|
OutputRKAdists._id_cnt + 1, self.id + 1)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def reach(self):
|
def reach(self):
|
||||||
|
|
|
||||||
|
|
@ -54,7 +54,7 @@ class Pollutants(SQLSubModel):
|
||||||
self._data = []
|
self._data = []
|
||||||
|
|
||||||
Pollutants._id_cnt = max(
|
Pollutants._id_cnt = max(
|
||||||
Pollutants._id_cnt + 1, self.id)
|
Pollutants._id_cnt + 1, self.id + 1)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def name(self):
|
def name(self):
|
||||||
|
|
|
||||||
|
|
@ -45,7 +45,7 @@ class REPLine(SQLSubModel):
|
||||||
self._line = line
|
self._line = line
|
||||||
self._solvers = solvers
|
self._solvers = solvers
|
||||||
|
|
||||||
REPLine._id_cnt = max(id, REPLine._id_cnt+1)
|
REPLine._id_cnt = max(self.id + 1, REPLine._id_cnt + 1)
|
||||||
|
|
||||||
def __getitem__(self, key):
|
def __getitem__(self, key):
|
||||||
value = None
|
value = None
|
||||||
|
|
|
||||||
|
|
@ -42,7 +42,7 @@ class Reservoir(SQLSubModel):
|
||||||
self._node = None
|
self._node = None
|
||||||
self._data = []
|
self._data = []
|
||||||
|
|
||||||
Reservoir._id_cnt = max(Reservoir._id_cnt + 1, self.id)
|
Reservoir._id_cnt = max(Reservoir._id_cnt + 1, self.id + 1)
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def _db_create(cls, execute):
|
def _db_create(cls, execute):
|
||||||
|
|
@ -97,7 +97,7 @@ class Reservoir(SQLSubModel):
|
||||||
new_reservoir._node = next(
|
new_reservoir._node = next(
|
||||||
filter(
|
filter(
|
||||||
lambda n: n.id == node_id, data["nodes"]
|
lambda n: n.id == node_id, data["nodes"]
|
||||||
)
|
), None
|
||||||
)
|
)
|
||||||
|
|
||||||
new_data = []
|
new_data = []
|
||||||
|
|
|
||||||
|
|
@ -51,7 +51,7 @@ class Layer(SQLSubModel):
|
||||||
else:
|
else:
|
||||||
self.id = id
|
self.id = id
|
||||||
|
|
||||||
Layer._id_cnt = max(id, Layer._id_cnt+1)
|
Layer._id_cnt = max(self.id + 1, Layer._id_cnt + 1)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def name(self):
|
def name(self):
|
||||||
|
|
|
||||||
|
|
@ -197,7 +197,7 @@ class AdisTS(CommandLineSolver):
|
||||||
_nodes_views = set()
|
_nodes_views = set()
|
||||||
|
|
||||||
def get_reach_name(self, reach):
|
def get_reach_name(self, reach):
|
||||||
return f"Reach_{reach.id:>3}".replace(" ", "0")
|
return f"Reach_{reach.id + 1:>3}".replace(" ", "0")
|
||||||
|
|
||||||
def get_node_name(self, node):
|
def get_node_name(self, node):
|
||||||
"""Generate a 3 char name for node
|
"""Generate a 3 char name for node
|
||||||
|
|
@ -338,9 +338,9 @@ class AdisTSwc(AdisTS):
|
||||||
) as f:
|
) as f:
|
||||||
for LC in POL_LC:
|
for LC in POL_LC:
|
||||||
reach = next(filter(
|
reach = next(filter(
|
||||||
lambda edge: edge.id == LC.edge, study.river.edges()
|
lambda edge: edge.id == LC.edge, study.river.enable_edges()
|
||||||
)) # .name
|
)) # .name
|
||||||
reach_name = self.get_reach_name(self, reach)
|
reach_name = self.get_reach_name(reach)
|
||||||
f.write(f"${reach_name} {LC.begin_rk} {LC.end_rk}\n")
|
f.write(f"${reach_name} {LC.begin_rk} {LC.end_rk}\n")
|
||||||
f.write(f"*temps |débit massique (kg/s)\n")
|
f.write(f"*temps |débit massique (kg/s)\n")
|
||||||
f.write(f"*---------++++++++++\n")
|
f.write(f"*---------++++++++++\n")
|
||||||
|
|
|
||||||
|
|
@ -55,7 +55,7 @@ class AboutWindow(PamhyrDialog):
|
||||||
|
|
||||||
label = self.get_label_text("label_version")
|
label = self.get_label_text("label_version")
|
||||||
label = label.replace("@version", version)
|
label = label.replace("@version", version)
|
||||||
label = label.replace("@codename", "(Adis-TS)")
|
label = label.replace("@codename", "(Le Coz)")
|
||||||
self.set_label_text("label_version", label)
|
self.set_label_text("label_version", label)
|
||||||
|
|
||||||
# Authors
|
# Authors
|
||||||
|
|
|
||||||
|
|
@ -320,7 +320,9 @@ class GeometryWindow(PamhyrWindow):
|
||||||
index = QItemSelection()
|
index = QItemSelection()
|
||||||
if len(ind) > 0:
|
if len(ind) > 0:
|
||||||
for i in ind:
|
for i in ind:
|
||||||
index.append(QItemSelectionRange(self.tableView.model().index(i, 0)))
|
index.append(QItemSelectionRange(
|
||||||
|
self.tableView.model().index(i, 0))
|
||||||
|
)
|
||||||
selection.select(
|
selection.select(
|
||||||
index,
|
index,
|
||||||
QItemSelectionModel.Rows |
|
QItemSelectionModel.Rows |
|
||||||
|
|
@ -356,14 +358,11 @@ class GeometryWindow(PamhyrWindow):
|
||||||
|
|
||||||
def _update_rk(self, data):
|
def _update_rk(self, data):
|
||||||
try:
|
try:
|
||||||
mesher = MeshingWithMageMailleurTT()
|
mesher = InternalMeshing()
|
||||||
self._table.update_rk(mesher, data)
|
self._table.update_rk(mesher, data)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logger_exception(e)
|
logger_exception(e)
|
||||||
raise ExternFileMissingError(
|
raise ExternFileMissingError(
|
||||||
module="mage",
|
|
||||||
filename="MailleurTT",
|
|
||||||
path=MeshingWithMageMailleurTT._path(),
|
|
||||||
src_except=e
|
src_except=e
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -296,11 +296,11 @@ class InitialConditionTableModel(PamhyrTableModel):
|
||||||
formated = False
|
formated = False
|
||||||
if len(line_split[0]) > 3:
|
if len(line_split[0]) > 3:
|
||||||
formated = True
|
formated = True
|
||||||
elif len(line_split[2]) > 10:
|
elif len(line_split[2]) > 10:
|
||||||
formated = True
|
formated = True
|
||||||
elif len(line_split[3]) > 11:
|
elif len(line_split[3]) > 11:
|
||||||
formated = True
|
formated = True
|
||||||
elif len(line_split[4]) > 9:
|
elif len(line_split[4]) > 9:
|
||||||
formated = True
|
formated = True
|
||||||
|
|
||||||
if formated: # old PamHyr format
|
if formated: # old PamHyr format
|
||||||
|
|
|
||||||
|
|
@ -53,7 +53,8 @@ class LCTranslate(MainTranslate):
|
||||||
self._dict["y"] = _translate("Geometry", "Y (m)")
|
self._dict["y"] = _translate("Geometry", "Y (m)")
|
||||||
self._dict["z"] = _translate("Geometry", "Z (m)")
|
self._dict["z"] = _translate("Geometry", "Z (m)")
|
||||||
self._dict["file_lat"] = _translate(
|
self._dict["file_lat"] = _translate(
|
||||||
"LateralContribution", "Shapefile (*.LAT *.lat)")
|
"LateralContribution",
|
||||||
|
"Mage lateral contributions file (*.LAT *.lat)")
|
||||||
self._dict["file_all"] = _translate(
|
self._dict["file_all"] = _translate(
|
||||||
"LateralContribution", "All files (*)")
|
"LateralContribution", "All files (*)")
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -194,10 +194,10 @@ class ApplicationWindow(QMainWindow, ListedSubWindow, WindowToolKit):
|
||||||
title = "(dbg) " if self.conf.debug else ""
|
title = "(dbg) " if self.conf.debug else ""
|
||||||
|
|
||||||
if self._study is not None:
|
if self._study is not None:
|
||||||
title += f"Pamhyr2 - {self._study.name}"
|
title += f"Pamhyr2 (Le Coz) - {self._study.name}"
|
||||||
self.setWindowTitle(title)
|
self.setWindowTitle(title)
|
||||||
else:
|
else:
|
||||||
title += "Pamhyr2"
|
title += "Pamhyr2 (Le Coz)"
|
||||||
self.setWindowTitle(title)
|
self.setWindowTitle(title)
|
||||||
|
|
||||||
def setup_tab(self):
|
def setup_tab(self):
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@
|
||||||
from View.Tools.PamhyrWindow import PamhyrDialog
|
from View.Tools.PamhyrWindow import PamhyrDialog
|
||||||
|
|
||||||
from PyQt5.QtWidgets import (
|
from PyQt5.QtWidgets import (
|
||||||
QRadioButton, QCheckBox, QVBoxLayout, QLabel,
|
QRadioButton, QCheckBox, QVBoxLayout, QLabel, QFrame
|
||||||
)
|
)
|
||||||
|
|
||||||
from View.Results.translate import ResultsTranslate
|
from View.Results.translate import ResultsTranslate
|
||||||
|
|
@ -43,6 +43,7 @@ class CustomExportDialog(PamhyrDialog):
|
||||||
|
|
||||||
self.setup_radio_buttons_x()
|
self.setup_radio_buttons_x()
|
||||||
self.setup_radio_buttons_res()
|
self.setup_radio_buttons_res()
|
||||||
|
self.setup_label()
|
||||||
self.setup_envelop_box()
|
self.setup_envelop_box()
|
||||||
self.setup_check_boxes()
|
self.setup_check_boxes()
|
||||||
|
|
||||||
|
|
@ -87,6 +88,22 @@ class CustomExportDialog(PamhyrDialog):
|
||||||
|
|
||||||
layout.addStretch()
|
layout.addStretch()
|
||||||
|
|
||||||
|
def setup_label(self):
|
||||||
|
self._label = self.find(QLabel, "label_4")
|
||||||
|
self._label.setFrameStyle(QFrame.StyledPanel)
|
||||||
|
self._label.setStyleSheet('background-color: white')
|
||||||
|
self.set_label()
|
||||||
|
for r in self._radio:
|
||||||
|
r[1].clicked.connect(self.set_label)
|
||||||
|
|
||||||
|
def set_label(self):
|
||||||
|
if self._radio[0][1].isChecked():
|
||||||
|
self._label.setText(self._parent.text_bief() + "\n" +
|
||||||
|
self._parent.text_time())
|
||||||
|
else:
|
||||||
|
self._label.setText(self._parent.text_bief() + "\n" +
|
||||||
|
self._parent.text_profile())
|
||||||
|
|
||||||
def setup_envelop_box(self):
|
def setup_envelop_box(self):
|
||||||
layout = self.find(QVBoxLayout, "verticalLayout_x")
|
layout = self.find(QVBoxLayout, "verticalLayout_x")
|
||||||
self._envelop = QCheckBox(
|
self._envelop = QCheckBox(
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@
|
||||||
from View.Tools.PamhyrWindow import PamhyrDialog
|
from View.Tools.PamhyrWindow import PamhyrDialog
|
||||||
|
|
||||||
from PyQt5.QtWidgets import (
|
from PyQt5.QtWidgets import (
|
||||||
QRadioButton, QCheckBox, QVBoxLayout,
|
QRadioButton, QCheckBox, QVBoxLayout, QLabel, QFrame
|
||||||
)
|
)
|
||||||
|
|
||||||
from View.Results.translate import ResultsTranslate
|
from View.Results.translate import ResultsTranslate
|
||||||
|
|
@ -50,6 +50,7 @@ class CustomExportAdisDialog(PamhyrDialog):
|
||||||
|
|
||||||
self.setup_radio_buttons_x()
|
self.setup_radio_buttons_x()
|
||||||
self.setup_radio_buttons_pol()
|
self.setup_radio_buttons_pol()
|
||||||
|
self.setup_label()
|
||||||
self.setup_check_boxes()
|
self.setup_check_boxes()
|
||||||
|
|
||||||
self.value = None
|
self.value = None
|
||||||
|
|
@ -84,6 +85,22 @@ class CustomExportAdisDialog(PamhyrDialog):
|
||||||
self._radio2[0][1].setChecked(True)
|
self._radio2[0][1].setChecked(True)
|
||||||
layout.addStretch()
|
layout.addStretch()
|
||||||
|
|
||||||
|
def setup_label(self):
|
||||||
|
self._label = self.find(QLabel, "label_4")
|
||||||
|
self._label.setFrameStyle(QFrame.StyledPanel)
|
||||||
|
self._label.setStyleSheet('background-color: white')
|
||||||
|
self.set_label()
|
||||||
|
for r in self._radio:
|
||||||
|
r[1].clicked.connect(self.set_label)
|
||||||
|
|
||||||
|
def set_label(self):
|
||||||
|
if self._radio[0][1].isChecked():
|
||||||
|
self._label.setText(self._parent.text_bief() + "\n" +
|
||||||
|
self._parent.text_time())
|
||||||
|
else:
|
||||||
|
self._label.setText(self._parent.text_bief() + "\n" +
|
||||||
|
self._parent.text_profile())
|
||||||
|
|
||||||
def setup_check_boxes(self):
|
def setup_check_boxes(self):
|
||||||
self._check = []
|
self._check = []
|
||||||
layout = self.find(QVBoxLayout, "verticalLayout_y")
|
layout = self.find(QVBoxLayout, "verticalLayout_y")
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@
|
||||||
from View.Tools.PamhyrWindow import PamhyrDialog
|
from View.Tools.PamhyrWindow import PamhyrDialog
|
||||||
|
|
||||||
from PyQt5.QtWidgets import (
|
from PyQt5.QtWidgets import (
|
||||||
QRadioButton, QCheckBox, QVBoxLayout,
|
QRadioButton, QCheckBox, QVBoxLayout, QLabel, QFrame
|
||||||
)
|
)
|
||||||
|
|
||||||
from View.Results.CustomPlot.Translate import CustomPlotTranslate
|
from View.Results.CustomPlot.Translate import CustomPlotTranslate
|
||||||
|
|
@ -38,10 +38,12 @@ class CustomPlotValuesSelectionDialog(PamhyrDialog):
|
||||||
parent=parent
|
parent=parent
|
||||||
)
|
)
|
||||||
|
|
||||||
|
self._parent = parent
|
||||||
self._available_values_x = self._trad.get_dict("values_x")
|
self._available_values_x = self._trad.get_dict("values_x")
|
||||||
self._available_values_y = self._trad.get_dict("values_y")
|
self._available_values_y = self._trad.get_dict("values_y")
|
||||||
|
|
||||||
self.setup_radio_buttons()
|
self.setup_radio_buttons()
|
||||||
|
self.setup_label()
|
||||||
self.setup_envelop_box()
|
self.setup_envelop_box()
|
||||||
self.setup_check_boxs()
|
self.setup_check_boxs()
|
||||||
|
|
||||||
|
|
@ -62,6 +64,22 @@ class CustomPlotValuesSelectionDialog(PamhyrDialog):
|
||||||
self._radio[0][1].setChecked(True)
|
self._radio[0][1].setChecked(True)
|
||||||
layout.addStretch()
|
layout.addStretch()
|
||||||
|
|
||||||
|
def setup_label(self):
|
||||||
|
self._label = self.find(QLabel, "label_3")
|
||||||
|
self._label.setFrameStyle(QFrame.StyledPanel)
|
||||||
|
self._label.setStyleSheet('background-color: white')
|
||||||
|
self.set_label()
|
||||||
|
for r in self._radio:
|
||||||
|
r[1].clicked.connect(self.set_label)
|
||||||
|
|
||||||
|
def set_label(self):
|
||||||
|
if self._radio[0][1].isChecked():
|
||||||
|
self._label.setText(self._parent.text_bief() + "\n" +
|
||||||
|
self._parent.text_time())
|
||||||
|
else:
|
||||||
|
self._label.setText(self._parent.text_bief() + "\n" +
|
||||||
|
self._parent.text_profile())
|
||||||
|
|
||||||
def setup_envelop_box(self):
|
def setup_envelop_box(self):
|
||||||
self._envelop = []
|
self._envelop = []
|
||||||
layout = self.find(QVBoxLayout, "verticalLayout_x")
|
layout = self.find(QVBoxLayout, "verticalLayout_x")
|
||||||
|
|
|
||||||
|
|
@ -150,8 +150,17 @@ class PlotAC(PamhyrPlot):
|
||||||
self.annotation = []
|
self.annotation = []
|
||||||
self.cgl, self.igl = reach.geometry.compute_guidelines()
|
self.cgl, self.igl = reach.geometry.compute_guidelines()
|
||||||
|
|
||||||
lcomplete = list(self.cgl)
|
# we make sure that the lines are in the left-to-right order
|
||||||
lincomplete = list(self.igl)
|
lcomplete = [
|
||||||
|
x.name
|
||||||
|
for x in profile.geometry.named_points()
|
||||||
|
if x.name in self.cgl
|
||||||
|
]
|
||||||
|
lincomplete = [
|
||||||
|
x.name
|
||||||
|
for x in profile.geometry.named_points()
|
||||||
|
if x.name in self.igl
|
||||||
|
]
|
||||||
|
|
||||||
self.color_complete_gl = self.colors
|
self.color_complete_gl = self.colors
|
||||||
self.color_incomplete_gl = 2 * ["grey"]
|
self.color_incomplete_gl = 2 * ["grey"]
|
||||||
|
|
@ -171,7 +180,7 @@ class PlotAC(PamhyrPlot):
|
||||||
]
|
]
|
||||||
else:
|
else:
|
||||||
color = self.color_incomplete_gl[
|
color = self.color_incomplete_gl[
|
||||||
lincomplete.index(txt)
|
lincomplete.index(txt) % len(self.color_incomplete_gl)
|
||||||
]
|
]
|
||||||
|
|
||||||
annotation = self.canvas.axes.annotate(
|
annotation = self.canvas.axes.annotate(
|
||||||
|
|
|
||||||
|
|
@ -157,8 +157,6 @@ class TableModel(PamhyrTableModel):
|
||||||
self._lst = _river.reachs
|
self._lst = _river.reachs
|
||||||
elif self._opt_data == "profile" or self._opt_data == "raw_data":
|
elif self._opt_data == "profile" or self._opt_data == "raw_data":
|
||||||
self._lst = _river.reach(reach).profiles
|
self._lst = _river.reach(reach).profiles
|
||||||
# self._lst = list(compress(_river.reach(reach).profiles,
|
|
||||||
# _river.reach(reach).profile_mask))
|
|
||||||
elif self._opt_data == "solver":
|
elif self._opt_data == "solver":
|
||||||
self._lst = self._parent._solvers
|
self._lst = self._parent._solvers
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -288,16 +288,12 @@ class ResultsWindow(PamhyrWindow):
|
||||||
super(ResultsWindow, self).closeEvent(event)
|
super(ResultsWindow, self).closeEvent(event)
|
||||||
|
|
||||||
def _compute_status_label(self):
|
def _compute_status_label(self):
|
||||||
# Timestamp
|
|
||||||
ts = self._timestamps[self._slider_time.value()]
|
|
||||||
|
|
||||||
t0 = datetime.fromtimestamp(0)
|
return (self.text_bief() + " | " +
|
||||||
fts = str(
|
self.text_profile() + " | " +
|
||||||
datetime.fromtimestamp(ts) - t0
|
self.text_time())
|
||||||
)
|
|
||||||
fts.replace("days", _translate("Results", "days"))\
|
|
||||||
.replace("day", _translate("Results", "day"))
|
|
||||||
|
|
||||||
|
def text_bief(self):
|
||||||
# Reach
|
# Reach
|
||||||
table = self.find(QTableView, f"tableView_reach")
|
table = self.find(QTableView, f"tableView_reach")
|
||||||
indexes = table.selectedIndexes()
|
indexes = table.selectedIndexes()
|
||||||
|
|
@ -305,7 +301,16 @@ class ResultsWindow(PamhyrWindow):
|
||||||
reach = self._study.river.enable_edges()[0]
|
reach = self._study.river.enable_edges()[0]
|
||||||
else:
|
else:
|
||||||
reach = self._study.river.enable_edges()[indexes[0].row()]
|
reach = self._study.river.enable_edges()[indexes[0].row()]
|
||||||
|
return f"{self._trad['reach']}: {reach.name}"
|
||||||
|
|
||||||
|
def text_profile(self):
|
||||||
|
# Reach
|
||||||
|
table = self.find(QTableView, f"tableView_reach")
|
||||||
|
indexes = table.selectedIndexes()
|
||||||
|
if len(indexes) == 0:
|
||||||
|
reach = self._study.river.enable_edges()[0]
|
||||||
|
else:
|
||||||
|
reach = self._study.river.enable_edges()[indexes[0].row()]
|
||||||
# Profile
|
# Profile
|
||||||
table = self.find(QTableView, f"tableView_profile")
|
table = self.find(QTableView, f"tableView_profile")
|
||||||
indexes = table.selectedIndexes()
|
indexes = table.selectedIndexes()
|
||||||
|
|
@ -315,10 +320,22 @@ class ResultsWindow(PamhyrWindow):
|
||||||
profile = reach.reach.profile(indexes[0].row())
|
profile = reach.reach.profile(indexes[0].row())
|
||||||
|
|
||||||
pname = profile.name if profile.name != "" else profile.rk
|
pname = profile.name if profile.name != "" else profile.rk
|
||||||
|
return f"{self._trad['cross_section']}: {pname}"
|
||||||
|
|
||||||
return (f"{self._trad['reach']}: {reach.name} | " +
|
def text_time(self):
|
||||||
f"{self._trad['cross_section']}: {pname} | " +
|
# Timestamp
|
||||||
f"{self._trad['unit_time_s']} : {fts} ({ts} sec)")
|
ts = self._timestamps[self._slider_time.value()]
|
||||||
|
|
||||||
|
t0 = datetime.fromtimestamp(0)
|
||||||
|
fts = str(
|
||||||
|
datetime.fromtimestamp(ts) - t0
|
||||||
|
)
|
||||||
|
fts = str(
|
||||||
|
datetime.fromtimestamp(ts) - t0
|
||||||
|
)
|
||||||
|
fts.replace("days", _translate("Results", "days"))\
|
||||||
|
.replace("day", _translate("Results", "day"))
|
||||||
|
return f"{self._trad['time']} : {fts} ({ts} sec)"
|
||||||
|
|
||||||
def setup_statusbar(self):
|
def setup_statusbar(self):
|
||||||
txt = self._compute_status_label()
|
txt = self._compute_status_label()
|
||||||
|
|
@ -721,20 +738,29 @@ class ResultsWindow(PamhyrWindow):
|
||||||
first_line.append(f"Profile: {pname}")
|
first_line.append(f"Profile: {pname}")
|
||||||
val_dict = self._export_time(profile_id, y, solver_id)
|
val_dict = self._export_time(profile_id, y, solver_id)
|
||||||
|
|
||||||
with open(filename, 'w', newline='') as csvfile:
|
try:
|
||||||
writer = csv.writer(csvfile, delimiter=',',
|
with open(filename, 'w', newline='') as csvfile:
|
||||||
quotechar='|', quoting=csv.QUOTE_MINIMAL)
|
writer = csv.writer(csvfile, delimiter=',',
|
||||||
dict_x = self._trad.get_dict("values_x")
|
quotechar='|', quoting=csv.QUOTE_MINIMAL)
|
||||||
header = []
|
dict_x = self._trad.get_dict("values_x")
|
||||||
writer.writerow(first_line)
|
header = []
|
||||||
for text in val_dict.keys():
|
writer.writerow(first_line)
|
||||||
header.append(text)
|
for text in val_dict.keys():
|
||||||
writer.writerow(header)
|
header.append(text)
|
||||||
for row in range(len(val_dict[dict_x[x]])):
|
writer.writerow(header)
|
||||||
line = []
|
for row in range(len(val_dict[dict_x[x]])):
|
||||||
for var in val_dict.keys():
|
line = []
|
||||||
line.append(val_dict[var][row])
|
for var in val_dict.keys():
|
||||||
writer.writerow(line)
|
line.append(val_dict[var][row])
|
||||||
|
writer.writerow(line)
|
||||||
|
self._timer.stop()
|
||||||
|
except Exception as e:
|
||||||
|
self.message_box(
|
||||||
|
window_title=self._trad["Warning"],
|
||||||
|
text=self._trad["mb_write_error"],
|
||||||
|
informative_text=self._trad["mb_close_file"]
|
||||||
|
)
|
||||||
|
logger_exception(e)
|
||||||
|
|
||||||
def export_all(self, reach, directory, timestamps):
|
def export_all(self, reach, directory, timestamps):
|
||||||
name = reach.name
|
name = reach.name
|
||||||
|
|
@ -747,17 +773,25 @@ class ResultsWindow(PamhyrWindow):
|
||||||
f"reach_{name}.csv"
|
f"reach_{name}.csv"
|
||||||
)
|
)
|
||||||
|
|
||||||
with open(file_name, 'w', newline='') as csvfile:
|
try:
|
||||||
writer = csv.writer(csvfile, delimiter=',',
|
with open(file_name, 'w', newline='') as csvfile:
|
||||||
quotechar='|', quoting=csv.QUOTE_MINIMAL)
|
writer = csv.writer(csvfile, delimiter=',',
|
||||||
ts = timestamps[0]
|
quotechar='|', quoting=csv.QUOTE_MINIMAL)
|
||||||
writer.writerow(self._table["raw_data"]._headers)
|
ts = timestamps[0]
|
||||||
for row in range(self._table["raw_data"].rowCount()):
|
writer.writerow(self._table["raw_data"]._headers)
|
||||||
line = []
|
for row in range(self._table["raw_data"].rowCount()):
|
||||||
for column in range(self._table["raw_data"].columnCount()):
|
line = []
|
||||||
index = self._table["raw_data"].index(row, column)
|
for column in range(self._table["raw_data"].columnCount()):
|
||||||
line.append(self._table["raw_data"].data(index))
|
index = self._table["raw_data"].index(row, column)
|
||||||
writer.writerow(line)
|
line.append(self._table["raw_data"].data(index))
|
||||||
|
writer.writerow(line)
|
||||||
|
except Exception as e:
|
||||||
|
self.message_box(
|
||||||
|
window_title=self._trad["Warning"],
|
||||||
|
text=self._trad["mb_write_errore"],
|
||||||
|
informative_text=self._trad["mb_close_file"]
|
||||||
|
)
|
||||||
|
logger_exception(e)
|
||||||
|
|
||||||
def export_current(self):
|
def export_current(self):
|
||||||
self.file_dialog(
|
self.file_dialog(
|
||||||
|
|
@ -1168,48 +1202,4 @@ class ResultsWindow(PamhyrWindow):
|
||||||
self.update_table_selection_profile(profile_id)
|
self.update_table_selection_profile(profile_id)
|
||||||
|
|
||||||
def import_geotiff(self):
|
def import_geotiff(self):
|
||||||
# options = QFileDialog.Options()
|
|
||||||
# settings = QSettings(QSettings.IniFormat,
|
|
||||||
# QSettings.UserScope, 'MyOrg', )
|
|
||||||
# options |= QFileDialog.DontUseNativeDialog
|
|
||||||
#
|
|
||||||
# file_types = [
|
|
||||||
# self._trad["file_geotiff"],
|
|
||||||
# self._trad["file_all"],
|
|
||||||
# ]
|
|
||||||
#
|
|
||||||
# filename, _ = QFileDialog.getOpenFileName(
|
|
||||||
# self,
|
|
||||||
# self._trad["open_file"],
|
|
||||||
# "",
|
|
||||||
# ";; ".join(file_types),
|
|
||||||
# options=options
|
|
||||||
# )
|
|
||||||
#
|
|
||||||
# if filename != "":
|
|
||||||
# with rasterio.open(filename) as data:
|
|
||||||
# img = data.read()
|
|
||||||
# b = data.bounds[:]
|
|
||||||
# # b[0] left
|
|
||||||
# # b[1] bottom
|
|
||||||
# # b[2] right
|
|
||||||
# # b[3] top
|
|
||||||
# xlim = self.canvas.axes.get_xlim()
|
|
||||||
# ylim = self.canvas.axes.get_ylim()
|
|
||||||
# if b[2] > b[0] and b[1] < b[3]:
|
|
||||||
# self.canvas.axes.imshow(img.transpose((1, 2, 0)),
|
|
||||||
# extent=[b[0], b[2], b[1], b[3]])
|
|
||||||
# else:
|
|
||||||
# dlg = CoordinatesDialog(
|
|
||||||
# xlim,
|
|
||||||
# ylim,
|
|
||||||
# trad=self._trad,
|
|
||||||
# parent=self
|
|
||||||
# )
|
|
||||||
# if dlg.exec():
|
|
||||||
# self.canvas.axes.imshow(img.transpose((1, 2, 0)),
|
|
||||||
# extent=dlg.values)
|
|
||||||
# self.plot_xy.idle()
|
|
||||||
# self.canvas.axes.set_xlim(xlim)
|
|
||||||
# self.canvas.axes.set_ylim(ylim)
|
|
||||||
return
|
return
|
||||||
|
|
|
||||||
|
|
@ -59,6 +59,13 @@ class ResultsTranslate(MainTranslate):
|
||||||
self._dict["ImageCoordinates"] = _translate(
|
self._dict["ImageCoordinates"] = _translate(
|
||||||
"Results", "Image coordinates"
|
"Results", "Image coordinates"
|
||||||
)
|
)
|
||||||
|
self._dict["mb_write_error"] = _translate(
|
||||||
|
"Results", "An error occured when writing to file"
|
||||||
|
)
|
||||||
|
self._dict["mb_close_file"] = _translate(
|
||||||
|
"Results",
|
||||||
|
"If the file is in use, close it and try again"
|
||||||
|
)
|
||||||
|
|
||||||
self._sub_dict["table_headers_reach"] = {
|
self._sub_dict["table_headers_reach"] = {
|
||||||
"name": _translate("Results", "Reach name"),
|
"name": _translate("Results", "Reach name"),
|
||||||
|
|
|
||||||
|
|
@ -7,23 +7,13 @@
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>194</width>
|
<width>194</width>
|
||||||
<height>70</height>
|
<height>126</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
<string>Dialog</string>
|
<string>Dialog</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" name="gridLayout">
|
<layout class="QGridLayout" name="gridLayout">
|
||||||
<item row="4" column="0">
|
|
||||||
<widget class="QDialogButtonBox" name="buttonBox">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
<property name="standardButtons">
|
|
||||||
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="3" column="0">
|
<item row="3" column="0">
|
||||||
<widget class="QSplitter" name="splitter">
|
<widget class="QSplitter" name="splitter">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
|
|
@ -64,6 +54,23 @@
|
||||||
</widget>
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="5" column="0">
|
||||||
|
<widget class="QDialogButtonBox" name="buttonBox">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="standardButtons">
|
||||||
|
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="4" column="0">
|
||||||
|
<widget class="QLabel" name="label_4">
|
||||||
|
<property name="text">
|
||||||
|
<string>TextLabel</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<resources/>
|
<resources/>
|
||||||
|
|
|
||||||
|
|
@ -7,14 +7,24 @@
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>414</width>
|
<width>414</width>
|
||||||
<height>70</height>
|
<height>132</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
<string>Dialog</string>
|
<string>Dialog</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" name="gridLayout">
|
<layout class="QGridLayout" name="gridLayout">
|
||||||
<item row="0" column="0">
|
<item row="3" column="0">
|
||||||
|
<widget class="QDialogButtonBox" name="buttonBox">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="standardButtons">
|
||||||
|
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0">
|
||||||
<widget class="QSplitter" name="splitter">
|
<widget class="QSplitter" name="splitter">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
<enum>Qt::Horizontal</enum>
|
<enum>Qt::Horizontal</enum>
|
||||||
|
|
@ -43,13 +53,10 @@
|
||||||
</widget>
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="0">
|
<item row="2" column="0">
|
||||||
<widget class="QDialogButtonBox" name="buttonBox">
|
<widget class="QLabel" name="label_3">
|
||||||
<property name="orientation">
|
<property name="text">
|
||||||
<enum>Qt::Horizontal</enum>
|
<string>TextLabel</string>
|
||||||
</property>
|
|
||||||
<property name="standardButtons">
|
|
||||||
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
|
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="label">
|
<widget class="QLabel" name="label">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Upstream height (m)</string>
|
<string>Upstream elevation (m)</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
|
@ -70,7 +70,7 @@
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="label_2">
|
<widget class="QLabel" name="label_2">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Downstream height (m)</string>
|
<string>Downstream elevation (m)</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
|
|
||||||
126
src/lang/fr.ts
126
src/lang/fr.ts
|
|
@ -735,12 +735,12 @@ Cette fonctionnalité nécessite un bief muni d'une géométrie.</translati
|
||||||
<translation>Dernière modification :</translation>
|
<translation>Dernière modification :</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/ui/CustomExportAdisDialog.ui" line="37"/>
|
<location filename="../View/ui/CustomExportAdisDialog.ui" line="27"/>
|
||||||
<source>X axis:</source>
|
<source>X axis:</source>
|
||||||
<translation>Axe X :</translation>
|
<translation>Axe X :</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/ui/CustomExportAdisDialog.ui" line="48"/>
|
<location filename="../View/ui/CustomExportAdisDialog.ui" line="38"/>
|
||||||
<source>Y axis:</source>
|
<source>Y axis:</source>
|
||||||
<translation>Axe Y :</translation>
|
<translation>Axe Y :</translation>
|
||||||
</message>
|
</message>
|
||||||
|
|
@ -750,32 +750,32 @@ Cette fonctionnalité nécessite un bief muni d'une géométrie.</translati
|
||||||
<translation>Débit</translation>
|
<translation>Débit</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/ui/MeshingOptions.ui" line="168"/>
|
<location filename="../View/ui/MeshingOptions.ui" line="128"/>
|
||||||
<source>First cross-section</source>
|
<source>First cross-section</source>
|
||||||
<translation>Première section en travers</translation>
|
<translation>Première section en travers</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/ui/MeshingOptions.ui" line="189"/>
|
<location filename="../View/ui/MeshingOptions.ui" line="149"/>
|
||||||
<source>Last cross-section</source>
|
<source>Last cross-section</source>
|
||||||
<translation>Dernière section en travers</translation>
|
<translation>Dernière section en travers</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/ui/MeshingOptions.ui" line="133"/>
|
<location filename="../View/ui/MeshingOptions.ui" line="133"/>
|
||||||
<source>First guideline</source>
|
<source>First guideline</source>
|
||||||
<translation>Première ligne directrice</translation>
|
<translation type="obsolete">Première ligne directrice</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/ui/MeshingOptions.ui" line="114"/>
|
<location filename="../View/ui/MeshingOptions.ui" line="114"/>
|
||||||
<source>Guideline used for distance computation</source>
|
<source>Guideline used for distance computation</source>
|
||||||
<translation>Lignes directrices pour le calcul des distances</translation>
|
<translation type="obsolete">Lignes directrices pour le calcul des distances</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/ui/MeshingOptions.ui" line="79"/>
|
<location filename="../View/ui/MeshingOptions.ui" line="69"/>
|
||||||
<source>Spline</source>
|
<source>Spline</source>
|
||||||
<translation>Spline</translation>
|
<translation>Spline</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/ui/MeshingOptions.ui" line="89"/>
|
<location filename="../View/ui/MeshingOptions.ui" line="79"/>
|
||||||
<source>Linear</source>
|
<source>Linear</source>
|
||||||
<translation>Linéaire</translation>
|
<translation>Linéaire</translation>
|
||||||
</message>
|
</message>
|
||||||
|
|
@ -805,7 +805,7 @@ Cette fonctionnalité nécessite un bief muni d'une géométrie.</translati
|
||||||
<translation>Ligne</translation>
|
<translation>Ligne</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/ui/MeshingOptions.ui" line="157"/>
|
<location filename="../View/ui/MeshingOptions.ui" line="117"/>
|
||||||
<source>Limits</source>
|
<source>Limits</source>
|
||||||
<translation>Limites</translation>
|
<translation>Limites</translation>
|
||||||
</message>
|
</message>
|
||||||
|
|
@ -815,12 +815,12 @@ Cette fonctionnalité nécessite un bief muni d'une géométrie.</translati
|
||||||
<translation>Options</translation>
|
<translation>Options</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/ui/MeshingOptions.ui" line="36"/>
|
<location filename="../View/ui/MeshingOptions.ui" line="26"/>
|
||||||
<source>Space step (m)</source>
|
<source>Space step (m)</source>
|
||||||
<translation>Pas d'espace (m)</translation>
|
<translation>Pas d'espace (m)</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/ui/MeshingOptions.ui" line="70"/>
|
<location filename="../View/ui/MeshingOptions.ui" line="60"/>
|
||||||
<source>Type of interpolation:</source>
|
<source>Type of interpolation:</source>
|
||||||
<translation>Type d'interpolation :</translation>
|
<translation>Type d'interpolation :</translation>
|
||||||
</message>
|
</message>
|
||||||
|
|
@ -855,7 +855,7 @@ Cette fonctionnalité nécessite un bief muni d'une géométrie.</translati
|
||||||
<translation>Valeur à l'origine</translation>
|
<translation>Valeur à l'origine</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/ui/MeshingOptions.ui" line="30"/>
|
<location filename="../View/ui/MeshingOptions.ui" line="20"/>
|
||||||
<source>Parameters</source>
|
<source>Parameters</source>
|
||||||
<translation>Paramètres</translation>
|
<translation>Paramètres</translation>
|
||||||
</message>
|
</message>
|
||||||
|
|
@ -867,7 +867,7 @@ Cette fonctionnalité nécessite un bief muni d'une géométrie.</translati
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/ui/MeshingOptions.ui" line="123"/>
|
<location filename="../View/ui/MeshingOptions.ui" line="123"/>
|
||||||
<source>Second guideline</source>
|
<source>Second guideline</source>
|
||||||
<translation>Seconde ligne directrice</translation>
|
<translation type="obsolete">Seconde ligne directrice</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/ui/GeometryReachShift.ui" line="35"/>
|
<location filename="../View/ui/GeometryReachShift.ui" line="35"/>
|
||||||
|
|
@ -907,12 +907,12 @@ Cette fonctionnalité nécessite un bief muni d'une géométrie.</translati
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/ui/InitialConditions_Dialog_Generator_Height.ui" line="25"/>
|
<location filename="../View/ui/InitialConditions_Dialog_Generator_Height.ui" line="25"/>
|
||||||
<source>Upstream height (m)</source>
|
<source>Upstream height (m)</source>
|
||||||
<translation>Cote à l'amont (m)</translation>
|
<translation type="obsolete">Cote à l'amont (m)</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/ui/InitialConditions_Dialog_Generator_Height.ui" line="73"/>
|
<location filename="../View/ui/InitialConditions_Dialog_Generator_Height.ui" line="73"/>
|
||||||
<source>Downstream height (m)</source>
|
<source>Downstream height (m)</source>
|
||||||
<translation>Cote à l'aval (m)</translation>
|
<translation type="obsolete">Cote à l'aval (m)</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/ui/InitialConditions_Dialog_Generator_Height.ui" line="107"/>
|
<location filename="../View/ui/InitialConditions_Dialog_Generator_Height.ui" line="107"/>
|
||||||
|
|
@ -955,7 +955,7 @@ Cette fonctionnalité nécessite un bief muni d'une géométrie.</translati
|
||||||
<translation>Débit (m³/s)</translation>
|
<translation>Débit (m³/s)</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/ui/CustomExportAdisDialog.ui" line="59"/>
|
<location filename="../View/ui/CustomExportAdisDialog.ui" line="49"/>
|
||||||
<source>Pollutant:</source>
|
<source>Pollutant:</source>
|
||||||
<translation>Polluant:</translation>
|
<translation>Polluant:</translation>
|
||||||
</message>
|
</message>
|
||||||
|
|
@ -1004,6 +1004,21 @@ Cette fonctionnalité nécessite un bief muni d'une géométrie.</translati
|
||||||
<source>Image coordinates</source>
|
<source>Image coordinates</source>
|
||||||
<translation type="obsolete">Coordonnées de l'image</translation>
|
<translation type="obsolete">Coordonnées de l'image</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../View/ui/CustomExportAdisDialog.ui" line="70"/>
|
||||||
|
<source>TextLabel</source>
|
||||||
|
<translation>TextLabel</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../View/ui/InitialConditions_Dialog_Generator_Height.ui" line="25"/>
|
||||||
|
<source>Upstream elevation (m)</source>
|
||||||
|
<translation>Cote amont</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../View/ui/InitialConditions_Dialog_Generator_Height.ui" line="73"/>
|
||||||
|
<source>Downstream elevation (m)</source>
|
||||||
|
<translation>Cote aval</translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>Documentation</name>
|
<name>Documentation</name>
|
||||||
|
|
@ -1308,12 +1323,12 @@ Cette fonctionnalité nécessite un bief muni d'une géométrie.</translati
|
||||||
<context>
|
<context>
|
||||||
<name>Frictions</name>
|
<name>Frictions</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/Frictions/translate.py" line="45"/>
|
<location filename="../View/Frictions/translate.py" line="49"/>
|
||||||
<source>Start (m)</source>
|
<source>Start (m)</source>
|
||||||
<translation>PK de départ (m)</translation>
|
<translation>PK de départ (m)</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/Frictions/translate.py" line="46"/>
|
<location filename="../View/Frictions/translate.py" line="50"/>
|
||||||
<source>End (m)</source>
|
<source>End (m)</source>
|
||||||
<translation>PK de fin (m)</translation>
|
<translation>PK de fin (m)</translation>
|
||||||
</message>
|
</message>
|
||||||
|
|
@ -1333,10 +1348,20 @@ Cette fonctionnalité nécessite un bief muni d'une géométrie.</translati
|
||||||
<translation>Strickler ($m^{1/3}/s$)</translation>
|
<translation>Strickler ($m^{1/3}/s$)</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/Frictions/translate.py" line="47"/>
|
<location filename="../View/Frictions/translate.py" line="51"/>
|
||||||
<source>Coefficient</source>
|
<source>Coefficient</source>
|
||||||
<translation>Coefficient</translation>
|
<translation>Coefficient</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../View/Frictions/translate.py" line="41"/>
|
||||||
|
<source>Mage initial frictions file (*.RUG *.rug)</source>
|
||||||
|
<translation>Fichier de frottements Mage (*.RUG *.rug)</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../View/Frictions/translate.py" line="43"/>
|
||||||
|
<source>All files (*)</source>
|
||||||
|
<translation>Tous les fichiers (*)</translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>GeoTIFF</name>
|
<name>GeoTIFF</name>
|
||||||
|
|
@ -1581,12 +1606,12 @@ Cette fonctionnalité nécessite un bief muni d'une géométrie.</translati
|
||||||
<translation>Évaporation</translation>
|
<translation>Évaporation</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/LateralContribution/translate.py" line="60"/>
|
<location filename="../View/LateralContribution/translate.py" line="65"/>
|
||||||
<source>Start (m)</source>
|
<source>Start (m)</source>
|
||||||
<translation>PK de départ (m)</translation>
|
<translation>PK de départ (m)</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/LateralContribution/translate.py" line="61"/>
|
<location filename="../View/LateralContribution/translate.py" line="66"/>
|
||||||
<source>End (m)</source>
|
<source>End (m)</source>
|
||||||
<translation>PK de fin (m)</translation>
|
<translation>PK de fin (m)</translation>
|
||||||
</message>
|
</message>
|
||||||
|
|
@ -1605,6 +1630,21 @@ Cette fonctionnalité nécessite un bief muni d'une géométrie.</translati
|
||||||
<source>End rk (m)</source>
|
<source>End rk (m)</source>
|
||||||
<translation>Pk fin</translation>
|
<translation>Pk fin</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../View/LateralContribution/translate.py" line="55"/>
|
||||||
|
<source>Shapefile (*.LAT *.lat)</source>
|
||||||
|
<translation type="obsolete">Shapefile (*.LAT *.lat)</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../View/LateralContribution/translate.py" line="58"/>
|
||||||
|
<source>All files (*)</source>
|
||||||
|
<translation>Tous les fichiers (*)</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../View/LateralContribution/translate.py" line="55"/>
|
||||||
|
<source>Mage lateral contributions file (*.LAT *.lat)</source>
|
||||||
|
<translation>Fichiers d'apports latéraux Mage (*.LAT *.lat)</translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>LateralContributionAdisTS</name>
|
<name>LateralContributionAdisTS</name>
|
||||||
|
|
@ -2117,7 +2157,7 @@ Cette fonctionnalité nécessite un bief muni d'une géométrie.</translati
|
||||||
<translation>Suspension</translation>
|
<translation>Suspension</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/ui/LateralContributions.ui" line="117"/>
|
<location filename="../View/ui/LateralContributions.ui" line="118"/>
|
||||||
<source>Add a new boundary condition or lateral source</source>
|
<source>Add a new boundary condition or lateral source</source>
|
||||||
<translation>Ajouter une condition aux limites ou un apport latéral</translation>
|
<translation>Ajouter une condition aux limites ou un apport latéral</translation>
|
||||||
</message>
|
</message>
|
||||||
|
|
@ -2127,7 +2167,7 @@ Cette fonctionnalité nécessite un bief muni d'une géométrie.</translati
|
||||||
<translation>Supprimer les lignes selectionnées</translation>
|
<translation>Supprimer les lignes selectionnées</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/ui/LateralContributions.ui" line="147"/>
|
<location filename="../View/ui/LateralContributions.ui" line="148"/>
|
||||||
<source>Edit boundary condition or lateral source</source>
|
<source>Edit boundary condition or lateral source</source>
|
||||||
<translation>Éditer une condition aux limites ou un apport latéral</translation>
|
<translation>Éditer une condition aux limites ou un apport latéral</translation>
|
||||||
</message>
|
</message>
|
||||||
|
|
@ -2212,7 +2252,7 @@ Cette fonctionnalité nécessite un bief muni d'une géométrie.</translati
|
||||||
<translation>supprimer</translation>
|
<translation>supprimer</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/ui/Frictions.ui" line="104"/>
|
<location filename="../View/ui/Frictions.ui" line="105"/>
|
||||||
<source>Edit Strickler coefficients</source>
|
<source>Edit Strickler coefficients</source>
|
||||||
<translation>Éditer les coefficients de Strickler</translation>
|
<translation>Éditer les coefficients de Strickler</translation>
|
||||||
</message>
|
</message>
|
||||||
|
|
@ -2689,17 +2729,17 @@ Cette fonctionnalité nécessite un bief muni d'une géométrie.</translati
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/ui/InitialConditions.ui" line="30"/>
|
<location filename="../View/ui/InitialConditions.ui" line="30"/>
|
||||||
<source>Generate uniform depth</source>
|
<source>Generate uniform depth</source>
|
||||||
<translation>Générer une profondeur uniforme</translation>
|
<translation>Profondeur uniforme</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/ui/InitialConditions.ui" line="37"/>
|
<location filename="../View/ui/InitialConditions.ui" line="37"/>
|
||||||
<source>Generate uniform discharge</source>
|
<source>Generate uniform discharge</source>
|
||||||
<translation>Générer un débit uniforme</translation>
|
<translation>Débit uniforme</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/ui/InitialConditions.ui" line="44"/>
|
<location filename="../View/ui/InitialConditions.ui" line="44"/>
|
||||||
<source>Generate uniform elevation</source>
|
<source>Generate uniform elevation</source>
|
||||||
<translation>Générer une cote uniforme</translation>
|
<translation>Cote uniforme</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/ui/Results.ui" line="149"/>
|
<location filename="../View/ui/Results.ui" line="149"/>
|
||||||
|
|
@ -3176,7 +3216,7 @@ Cette fonctionnalité nécessite un bief muni d'une géométrie.</translati
|
||||||
<translation>Lecture des résultats</translation>
|
<translation>Lecture des résultats</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/Results/translate.py" line="154"/>
|
<location filename="../View/Results/translate.py" line="161"/>
|
||||||
<source>Water elevation</source>
|
<source>Water elevation</source>
|
||||||
<translation>Cote de l'eau</translation>
|
<translation>Cote de l'eau</translation>
|
||||||
</message>
|
</message>
|
||||||
|
|
@ -3186,12 +3226,12 @@ Cette fonctionnalité nécessite un bief muni d'une géométrie.</translati
|
||||||
<translation>Cote maximum de l'eau</translation>
|
<translation>Cote maximum de l'eau</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/Results/translate.py" line="64"/>
|
<location filename="../View/Results/translate.py" line="71"/>
|
||||||
<source>Reach name</source>
|
<source>Reach name</source>
|
||||||
<translation>Nom du bief</translation>
|
<translation>Nom du bief</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/Results/translate.py" line="160"/>
|
<location filename="../View/Results/translate.py" line="167"/>
|
||||||
<source>Profile</source>
|
<source>Profile</source>
|
||||||
<translation>Profil</translation>
|
<translation>Profil</translation>
|
||||||
</message>
|
</message>
|
||||||
|
|
@ -3246,12 +3286,12 @@ Cette fonctionnalité nécessite un bief muni d'une géométrie.</translati
|
||||||
<translation>Masse min</translation>
|
<translation>Masse min</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/Results/translate.py" line="68"/>
|
<location filename="../View/Results/translate.py" line="75"/>
|
||||||
<source>Variables names</source>
|
<source>Variables names</source>
|
||||||
<translation>Noms des variables</translation>
|
<translation>Noms des variables</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/Results/translate.py" line="81"/>
|
<location filename="../View/Results/translate.py" line="88"/>
|
||||||
<source>Pollutant name</source>
|
<source>Pollutant name</source>
|
||||||
<translation>Nom des polluants</translation>
|
<translation>Nom des polluants</translation>
|
||||||
</message>
|
</message>
|
||||||
|
|
@ -3261,7 +3301,7 @@ Cette fonctionnalité nécessite un bief muni d'une géométrie.</translati
|
||||||
<translation type="obsolete">enveloppe</translation>
|
<translation type="obsolete">enveloppe</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/Results/translate.py" line="72"/>
|
<location filename="../View/Results/translate.py" line="79"/>
|
||||||
<source>Profile name</source>
|
<source>Profile name</source>
|
||||||
<translation>Nom du profil</translation>
|
<translation>Nom du profil</translation>
|
||||||
</message>
|
</message>
|
||||||
|
|
@ -3290,6 +3330,26 @@ Cette fonctionnalité nécessite un bief muni d'une géométrie.</translati
|
||||||
<source>All files (*)</source>
|
<source>All files (*)</source>
|
||||||
<translation>Tous les fichiers (*)</translation>
|
<translation>Tous les fichiers (*)</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../View/Results/translate.py" line="62"/>
|
||||||
|
<source>An error occured when writing to file</source>
|
||||||
|
<translation>Une erreur s'est produite lors de l'écriture dans le fichier</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../View/Results/translate.py" line="65"/>
|
||||||
|
<source>If the file is open in another application, close it and try again</source>
|
||||||
|
<translation type="obsolete">Si le fichier est ouvert dans une autre application, fermez-la et recommencez</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../View/Results/translate.py" line="65"/>
|
||||||
|
<source>If the file is open in another application, close it and try again</source>
|
||||||
|
<translation type="obsolete">Si le fichier est ouvert dans une autre application, fermez-la et recommencez</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../View/Results/translate.py" line="65"/>
|
||||||
|
<source>If the file is in use, close it and try again</source>
|
||||||
|
<translation>Si le fichier est en cours d'utilisation, fermez-le et recommencez</translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>SedimentLayers</name>
|
<name>SedimentLayers</name>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue