message_ix_models.tools.add_AFOLU_CO2_accounting.add_AFOLU_CO2_accounting

message_ix_models.tools.add_AFOLU_CO2_accounting.add_AFOLU_CO2_accounting(scen: Scenario, relation_name: str, constraint_value: float | None = None, emission: str | None = None, level: str = 'LU', suffix: str = '', *, method: METHOD = METHOD.B, **kwargs) None[source]

Add land_output and set entries for accounting AFOLU emissions of CO2.

The function has the following effects on scen:

  1. A relation set member relation_name is added. However, no data for this relation is added or changed.

  2. A level set member level is added.

  3. For every member of set land_scenario:

    1. Members with the same ID are added to both of the sets commodity and technology. If suffix is given, it is appended to these added members.

    2. A balance_equality set member is added for the commodity and level.

  4. Data in land_output are:

    • Retrieved where commodity=emission according to parameter emission.

    • Modified to set level, value 1.0, unit “%”, and replace the commodity label with {land_scenario}{suffix}, using the value of land_scenario from the respective row.

    • Added to scen.

This structure and data interact with other data whereby:

  • The technologies added in 3(a) receive input from the respective commodities. This, combined with the balance_equality setting, ensure that the ACT of these technologies is exactly equal to the corresponding LAND.

  • The technologies in turn have entries into a relation that is used for other purposes.

With method = METHOD.A, add_par_A() is called to add these data. With METHOD.B (the default), this is not done, and those other entries must already be present in scen.

This complicated setup is required, because land-use scenarios only have a single entry in the emission factor TCE, which is the sum of all land-use related emissions.

Changed in version NEXT-RELEASE: With method METHOD.B now the default, the function no longer sets values of relation_activity or input, and parameters constraint_value and glb_reg are ignored. To preserve the original behaviour, pass METHOD.A. (PR #354)

Parameters:
  • scen – Scenario to which changes should be applied.

  • relation_name – Name of a generic relation.

  • constraint_value – (METHOD.A only) Passed to add_CO2_emission_constraint.main().

  • emission – Commodity name for filtering land_output data. If not given, defaults to “LU_CO2” (METHOD.A) or “LU_CO2_orig” (METHOD.B).

  • level – Level for added land_output data.

  • suffix – (METHOD.B only) Suffix for added commodity and level names.

  • method – A member of the METHOD enumeration.

  • glb_reg – (METHOD.A only) Region for node_rel dimension of relation_activity parameters.

  • reg – Same as glb_reg.

Raises:

ValueError – if there is no land_output data for commodity=emission.