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:
Returns:

  • init_steps (dict of {str: polaris.Step} or None) – The task’s init steps now.

  • model (str) – The ocean model they are for.