diff --git a/src/View/Results/CustomPlot/Plot.py b/src/View/Results/CustomPlot/Plot.py index a3073c7a1bf4dd2b21cd737793f12f574cae6239..f1f2438f3406c1d6f50ca29c60bfdee34f9aa9c0 100644 --- a/src/View/Results/CustomPlot/Plot.py +++ b/src/View/Results/CustomPlot/Plot.py @@ -34,7 +34,7 @@ unit = { "water_elevation": "0-meter", "discharge": "1-m3s", "velocity": "2-ms", - "depth": "3-meter", + "max_depth": "3-meter", "mean_depth": "3-meter", "froude": "4-dimensionless", "wet_area": "5-m2", @@ -157,9 +157,9 @@ class CustomPlot(PamhyrPlot): ) lines["velocity"] = line - if "depth" in self._y: + if "max_depth" in self._y: - ax = self._axes[unit["depth"]] + ax = self._axes[unit["max_depth"]] d = list( map( lambda p: p.geometry.max_water_depth( @@ -171,7 +171,7 @@ class CustomPlot(PamhyrPlot): rk, d, color='brown', lw=1., ) - lines["depth"] = line + lines["max_depth"] = line if "mean_depth" in self._y: @@ -361,9 +361,9 @@ class CustomPlot(PamhyrPlot): ) lines["velocity"] = line - if "depth" in self._y: + if "max_depth" in self._y: - ax = self._axes[unit["depth"]] + ax = self._axes[unit["max_depth"]] d = list( map(lambda z: profile.geometry.max_water_depth(z), z) ) @@ -372,7 +372,7 @@ class CustomPlot(PamhyrPlot): ts, d, color='brown', lw=1., ) - lines["depth"] = line + lines["max_depth"] = line if "mean_depth" in self._y: @@ -385,7 +385,7 @@ class CustomPlot(PamhyrPlot): ts, d, color='orange', lw=1., ) - lines["depth"] = line + lines["mean_depth"] = line if "froude" in self._y: diff --git a/src/View/Results/Window.py b/src/View/Results/Window.py index 76c16b9d3b0b2ee1a2befea9dd39b65f4fa1c53b..eb4684cfa1be443b1dab8a69a51348245f8c67bc 100644 --- a/src/View/Results/Window.py +++ b/src/View/Results/Window.py @@ -695,8 +695,8 @@ class ResultsWindow(PamhyrWindow): reach.profiles ) ) - if "depth" in y: - my_dict["depth"] = list( + if "max_depth" in y: + my_dict["max_depth"] = list( map( lambda p: p.geometry.max_water_depth( p.get_ts_key(timestamp, "Z")), @@ -760,8 +760,8 @@ class ResultsWindow(PamhyrWindow): q, z ) ) - if "depth" in y: - my_dict["depth"] = list( + if "max_depth" in y: + my_dict["max_depth"] = list( map(lambda z: profile.geometry.max_water_depth(z), z) ) if "mean_depth" in y: diff --git a/src/View/Results/translate.py b/src/View/Results/translate.py index b8e40d3b4207f126605bb8b27f2483efa8a7633c..8b66124edd6fffa1c09c807355dfc3a94e6ff999 100644 --- a/src/View/Results/translate.py +++ b/src/View/Results/translate.py @@ -77,7 +77,7 @@ class ResultsTranslate(MainTranslate): "water_elevation": self._dict["unit_water_elevation"], "discharge": self._dict["unit_discharge"], "velocity": self._dict["unit_speed"], - "depth": self._dict["unit_max_height"], + "max_depth": self._dict["unit_max_height"], "mean_depth": self._dict["unit_mean_height"], "froude": self._dict["unit_froude"], "wet_area": self._dict["unit_wet_area"],