mirror of https://gitlab.com/pamhyr/pamhyr2
debug bed elevation comparison
parent
1f35020e3f
commit
ad5cc831a3
|
|
@ -1027,7 +1027,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
|
||||
|
|
@ -1242,7 +1243,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)
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
|
|
@ -763,13 +765,16 @@ class Rubar3(CommandLineSolver):
|
|||
logger.info(f"write_bin: ... end with {len(ts_list)} timestamps")
|
||||
|
||||
@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)
|
||||
|
|
|
|||
|
|
@ -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(
|
||||
|
|
@ -654,7 +654,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)
|
||||
|
|
|
|||
Loading…
Reference in New Issue