mirror of
https://gitlab.com/pamhyr/pamhyr2.git
synced 2026-10-30 03:20:41 +01:00
add zfd in results
This commit is contained in:
1 parent
242df7f648
commit
5b497d61f0
5 files changed
+113
-75
No files matched your search
+41
-11
@@ -1934,17 +1934,23 @@ class ApplicationWindow(QMainWindow, ListedSubWindow, WindowToolKit):
|
||||
)
|
||||
)
|
||||
|
||||
result3 = Results(self._study, solver3)
|
||||
result4 = Results(self._study, solver1)
|
||||
result5 = Results(self._study, solver2)
|
||||
|
||||
result3.set("nb_reach", result1.get("nb_reach"))
|
||||
result3.set("nb_profile", result1.get("nb_profile"))
|
||||
result3.set("timestamps", ts)
|
||||
result4.set("timestamps", ts)
|
||||
result5.set("timestamps", ts)
|
||||
|
||||
for i in range(int(result1.get("nb_reach"))):
|
||||
r = result3.river.add(i)
|
||||
|
||||
for timestamp in result3.get("timestamps"):
|
||||
for timestamp in ts:
|
||||
for r in range(int(result1.get("nb_reach"))):
|
||||
reach1 = result1.river.reach(r)
|
||||
reach2 = result2.river.reach(r)
|
||||
reach1 = result4.river.reach(r)
|
||||
reach2 = result5.river.reach(r)
|
||||
reach3 = result3.river.reach(r)
|
||||
|
||||
for profile1, profile2, profile3 in zip(
|
||||
@@ -1954,17 +1960,41 @@ class ApplicationWindow(QMainWindow, ListedSubWindow, WindowToolKit):
|
||||
for key in ["Z", "Q", "V"]:
|
||||
d1 = profile1.get_ts_key(timestamp, key)
|
||||
d2 = profile2.get_ts_key(timestamp, key)
|
||||
d = d1 - d2
|
||||
d = d1-d2
|
||||
reach3.set(p, timestamp, key, d)
|
||||
reach4.set(p, timestamp, key, d1)
|
||||
reach5.set(p, timestamp, key, d2)
|
||||
if reach1.has_bedload():
|
||||
d1 = profile1.get_ts_key(timestamp, 'zfd')
|
||||
reach4.set(p, timestamp, 'zfd', d1)
|
||||
if reach2.has_bedload():
|
||||
d2 = profile2.get_ts_key(timestamp, 'zfd')
|
||||
reach5.set(p, timestamp, 'zfd', d2)
|
||||
if reach1.has_bedload():
|
||||
d3 = d1-d2
|
||||
reach3.set(p, timestamp, 'zfd', d3)
|
||||
|
||||
profile3.set(timestamp, key, d)
|
||||
limits = reach3.profile(p).geometry.get_water_limits(
|
||||
reach3.profile(p).get_ts_key(timestamp, "Z")
|
||||
)
|
||||
reach3.set(
|
||||
p, timestamp,
|
||||
"water_limits",
|
||||
limits
|
||||
)
|
||||
limits = profile1.get_ts_key(timestamp, "water_limits")
|
||||
reach4.set(p, timestamp, "water_limits", limits)
|
||||
limits = profile2.get_ts_key(timestamp, "water_limits")
|
||||
reach5.set(p, timestamp, "water_limits", limits)
|
||||
|
||||
limits = profile3.geometry\
|
||||
.get_water_limits(
|
||||
profile3.get_ts_key(timestamp, "Z")
|
||||
)
|
||||
profile3.set(timestamp, "water_limits", limits)
|
||||
for res in (result3, result4, result5):
|
||||
for r in range(int(res.get("nb_reach"))):
|
||||
for key in ["Z", "Q", "V"]:
|
||||
res.river.reach(r).bufferize(ts, key)
|
||||
if res.river.reach(r).has_bedload():
|
||||
res.river.reach(r).bufferize(ts, "zfd")
|
||||
|
||||
return [result1, result2, result3]
|
||||
return [result4, result5, result3]
|
||||
|
||||
def open_results_adists(self):
|
||||
if self._study is None:
|
||||
|
||||
Reference in new issue
Block a user