Read Raindrop optimisation simulation results from HDF5 (parallel via future.apply + progress)
Source:R/get_simulation_results_optim_parallel.R
get_simulation_results_optim_parallel.RdParallel variant of get_simulation_results_optim() using
future.apply::future_lapply() including optional progress reporting
via progressr.
Usage
get_simulation_results_optim_parallel(
paths,
path_list,
simulation_names,
debug = TRUE,
workers = NULL,
show_progress = TRUE,
future_seed = TRUE,
progress_handler = progressr::handler_txtprogressbar
)Arguments
- paths
A list of path definitions. Used for messaging and expected to contain
file_results_hdf5_elementandfile_results_hdf5_flaeche(file names). Note: within the loop,pathsis overwritten by the resolved paths for the current simulation run.- path_list
A list passed to
kwb.utils::resolve()to generate run-specific paths (must yieldpath_results_hdf5_element,path_results_hdf5_flaeche, anddir_target_output).- simulation_names
Character vector of simulation run identifiers (e.g.
c("s00001", "s00002")).- debug
print debug messages (default: TRUE)
- workers
Optional number of parallel workers. If not NULL, a temporary
future::multisessionplan is set.- show_progress
Logical (default TRUE).
- future_seed
Passed to
future.apply::future_lapply().- progress_handler
A progressr handler function (default:
progressr::handler_txtprogressbar). If NULL, no handler is set.
Value
Named list (see get_simulation_results_optim). As with
the non-parallel sibling, the entry for a run is NULL only when the
element HDF5 is missing; a missing connected-area HDF5 yields a partial
result with connected_area = NULL.