diff --git a/src/Solver/RubarBE.py b/src/Solver/RubarBE.py index bb9f118b..fe169f88 100644 --- a/src/Solver/RubarBE.py +++ b/src/Solver/RubarBE.py @@ -575,8 +575,12 @@ class Rubar3(CommandLineSolver): for bc in bcs: f.write(f"{len(bc)}\n") - for d0, d1 in bc.data: - f.write(f"{d1} {d0}\n") + if bc.bctype == "ZD": + for d0, d1 in bc.data: + 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"): logger.info(f"read: profil.{name}") @@ -590,7 +594,10 @@ class Rubar3(CommandLineSolver): def read_data_line(f): line = f.readline().split() - return tuple(map(float, line)) + if len(line) > 3: + 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): reach.set(ind, timestamp, "Z", z) @@ -628,9 +635,9 @@ class Rubar3(CommandLineSolver): h, s, q, z = read_data_line(f) set_and_compute_limites( reach, ind, - (ph + pz + ph + h) / 2, - (pz + s) / 2, - (pq + q) / 2 + (pz + z + ph + h) / 2, + (pq + q) / 2, + (ps + s) / 2 ) ph = h diff --git a/tests_cases/Enlargement/Enlargement.pamhyr b/tests_cases/Enlargement/Enlargement.pamhyr index 12b3751d..7b70f85d 100644 Binary files a/tests_cases/Enlargement/Enlargement.pamhyr and b/tests_cases/Enlargement/Enlargement.pamhyr differ