mirror of https://gitlab.com/pamhyr/pamhyr2
debug bed elevation comparison
parent
f0994dd801
commit
b00cca953e
|
|
@ -1117,7 +1117,8 @@ class Mage8(Mage):
|
||||||
|
|
||||||
# Z and Y (4th line)
|
# Z and Y (4th line)
|
||||||
newline()
|
newline()
|
||||||
_ = read_float(3*nb_profile)
|
tmp = read_float(3*nb_profile)
|
||||||
|
zfd = tmp[::3]
|
||||||
endline()
|
endline()
|
||||||
|
|
||||||
# Data
|
# Data
|
||||||
|
|
@ -1332,7 +1333,7 @@ class Mage8(Mage):
|
||||||
|
|
||||||
i_pts = 0
|
i_pts = 0
|
||||||
i_data = 0
|
i_data = 0
|
||||||
# Loop on cross section
|
# Loop on cross sections
|
||||||
for i in range(n):
|
for i in range(n):
|
||||||
sec_sl = []
|
sec_sl = []
|
||||||
reach = ip_to_r(i)
|
reach = ip_to_r(i)
|
||||||
|
|
|
||||||
|
|
@ -590,6 +590,8 @@ class Rubar3(CommandLineSolver):
|
||||||
# Add results reach to reach list
|
# Add results reach to reach list
|
||||||
res_reach = results.river.add(i)
|
res_reach = results.river.add(i)
|
||||||
reachs.append((res_reach, len(reach) + 1))
|
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):
|
def read_data_line(f):
|
||||||
line = f.readline().split()
|
line = f.readline().split()
|
||||||
|
|
@ -650,13 +652,16 @@ class Rubar3(CommandLineSolver):
|
||||||
set_and_compute_limites(reach, ind, z+h, q, s)
|
set_and_compute_limites(reach, ind, z+h, q, s)
|
||||||
|
|
||||||
@timer
|
@timer
|
||||||
def results(self, study, repertory, qlog=None, name="0"):
|
def results(self, study, repertory, qlog=None, name=None):
|
||||||
results = Results(
|
results = Results(
|
||||||
study=study,
|
study=study,
|
||||||
solver=self,
|
solver=self,
|
||||||
repertory=repertory,
|
repertory=repertory,
|
||||||
name=name,
|
name=name,
|
||||||
)
|
)
|
||||||
|
if name is None:
|
||||||
|
name = study.name.replace(" ", "_")
|
||||||
|
|
||||||
results_file = f"profil.{name}"
|
results_file = f"profil.{name}"
|
||||||
|
|
||||||
fname = os.path.join(repertory, results_file)
|
fname = os.path.join(repertory, results_file)
|
||||||
|
|
|
||||||
|
|
@ -1888,7 +1888,7 @@ class ApplicationWindow(QMainWindow, ListedSubWindow, WindowToolKit):
|
||||||
|
|
||||||
s3_name = solver1.name + " <> " + solver2.name
|
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)
|
study1 = self._study.copy_from_scenario(scenario1)
|
||||||
study2 = self._study.copy_from_scenario(scenario2)
|
study2 = self._study.copy_from_scenario(scenario2)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -230,7 +230,7 @@ class CustomPlot(PamhyrPlot):
|
||||||
dz = list(
|
dz = list(
|
||||||
map(
|
map(
|
||||||
lambda x, y: x - y,
|
lambda x, y: x - y,
|
||||||
z_min2, z_min2
|
z_min1, z_min2
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
line = ax.plot(
|
line = ax.plot(
|
||||||
|
|
@ -646,7 +646,7 @@ class CustomPlot(PamhyrPlot):
|
||||||
dz = list(
|
dz = list(
|
||||||
map(
|
map(
|
||||||
lambda x, y: x - y,
|
lambda x, y: x - y,
|
||||||
z_min2, z_min2
|
z_min1, z_min2
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
self.lines["bed_elevation"][0].set_ydata(dz)
|
self.lines["bed_elevation"][0].set_ydata(dz)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue