polaris.tasks.ocean.realistic_global.forward.task.RealisticGlobalForward

class polaris.tasks.ocean.realistic_global.forward.task.RealisticGlobalForward(component, mesh_name: str, init_condition: InitialCondition, subdir_name: str = 'forward', init_steps: Dict[str, Step] | None = None, time_integrator: str = 'split_explicit')[source]

A short forward run of the configured ocean model for a realistic global ocean simulation on one MPAS mesh.

The task runs a single Forward step (short, a brief smoke test) whose duration and cadence come from the [realistic_global_forward] config section, with any per-mesh overrides applied on top. Each mesh has a split_explicit variant of the task, which uses the default split time stepping, and an rk4 variant, which adds rk4.cfg on top of the per-mesh options to run RK4 in both models. The target model is resolved from [ocean] model during component setup. Two diagnostic steps that are not run by default follow it: global_stats plots time series of the run’s global statistics, and viz plots global maps of its state.

Where the model’s input files come from is the initial condition’s business, not the task’s, which is what lets one task cover two rather different costs. A StepInitialCondition consumes the outputs of the shared realistic_global/init steps, which the caller passes as init_steps so the task is runnable end to end; a DatabaseInitialCondition downloads a cached initial condition and needs no upstream steps at all.

Variables:
  • mesh_name (str) – The name of the MPAS mesh.

  • time_integrator (str) – The variant of the task, 'split_explicit' or 'rk4'.

__init__(component, mesh_name: str, init_condition: InitialCondition, subdir_name: str = 'forward', init_steps: Dict[str, Step] | None = None, time_integrator: str = 'split_explicit')[source]

Create the task.

Parameters:
  • component (polaris.tasks.ocean.Ocean) – The ocean component the task belongs to.

  • mesh_name (str) – The name of the MPAS mesh (e.g. 'icos240km').

  • init_condition (InitialCondition) – The source of the model input files.

  • subdir_name (str, optional) – The name of the task’s directory under the mesh. It also keeps two tasks on the same mesh apart when they differ only in where their initial condition comes from.

  • init_steps (dict of polaris.Step, optional) – Shared upstream steps to add to the task, keyed by the symlink name to give them. Needed when init_condition consumes their outputs, and left unset for a source that does not.

  • time_integrator (str, optional) – The variant of the task, one of TIME_INTEGRATORS: the default split time stepping or RK4 in both models. It is also the name of the task’s directory under subdir_name.

Methods

__init__(component, mesh_name, init_condition)

Create the task.

add_step([step, subdir, symlink, run_by_default])

Add a step to the task and component (if not already present)

configure()

Modify the configuration options for this task.

remove_step(step)

Remove the given step from this task and the component

set_shared_config(config[, link])

Replace the task's config parser with the shared config parser