runtraj.ProjectConfig#
- class runtraj.ProjectConfig(*, mets: dict[str, dict[str, typing.Any] | str]=<factory>, models: dict[str, dict[str, typing.Any] | None]=<factory>, stages: dict[str, dict[str, typing.Any]]=<factory>, variants: dict[str, dict[str, typing.Any] | None]=<factory>, execution: runtraj.execution.config.ExecutionConfig = <factory>, output: str = 'output') None[source]#
A project’s configuration, as read from
config.yaml.The file is blocks.
metsnames the meteorology,modelsthe transport models,stageswhat is made from each simulation’s results, andvariantswhat runs. A model’s or a stage’s block holds its settings, checked by its own config class: the defaults of every variant that uses it. Each variant names a met and a model, when there are several, and overrides some of the defaults; only the declared variants run. No setting sits at the top level: one written there is refused with a message that names its block. An unknown key is an error that names the nearest setting.
Parameters#
Parameter |
Description |
Default |
|---|---|---|
|
Meteorology by name, such as |
|
|
Transport models by name, each a block of its settings: the defaults of every variant that runs it. A block named |
|
|
What is made from each simulation’s results after the transport model runs, by name, each a block that gives the stage’s import path as |
|
|
Variants by name, each a set of overrides of the defaults. A variant’s own keys are |
|
|
Where the releases run and with what resources, such as |
|
|
Directory the results go to, relative to the project directory unless absolute. A URL such as |
|
Methods#
|
Load a project config from a YAML file. |
|
Return the met called name, checked by the met config of the transport model that reads it. |
|
This function is meant to behave like a BaseModel method to initialize private attributes. |
|
Return one |
|
Return the config as YAML, and write it to |