debug bed elevation comparison

dev_dylan
Theophile Terraz 2026-03-26 10:51:21 +01:00
parent f0994dd801
commit b00cca953e
4 changed files with 12 additions and 6 deletions

View File

@ -1117,7 +1117,8 @@ class Mage8(Mage):
# Z and Y (4th line)
newline()
_ = read_float(3*nb_profile)
tmp = read_float(3*nb_profile)
zfd = tmp[::3]
endline()
# Data
@ -1332,7 +1333,7 @@ class Mage8(Mage):
i_pts = 0
i_data = 0
# Loop on cross section
# Loop on cross sections
for i in range(n):
sec_sl = []
reach = ip_to_r(i)

View File

@ -590,6 +590,8 @@ class Rubar3(CommandLineSolver):
# Add results reach to reach list
res_reach = results.river.add(i)
reachs.append((res_reach, len(reach) + 1))
results.set("nb_reach", f"{len(reachs)}")
results.set("nb_profile", f"{sum([r[1] - 1 for r in reachs])}")
def read_data_line(f):
line = f.readline().split()
@ -650,13 +652,16 @@ class Rubar3(CommandLineSolver):
set_and_compute_limites(reach, ind, z+h, q, s)
@timer
def results(self, study, repertory, qlog=None, name="0"):
def results(self, study, repertory, qlog=None, name=None):
results = Results(
study=study,
solver=self,
repertory=repertory,
name=name,
)
if name is None:
name = study.name.replace(" ", "_")
results_file = f"profil.{name}"
fname = os.path.join(repertory, results_file)

View File

@ -1888,7 +1888,7 @@ class ApplicationWindow(QMainWindow, ListedSubWindow, WindowToolKit):
s3_name = solver1.name + " <> " + solver2.name
if not (scenario2 is None or scenario2 is None):
if not (scenario1 is None or scenario2 is None):
study1 = self._study.copy_from_scenario(scenario1)
study2 = self._study.copy_from_scenario(scenario2)

View File

@ -230,7 +230,7 @@ class CustomPlot(PamhyrPlot):
dz = list(
map(
lambda x, y: x - y,
z_min2, z_min2
z_min1, z_min2
)
)
line = ax.plot(
@ -646,7 +646,7 @@ class CustomPlot(PamhyrPlot):
dz = list(
map(
lambda x, y: x - y,
z_min2, z_min2
z_min1, z_min2
)
)
self.lines["bed_elevation"][0].set_ydata(dz)