polaris.tasks.ocean.Ocean
- class polaris.tasks.ocean.Ocean[source]
The collection of all test case for the MPAS-Ocean core
- Variables:
model (str) – The ocean model being used, either ‘mpas-ocean’, ‘omega’, or ‘unknown’ if no OceanModelStep or OceanIOStep is present in any task
mpaso_to_omega_dim_map (dict) – A map from MPAS-Ocean dimension names to their Omega equivalents
mpaso_to_omega_var_map (dict) – A map from MPAS-Ocean variable names to their Omega equivalents
horiz_mesh_vars (list of str) – Variables that belong in the horizontal mesh file rather than the initial condition file
vert_coord_vars (list of str) – Variables that belong in the vertical coordinate file (Omega only) rather than the initial condition file
Methods
__init__()Construct the collection of MPAS-Ocean test cases
add_config(config)Add a shared config to the component
add_step(step)Add a step to the component
add_task(task)Add a task to the component
configure(config, tasks)Configure the component
get_available_resources()Get available resources from the active parallel system
get_or_create_shared_step(step_cls, subdir, ...)Get a shared step from the component if it exists, otherwise create and add it.
If the model is Omega, rename dimensions and variables in a dataset from their Omega names to the MPAS-Ocean equivalent (appropriate for datasets that are output from the model)
If the model is Omega, rename dimensions and variables in a dataset from their MPAS-Ocean names to the Omega equivalent (appropriate for input datasets like an initial condition)
map_var_list_from_native_model(var_list)If the model is Omega, rename variables from their Omega names to the MPAS-Ocean equivalent
map_var_list_to_native_model(var_list)If the model is Omega, rename variables from their MPAS-Ocean names to the Omega equivalent (appropriate for validation variable lists)
open_model_dataset(filename, config[, ...])Open the given dataset, mapping variable and dimension names from Omega to MPAS-Ocean names if appropriate
remove_horiz_mesh_vars(ds)Remove horizontal mesh variables from a dataset.
remove_step(step)Remove the given step from this component
remove_vert_coord_vars(ds)Remove vertical coordinate variables from a dataset.
run_parallel_command(args, cpus_per_task, ...)Run a command using the active parallel system
set_parallel_system(config)Construct and store the active parallel system for this component
write_horiz_mesh_dataset(ds, filename, config)Write a horizontal mesh dataset, validating that all expected mesh variables are present.
write_initial_state_dataset(ds, filename, config)Write an initial-state dataset, omitting horizontal mesh fields and (for Omega) vertical coordinate fields.
write_model_dataset(ds, filename, config)Write out the given dataset, mapping dimension and variable names from MPAS-Ocean to Omega names if appropriate
write_vert_coord_dataset(ds, filename, config)Write a vertical-coordinate dataset for Omega's
InitialVertCoordstream.