mirror of https://gitlab.com/pamhyr/pamhyr2
debug water limits
parent
d32baa61a1
commit
a698d46144
|
|
@ -565,18 +565,18 @@ class ProfileXYZ(Profile, SQLSubModel):
|
||||||
start.append(y)
|
start.append(y)
|
||||||
|
|
||||||
end = []
|
end = []
|
||||||
for i in reversed(range(self.number_points-1)):
|
|
||||||
if zz[i-1] <= z and zz[i] > z:
|
|
||||||
y = np.interp(
|
|
||||||
z,
|
|
||||||
[zz[i-1], zz[i]],
|
|
||||||
[station[i-1], station[i]]
|
|
||||||
)
|
|
||||||
end.append(y)
|
|
||||||
|
|
||||||
if points[-1].z <= z:
|
if points[-1].z <= z:
|
||||||
end.append(station[-1])
|
end.append(station[-1])
|
||||||
|
|
||||||
|
for i in reversed(range(self.number_points-1)):
|
||||||
|
if zz[i] <= z and zz[i+1] > z:
|
||||||
|
y = np.interp(
|
||||||
|
z,
|
||||||
|
[zz[i], zz[i+1]],
|
||||||
|
[station[i], station[i+1]]
|
||||||
|
)
|
||||||
|
end.append(y)
|
||||||
|
|
||||||
if len(start) != len(end):
|
if len(start) != len(end):
|
||||||
logger.error(f"ERROR in get_all_water_limits_ac")
|
logger.error(f"ERROR in get_all_water_limits_ac")
|
||||||
return [], []
|
return [], []
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue