Skip to content

data

FloodingData

Class to handle flooding data.

Source code in src/idd_forecast_mbp/data.py
class FloodingData:
    """
    Class to handle flooding data.
    """

    def __init__(self, root: str | Path = rfc.MODEL_ROOT):
        self._root = Path(root)

    @property
    def root(self) -> Path:
        """
        Returns the root path of the flooding data.
        """
        return self._root

    @property
    def logs(self) -> Path:
        """
        Returns the path to the logs directory.
        """
        return self.root / "logs"

    def log_dir(self, step_name: str) -> Path:
        return self.logs / step_name

    @property
    def raw_root(self) -> Path:
        """
        Returns the path to the CaMa-Flood root directory.
        """
        return self.root / "01-raw_data"

    @property
    def processed_root(self) -> Path:
        """
        Returns the path to the CaMa-Flood root directory.
        """
        return self.root / "02-processed_data"

    @property
    def modeling_root(self) -> Path:
        """
        Returns the path to the CaMa-Flood root directory.
        """
        return self.root / "03-modeling_data"

    @property
    def forecasting_root(self) -> Path:
        """
        Returns the path to the CaMa-Flood root directory.
        """
        return self.root / "04-forecasting_data"

forecasting_root: Path property

Returns the path to the CaMa-Flood root directory.

logs: Path property

Returns the path to the logs directory.

modeling_root: Path property

Returns the path to the CaMa-Flood root directory.

processed_root: Path property

Returns the path to the CaMa-Flood root directory.

raw_root: Path property

Returns the path to the CaMa-Flood root directory.

root: Path property

Returns the root path of the flooding data.