polaris.tasks.ocean.realistic_global.forward.task.swap_init_model
- polaris.tasks.ocean.realistic_global.forward.task.swap_init_model(task: Task, forward_step: Forward, mesh_name: str, init_steps: Dict[str, Step] | None, model: str) Tuple[Dict[str, Step] | None, str][source]
Switch a forward task to the configured ocean model’s init steps.
The task’s model-dependent init steps are swapped for the configured model’s, and its forward step reads its initial condition from them. A task without init steps, which runs from a cached initial condition, is left alone.
- Parameters:
task (polaris.Task) – The task, during
configure().forward_step (polaris.tasks.ocean.realistic_global.forward.forward.Forward) – The task’s forward step, whose initial condition reads the init steps.
mesh_name (str) – The name of the MPAS mesh.
init_steps (dict of {str: polaris.Step} or None) – The task’s init steps, for
model.model (str) – The ocean model
init_stepsare for.
- Returns:
init_steps (dict of {str: polaris.Step} or None) – The task’s init steps now.
model (str) – The ocean model they are for.