mirror of https://gitlab.com/pamhyr/pamhyr2
Compare commits
2 Commits
7d42c164fc
...
706a900c8e
| Author | SHA1 | Date |
|---|---|---|
|
|
706a900c8e | |
|
|
da03f39425 |
|
|
@ -74,10 +74,10 @@ class Rubar3(CommandLineSolver):
|
|||
("rubarbe_tf_5", "y"),
|
||||
("rubarbe_tf_6", "n"),
|
||||
("rubarbe_trased", "y"),
|
||||
("rubarbe_optfpc", "0"),
|
||||
("rubarbe_ros", "2650.0"),
|
||||
("rubarbe_dm", "0.1"),
|
||||
("rubarbe_segma", "1.0"),
|
||||
#("rubarbe_optfpc", "0"),
|
||||
#("rubarbe_ros", "2650.0"),
|
||||
#("rubarbe_dm", "0.1"),
|
||||
#("rubarbe_segma", "1.0"),
|
||||
# Sediment parameters
|
||||
("rubarbe_sediment_ros", "2650.0"),
|
||||
("rubarbe_sediment_por", "0.4"),
|
||||
|
|
@ -167,7 +167,7 @@ class Rubar3(CommandLineSolver):
|
|||
it = iter(params)
|
||||
|
||||
line = 0
|
||||
while line < 29:
|
||||
while line < 25:
|
||||
param = next(it)
|
||||
name = param.name
|
||||
value = param.value
|
||||
|
|
@ -277,19 +277,20 @@ class Rubar3(CommandLineSolver):
|
|||
|
||||
f.write(f"{ind:>4} {rk:>11.3f} {n_points:>4}\n")
|
||||
|
||||
for point in profile.points:
|
||||
station = profile.get_station()
|
||||
for i, point in enumerate(profile.points):
|
||||
label = point.name.lower()
|
||||
if label != "":
|
||||
if label[0] == "r":
|
||||
label = label[1].upper()
|
||||
else:
|
||||
label = label[1].upper()
|
||||
label = " "
|
||||
else:
|
||||
label = " "
|
||||
|
||||
y = point.y
|
||||
y = station[i]
|
||||
z = point.z
|
||||
dcs = 0.001
|
||||
dcs = 1.0
|
||||
scs = 1.0
|
||||
tmcs = 0.0
|
||||
|
||||
|
|
@ -444,10 +445,10 @@ class Rubar3(CommandLineSolver):
|
|||
z = data[profile.rk][0]
|
||||
q = data[profile.rk][1]
|
||||
|
||||
# height = z - profile.z_min()
|
||||
height = z - profile.z_min()
|
||||
speed = profile.speed(q, z)
|
||||
|
||||
return z, speed
|
||||
return height, speed
|
||||
|
||||
def _export_hydro(self, study, repertory, qlog, name="0"):
|
||||
if qlog is not None:
|
||||
|
|
@ -470,7 +471,7 @@ class Rubar3(CommandLineSolver):
|
|||
for bc in bcs:
|
||||
f.write(f"{len(bc)}\n")
|
||||
for d0, d1 in bc.data:
|
||||
f.write(f"{d0} {d1}\n")
|
||||
f.write(f"{d1} {d0}\n")
|
||||
|
||||
def _export_condav(self, study, repertory, qlog, name="0"):
|
||||
if qlog is not None:
|
||||
|
|
@ -493,7 +494,7 @@ class Rubar3(CommandLineSolver):
|
|||
for bc in bcs:
|
||||
f.write(f"{len(bc)}\n")
|
||||
for d0, d1 in bc.data:
|
||||
f.write(f"{d0} {d1}\n")
|
||||
f.write(f"{d1} {d0}\n")
|
||||
|
||||
|
||||
class RubarBE(Rubar3):
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ class BCETranslate(BCTranslate):
|
|||
"BoundaryCondition", "Mage hydrograph file (*.HYD)")
|
||||
self._dict["file_lim"] = _translate(
|
||||
"BoundaryCondition", "Mage limnigraph file (*.LIM)")
|
||||
self._dict["file_lim"] = _translate(
|
||||
self._dict["file_ava"] = _translate(
|
||||
"BoundaryCondition", "Mage rating curve file (*.AVA)")
|
||||
self._dict["file_all"] = _translate(
|
||||
"BoundaryCondition", "All files (*)")
|
||||
|
|
|
|||
|
|
@ -314,9 +314,10 @@ class InitialConditionsWindow(PamhyrWindow):
|
|||
|
||||
def _import_from_results(self, results):
|
||||
logger.debug(f"import from results: {results}")
|
||||
self._table.import_from_results(row, results)
|
||||
self._table.import_from_results(results)
|
||||
|
||||
def _import_from_ini_file(self, file_name):
|
||||
logger.debug(f"import from INI file: {file_name}")
|
||||
self._table.read_from_ini(file_name)
|
||||
|
||||
def move_up(self):
|
||||
|
|
|
|||
Loading…
Reference in New Issue