model.runtime.runners.grid_simulation_runner¶
Grid-based simulation runner for ADELM.
Module Contents¶
Classes¶
Forward-run ADELM on a spatial (lat x lon) grid. |
Data¶
API¶
- model.runtime.runners.grid_simulation_runner.log¶
‘getLogger(…)’
- class model.runtime.runners.grid_simulation_runner.GridSimulationRunner(config, model, site_ids=None, time_values=None, data=None)¶
Bases:
model.runtime.runners.base_runner.BaseRunnerForward-run ADELM on a spatial (lat x lon) grid.
Initialization
- classmethod from_config(config_path, config_overrides=None)¶
- set_training_domain(domain)¶
Restrict the run to an explicit set of routing cells (a basin domain).
domainis the dict from :func:model.environment.river_network.build_training_domain. When set, the land/forcing grid is loaded only on these cells, in the domain order, and the domain’s routing geometry is used (instead of all catchments in the bounding box). Used by the routing-calibration learning runner.
- bind_grid_static_inputs()¶
- load_grid_static_inputs()¶
- load_grid_static()¶
- load_static()¶
- run(year_start=None, month_start=None, year_end=None, month_end=None, output_dir=None, checkpoint_dir=None, resume_from=None, save_outputs=True)¶
Run the forward model over the spatial grid, stepping month by month.
Resolves the run window from arguments or config, optionally resumes from a monthly checkpoint or runs spinup cycles, then iterates over each month: loads that month’s gridded drivers, runs the forward model on the flattened valid pixels, and writes daily/monthly outputs and an end-of-month state checkpoint.
Parameters
year_start, month_start, year_end, month_end : int, optional Run window bounds; default to the
grid_simulation.timeconfig. output_dir, checkpoint_dir : str, optional Output and checkpoint directories; default to config-derived paths. resume_from : str, optional Checkpoint to restart prognostic states from. save_outputs : bool Whether to write output NetCDF files (setFalsefor spinup-only).
- model.runtime.runners.grid_simulation_runner.__all__¶
[‘GridSimulationRunner’]