diff --git a/src/View/Results/CustomPlot/Plot.py b/src/View/Results/CustomPlot/Plot.py index 72e69826..629598f9 100644 --- a/src/View/Results/CustomPlot/Plot.py +++ b/src/View/Results/CustomPlot/Plot.py @@ -103,10 +103,7 @@ class CustomPlot(PamhyrPlot): def get_ts_zmin(self, profile, res_id): results = self.data[res_id] - # nt = len(list(results.get("timestamps"))) reach = results.river.reach(self._current_reach) - # berdrock = self.sl_compute_bedrock(reach) - # sl = reach.profile(profile).get_key("sl") zfd = reach.profile(profile).get_key("zfd") return zfd diff --git a/src/View/Results/PlotRKC.py b/src/View/Results/PlotRKC.py index 006a7085..f7238ec0 100644 --- a/src/View/Results/PlotRKC.py +++ b/src/View/Results/PlotRKC.py @@ -102,11 +102,7 @@ class PlotRKC(PamhyrPlot): self.draw_bottom_geometry(reach) def draw_bottom_with_bedload(self, reach): - # self._bedrock = self.sl_compute_bedrock(reach) - rk = reach.geometry.get_rk() - # z = self.sl_compute_current_z(reach) - zfd = list( map( lambda p: p.get_ts_key( diff --git a/src/View/Results/Window.py b/src/View/Results/Window.py index 9edd6587..45eddb09 100644 --- a/src/View/Results/Window.py +++ b/src/View/Results/Window.py @@ -851,17 +851,17 @@ class ResultsWindow(PamhyrWindow): my_dict = {} my_dict[dict_x["rk"]] = reach.geometry.get_rk() if "bed_elevation" in y: - if self._current_results != 2: - zmin = reach.geometry.get_z_min() - else: - z_min1 = reach1.geometry.get_z_min() - z_min2 = reach2.geometry.get_z_min() + if reach.has_bedload(): zmin = list( - map( - lambda x, y: x - y, - z_min2, z_min2 + map( + lambda p: p.get_ts_key( + timestamp, "zfd" + ), + reach.profiles ) ) + else: + zmin = reach.geometry.get_z_min() my_dict[dict_y["bed_elevation"]] = zmin # if envelop and reach.has_sediment(): if "discharge" in y: @@ -1096,29 +1096,16 @@ class ResultsWindow(PamhyrWindow): if self._current_results == 2: reach1 = self._results[0].river.reach(self._reach) reach2 = self._results[1].river.reach(self._reach) + reach3 = self._results[2].river.reach(self._reach) profile1 = reach1.profile(self._profile) profile2 = reach2.profile(self._profile) - - q1 = profile1.get_key("Q") - z1 = profile1.get_key("Z") - v1 = profile1.get_key("V") - - q2 = profile2.get_key("Q") - z2 = profile2.get_key("Z") - v2 = profile2.get_key("V") + profile3 = reach3.profile(self._profile) if "bed_elevation" in y: - if self._current_results != 2: - z_min = [profile.geometry.z_min()] * len(self._timestamps) + if reach.has_bedload(): + z_min = profile.get_key("zfd") else: - z_min1 = profile1.geometry.z_min() - z_min2 = profile2.geometry.z_min() - z_min = list( - map( - lambda ts: z_min1 - z_min2, - self._timestamps - ) - ) + z_min = [profile.geometry.z_min()] * len(self._timestamps) my_dict[dict_y["bed_elevation"]] = z_min if "discharge" in y: my_dict[dict_y["discharge"]] = q