message_ix_models.model.bmt.config.apply_bmt_config
- message_ix_models.model.bmt.config.apply_bmt_config(context: Context, path: Path | None = None) None[source]
Load BMT configuration file into context (bmt, buildings, macro, transport).
The file given by path must be in YAML format and have the top-level keys:
model_name: "..." buildings: # ... macro: "..." materials: # Optional # ... transport: # Optional # ...
All data from the file is stored at the key
context.bmtas adict. The function then sets or converts other values:context.buildings: an instance ofConfig(includingConfig.data_paths, :attr`~code`` for STURM, etc.) from thebuildingsmapping.context.macro:macrostring (macro calibration workbook).context.transport: and instance oftransport.config.Configusingfrom_context(), with the YAMLtransportmapping passed as options (e.g.code: "M SSP2").Note
The
context.transportkey must be an instance of that class, becausemodel.transportcode expects its various attributes.
- Parameters:
path – Configuration file path. If not given, defaults to
data/bmt/config.yaml. This file must be in YAML format has top-leve