Ensemble: Continue to adapt results.

scenario-dev-pa
Pierre-Antoine 2026-08-28 16:15:59 +02:00
parent a1d85274b9
commit 7ef7bc13dc
3 changed files with 16 additions and 6 deletions

View File

@ -467,12 +467,15 @@ class Study(SQLModel):
progress()
if self.status.scenario.is_ensemble():
lst = [
self.scenarios, self._ens_functions,
self._river._ensembles,
]
for solv in self._river._results:
lst.append(self._river._results[solv])
self._save_submodel(
[
self.scenarios, self._ens_functions,
self._river._ensembles
],
data=progress
lst, data=progress
)
progress()
self.commit()

View File

@ -1522,7 +1522,7 @@ class Mage8(Mage):
@timer
def read_ensemble_bin(self, study, fname, tables, run_number, qlog=None):
logger.info(f"read_bin: Start reading '{fname}' ...")
logger.info(f"read_ensemble_bin: Start reading '{fname}' ...")
start = time.time()
with mage_file_open(fname, "r") as f:
@ -1577,6 +1577,8 @@ class Mage8(Mage):
# Data
newline()
ts = set()
tmp_table = {}
end = False
while not end:
@ -1594,6 +1596,8 @@ class Mage8(Mage):
tmp_table[key].append(data)
ts.add(timestamp)
endline()
end = newline().size <= 0
@ -1605,6 +1609,8 @@ class Mage8(Mage):
table, tables, run_number
)
tables["timestamps"] = ts
logger.info(f"reading time: '{time.time() - start}'")
def read_ensemble_bin_agregate_data(self, tables, res, run_number):

View File

@ -555,6 +555,7 @@ class SolverLogEnsWindow(SolverLogWindow):
)
results.set("table", table)
results.set("timestamps", tables["timestamps"])
return results