polaris.tasks.ocean.realistic_global.restart.Restart

class polaris.tasks.ocean.realistic_global.restart.Restart(component, subdir, mesh_name, mpaso_id, omega_id, ncells)[source]

A task that checks that splitting a run across a restart leaves the history output alone.

A full_run covers the whole period in one go. Two further steps cover the same period in two segments, the second continuing from the restart the first wrote and appending its frames to the history the first left behind. A validate step then checks that the two histories hold the same frames at the same times and the same state.

This is a regression test for Omega #482, where the continuing segment measured its history time axis from its own start rather than the simulation’s, so its first frame collided with the first frame already in the file and silently replaced the earlier half of the run.

__init__(component, subdir, mesh_name, mpaso_id, omega_id, ncells)[source]

Create the task

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

  • subdir (str) – The subdirectory for the task, to which restart will be appended

  • mesh_name (str) – The name of the mesh (e.g. QU.240km)

  • mpaso_id (int) – The ID of the MPAS-Ocean initial condition in the Polaris input database

  • omega_id (int) – The ID of the Omega initial condition in the Polaris input database

  • ncells (int) – The approximate number of cells in the mesh, used to constrain resources

Methods

__init__(component, subdir, mesh_name, ...)

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