uwtools.api.sfc_climo_gen
API access to the uwtools sfc_climo_gen driver.
- class uwtools.api.sfc_climo_gen.SfcClimoGen(config=None, dry_run=False, key_path=None, batch=False, schema_file=None, controller=None)
A driver for sfc_climo_gen.
- Parameters:
config (dict | str | YAMLConfig | Path | None) – Path to config file (read stdin if missing or None).
dry_run (bool) – Run in dry-run mode?
key_path (list[str] | None) – Keys leading through the config to the driver’s configuration block.
batch (bool) – Run component via the batch system?
schema_file (Path | None) – Path to schema file to use to validate an external driver.
controller (list[str] | None) – Key(s) leading to block in config controlling run-time values.
- namelist_file()
The namelist file.
- namelist_schema(config_keys=None, schema_keys=None)
Return the (sub)schema for validating the driver’s namelist content.
- property output: dict[str, str] | dict[str, list[str]]
Returns a description of the file(s) created when this component runs.
- provisioned_rundir()
Run directory provisioned with all required content.
- run()
A run.
- runscript()
The runscript.
- show_output()
Show the output to be created by this component.
- taskname(suffix)
Return a common tag for task-related log messages.
- validate()
Validate the UW driver config.
- uwtools.api.sfc_climo_gen.execute(task, config=None, batch=False, dry_run=False, graph_file=None, key_path=None, schema_file=None, stdin_ok=False)
Execute a task.
If
batchis 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 (str) – The task to execute.
config (str | Path | None) – Path to config file (read stdin if missing or None).
batch (bool) – Submit run to the batch system?
dry_run (bool) – Do not run the executable, just report what would have been done.
graph_file (str | Path | None) – Write Graphviz DOT output here.
key_path (list[str] | None) – Path of keys to subsection of config file.
schema_file (str | Path | None) – The JSON Schema file to use for validation.
stdin_ok (bool) – OK to read from stdin?
- Returns:
Trueif task completes without raising an exception.- Return type:
- uwtools.api.sfc_climo_gen.graph()
Return Graphviz DOT code for the most recently executed task.
- Return type: