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
Forwardstep (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 asplit_explicitvariant of the task, which uses the default split time stepping, and anrk4variant, which addsrk4.cfgon top of the per-mesh options to run RK4 in both models. The target model is resolved from[ocean] modelduring component setup. Two diagnostic steps that are not run by default follow it:global_statsplots time series of the run’s global statistics, andvizplots 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
StepInitialConditionconsumes the outputs of the sharedrealistic_global/initsteps, which the caller passes asinit_stepsso the task is runnable end to end; aDatabaseInitialConditiondownloads a cached initial condition and needs no upstream steps at all.- Variables:
- __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_conditionconsumes 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 undersubdir_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