environmentaltools.common.write_swan_input
- environmentaltools.common.write_swan_input(case_index: int, time_index, case_id: str, data, params: dict, mesh: str = 'global', local: bool = False, nested: bool = False)[source]
Write SWAN wave model input files.
Creates initialization and input files for the SWAN (Simulating WAves Nearshore) model for a specific case.
- Parameters:
case_index (int) – Sequential case number (0-based index).
time_index – Timestamp from the data index for this case.
case_id (str) – String identifier for this case (e.g., ‘0001’, ‘0002’).
data (pd.DataFrame) – Time series of boundary condition data.
params (dict) – Dictionary with model parameters including: - directory: Root directory for output files - Mesh configuration parameters - Wave and wind parameters
mesh (str, optional) – Mesh type identifier (‘global’ or ‘local’). Defaults to ‘global’.
local (bool, optional) – Whether to use local mesh configuration. Defaults to False.
nested (bool, optional) – Whether to enable nested grid mode. Defaults to False.