Attention
This project is still in an early phase of development.
The python API is not yet stable, and some aspects of the schema for the blueprint and workplan will likely evolve. Therefore whilst you are welcome to try out using the package, we cannot yet guarantee backwards compatibility. We expect to reach a more stable version in 2026.
cstar.roms.ROMSSimulation.from_dict#
- classmethod ROMSSimulation.from_dict(simulation_dict: dict, directory: str | Path, start_date: str | datetime | None = None, end_date: str | datetime | None = None)#
Create a ROMSSimulation instance from a dictionary representation.
- Parameters:
simulation_dict (dict) – A dictionary containing the serialized attributes of a ROMSSimulation.
directory (str or Path) – The directory where the simulation data should be stored.
start_date (str or datetime, optional) – The start date of the simulation. If not provided, it will be attempted to be inferred.
end_date (str or datetime, optional) – The end date of the simulation. If not provided, it will be attempted to be inferred.
- Returns:
ROMSSimulation – An initialized ROMSSimulation instance.
- Raises:
ValueError – If essential keys such as ‘discretization’ or ‘runtime_code’ are missing.
NotImplementedError – If compile_time_code is not provided, as it is currently required.
See also
to_dictSerializes a ROMSSimulation instance into a dictionary.
from_blueprintCreates a ROMSSimulation from a YAML blueprint file.