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_outputand set entries for accounting AFOLU emissions of CO2.The function has the following effects on scen:
A
relationset member relation_name is added. However, no data for this relation is added or changed.A
levelset member level is added.For every member of set
land_scenario:Members with the same ID are added to both of the sets
commodityandtechnology. If suffix is given, it is appended to these added members.A
balance_equalityset member is added for the commodity and level.
Data in
land_outputare:Retrieved where
commodity=emissionaccording 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
inputfrom the respective commodities. This, combined with thebalance_equalitysetting, ensure that theACTof these technologies is exactly equal to the correspondingLAND.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. WithMETHOD.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.Bnow the default, the function no longer sets values ofrelation_activityorinput, and parameters constraint_value and glb_reg are ignored. To preserve the original behaviour, passMETHOD.A. (PR #354)- Parameters:
scen – Scenario to which changes should be applied.
relation_name – Name of a generic relation.
constraint_value – (
METHOD.Aonly) Passed toadd_CO2_emission_constraint.main().emission – Commodity name for filtering
land_outputdata. If not given, defaults to “LU_CO2” (METHOD.A) or “LU_CO2_orig” (METHOD.B).level – Level for added
land_outputdata.suffix – (
METHOD.Bonly) Suffix for added commodity and level names.method – A member of the
METHODenumeration.glb_reg – (
METHOD.Aonly) Region fornode_reldimension ofrelation_activityparameters.reg – Same as glb_reg.
- Raises:
ValueError – if there is no
land_outputdata forcommodity=emission.