Compare commits

..

No commits in common. "c1905aa7e15180a66a20c07deefdb1011b4a62a9" and "d934b5e38139f346b52ef6587306f248cde2a7f5" have entirely different histories.

3 changed files with 7 additions and 14 deletions

View File

@ -575,12 +575,8 @@ class Rubar3(CommandLineSolver):
for bc in bcs: for bc in bcs:
f.write(f"{len(bc)}\n") f.write(f"{len(bc)}\n")
if bc.bctype == "ZD": for d0, d1 in bc.data:
for d0, d1 in bc.data: f.write(f"{d1} {d0}\n")
f.write(f"{d1} {d0}\n")
else:
for d0, d1 in bc.data:
f.write(f"{d0} {d1}\n")
def read_profil(self, study, fname, results, qlog=None, name="0"): def read_profil(self, study, fname, results, qlog=None, name="0"):
logger.info(f"read: profil.{name}") logger.info(f"read: profil.{name}")
@ -594,10 +590,7 @@ class Rubar3(CommandLineSolver):
def read_data_line(f): def read_data_line(f):
line = f.readline().split() line = f.readline().split()
if len(line) > 3: return tuple(map(float, line))
return tuple(map(float, line))
else:
return (0.0, 0.0, 0.0, 0.0)
def set_and_compute_limites(reach, ind, z, q, s): def set_and_compute_limites(reach, ind, z, q, s):
reach.set(ind, timestamp, "Z", z) reach.set(ind, timestamp, "Z", z)
@ -635,9 +628,9 @@ class Rubar3(CommandLineSolver):
h, s, q, z = read_data_line(f) h, s, q, z = read_data_line(f)
set_and_compute_limites( set_and_compute_limites(
reach, ind, reach, ind,
(pz + z + ph + h) / 2, (ph + pz + ph + h) / 2,
(pq + q) / 2, (pz + s) / 2,
(ps + s) / 2 (pq + q) / 2
) )
ph = h ph = h

View File

@ -718,7 +718,7 @@ class ResultsWindow(PamhyrWindow):
select_file="AnyFile", select_file="AnyFile",
callback=lambda f: self.export_to(f[0], x, y, envelop, solver_id), callback=lambda f: self.export_to(f[0], x, y, envelop, solver_id),
default_suffix=".csv", default_suffix=".csv",
file_filter=[self._trad["file_csv"]], file_filter=[self._dict["file_csv"]],
) )
def export_to(self, filename, x, y, envelop, solver_id): def export_to(self, filename, x, y, envelop, solver_id):