Skip to content

Dev#14

Open
mrustl wants to merge 5 commits into
mainfrom
dev
Open

Dev#14
mrustl wants to merge 5 commits into
mainfrom
dev

Conversation

@mrustl
Copy link
Copy Markdown
Member

@mrustl mrustl commented Jun 3, 2026

No description provided.

claude added 5 commits June 3, 2026 12:28
ET0 fix: both full workflows now divide the daily ET0 by its interval in hours
(period_et = 24) before writing //Kurven/ET0, mirroring the rain conversion.
The kernel reads the ET0 curve as a mm/h rate, so unconverted daily values were
integrated 24x too high.

RAM: run_one() now thins each run to its single optimisation row immediately
(get_simulation_results_optim(lean = TRUE) + add_overflow_events_and_waterbalance)
and returns it; run_scenarios() collects the one-row tibbles and the analyse
chunk just binds them. This removes the get_simulation_results_optim_parallel()
pass that loaded every run's full time series into memory at once. New 'lean'
arg on get_simulation_results_optim() reads only the fields the optimisation
summary needs (element rates + both water balances), nulling states/meta/
connected-area rates; its intro message is gated behind debug.
Apply the same memory fix as Wien/BadAussee: run_one() now thins each run to
its optimisation row immediately (get_simulation_results_optim(lean = TRUE) +
add_overflow_events_and_waterbalance) and returns it; run_scenarios() collects
the rows and the analyse chunk binds them, replacing the
get_simulation_results_optim_parallel() pass that held every run's full time
series at once. No ET0 unit change here: the Eisenstadt workflows use the
base.h5 constant ET0 placeholder (0.2 mm/h) and the template rain (already
mm/h), so there is no mm/d daily series to convert.
Summary page linking the per-site brute-force outputs (workflow html, result
tables, CSVs, interactive plots). Added to .Rbuildignore so R CMD check does
not build/execute it; render it manually into the assembled results directory.
Result-file links match each workflow's paths$modelname (Wien, BadAussee,
Eisenstadt_2005).
Since the workflows now thin per run inside run_one(), reading happens inside
the future_lapply batch. A result file that exists but cannot be opened/read
(engine crashed mid-write for a scenario, or a transient lock) previously threw
H5File.open() 'unable to open file' and aborted the whole render at the
run_model chunk. Wrap the open+read in an inner function (own on.exit for handle
cleanup) plus tryCatch: such a file is now treated like a missing one -- warn,
name the scenario, return NULL -- so add_overflow_events_and_waterbalance()
emits an NA row and the batch completes.
R CMD check failed with a codoc WARNING because the .Rd still documented the
old signature (no 'lean'). Regenerate the usage block and add the \item{lean}
documentation to match R/get_simulation_results_optim.R (devtools::document()
equivalent), clearing the only WARNING (the 3 NOTEs are pre-existing).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants