pisces.extensions.simulation.core.initial_conditions.load_ics#
- pisces.extensions.simulation.core.initial_conditions.load_ics(path: str | Path) InitialConditions[source]#
Load an initial conditions directory from its configuration file.
This function reads the
IC_CONFIG.yamlfile in the specified directory, inspects its metadata to determine the correctInitialConditionssubclass, and returns an instance of that class.- Parameters:
path (
strorPath) – Path to the initial conditions directory containing anIC_CONFIG.yamlfile.- Returns:
An instance of the appropriate subclass populated from the file.
- Return type:
- Raises:
FileNotFoundError – If the directory or its
IC_CONFIG.yamlfile does not exist.ValueError – If the configuration is invalid or the class cannot be resolved.