rubem.api.RunResult

class RunResult(output_directory, rasters, time_series, metadata, first_step, last_step, elapsed_seconds)[source]

Bases: object

What a finished run wrote, enumerated from the configuration.

The paths are derived from the configuration and the naming rules of the model, never from a listing of the output directory, so a result describes the run that produced it even when the directory holds the outputs of earlier runs as well. They are absolute, so a result of an isolated run names the same files whatever the caller does with its working directory afterwards.

Parameters:
  • output_directory (Path) – Directory the run wrote to.

  • rasters (dict[str, tuple[Path, ...]]) – Raster members per variable id, the PCRaster series in step order followed by the GeoTIFF series in step order, restricted to the enabled formats.

  • time_series (dict[str, tuple[Path, ...]]) – Time series tables per variable id, the CSV table followed by the PCRaster TSS table, restricted to the enabled formats. Empty when the run writes no time series. The zones_mapping.csv a run aggregated over zones writes is not listed: it belongs to the aggregation, not to a variable.

  • metadata (Path | None) – The metadata.json of a format 1.0 run, None for a legacy configuration, which has no metadata section.

  • first_step (int) – First simulated time step.

  • last_step (int) – Last simulated time step.

  • elapsed_seconds (float) – Wall-clock duration of the run itself. An isolated run measures the simulation inside its subprocess, not the interpreter start-up the call also pays.

Methods

Attributes

output_directory

rasters

time_series

metadata

first_step

last_step

elapsed_seconds