pisces.extensions.simulation.core.initial_conditions.InitialConditions.__init__#

InitialConditions.__init__(directory: str | Path)[source]#

Load an existing set of initial conditions from a target directory.

This base initializer is responsible for:

  1. Normalizing and storing the target directory path.

  2. Verifying that the directory exists and is a valid directory on disk.

  3. Locating and loading the IC_CONFIG.yaml file associated with the

initial condition set.

  1. Initializing the internal ConfigManager for accessing and

modifying configuration data.

  1. Running the default configuration validation via

_validate_configuration.

Parameters:

directory (str or pathlib.Path) – Filesystem path to an existing initial condition directory that contains a valid IC_CONFIG.yaml file.

Raises:
  • FileNotFoundError – If the provided directory does not exist or is not a directory.

  • FileNotFoundError – If no IC_CONFIG.yaml file is found in the specified directory.

  • ValueError – If the configuration file exists but is structurally invalid.

Notes

  • Subclasses overriding __init__ should call super().__init__(directory) to ensure the configuration is loaded and validated before performing subclass-specific setup.

  • The loaded configuration is stored in config, a ConfigManager instance, and the absolute directory path is available as directory.