mirror of https://gitlab.com/pamhyr/pamhyr2
merge
commit
ff38571933
|
|
@ -360,26 +360,11 @@ class InitialConditions(SQLSubModel):
|
|||
def get_discharge(self):
|
||||
return self._data_get("discharge")
|
||||
|
||||
def _sort_by_z_and_rk(self, profiles):
|
||||
profiles.sort(
|
||||
reverse=False,
|
||||
key=lambda p: p.rk
|
||||
)
|
||||
|
||||
first_z = profiles[0].z()
|
||||
last_z = profiles[-1].z()
|
||||
|
||||
if first_z > last_z:
|
||||
profiles.sort(
|
||||
reverse=True,
|
||||
key=lambda p: p.rk
|
||||
)
|
||||
|
||||
def generate_growing_constant_depth(self, height: float,
|
||||
compute_discharge: bool):
|
||||
|
||||
profiles = self._reach.reach.profiles.copy()
|
||||
self._sort_by_z_and_rk(profiles)
|
||||
profiles.reverse()
|
||||
|
||||
previous_elevation = -99999.99
|
||||
|
||||
|
|
@ -433,12 +418,12 @@ class InitialConditions(SQLSubModel):
|
|||
previous_elevation = elevation
|
||||
self._data.append(new)
|
||||
|
||||
self._generate_resort_data(profiles)
|
||||
self._data.reverse()
|
||||
|
||||
def generate_discharge(self, discharge: float, compute_height: bool):
|
||||
|
||||
profiles = self._reach.reach.profiles.copy()
|
||||
self._sort_by_z_and_rk(profiles)
|
||||
profiles.reverse()
|
||||
|
||||
previous_elevation = -99999.99
|
||||
|
||||
|
|
@ -491,7 +476,7 @@ class InitialConditions(SQLSubModel):
|
|||
previous_elevation = elevation
|
||||
self._data.append(new)
|
||||
|
||||
self._generate_resort_data(profiles)
|
||||
self._data.reverse()
|
||||
|
||||
def generate_height(self,
|
||||
elevation1: float,
|
||||
|
|
@ -525,13 +510,3 @@ class InitialConditions(SQLSubModel):
|
|||
new["discharge"] = d
|
||||
new["elevation"] = elevation
|
||||
self._data.append(new)
|
||||
|
||||
def _generate_resort_data(self, profiles):
|
||||
is_reverse = False
|
||||
if profiles[0].rk > profiles[-1].rk:
|
||||
is_reverse = True
|
||||
|
||||
self._data.sort(
|
||||
reverse=not is_reverse,
|
||||
key=lambda d: d['rk']
|
||||
)
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ class PlotRKZ(PamhyrPlot):
|
|||
self.line_rk_zmin_zmax_highlight = None
|
||||
|
||||
self.label_x = self._trad["unit_rk"]
|
||||
self.label_y = self._trad["unit_height"]
|
||||
self.label_y = self._trad["unit_depth"]
|
||||
|
||||
self.before_plot_selected = None
|
||||
self.plot_selected = None
|
||||
|
|
|
|||
|
|
@ -77,29 +77,29 @@ class PlotDRK(PamhyrPlot):
|
|||
rk = self.data.get_rk()
|
||||
elevation = self.data.get_elevation()
|
||||
|
||||
sorted_rk, sorted_elevation = zip(
|
||||
*sorted(zip(rk, elevation))
|
||||
)
|
||||
|
||||
self.line_rk_elevation = self.canvas.axes.plot(
|
||||
rk, elevation,
|
||||
sorted_rk, sorted_elevation,
|
||||
color=self.color_plot_river_water,
|
||||
**self.plot_default_kargs
|
||||
)
|
||||
|
||||
z_min = self.data.reach.reach.get_z_min()
|
||||
geometry_rk = self.data.reach.reach.get_rk()
|
||||
|
||||
filtred_elevation = list(
|
||||
map(
|
||||
lambda x: elevation[x[0]],
|
||||
filter(
|
||||
lambda x: x[1] in geometry_rk,
|
||||
enumerate(rk)
|
||||
)
|
||||
)
|
||||
sorted_geometry_rk, sorted_z_min = zip(
|
||||
*sorted(zip(geometry_rk, z_min), reverse=True)
|
||||
)
|
||||
|
||||
self.collection = self.canvas.axes.fill_between(
|
||||
geometry_rk, z_min, filtred_elevation,
|
||||
poly_x = sorted_rk + sorted_geometry_rk
|
||||
poly_y = sorted_elevation + sorted_z_min
|
||||
|
||||
self.collection = self.canvas.axes.fill(
|
||||
poly_x, poly_y,
|
||||
color=self.color_plot_river_water_zone,
|
||||
alpha=0.7, interpolate=True
|
||||
alpha=0.7,
|
||||
)
|
||||
|
||||
@timer
|
||||
|
|
|
|||
|
|
@ -104,15 +104,15 @@ class InitialConditionTableModel(PamhyrTableModel):
|
|||
row = index.row()
|
||||
column = index.column()
|
||||
|
||||
if self._headers[column] is "speed":
|
||||
if self._headers[column] == "velocity":
|
||||
z = self._lst.get(row)["elevation"]
|
||||
q = self._lst.get(row)["discharge"]
|
||||
profile = self._reach.reach.get_profiles_from_rk(
|
||||
self._lst.get(row)["rk"]
|
||||
)
|
||||
if len(profile) >= 1:
|
||||
speed = profile[0].speed(q, z)
|
||||
return f"{speed:.4f}"
|
||||
velocity = profile[0].speed(q, z)
|
||||
return f"{velocity:.4f}"
|
||||
|
||||
return ""
|
||||
elif self._headers[column] not in ["name", "comment"]:
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ class ICTranslate(MainTranslate):
|
|||
"rk": self._dict["unit_rk"],
|
||||
"discharge": self._dict["unit_discharge"],
|
||||
"elevation": self._dict["unit_elevation"],
|
||||
"height": self._dict["unit_height"],
|
||||
"speed": self._dict["unit_speed"],
|
||||
"height": self._dict["unit_depth"],
|
||||
"velocity": self._dict["unit_velocity"],
|
||||
# "comment": _translate("InitialCondition", "Comment"),
|
||||
}
|
||||
|
|
|
|||
|
|
@ -42,6 +42,7 @@ class CustomPlotValuesSelectionDialog(PamhyrDialog):
|
|||
self._available_values_y = self._trad.get_dict("values_y")
|
||||
|
||||
self.setup_radio_buttons()
|
||||
self.setup_envelop_box()
|
||||
self.setup_check_boxs()
|
||||
|
||||
self.value = None
|
||||
|
|
@ -61,6 +62,24 @@ class CustomPlotValuesSelectionDialog(PamhyrDialog):
|
|||
self._radio[0][1].setChecked(True)
|
||||
layout.addStretch()
|
||||
|
||||
def setup_envelop_box(self):
|
||||
self._envelop = []
|
||||
layout = self.find(QVBoxLayout, "verticalLayout_x")
|
||||
self._envelop = QCheckBox(
|
||||
"envelop",
|
||||
parent=self
|
||||
)
|
||||
layout.addWidget(self._envelop)
|
||||
self._envelop.setChecked(True)
|
||||
for r in self._radio:
|
||||
r[1].clicked.connect(self.envelop_box_status)
|
||||
|
||||
def envelop_box_status(self):
|
||||
if self._radio[0][1].isChecked():
|
||||
self._envelop.setEnabled(True)
|
||||
else:
|
||||
self._envelop.setEnabled(False)
|
||||
|
||||
def setup_check_boxs(self):
|
||||
self._check = []
|
||||
layout = self.find(QVBoxLayout, "verticalLayout_y")
|
||||
|
|
@ -94,6 +113,6 @@ class CustomPlotValuesSelectionDialog(PamhyrDialog):
|
|||
)
|
||||
)
|
||||
|
||||
self.value = x, y
|
||||
self.value = x, y, self._envelop.isChecked()
|
||||
|
||||
super().accept()
|
||||
|
|
|
|||
|
|
@ -30,11 +30,15 @@ from View.Results.CustomPlot.Translate import CustomPlotTranslate
|
|||
logger = logging.getLogger()
|
||||
|
||||
unit = {
|
||||
"elevation": "0-meter",
|
||||
"bed_elevation": "0-meter",
|
||||
"water_elevation": "0-meter",
|
||||
"water_elevation_envelop": "0-meter",
|
||||
"discharge": "1-m3s",
|
||||
"discharge_envelop": "1-m3s",
|
||||
"velocity": "2-ms",
|
||||
"max_depth": "3-meter",
|
||||
"velocity_envelop": "2-ms",
|
||||
"depth": "3-meter",
|
||||
"depth_envelop": "3-meter",
|
||||
"mean_depth": "3-meter",
|
||||
"froude": "4-dimensionless",
|
||||
"wet_area": "5-m2",
|
||||
|
|
@ -42,7 +46,7 @@ unit = {
|
|||
|
||||
|
||||
class CustomPlot(PamhyrPlot):
|
||||
def __init__(self, x, y, reach, profile, timestamp,
|
||||
def __init__(self, x, y, envelop, reach, profile, timestamp,
|
||||
data=None, canvas=None, trad=None,
|
||||
toolbar=None, parent=None):
|
||||
super(CustomPlot, self).__init__(
|
||||
|
|
@ -55,6 +59,7 @@ class CustomPlot(PamhyrPlot):
|
|||
|
||||
self._x = x
|
||||
self._y = y
|
||||
self._envelop = envelop
|
||||
self._reach = reach
|
||||
self._profile = profile
|
||||
self._timestamp = timestamp
|
||||
|
|
@ -105,15 +110,15 @@ class CustomPlot(PamhyrPlot):
|
|||
self._axes[ax].spines['right'].set_position(('outward', shift))
|
||||
shift += 60
|
||||
|
||||
lines = {}
|
||||
if "elevation" in self._y:
|
||||
self.lines = {}
|
||||
if "bed_elevation" in self._y:
|
||||
|
||||
ax = self._axes[unit["elevation"]]
|
||||
ax = self._axes[unit["bed_elevation"]]
|
||||
line = ax.plot(
|
||||
rk, z_min,
|
||||
color='grey', lw=1.,
|
||||
)
|
||||
lines["elevation"] = line
|
||||
self.lines["bed_elevation"] = line
|
||||
|
||||
if "water_elevation" in self._y:
|
||||
|
||||
|
|
@ -122,14 +127,46 @@ class CustomPlot(PamhyrPlot):
|
|||
rk, z, lw=1.,
|
||||
color='blue',
|
||||
)
|
||||
lines["water_elevation"] = line
|
||||
self.lines["water_elevation"] = line
|
||||
|
||||
if "elevation" in self._y:
|
||||
ax.fill_between(
|
||||
if "bed_elevation" in self._y:
|
||||
self.fill = ax.fill_between(
|
||||
rk, z_min, z,
|
||||
color='blue', alpha=0.5, interpolate=True
|
||||
)
|
||||
|
||||
if self._envelop:
|
||||
|
||||
ax = self._axes[unit["water_elevation_envelop"]]
|
||||
|
||||
d = list(
|
||||
map(
|
||||
lambda p: max(p.get_key("Z")),
|
||||
reach.profiles
|
||||
)
|
||||
)
|
||||
|
||||
line1 = ax.plot(
|
||||
rk, d, lw=1.,
|
||||
color='blue',
|
||||
linestyle='dotted',
|
||||
)
|
||||
self.lines["water_elevation_envelop"] = line1
|
||||
|
||||
d = list(
|
||||
map(
|
||||
lambda p: min(p.get_key("Z")),
|
||||
reach.profiles
|
||||
)
|
||||
)
|
||||
|
||||
line2 = ax.plot(
|
||||
rk, d, lw=1.,
|
||||
color='blue',
|
||||
linestyle='dotted',
|
||||
)
|
||||
# self.lines["water_elevation_envelop2"] = line2
|
||||
|
||||
if "discharge" in self._y:
|
||||
|
||||
ax = self._axes[unit["discharge"]]
|
||||
|
|
@ -137,7 +174,37 @@ class CustomPlot(PamhyrPlot):
|
|||
rk, q, lw=1.,
|
||||
color='r',
|
||||
)
|
||||
lines["discharge"] = line
|
||||
self.lines["discharge"] = line
|
||||
|
||||
if self._envelop:
|
||||
|
||||
ax = self._axes[unit["discharge_envelop"]]
|
||||
|
||||
q1 = list(
|
||||
map(
|
||||
lambda p: max(p.get_key("Q")),
|
||||
reach.profiles
|
||||
)
|
||||
)
|
||||
line1 = ax.plot(
|
||||
rk, q1, lw=1.,
|
||||
color='r',
|
||||
linestyle='dotted',
|
||||
)
|
||||
self.lines["discharge_envelop"] = line1
|
||||
|
||||
q2 = list(
|
||||
map(
|
||||
lambda p: min(p.get_key("Q")),
|
||||
reach.profiles
|
||||
)
|
||||
)
|
||||
line2 = ax.plot(
|
||||
rk, q2, lw=1.,
|
||||
color='r',
|
||||
linestyle='dotted',
|
||||
)
|
||||
# self.lines["discharge_envelop2"] = line2
|
||||
|
||||
if "velocity" in self._y:
|
||||
|
||||
|
|
@ -155,11 +222,40 @@ class CustomPlot(PamhyrPlot):
|
|||
rk, v, lw=1.,
|
||||
color='g',
|
||||
)
|
||||
lines["velocity"] = line
|
||||
self.lines["velocity"] = line
|
||||
|
||||
if "max_depth" in self._y:
|
||||
if self._envelop:
|
||||
|
||||
ax = self._axes[unit["max_depth"]]
|
||||
velocities = list(map(
|
||||
lambda p: list(map(
|
||||
lambda q, z:
|
||||
p.geometry.speed(q, z),
|
||||
p.get_key("Q"), p.get_key("Z")
|
||||
)), reach.profiles
|
||||
)
|
||||
)
|
||||
|
||||
ax = self._axes[unit["velocity_envelop"]]
|
||||
vmax = [max(v) for v in velocities]
|
||||
|
||||
line1 = ax.plot(
|
||||
rk, vmax, lw=1.,
|
||||
color='g',
|
||||
linestyle='dotted',
|
||||
)
|
||||
self.lines["velocity_envelop"] = line1
|
||||
vmin = [min(v) for v in velocities]
|
||||
|
||||
line2 = ax.plot(
|
||||
rk, vmin, lw=1.,
|
||||
color='g',
|
||||
linestyle='dotted',
|
||||
)
|
||||
# self.lines["velocity_envelop2"] = line2
|
||||
|
||||
if "depth" in self._y:
|
||||
|
||||
ax = self._axes[unit["depth"]]
|
||||
d = list(
|
||||
map(
|
||||
lambda p: p.geometry.max_water_depth(
|
||||
|
|
@ -171,7 +267,37 @@ class CustomPlot(PamhyrPlot):
|
|||
rk, d,
|
||||
color='brown', lw=1.,
|
||||
)
|
||||
lines["max_depth"] = line
|
||||
self.lines["depth"] = line
|
||||
|
||||
if self._envelop:
|
||||
|
||||
ax = self._axes[unit["depth_envelop"]]
|
||||
|
||||
d = list(map(
|
||||
lambda p1, p2: p1 - p2, map(
|
||||
lambda p: max(p.get_key("Z")),
|
||||
reach.profiles
|
||||
), z_min)
|
||||
)
|
||||
line1 = ax.plot(
|
||||
rk, d,
|
||||
color='brown', lw=1.,
|
||||
linestyle='dotted',
|
||||
)
|
||||
self.lines["depth_envelop"] = line1
|
||||
|
||||
d = list(map(
|
||||
lambda p1, p2: p1 - p2, map(
|
||||
lambda p: min(p.get_key("Z")),
|
||||
reach.profiles
|
||||
), z_min)
|
||||
)
|
||||
line2 = ax.plot(
|
||||
rk, d,
|
||||
color='brown', lw=1.,
|
||||
linestyle='dotted',
|
||||
)
|
||||
# self.lines["depth_envelop2"] = line2
|
||||
|
||||
if "mean_depth" in self._y:
|
||||
|
||||
|
|
@ -188,7 +314,7 @@ class CustomPlot(PamhyrPlot):
|
|||
rk, d,
|
||||
color='orange', lw=1.,
|
||||
)
|
||||
lines["mean_depth"] = line
|
||||
self.lines["mean_depth"] = line
|
||||
|
||||
if "froude" in self._y:
|
||||
|
||||
|
|
@ -212,7 +338,7 @@ class CustomPlot(PamhyrPlot):
|
|||
line = ax.plot(
|
||||
rk, fr, color='black', linestyle='--', lw=1.,
|
||||
)
|
||||
lines["froude"] = line
|
||||
self.lines["froude"] = line
|
||||
|
||||
if "wet_area" in self._y:
|
||||
|
||||
|
|
@ -229,17 +355,110 @@ class CustomPlot(PamhyrPlot):
|
|||
rk, d,
|
||||
color='blue', linestyle='--', lw=1.,
|
||||
)
|
||||
lines["wet_area"] = line
|
||||
self.lines["wet_area"] = line
|
||||
|
||||
# Legend
|
||||
lns = reduce(
|
||||
lambda acc, line: acc + line,
|
||||
map(lambda line: lines[line], lines),
|
||||
map(lambda line: self.lines[line], self.lines),
|
||||
[]
|
||||
)
|
||||
labs = list(map(lambda line: self._trad[line], lines))
|
||||
labs = list(map(lambda line: self._trad[line], self.lines))
|
||||
self.canvas.axes.legend(lns, labs, loc="best")
|
||||
|
||||
def _redraw_rk(self):
|
||||
results = self.data
|
||||
reach = results.river.reach(self._reach)
|
||||
rk = reach.geometry.get_rk()
|
||||
z_min = reach.geometry.get_z_min()
|
||||
q = list(
|
||||
map(
|
||||
lambda p: p.get_ts_key(self._timestamp, "Q"),
|
||||
reach.profiles
|
||||
)
|
||||
)
|
||||
z = list(
|
||||
map(
|
||||
lambda p: p.get_ts_key(self._timestamp, "Z"),
|
||||
reach.profiles
|
||||
)
|
||||
)
|
||||
if "bed_elevation" in self._y:
|
||||
self.lines["bed_elevation"][0].set_ydata(z_min)
|
||||
|
||||
if "water_elevation" in self._y:
|
||||
self.lines["water_elevation"][0].set_ydata(z)
|
||||
|
||||
if "bed_elevation" in self._y:
|
||||
ax = self._axes[unit["water_elevation"]]
|
||||
self.fill.remove()
|
||||
self.fill = ax.fill_between(
|
||||
rk, z_min, z,
|
||||
color='blue', alpha=0.5, interpolate=True
|
||||
)
|
||||
|
||||
if "discharge" in self._y:
|
||||
self.lines["discharge"][0].set_ydata(q)
|
||||
|
||||
if "velocity" in self._y:
|
||||
v = list(
|
||||
map(
|
||||
lambda p: p.geometry.speed(
|
||||
p.get_ts_key(self._timestamp, "Q"),
|
||||
p.get_ts_key(self._timestamp, "Z")),
|
||||
reach.profiles
|
||||
)
|
||||
)
|
||||
self.lines["discharge"][0].set_ydata(v)
|
||||
|
||||
if "depth" in self._y:
|
||||
d = list(
|
||||
map(
|
||||
lambda p: p.geometry.max_water_depth(
|
||||
p.get_ts_key(self._timestamp, "Z")),
|
||||
reach.profiles
|
||||
)
|
||||
)
|
||||
self.lines["depth"][0].set_ydata(d)
|
||||
|
||||
if "mean_depth" in self._y:
|
||||
d = list(
|
||||
map(
|
||||
lambda p: p.geometry.mean_water_depth(
|
||||
p.get_ts_key(self._timestamp, "Z")),
|
||||
reach.profiles
|
||||
)
|
||||
)
|
||||
self.lines["mean_depth"][0].set_ydata(d)
|
||||
|
||||
if "froude" in self._y:
|
||||
fr = list(
|
||||
map(
|
||||
lambda p:
|
||||
p.geometry.speed(
|
||||
p.get_ts_key(self._timestamp, "Q"),
|
||||
p.get_ts_key(self._timestamp, "Z")) /
|
||||
sqrt(9.81 * (
|
||||
p.geometry.wet_area(
|
||||
p.get_ts_key(self._timestamp, "Z")) /
|
||||
p.geometry.wet_width(
|
||||
p.get_ts_key(self._timestamp, "Z"))
|
||||
)),
|
||||
reach.profiles
|
||||
)
|
||||
)
|
||||
self.lines["froude"][0].set_ydata(fr)
|
||||
|
||||
if "wet_area" in self._y:
|
||||
d = list(
|
||||
map(
|
||||
lambda p: p.geometry.wet_area(
|
||||
p.get_ts_key(self._timestamp, "Z")),
|
||||
reach.profiles
|
||||
)
|
||||
)
|
||||
self.lines["wet_area"][0].set_ydata(d)
|
||||
|
||||
def _customize_x_axes_time(self, ts, mode="time"):
|
||||
# Custom time display
|
||||
nb = len(ts)
|
||||
|
|
@ -308,17 +527,17 @@ class CustomPlot(PamhyrPlot):
|
|||
)
|
||||
)
|
||||
|
||||
lines = {}
|
||||
if "elevation" in self._y:
|
||||
self.lines = {}
|
||||
if "bed_elevation" in self._y:
|
||||
# Z min is constant in time
|
||||
|
||||
ax = self._axes[unit["elevation"]]
|
||||
ax = self._axes[unit["bed_elevation"]]
|
||||
|
||||
line = ax.plot(
|
||||
ts, ts_z_min,
|
||||
color='grey', lw=1.
|
||||
)
|
||||
lines["elevation"] = line
|
||||
self.lines["bed_elevation"] = line
|
||||
|
||||
if "water_elevation" in self._y:
|
||||
|
||||
|
|
@ -327,11 +546,11 @@ class CustomPlot(PamhyrPlot):
|
|||
ts, z, lw=1.,
|
||||
color='b',
|
||||
)
|
||||
lines["water_elevation"] = line
|
||||
self.lines["water_elevation"] = line
|
||||
|
||||
if "elevation" in self._y:
|
||||
if "bed_elevation" in self._y:
|
||||
|
||||
ax.fill_between(
|
||||
self.fill = ax.fill_between(
|
||||
ts, ts_z_min, z,
|
||||
color='blue', alpha=0.5, interpolate=True
|
||||
)
|
||||
|
|
@ -343,7 +562,7 @@ class CustomPlot(PamhyrPlot):
|
|||
ts, q, lw=1.,
|
||||
color='r',
|
||||
)
|
||||
lines["discharge"] = line
|
||||
self.lines["discharge"] = line
|
||||
|
||||
if "velocity" in self._y:
|
||||
|
||||
|
|
@ -359,11 +578,11 @@ class CustomPlot(PamhyrPlot):
|
|||
ts, v, lw=1.,
|
||||
color='g',
|
||||
)
|
||||
lines["velocity"] = line
|
||||
self.lines["velocity"] = line
|
||||
|
||||
if "max_depth" in self._y:
|
||||
if "depth" in self._y:
|
||||
|
||||
ax = self._axes[unit["max_depth"]]
|
||||
ax = self._axes[unit["depth"]]
|
||||
d = list(
|
||||
map(lambda z: profile.geometry.max_water_depth(z), z)
|
||||
)
|
||||
|
|
@ -372,7 +591,7 @@ class CustomPlot(PamhyrPlot):
|
|||
ts, d,
|
||||
color='brown', lw=1.,
|
||||
)
|
||||
lines["max_depth"] = line
|
||||
self.lines["depth"] = line
|
||||
|
||||
if "mean_depth" in self._y:
|
||||
|
||||
|
|
@ -385,7 +604,7 @@ class CustomPlot(PamhyrPlot):
|
|||
ts, d,
|
||||
color='orange', lw=1.,
|
||||
)
|
||||
lines["mean_depth"] = line
|
||||
self.lines["mean_depth"] = line
|
||||
|
||||
if "froude" in self._y:
|
||||
|
||||
|
|
@ -402,7 +621,7 @@ class CustomPlot(PamhyrPlot):
|
|||
line = ax.plot(
|
||||
ts, d, color='black', linestyle='--', lw=1.,
|
||||
)
|
||||
lines["froude"] = line
|
||||
self.lines["froude"] = line
|
||||
|
||||
if "wet_area" in self._y:
|
||||
|
||||
|
|
@ -414,21 +633,100 @@ class CustomPlot(PamhyrPlot):
|
|||
line = ax.plot(
|
||||
ts, d, color='blue', linestyle='--', lw=1.,
|
||||
)
|
||||
lines["wet_area"] = line
|
||||
self.lines["wet_area"] = line
|
||||
|
||||
self._customize_x_axes_time(ts)
|
||||
|
||||
# Legend
|
||||
lns = reduce(
|
||||
lambda acc, line: acc + line,
|
||||
map(lambda line: lines[line], lines),
|
||||
map(lambda line: self.lines[line], self.lines),
|
||||
[]
|
||||
)
|
||||
labs = list(map(lambda line: self._trad[line], lines))
|
||||
labs = list(map(lambda line: self._trad[line], self.lines))
|
||||
self.canvas.axes.legend(lns, labs, loc="best")
|
||||
|
||||
@timer
|
||||
def _redraw_time(self):
|
||||
|
||||
results = self.data
|
||||
reach = results.river.reach(self._reach)
|
||||
profile = reach.profile(self._profile)
|
||||
ts = list(results.get("timestamps"))
|
||||
ts.sort()
|
||||
|
||||
q = profile.get_key("Q")
|
||||
z = profile.get_key("Z")
|
||||
z_min = profile.geometry.z_min()
|
||||
ts_z_min = list(
|
||||
map(
|
||||
lambda ts: z_min,
|
||||
ts
|
||||
)
|
||||
)
|
||||
|
||||
if "water_elevation" in self._y:
|
||||
self.lines["water_elevation"][0].set_ydata(z)
|
||||
|
||||
if "bed_elevation" in self._y:
|
||||
ax = self._axes[unit["bed_elevation"]]
|
||||
self.fill.remove()
|
||||
self.fill = ax.fill_between(
|
||||
ts, ts_z_min, z,
|
||||
color='blue', alpha=0.5, interpolate=True
|
||||
)
|
||||
|
||||
if "discharge" in self._y:
|
||||
self.lines["discharge"][0].set_ydata(q)
|
||||
|
||||
if "velocity" in self._y:
|
||||
v = list(
|
||||
map(
|
||||
lambda q, z: profile.geometry.speed(q, z),
|
||||
q, z
|
||||
)
|
||||
)
|
||||
self.lines["velocity"][0].set_ydata(v)
|
||||
|
||||
if "depth" in self._y:
|
||||
d = list(
|
||||
map(lambda z: profile.geometry.max_water_depth(z), z)
|
||||
)
|
||||
self.lines["depth"][0].set_ydata(d)
|
||||
|
||||
if "mean_depth" in self._y:
|
||||
d = list(
|
||||
map(lambda z: profile.geometry.mean_water_depth(z), z)
|
||||
)
|
||||
self.lines["mean_depth"][0].set_ydata(d)
|
||||
|
||||
if "froude" in self._y:
|
||||
d = list(
|
||||
map(lambda z, q:
|
||||
profile.geometry.speed(q, z) /
|
||||
sqrt(9.81 * (
|
||||
profile.geometry.wet_area(z) /
|
||||
profile.geometry.wet_width(z))
|
||||
), z, q)
|
||||
)
|
||||
self.lines["froude"][0].set_ydata(d)
|
||||
|
||||
if "wet_area" in self._y:
|
||||
d = list(
|
||||
map(lambda z: profile.geometry.wet_area(z), z)
|
||||
)
|
||||
self.lines["wet_area"][0].set_ydata(d)
|
||||
|
||||
def draw(self):
|
||||
self.draw_static()
|
||||
|
||||
def draw_update(self):
|
||||
if self._x == "rk":
|
||||
self._redraw_rk()
|
||||
elif self._x == "time":
|
||||
self._redraw_time()
|
||||
|
||||
@timer
|
||||
def draw_static(self):
|
||||
self.canvas.axes.cla()
|
||||
self.canvas.axes.grid(color='grey', linestyle='--', linewidth=0.5)
|
||||
|
||||
|
|
@ -484,10 +782,10 @@ class CustomPlot(PamhyrPlot):
|
|||
|
||||
@timer
|
||||
def update(self):
|
||||
if not self._init:
|
||||
self.draw()
|
||||
self.draw_current()
|
||||
return
|
||||
# if not self._init:
|
||||
self.draw_update()
|
||||
self.draw_current()
|
||||
return
|
||||
|
||||
def set_reach(self, reach_id):
|
||||
self._reach = reach_id
|
||||
|
|
|
|||
|
|
@ -36,14 +36,18 @@ class CustomPlotTranslate(ResultsTranslate):
|
|||
self._dict['time'] = self._dict["unit_time_s"]
|
||||
self._dict['rk'] = self._dict["unit_rk"]
|
||||
self._dict['water_elevation'] = self._dict["unit_water_elevation"]
|
||||
self._dict['water_elevation_envelop'] = self._dict[
|
||||
"unit_water_elevation_envelop"
|
||||
]
|
||||
self._dict['discharge'] = self._dict["unit_discharge"]
|
||||
self._dict['elevation'] = _translate(
|
||||
"CustomPlot", "Bed elevation (m)"
|
||||
)
|
||||
self._dict['velocity'] = self._dict["unit_speed"]
|
||||
self._dict['discharge_envelop'] = self._dict["unit_discharge_envelop"]
|
||||
self._dict['bed_elevation'] = self._dict["unit_bed_elevation"]
|
||||
self._dict['velocity'] = self._dict["unit_velocity"]
|
||||
self._dict['width'] = self._dict["unit_width"]
|
||||
self._dict['max_depth'] = self._dict["unit_max_height"]
|
||||
self._dict['mean_depth'] = self._dict["unit_mean_height"]
|
||||
self._dict['velocity_envelop'] = self._dict["unit_velocity_envelop"]
|
||||
self._dict['depth'] = self._dict["unit_depth"]
|
||||
self._dict['depth_envelop'] = self._dict["unit_depth_envelop"]
|
||||
self._dict['mean_depth'] = self._dict["unit_mean_depth"]
|
||||
self._dict['wet_area'] = self._dict["unit_wet_area"]
|
||||
self._dict['wet_perimeter'] = self._dict["unit_wet_perimeter"]
|
||||
self._dict['hydraulic_radius'] = self._dict["unit_hydraulic_radius"]
|
||||
|
|
@ -55,7 +59,7 @@ class CustomPlotTranslate(ResultsTranslate):
|
|||
"CustomPlot", "Elevation (m)"
|
||||
)
|
||||
self._dict['1-m3s'] = self._dict["unit_discharge"]
|
||||
self._dict['2-ms'] = self._dict["unit_speed"]
|
||||
self._dict['3-meter'] = self._dict["unit_height"]
|
||||
self._dict['2-ms'] = self._dict["unit_velocity"]
|
||||
self._dict['3-meter'] = self._dict["unit_depth"]
|
||||
self._dict['4-dimensionless'] = self._dict["unit_froude"]
|
||||
self._dict['5-m2'] = self._dict["wet_area"]
|
||||
|
|
|
|||
|
|
@ -101,7 +101,7 @@ class TableModel(PamhyrTableModel):
|
|||
z = self._lst[row].get_ts_key(self._timestamp, "Z")
|
||||
v = self._lst[row].geometry.wet_width(z)
|
||||
return f"{v:.4f}"
|
||||
elif self._headers[column] == "max_depth":
|
||||
elif self._headers[column] == "depth":
|
||||
z = self._lst[row].get_ts_key(self._timestamp, "Z")
|
||||
v = self._lst[row].geometry.max_water_depth(z)
|
||||
return f"{v:.4f}"
|
||||
|
|
|
|||
|
|
@ -490,11 +490,13 @@ class ResultsWindow(PamhyrWindow):
|
|||
def _add_custom_plot(self):
|
||||
dlg = CustomPlotValuesSelectionDialog(parent=self)
|
||||
if dlg.exec():
|
||||
x, y = dlg.value
|
||||
self.create_new_tab_custom_plot(x, y)
|
||||
x, y, envelop = dlg.value
|
||||
self.create_new_tab_custom_plot(x, y, envelop)
|
||||
|
||||
def create_new_tab_custom_plot(self, x: str, y: list):
|
||||
def create_new_tab_custom_plot(self, x: str, y: list, envelop: bool):
|
||||
name = f"{x}: {','.join(y)}"
|
||||
if envelop and x == "rk":
|
||||
name += "_envelop"
|
||||
wname = f"tab_custom_{x}_{y}"
|
||||
|
||||
tab_widget = self.find(QTabWidget, f"tabWidget")
|
||||
|
|
@ -518,7 +520,7 @@ class ResultsWindow(PamhyrWindow):
|
|||
)
|
||||
|
||||
plot = CustomPlot(
|
||||
x, y,
|
||||
x, y, envelop,
|
||||
self._get_current_reach(),
|
||||
self._get_current_profile(),
|
||||
self._get_current_timestamp(),
|
||||
|
|
@ -589,7 +591,7 @@ class ResultsWindow(PamhyrWindow):
|
|||
|
||||
dlg = CustomPlotValuesSelectionDialog(parent=self)
|
||||
if dlg.exec():
|
||||
x, y = dlg.value
|
||||
x, y, envelop = dlg.value
|
||||
else:
|
||||
return
|
||||
|
||||
|
|
@ -599,12 +601,12 @@ class ResultsWindow(PamhyrWindow):
|
|||
)
|
||||
self.file_dialog(
|
||||
select_file="AnyFile",
|
||||
callback=lambda f: self.export_to(f[0], x, y),
|
||||
callback=lambda f: self.export_to(f[0], x, y, envelop),
|
||||
default_suffix=".csv",
|
||||
file_filter=["CSV (*.csv)"],
|
||||
)
|
||||
|
||||
def export_to(self, filename, x, y):
|
||||
def export_to(self, filename, x, y, envelop):
|
||||
timestamps = sorted(self._results.get("timestamps"))
|
||||
reach = self._results.river.reachs[self._get_current_reach()]
|
||||
first_line = [f"Study: {self._results.study.name}",
|
||||
|
|
@ -612,26 +614,26 @@ class ResultsWindow(PamhyrWindow):
|
|||
if x == "rk":
|
||||
timestamp = self._get_current_timestamp()
|
||||
first_line.append(f"Time: {timestamp}s")
|
||||
val_dict = self._export_rk(timestamp, y, filename)
|
||||
val_dict = self._export_rk(timestamp, y, envelop, filename)
|
||||
elif x == "time":
|
||||
profile = self._get_current_profile()
|
||||
profile_id = self._get_current_profile()
|
||||
profile = reach.profile(profile_id)
|
||||
pname = profile.name if profile.name != "" else profile.rk
|
||||
first_line.append(f"Profile: {pname}")
|
||||
val_dict = self._export_time(profile, y, filename)
|
||||
val_dict = self._export_time(profile_id, y, filename)
|
||||
|
||||
with open(filename, 'w', newline='') as csvfile:
|
||||
writer = csv.writer(csvfile, delimiter=',',
|
||||
quotechar='|', quoting=csv.QUOTE_MINIMAL)
|
||||
dict_x = self._trad.get_dict("values_x")
|
||||
dict_y = self._trad.get_dict("values_y")
|
||||
header = [dict_x[x]]
|
||||
header = []
|
||||
writer.writerow(first_line)
|
||||
for text in y:
|
||||
header.append(dict_y[text])
|
||||
for text in val_dict.keys():
|
||||
header.append(text)
|
||||
writer.writerow(header)
|
||||
for row in range(len(val_dict[x])):
|
||||
line = [val_dict[x][row]]
|
||||
for var in y:
|
||||
for row in range(len(val_dict[dict_x[x]])):
|
||||
line = []
|
||||
for var in val_dict.keys():
|
||||
line.append(val_dict[var][row])
|
||||
writer.writerow(line)
|
||||
|
||||
|
|
@ -673,28 +675,59 @@ class ResultsWindow(PamhyrWindow):
|
|||
self._additional_plot.pop(tab_widget.tabText(index))
|
||||
tab_widget.removeTab(index)
|
||||
|
||||
def _export_rk(self, timestamp, y, filename):
|
||||
def _export_rk(self, timestamp, y, envelop, filename):
|
||||
reach = self._results.river.reachs[self._get_current_reach()]
|
||||
dict_x = self._trad.get_dict("values_x")
|
||||
dict_y = self._trad.get_dict("values_y")
|
||||
if envelop:
|
||||
dict_y.update(self._trad.get_dict("values_y_envelop"))
|
||||
my_dict = {}
|
||||
my_dict["rk"] = reach.geometry.get_rk()
|
||||
if "elevation" in y:
|
||||
my_dict["elevation"] = reach.geometry.get_z_min()
|
||||
my_dict[dict_x["rk"]] = reach.geometry.get_rk()
|
||||
if "bed_elevation" in y:
|
||||
my_dict[dict_y["bed_elevation"]] = reach.geometry.get_z_min()
|
||||
if "discharge" in y:
|
||||
my_dict["discharge"] = list(
|
||||
my_dict[dict_y["discharge"]] = list(
|
||||
map(
|
||||
lambda p: p.get_ts_key(timestamp, "Q"),
|
||||
reach.profiles
|
||||
)
|
||||
)
|
||||
if envelop:
|
||||
my_dict[dict_y["min_discharge"]] = list(
|
||||
map(
|
||||
lambda p: min(p.get_key("Q")),
|
||||
reach.profiles
|
||||
)
|
||||
)
|
||||
my_dict[dict_y["max_discharge"]] = list(
|
||||
map(
|
||||
lambda p: max(p.get_key("Q")),
|
||||
reach.profiles
|
||||
)
|
||||
)
|
||||
if "water_elevation" in y:
|
||||
my_dict["water_elevation"] = list(
|
||||
my_dict[dict_y["water_elevation"]] = list(
|
||||
map(
|
||||
lambda p: p.get_ts_key(timestamp, "Z"),
|
||||
reach.profiles
|
||||
)
|
||||
)
|
||||
if envelop:
|
||||
my_dict[dict_y["min_water_elevation"]] = list(
|
||||
map(
|
||||
lambda p: min(p.get_key("Z")),
|
||||
reach.profiles
|
||||
)
|
||||
)
|
||||
my_dict[dict_y["max_water_elevation"]] = list(
|
||||
map(
|
||||
lambda p: max(p.get_key("Z")),
|
||||
reach.profiles
|
||||
)
|
||||
)
|
||||
|
||||
if "velocity" in y:
|
||||
my_dict["velocity"] = list(
|
||||
my_dict[dict_y["velocity"]] = list(
|
||||
map(
|
||||
lambda p: p.geometry.speed(
|
||||
p.get_ts_key(timestamp, "Q"),
|
||||
|
|
@ -702,16 +735,44 @@ class ResultsWindow(PamhyrWindow):
|
|||
reach.profiles
|
||||
)
|
||||
)
|
||||
if "max_depth" in y:
|
||||
my_dict["max_depth"] = list(
|
||||
if envelop:
|
||||
velocities = list(map(
|
||||
lambda p: list(map(
|
||||
lambda q, z:
|
||||
p.geometry.speed(q, z),
|
||||
p.get_key("Q"), p.get_key("Z")
|
||||
)), reach.profiles
|
||||
)
|
||||
)
|
||||
my_dict[dict_y["min_velocity"]] = [min(v) for v in velocities]
|
||||
my_dict[dict_y["max_velocity"]] = [max(v) for v in velocities]
|
||||
|
||||
if "depth" in y:
|
||||
my_dict[dict_y["depth"]] = list(
|
||||
map(
|
||||
lambda p: p.geometry.max_water_depth(
|
||||
p.get_ts_key(timestamp, "Z")),
|
||||
reach.profiles
|
||||
)
|
||||
)
|
||||
if envelop:
|
||||
my_dict[dict_y["min_depth"]] = list(map(
|
||||
lambda p1, p2: p1 - p2, map(
|
||||
lambda p: min(p.get_key("Z")),
|
||||
reach.profiles
|
||||
), reach.geometry.get_z_min()
|
||||
)
|
||||
)
|
||||
my_dict[dict_y["max_depth"]] = list(map(
|
||||
lambda p1, p2: p1 - p2, map(
|
||||
lambda p: max(p.get_key("Z")),
|
||||
reach.profiles
|
||||
), reach.geometry.get_z_min()
|
||||
)
|
||||
)
|
||||
|
||||
if "mean_depth" in y:
|
||||
my_dict["mean_depth"] = list(
|
||||
my_dict[dict_y["mean_depth"]] = list(
|
||||
map(
|
||||
lambda p: p.geometry.mean_water_depth(
|
||||
p.get_ts_key(timestamp, "Z")),
|
||||
|
|
@ -719,7 +780,7 @@ class ResultsWindow(PamhyrWindow):
|
|||
)
|
||||
)
|
||||
if "froude" in y:
|
||||
my_dict["froude"] = list(
|
||||
my_dict[dict_y["froude"]] = list(
|
||||
map(
|
||||
lambda p:
|
||||
p.geometry.speed(
|
||||
|
|
@ -735,7 +796,7 @@ class ResultsWindow(PamhyrWindow):
|
|||
)
|
||||
)
|
||||
if "wet_area" in y:
|
||||
my_dict["wet_area"] = list(
|
||||
my_dict[dict_y["wet_area"]] = list(
|
||||
map(
|
||||
lambda p: p.geometry.wet_area(
|
||||
p.get_ts_key(timestamp, "Z")),
|
||||
|
|
@ -750,33 +811,36 @@ class ResultsWindow(PamhyrWindow):
|
|||
profile = reach.profile(profile)
|
||||
ts = list(self._results.get("timestamps"))
|
||||
ts.sort()
|
||||
dict_x = self._trad.get_dict("values_x")
|
||||
dict_y = self._trad.get_dict("values_y")
|
||||
my_dict = {}
|
||||
my_dict["time"] = ts
|
||||
my_dict[dict_x["time"]] = ts
|
||||
z = profile.get_key("Z")
|
||||
q = profile.get_key("Q")
|
||||
if "elevation" in y:
|
||||
my_dict["elevation"] = [profile.geometry.z_min()] * len(ts)
|
||||
if "bed_elevation" in y:
|
||||
my_dict[dict_y["bed_elevation"]] = [
|
||||
profile.geometry.z_min()] * len(ts)
|
||||
if "discharge" in y:
|
||||
my_dict["discharge"] = q
|
||||
my_dict[dict_y["discharge"]] = q
|
||||
if "water_elevation" in y:
|
||||
my_dict["water_elevation"] = z
|
||||
my_dict[dict_y["water_elevation"]] = z
|
||||
if "velocity" in y:
|
||||
my_dict["velocity"] = list(
|
||||
my_dict[dict_y["velocity"]] = list(
|
||||
map(
|
||||
lambda q, z: profile.geometry.speed(q, z),
|
||||
q, z
|
||||
)
|
||||
)
|
||||
if "max_depth" in y:
|
||||
my_dict["max_depth"] = list(
|
||||
if "depth" in y:
|
||||
my_dict[dict_y["depth"]] = list(
|
||||
map(lambda z: profile.geometry.max_water_depth(z), z)
|
||||
)
|
||||
if "mean_depth" in y:
|
||||
my_dict["mean_depth"] = list(
|
||||
my_dict[dict_y["mean_depth"]] = list(
|
||||
map(lambda z: profile.geometry.mean_water_depth(z), z)
|
||||
)
|
||||
if "froude" in y:
|
||||
my_dict["froude"] = list(
|
||||
my_dict[dict_y["froude"]] = list(
|
||||
map(lambda z, q:
|
||||
profile.geometry.speed(q, z) /
|
||||
sqrt(9.81 * (
|
||||
|
|
@ -785,7 +849,7 @@ class ResultsWindow(PamhyrWindow):
|
|||
), z, q)
|
||||
)
|
||||
if "wet_area" in y:
|
||||
my_dict["wet_area"] = list(
|
||||
my_dict[dict_y["wet_area"]] = list(
|
||||
map(lambda z: profile.geometry.wet_area(z), z)
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -71,10 +71,10 @@ class ResultsTranslate(MainTranslate):
|
|||
"name": _translate("Results", "Profile"),
|
||||
"water_elevation": self._dict["unit_water_elevation"],
|
||||
"discharge": self._dict["unit_discharge"],
|
||||
"velocity": self._dict["unit_speed"],
|
||||
"velocity": self._dict["unit_velocity"],
|
||||
"width": self._dict["unit_width"],
|
||||
"max_depth": self._dict["unit_max_height"],
|
||||
"mean_depth": self._dict["unit_mean_height"],
|
||||
"depth": self._dict["unit_depth"],
|
||||
"mean_depth": self._dict["unit_mean_depth"],
|
||||
"wet_area": self._dict["unit_wet_area"],
|
||||
"wet_perimeter": self._dict["unit_wet_perimeter"],
|
||||
"hydraulic_radius": self._dict["unit_hydraulic_radius"],
|
||||
|
|
@ -87,12 +87,12 @@ class ResultsTranslate(MainTranslate):
|
|||
}
|
||||
|
||||
self._sub_dict["values_y"] = {
|
||||
"elevation": self._dict["unit_elevation"],
|
||||
"bed_elevation": self._dict["unit_bed_elevation"],
|
||||
"water_elevation": self._dict["unit_water_elevation"],
|
||||
"discharge": self._dict["unit_discharge"],
|
||||
"velocity": self._dict["unit_speed"],
|
||||
"max_depth": self._dict["unit_max_height"],
|
||||
"mean_depth": self._dict["unit_mean_height"],
|
||||
"velocity": self._dict["unit_velocity"],
|
||||
"depth": self._dict["unit_depth"],
|
||||
"mean_depth": self._dict["unit_mean_depth"],
|
||||
"froude": self._dict["unit_froude"],
|
||||
"wet_area": self._dict["unit_wet_area"],
|
||||
}
|
||||
|
|
@ -112,3 +112,13 @@ class ResultsTranslate(MainTranslate):
|
|||
"speed": self._dict["unit_speed"],
|
||||
}
|
||||
|
||||
self._sub_dict["values_y_envelop"] = {
|
||||
"min_water_elevation": self._dict["unit_min_water_elevation"],
|
||||
"max_water_elevation": self._dict["unit_max_water_elevation"],
|
||||
"min_discharge": self._dict["unit_min_discharge"],
|
||||
"max_discharge": self._dict["unit_max_discharge"],
|
||||
"min_velocity": self._dict["unit_min_velocity"],
|
||||
"max_velocity": self._dict["unit_max_velocity"],
|
||||
"min_depth": self._dict["unit_min_depth"],
|
||||
"max_depth": self._dict["unit_max_depth"],
|
||||
}
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ class Plot(PamhyrPlot):
|
|||
)
|
||||
|
||||
self.label_x = self._trad["rk"]
|
||||
self.label_y = self._trad["height"]
|
||||
self.label_y = self._trad["elevation"]
|
||||
|
||||
self.line_rk_zmin = None
|
||||
self.line_rk_sl = []
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ class Plot(PamhyrPlot):
|
|||
)
|
||||
|
||||
self.label_x = self._trad["x"]
|
||||
self.label_y = self._trad["height"]
|
||||
self.label_y = self._trad["elevation"]
|
||||
|
||||
self.line_rk_zmin = None
|
||||
self.line_rk_sl = []
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ class SedimentProfileTranslate(SedimentReachTranslate):
|
|||
self._dict["x"] = _translate(
|
||||
"SedimentLayers", "X (m)"
|
||||
)
|
||||
self._dict["height"] = self._dict["unit_height"]
|
||||
self._dict["elevation"] = self._dict["unit_elevation"]
|
||||
|
||||
self._dict["Profile sediment layers"] = _translate(
|
||||
"SedimentLayers", "Profile sediment layers"
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ class SedimentReachTranslate(SedimentTranslate):
|
|||
)
|
||||
|
||||
self._dict["rk"] = self._dict["unit_rk"]
|
||||
self._dict["height"] = self._dict["unit_height"]
|
||||
self._dict["elevation"] = self._dict["unit_elevation"]
|
||||
|
||||
self._sub_dict["table_headers"] = {
|
||||
"name": self._dict["name"],
|
||||
|
|
|
|||
|
|
@ -57,18 +57,56 @@ class UnitTranslate(CommonWordTranslate):
|
|||
|
||||
self._dict["unit_rk"] = _translate("Unit", "River Kilometer (m)")
|
||||
self._dict["unit_width"] = _translate("Unit", "Width (m)")
|
||||
self._dict["unit_height"] = _translate("Unit", "Depth (m)")
|
||||
self._dict["unit_max_height"] = _translate("Unit", "Max Depth (m)")
|
||||
self._dict["unit_mean_height"] = _translate("Unit", "Mean Depth (m)")
|
||||
self._dict["unit_width_envelop"] = _translate(
|
||||
"Unit", "Width Envelop (m)"
|
||||
)
|
||||
self._dict["unit_max_width"] = _translate("Unit", "Max Width (m)")
|
||||
self._dict["unit_min_width"] = _translate("Unit", "Min Width (m)")
|
||||
self._dict["unit_depth"] = _translate("Unit", "Depth (m)")
|
||||
self._dict["unit_max_depth"] = _translate("Unit", "Max Depth (m)")
|
||||
self._dict["unit_min_depth"] = _translate("Unit", "Min Depth (m)")
|
||||
self._dict["unit_depth_envelop"] = _translate(
|
||||
"Unit", "Depth Envelop (m)"
|
||||
)
|
||||
self._dict["unit_mean_depth"] = _translate("Unit", "Mean Depth (m)")
|
||||
self._dict["unit_diameter"] = _translate("Unit", "Diameter (m)")
|
||||
self._dict["unit_thickness"] = _translate("Unit", "Thickness (m)")
|
||||
self._dict["unit_elevation"] = _translate("Unit", "Elevation (m)")
|
||||
self._dict["unit_water_elevation"] = _translate(
|
||||
"Unit", "Water elevation (m)"
|
||||
self._dict["unit_bed_elevation"] = _translate(
|
||||
"Unit", "Bed Elevation (m)"
|
||||
)
|
||||
self._dict["unit_water_elevation"] = _translate(
|
||||
"Unit", "Water Elevation (m)"
|
||||
)
|
||||
self._dict["unit_water_elevation_envelop"] = _translate(
|
||||
"Unit", "Water Elevation Envelop (m)"
|
||||
)
|
||||
self._dict["unit_max_water_elevation"] = _translate(
|
||||
"Unit", "Max Water Elevation (m)"
|
||||
)
|
||||
self._dict["unit_min_water_elevation"] = _translate(
|
||||
"Unit", "Min Water Elevation (m)"
|
||||
)
|
||||
self._dict["unit_velocity"] = _translate("Unit", "Velocity (m/s)")
|
||||
self._dict["unit_velocity_envelop"] = _translate(
|
||||
"Unit", "Velocity Envelop (m/s)"
|
||||
)
|
||||
self._dict["unit_max_velocity"] = _translate(
|
||||
"Unit", "Max Velocity (m/s)"
|
||||
)
|
||||
self._dict["unit_min_velocity"] = _translate(
|
||||
"Unit", "Min Velocity (m/s)"
|
||||
)
|
||||
|
||||
self._dict["unit_speed"] = _translate("Unit", "Velocity (m/s)")
|
||||
self._dict["unit_discharge"] = _translate("Unit", "Discharge (m^3/s)")
|
||||
self._dict["unit_discharge_envelop"] = _translate(
|
||||
"Unit", "Discharge Envelop (m^3/s)"
|
||||
)
|
||||
self._dict["unit_max_discharge"] = _translate(
|
||||
"Unit", "Max Discharge (m^3/s)"
|
||||
)
|
||||
self._dict["unit_min_discharge"] = _translate(
|
||||
"Unit", "Min Discharge (m^3/s)"
|
||||
)
|
||||
self._dict["unit_area"] = _translate("Unit", "Area (hectare)")
|
||||
|
||||
self._dict["unit_time_s"] = _translate("Unit", "Time (sec)")
|
||||
|
|
|
|||
Loading…
Reference in New Issue