message_ix_models.project.engage.workflow.calc_budget

message_ix_models.project.engage.workflow.calc_budget(context: Context, scenario: Scenario, bdgt: float | str, method: float | Literal['calc'], type_emission='TCE') None[source]

Calculate and apply budget.

Adapted from engage.scenario_runner.ScenarioRunner.calc_budget(), with the following differences:

  • calc_hist_cum_CO2() above is called, instead of the method of the same name on ScenarioRunner.

  • scenario is an argument, not retrieved from the scen attribute of ScenarioRunner.

  • iam_units is used for unit conversion.

Todo

Fix confusing semantics, here and/or in the original; e.g. use a value argument and/or config class.

Parameters:
  • bdgt (float or str) – If method is “calc”, this must be the budget expressed as total gigatonnes of CO₂ for the period 2010–2100. Otherwise, the argument is ignored.

  • method (float or str) – Literal “calc” to calculate a constraint budget based on bdgt; otherwise, budget constraint value expressed as average Mt C-eq / a.