polaris.landice.model.MaliModelStep
- class polaris.landice.model.MaliModelStep(component, name, subdir=None, indir=None, ntasks=None, min_tasks=None, openmp_threads=None, velocity_solver=None, albany_input_package=None, albany_input_filename='albany_input.yaml')[source]
A step for running MALI
- Variables:
velocity_solver (str or None) – MALI’s velocity solver (
config_velocity_solver), orNoneto use the one in the step’s namelist
- __init__(component, name, subdir=None, indir=None, ntasks=None, min_tasks=None, openmp_threads=None, velocity_solver=None, albany_input_package=None, albany_input_filename='albany_input.yaml')[source]
Make a step for running MALI
- Parameters:
component (polaris.Component) – the component that the step belongs to
name (str) – The name of the step
subdir (str, optional) – the subdirectory for the step. If neither this nor
indirare provided, the directory is thenameindir (str, optional) – the directory the step is in, to which
namewill be appendedntasks (int, optional) – the target number of tasks the step would ideally use
min_tasks (int, optional) – the number of tasks the step requires
openmp_threads (int, optional) – the number of OpenMP threads to use
velocity_solver (str, optional) – MALI’s velocity solver (
config_velocity_solver), for example'sia'or'FO'. By default, the step uses the one in its namelist.albany_input_package (str, optional) – The package with the Albany input file, required if
velocity_solveris one that Albany providesalbany_input_filename (str, optional) – The name of the Albany input file in
albany_input_package
Methods
__init__(component, name[, subdir, indir, ...])Make a step for running MALI
add_cf_check([filename])Check an output file for CF compliance after the step runs.
add_dependency(step[, name])Add step as a dependency of this step (i.e. this step can't run until the dependency has finished).
add_input_file([filename, target, database, ...])Add an input file to the step (but not necessarily to the MPAS model).
add_model_config_options(options[, config_model])Add the replacement model config options to be parsed when generating a namelist or yaml file if and when the step gets set up.
add_namelist_file(package, namelist)Add a file with updates to namelist options to the step to be parsed when generating a complete namelist file if and when the step gets set up.
add_output_file(filename[, validate_vars, ...])Add the output file to the step
add_property_check(filename, check_properties)Add a single conservation comparison for an output file
add_streams_file(package, streams[, ...])Add a streams file to the step to be parsed when generating a complete streams file if and when the step gets set up.
add_yaml_file(package, yaml[, ...])Add a file with updates to yaml config options to the step to be parsed when generating a complete yaml file if and when the step gets set up.
check_cf()Check the files added with
add_cf_check()for CF compliance.check_properties()Check conservation properties of the output files of this step.
constrain_resources(available_resources)Request GPUs if the step uses them, then constrain the step's resources to those available
dynamic_model_config(at_setup)Set the velocity solver, if one was given
map_yaml_configs(configs, config_model)A mapping between model config options from different models.
map_yaml_options(options, config_model)A mapping between model config options from different models.
map_yaml_streams(streams, config_model)A mapping between model streams from different models.
map_yaml_to_namelist(options)A mapping from yaml model config options to namelist options.
partition([graph_file])Partition the domain for the requested number of tasks
process_inputs_and_outputs()Process the model as an input, then call the parent class' version
run()Run the step.
runtime_setup()Update IO task model config options, make graph file, and partition graph file (if any of these are requested)
set_model_resources([ntasks, min_tasks, ...])Update the resources for the step.
set_resources([cpus_per_task, ...])Update the resources for the subtask.
set_shared_config(config[, link])Replace the step's config parser with the shared config parser
setup()Request GPUs if the step uses them, then set up the command-line arguments
update_io_tasks_config([config_model])Modify model config options so the number of IO tasks and the stride between them are consistent with how MPI tasks are distributed across nodes (one IO task per node).
update_namelist_pio([config_model])Deprecated alias for
update_io_tasks_config().validate_baselines()Compare variables between output files in this step and in the same step from a baseline run if one was provided.
work_path(*filenames)Get the absolute path to a file or directory in the step's work directory
Attributes
coresthe number of cores this step needs, in total
gpusthe number of GPUs this step needs, in total
may_span_nodeswhether this step's cores and GPUs may come from several nodes
min_coresthe number of cores this step needs in order to run at all
min_gpusthe number of GPUs this step requires, in total
Whether the step uses a velocity solver from Albany
Whether the step runs on GPUs