Compare commits

..

No commits in common. "706a900c8ece1d2fba90df0046443201c601948d" and "7d42c164fc76021c9e6fc7c125c3e52771ed9811" have entirely different histories.

3 changed files with 15 additions and 17 deletions

View File

@ -74,10 +74,10 @@ class Rubar3(CommandLineSolver):
("rubarbe_tf_5", "y"), ("rubarbe_tf_5", "y"),
("rubarbe_tf_6", "n"), ("rubarbe_tf_6", "n"),
("rubarbe_trased", "y"), ("rubarbe_trased", "y"),
#("rubarbe_optfpc", "0"), ("rubarbe_optfpc", "0"),
#("rubarbe_ros", "2650.0"), ("rubarbe_ros", "2650.0"),
#("rubarbe_dm", "0.1"), ("rubarbe_dm", "0.1"),
#("rubarbe_segma", "1.0"), ("rubarbe_segma", "1.0"),
# Sediment parameters # Sediment parameters
("rubarbe_sediment_ros", "2650.0"), ("rubarbe_sediment_ros", "2650.0"),
("rubarbe_sediment_por", "0.4"), ("rubarbe_sediment_por", "0.4"),
@ -167,7 +167,7 @@ class Rubar3(CommandLineSolver):
it = iter(params) it = iter(params)
line = 0 line = 0
while line < 25: while line < 29:
param = next(it) param = next(it)
name = param.name name = param.name
value = param.value value = param.value
@ -277,20 +277,19 @@ class Rubar3(CommandLineSolver):
f.write(f"{ind:>4} {rk:>11.3f} {n_points:>4}\n") f.write(f"{ind:>4} {rk:>11.3f} {n_points:>4}\n")
station = profile.get_station() for point in profile.points:
for i, point in enumerate(profile.points):
label = point.name.lower() label = point.name.lower()
if label != "": if label != "":
if label[0] == "r": if label[0] == "r":
label = label[1].upper() label = label[1].upper()
else: else:
label = " " label = label[1].upper()
else: else:
label = " " label = " "
y = station[i] y = point.y
z = point.z z = point.z
dcs = 1.0 dcs = 0.001
scs = 1.0 scs = 1.0
tmcs = 0.0 tmcs = 0.0
@ -445,10 +444,10 @@ class Rubar3(CommandLineSolver):
z = data[profile.rk][0] z = data[profile.rk][0]
q = data[profile.rk][1] q = data[profile.rk][1]
height = z - profile.z_min() # height = z - profile.z_min()
speed = profile.speed(q, z) speed = profile.speed(q, z)
return height, speed return z, speed
def _export_hydro(self, study, repertory, qlog, name="0"): def _export_hydro(self, study, repertory, qlog, name="0"):
if qlog is not None: if qlog is not None:
@ -471,7 +470,7 @@ class Rubar3(CommandLineSolver):
for bc in bcs: for bc in bcs:
f.write(f"{len(bc)}\n") f.write(f"{len(bc)}\n")
for d0, d1 in bc.data: for d0, d1 in bc.data:
f.write(f"{d1} {d0}\n") f.write(f"{d0} {d1}\n")
def _export_condav(self, study, repertory, qlog, name="0"): def _export_condav(self, study, repertory, qlog, name="0"):
if qlog is not None: if qlog is not None:
@ -494,7 +493,7 @@ class Rubar3(CommandLineSolver):
for bc in bcs: for bc in bcs:
f.write(f"{len(bc)}\n") f.write(f"{len(bc)}\n")
for d0, d1 in bc.data: for d0, d1 in bc.data:
f.write(f"{d1} {d0}\n") f.write(f"{d0} {d1}\n")
class RubarBE(Rubar3): class RubarBE(Rubar3):

View File

@ -41,7 +41,7 @@ class BCETranslate(BCTranslate):
"BoundaryCondition", "Mage hydrograph file (*.HYD)") "BoundaryCondition", "Mage hydrograph file (*.HYD)")
self._dict["file_lim"] = _translate( self._dict["file_lim"] = _translate(
"BoundaryCondition", "Mage limnigraph file (*.LIM)") "BoundaryCondition", "Mage limnigraph file (*.LIM)")
self._dict["file_ava"] = _translate( self._dict["file_lim"] = _translate(
"BoundaryCondition", "Mage rating curve file (*.AVA)") "BoundaryCondition", "Mage rating curve file (*.AVA)")
self._dict["file_all"] = _translate( self._dict["file_all"] = _translate(
"BoundaryCondition", "All files (*)") "BoundaryCondition", "All files (*)")

View File

@ -314,10 +314,9 @@ class InitialConditionsWindow(PamhyrWindow):
def _import_from_results(self, results): def _import_from_results(self, results):
logger.debug(f"import from results: {results}") logger.debug(f"import from results: {results}")
self._table.import_from_results(results) self._table.import_from_results(row, results)
def _import_from_ini_file(self, file_name): def _import_from_ini_file(self, file_name):
logger.debug(f"import from INI file: {file_name}")
self._table.read_from_ini(file_name) self._table.read_from_ini(file_name)
def move_up(self): def move_up(self):