uwtools.api.chgres_cube

API access to the uwtools chgres_cube driver.

uwtools.api.chgres_cube.execute(task: str, cycle: datetime, config: Optional[Union[str, Path]] = None, batch: bool = False, dry_run: bool = False, graph_file: Optional[Union[str, Path]] = None, key_path: Optional[List[str]] = None, stdin_ok: bool = False) bool

Execute a task.

If batch is specified, a runscript will be written and submitted to the batch system. Otherwise, the executable will be run directly on the current system.

Parameters
  • task – The task to execute.

  • cycle – The cycle.

  • config – Path to config file (read stdin if missing or None).

  • batch – Submit run to the batch system?

  • dry_run – Do not run the executable, just report what would have been done.

  • graph_file – Write Graphviz DOT output here.

  • key_path – Path of keys to subsection of config file.

  • stdin_ok – OK to read from stdin?

Returns

True if task completes without raising an exception.

uwtools.api.chgres_cube.graph() str

Returns Graphviz DOT code for the most recently executed task.

uwtools.api.chgres_cube.tasks() Dict[str, str]

Returns a mapping from task names to their one-line descriptions.