Skip to content

constants

aggregate_root(run_mode: str) -> Path

Aggregation working directory for the given run mode.

Source code in src/climate_data/constants.py
def aggregate_root(run_mode: str) -> Path:
    """Aggregation working directory for the given run mode."""
    if run_mode == "forecast":
        return RRA_ROOT / "climate-aggregates"
    if run_mode == "historical":
        return model_root("historical") / "aggregates"
    msg = f"Unknown run_mode {run_mode!r}; expected one of {list(RUN_MODES)}"
    raise ValueError(msg)

model_root(run_mode: str) -> Path

Downscaling working directory for the given run mode.

Source code in src/climate_data/constants.py
def model_root(run_mode: str) -> Path:
    """Downscaling working directory for the given run mode."""
    try:
        return _MODEL_ROOTS[run_mode]
    except KeyError:
        msg = f"Unknown run_mode {run_mode!r}; expected one of {list(RUN_MODES)}"
        raise ValueError(msg) from None