polaris.setup.setup_tasks

polaris.setup.setup_tasks(work_dir, task_list=None, numbers=None, config_file=None, machine=None, baseline_dir=None, component_path=None, suite_name='custom', cached=None, copy_executable=False, clean=False, model=None)[source]

Set up one or more tasks

Parameters:
  • work_dir (str) – A directory that will serve as the base for creating task directories

  • task_list (list of str, optional) – Relative paths for a tasks to set up

  • numbers (list of str, optional) – Task numbers to setup, as listed from polaris list, optionally with a suffix c to indicate that all steps in that task should be cached

  • config_file ({str, None}, optional) – Configuration file with custom options for setting up and running tasks

  • machine (str, optional) – The name of one of the machines with defined config options, which can be listed with polaris list --machines

  • baseline_dir (str, optional) – Location of baselines that can be compared to

  • component_path (str, optional) – The relative or absolute path to the location where the model and default namelists have been built

  • suite_name (str, optional) – The name of the suite if tasks are being set up through a suite or 'custom' if not

  • cached (list of list of str, optional) – For each task in tasks, which steps (if any) should be cached, or a list with “_all” as the first entry if all steps in the task should be cached

  • copy_executable (bool, optional) – Whether to copy the model executable to the work directory

  • clean (bool, optional) – Whether to delete the contents of the base work directory before setting up tasks

  • model (str, optional) – The model to run

Returns:

tasks (dict of polaris.Task) – A dictionary of tasks, with the relative path in the work directory as keys