uwtools.api.driver
API access to the uwtools driver base classes.
- class uwtools.api.driver.Assets(cycle=None, leadtime=None, config=None, key_path=None, schema_file=None, controller=None)
A driver.
- Parameters:
cycle (datetime | None) – The cycle.
leadtime (timedelta | None) – The leadtime.
config (dict | str | Path | YAMLConfig | None) – Path to config file (read stdin if missing or None).
key_path (list[YAMLKey] | None) – Keys of keys to driver config block.
schema_file (Path | None) – Path to schema file to use to validate an external driver.
controller (list[YAMLKey] | None) – Key(s) leading to block in config controlling run-time values.
- namelist_schema(config_keys=None, schema_keys=None)
Return the (sub)schema for validating the driver’s namelist content.
- taskname(suffix=None)
Return a common tag for task-related log messages.
- validate()
Validate the UW driver config.
- class uwtools.api.driver.AssetsCycleBased(cycle, config=None, key_path=None, schema_file=None, controller=None)
A driver.
- Parameters:
cycle (datetime) – The cycle.
config (dict | str | YAMLConfig | Path | None) – Path to config file (read stdin if missing or None).
key_path (list[YAMLKey] | None) – Keys of keys to driver config block.
schema_file (Path | None) – Path to schema file to use to validate an external driver.
controller (list[YAMLKey] | None) – Key(s) leading to block in config controlling run-time values.
- property cycle
The cycle.
- namelist_schema(config_keys=None, schema_keys=None)
Return the (sub)schema for validating the driver’s namelist content.
- taskname(suffix=None)
Return a common tag for task-related log messages.
- validate()
Validate the UW driver config.
- class uwtools.api.driver.AssetsCycleLeadtimeBased(cycle, leadtime, config=None, key_path=None, schema_file=None, controller=None)
A driver.
- Parameters:
cycle (datetime) – The cycle.
leadtime (timedelta) – The leadtime.
config (dict | str | YAMLConfig | Path | None) – Path to config file (read stdin if missing or None).
key_path (list[YAMLKey] | None) – Keys of keys to driver config block.
schema_file (Path | None) – Path to schema file to use to validate an external driver.
controller (list[YAMLKey] | None) – Key(s) leading to block in config controlling run-time values.
- property cycle
The cycle.
- property leadtime
The leadtime.
- namelist_schema(config_keys=None, schema_keys=None)
Return the (sub)schema for validating the driver’s namelist content.
- taskname(suffix=None)
Return a common tag for task-related log messages.
- validate()
Validate the UW driver config.
- class uwtools.api.driver.AssetsTimeInvariant(config=None, key_path=None, schema_file=None, controller=None)
A driver.
- Parameters:
config (dict | str | YAMLConfig | Path | None) – Path to config file (read stdin if missing or None).
key_path (list[YAMLKey] | None) – Keys of keys to driver config block.
schema_file (Path | None) – Path to schema file to use to validate an external driver.
controller (list[YAMLKey] | None) – Key(s) leading to block in config controlling run-time values.
- namelist_schema(config_keys=None, schema_keys=None)
Return the (sub)schema for validating the driver’s namelist content.
- taskname(suffix=None)
Return a common tag for task-related log messages.
- validate()
Validate the UW driver config.
- class uwtools.api.driver.Driver(cycle=None, leadtime=None, config=None, key_path=None, batch=False, schema_file=None, controller=None)
A driver.
- Parameters:
cycle (datetime | None) – The cycle.
leadtime (timedelta | None) – The leadtime.
config (dict | str | YAMLConfig | Path | None) – Path to config file (read stdin if missing or None).
key_path (list[YAMLKey] | None) – Keys of keys to driver config 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[YAMLKey] | None) – Key(s) leading to block in config controlling run-time values.
- 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=None)
Return a common tag for task-related log messages.
- validate()
Validate the UW driver config.
- class uwtools.api.driver.DriverCycleBased(cycle, config=None, key_path=None, batch=False, schema_file=None, controller=None)
A driver.
- Parameters:
cycle (datetime) – The cycle.
config (dict | str | YAMLConfig | Path | None) – Path to config file (read stdin if missing or None).
key_path (list[YAMLKey] | None) – Keys of keys to driver config 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[YAMLKey] | None) – Key(s) leading to block in config controlling run-time values.
- property cycle
The cycle.
- 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.
- abstractmethod 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=None)
Return a common tag for task-related log messages.
- validate()
Validate the UW driver config.
- class uwtools.api.driver.DriverCycleLeadtimeBased(cycle, leadtime, config=None, key_path=None, batch=False, schema_file=None, controller=None)
A driver.
- Parameters:
cycle (datetime) – The cycle.
leadtime (timedelta) – The leadtime.
config (dict | str | YAMLConfig | Path | None) – Path to config file (read stdin if missing or None).
key_path (list[YAMLKey] | None) – Keys of keys to driver config 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[YAMLKey] | None) – Key(s) leading to block in config controlling run-time values.
- property cycle
The cycle.
- property leadtime
The leadtime.
- 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.
- abstractmethod 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=None)
Return a common tag for task-related log messages.
- validate()
Validate the UW driver config.
- class uwtools.api.driver.DriverTimeInvariant(config=None, key_path=None, batch=False, schema_file=None, controller=None)
A driver.
- Parameters:
config (dict | str | YAMLConfig | Path | None) – Path to config file (read stdin if missing or None).
key_path (list[YAMLKey] | None) – Keys of keys to driver config 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[YAMLKey] | None) – Key(s) leading to block in config controlling run-time values.
- 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.
- abstractmethod 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=None)
Return a common tag for task-related log messages.
- validate()
Validate the UW driver config.