S2-CON
Scope 2 Consolidation
1. Identity
Depends on module:
Purpose
Normalizes and consolidates Scope 2 emissions into canonical outputs for:
- location-based Scope 2 (
scope2_location) - market-based Scope 2 (
scope2_market) when available/derivable
This engine is a wrapper/entry point that ensures Scope 2 values are consistent and, when needed, delegates methodological conversion to MEID_CALC_GHG_SCOPE2_ADJ.
2. Contract References (ZAR)
2.1. Input Schema
ZAR Address: schema.compute.ghg.scope2.inputs.v1_0_0
Required conceptual fields:
scope2_location: scalar or time-series (recommended as authoritative)scope2_market: optional scalar or time-seriestarget_method:LOCATION|MARKET|BOTH(defaultBOTH)alignment:BY_YEAR|BY_INDEX(defaultBY_YEAR)
Optional (needed for derivation):
electricity_consumptioninstrument_portfolio
2.2. Options Schema
ZAR Address: schema.compute.ghg.scope2.options.v1_0_0
Common options:
derive_market_if_missing: boolean (default false)residual_mix_policy:DEFAULT_GRID|COUNTRY_RESIDUAL|ERRORmissing_policy:ERROR|SKIProunding: optional digits
2.3. Output Schema
ZAR Address: schema.compute.ghg.scope2.output.v1_0_0
Outputs include:
ghg_scope2_locationghg_scope2_market(if available/derived)ghg_scope2_selected(depends ontarget_method)metadata(derivation flags, source method, coverage)
3. Accepted Input Shapes
A. Location only
{
"scope2_location": [[2025, 800]],
"target_method": "LOCATION"
}
B. Location + market provided
{
"scope2_location": [[2025, 800]],
"scope2_market": [[2025, 600]],
"target_method": "BOTH"
}
C. Derive market from electricity + instruments
{
"scope2_location": [[2025, 800]],
"electricity_consumption": [[2025, 100000]],
"instrument_portfolio": [
{ "type": "EAC", "volume_mwh": 40000, "emission_factor": 0.0 }
],
"target_method": "MARKET"
}
4. Compute Semantics (Normative)
For each period :
4.1 Location value
4.2 Market value
- If
scope2_marketis provided:
- Else if
derive_market_if_missing = trueand sufficient inputs are provided:- Delegate to
MEID_CALC_GHG_SCOPE2_ADJto derive . - Record derivation details in metadata.
- Delegate to
4.3 Selected output
If target_method = LOCATION:
If target_method = MARKET:
If target_method = BOTH, S2_selected MUST be omitted or set to null, and both series are returned.
5. Validation & Error Model
Invariants
- Location-based input is required (v1 default governance)
- Values must be finite
- Market derivation requires electricity consumption and either instruments and/or residual mix availability
Error codes (suggested)
SCOPE2_LOCATION_REQUIREDSCOPE2_MARKET_MISSING_AND_NOT_DERIVABLESCOPE2_ALIGNMENT_MISMATCHSCOPE2_NON_FINITE_VALUE
6. Dependencies
MEID_CALC_GHG_SCOPE2_ADJ(optional, for derivation)- Schema resolver (ZAR)
- Residual mix datasets (if deriving)
Declared via ZAR dependencies.
7. Methods Served (v1)
GHG.scope2.abs(selected method)GHG.scope2.location.absGHG.scope2.market.abs