Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 38 additions & 1 deletion SWEET_python/MODEL_DECISIONS.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ Where the code applies a decision, a one-line comment names it:
| [`combustion-reject`](#combustion-reject) | Diversion | fixed value | medium |
| [`other-treatment-shares-landfilled`](#other-treatment-shares-landfilled) | Diversion | simplification | low |
| [`diversion-defaults`](#diversion-defaults) | Diversion | fallback | low |
| [`china-treatment-split-2020`](#china-treatment-split-2020) | Diversion | fixed value | low |
| [`city-treatment-buckets`](#city-treatment-buckets) | Diversion | method choice | low |
| [`diversion-eligibility`](#diversion-eligibility) | Diversion | fixed value | medium |
| [`diversion-rejects`](#diversion-rejects) | Diversion | fixed value | low |
Expand All @@ -109,6 +110,7 @@ Where the code applies a decision, a one-line comment names it:
| [`methane-potential-by-waste-type`](#methane-potential-by-waste-type) | Decay model | fixed value | high |
| [`oxidation`](#oxidation) | Decay model | fallback | medium |
| [`gas-capture-efficiency`](#gas-capture-efficiency) | Decay model | fallback | medium |
| [`default-landfill-capture-share`](#default-landfill-capture-share) | Decay model | fallback | low |
| [`flaring-uniform`](#flaring-uniform) | Decay model | simplification | medium |
| [`monthly-from-decay-model`](#monthly-from-decay-model) | Decay model | simplification | medium |
| [`inert-waste-types`](#inert-waste-types) | Decay model | simplification | low |
Expand Down Expand Up @@ -468,6 +470,21 @@ A city or place with no treatment data takes its country's, else its region's, c
- **Code:** `SWEET_python/city_params.py` (2 places)
- **Reviewed:** 2026-10-23

### `china-treatment-split-2020`

China's default treatment is its urban domestic waste in 2020: 33% landfilled, 62% incinerated, 5% composted. China had no row of its own and took Eastern Asia's, which landfilled 76%.

- **Kind:** fixed value
- **Why:** Hugh, 2026-11-19: 2020 is near China's 2015-2024 average (landfilled 60% in 2015, 5% in 2024), and one split covers every year.
- **Paths:**
- `city-model`: a Chinese city with no treatment or landfill shares of its own.
- `custom-location`: every Chinese Custom Location.
- **Confidence:** low
- **Better:** A split by year (`city-shares-constant`): China's landfilling fell from 60% to 5% in nine years. "Other" (5%) is taken as composting; the yearbook doesn't say. Needed before the cities pipeline relies on it.
- **Value:** `SWEET_python.defaults_2019`: the "China" rows of `FRACTION_LANDFILLED_COUNTRY`, `FRACTION_INCINERATED_COUNTRY`, `FRACTION_COMPOSTED_COUNTRY`, `FRACTION_OPEN_DUMPED_COUNTRY`, `FRACTION_UNSPECIFIED_COUNTRY` (China Statistical Yearbook 2021)
- **Code:** `SWEET_python/defaults_2019.py` (5 places)
- **Reviewed:** 2026-11-19

### `city-treatment-buckets`

A city's reported treatment shares map onto four buckets: sanitary landfill with gas collection is "with capture"; controlled landfill and unspecified landfill are "without capture"; open dump is "dumpsite"; controlled dumpsite is "controlled dumpsite". Advanced thermal treatment counts as incineration.
Expand Down Expand Up @@ -638,14 +655,34 @@ A site captures its reported efficiency, else a default: the remediated value fo
- `site-tool`: `reported`; left blank, `remediated` for a site upgraded in the scenario, else `type-default`.
- `adst-site`, `adst-city`: the caller's value, by year where it gives years; none given means 0.
- `city-model`: 0.6 on the share sent to landfills with capture; the cities table's efficiency is read but never used.
- `custom-location`: 0.6 on a capture share, but the default split has none, so a Custom Location captures nothing.
- `custom-location`: 0.6 on the capture share its default split now carries (`default-landfill-capture-share`).
- `city-dst-scenario`: "add gas capture" sets 0.6 on both landfill shares, `remediated` (30%) on the dumpsite, which it makes a controlled dumpsite, and `type-default` (45%) on the controlled dumpsite, which stays one, from the year after implementation.
- **Confidence:** medium
- **Better:** Let the city model read each city's reported efficiency.
- **Value:** `SWEET_python.gas_capture`: `GAS_CAPTURE_EFFICIENCY`, `CONVERTED_DUMP_CAPTURE_EFFICIENCY`, `UPGRADED_CONTROLLED_DUMP_CAPTURE_EFFICIENCY`
- **Code:** `SWEET_python/city_params.py` (2 places)
- **Reviewed:** 2026-10-23

### `default-landfill-capture-share`

A defaulted landfill share sends part of its waste to landfills with gas capture: the country's researched share, else half for a high-income country, else none.

- **Kind:** fallback
- **Why:** IPCC's default splits say nothing about capture, so every defaulted landfill in the US or EU was modelled without it; Hugh, 2026-11-19.
- **Options, best first:**
1. `reported`: the city's own landfill shares, which are never changed.
2. `country`: a researched share: US 0.85, Canada 0.66, New Zealand 0.92, Australia 0.6.
3. `high-income`: 0.5, a placeholder, for a World Bank high-income country.
4. `none`: no capture.
- **Paths:**
- `city-model`: `reported`; with every landfill share blank or zero, `country`, else `high-income` when the caller passes the income group, else `none`.
- `custom-location`: `country`, else `high-income` when the caller passes the income group, else `none`.
- **Confidence:** low
- **Better:** A researched share for every country, mass-weighted, before this is relied on. The Gulf states and Russia are high income but capture little; Turkey and Mexico capture some but get none.
- **Value:** `SWEET_python.landfill_capture`: `CAPTURE_SHARE_COUNTRY`, `HIGH_INCOME_SHARE`
- **Code:** `SWEET_python/landfill_capture.py`, `SWEET_python/city_params.py`, `SWEET_python/defaults_2019.py`
- **Reviewed:** 2026-11-19

### `flaring-uniform`

Captured gas is burned at 0.98 efficiency in every year, unless the caller states a value.
Expand Down
6 changes: 6 additions & 0 deletions SWEET_python/city_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import SWEET_python.defaults_2019 as defaults_2019
import SWEET_python.mcf as mcf_defaults
import SWEET_python.site_type_defaults as site_type_defaults
import SWEET_python.landfill_capture as landfill_capture
from SWEET_python.population import (
average_growth_rates,
city_population_series,
Expand Down Expand Up @@ -2110,6 +2111,8 @@ def load_andre_params(

# Normalize landfills to 1
split_total = sum([x for x in split_fractions.values()])
# No landfill share of the city's own: the split is its country's or region's.
split_defaulted = all_nan_fill or split_total == 0
if split_total == 0:
if site_type_defaults.landfill_is_default(iso3, income_id):
split_fractions = {
Expand All @@ -2126,6 +2129,9 @@ def load_andre_params(
split_total = sum([x for x in split_fractions.values()])
for site in split_fractions.keys():
split_fractions[site] /= split_total
# decision: default-landfill-capture-share
if split_defaulted:
split_fractions = landfill_capture.with_default_capture(split_fractions, iso3, income_id)

# Replace diversion NaN values with 0
(
Expand Down
53 changes: 43 additions & 10 deletions SWEET_python/defaults_2019.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
from pathlib import Path

import SWEET_python.gas_capture as gas_capture
import SWEET_python.landfill_capture as landfill_capture
import SWEET_python.oxidation as oxidation
from SWEET_python.constants import GWP100_CH4, SHORT_TONS_PER_TONNE, WASTE_TYPES

Expand Down Expand Up @@ -1524,6 +1525,10 @@ def compost_emission_factor(food, green):
"Australia": 0.0,
"New Zealand": 0.0,
"Nigeria": 1.0,
# decision: china-treatment-split-2020
# China: urban domestic waste, 2020 (China Statistical Yearbook 2021): 235.1 Mt collected,
# 77.7 Mt sanitary landfill, 146.1 Mt incineration, 10.7 Mt other (taken as composting).
"China": 0.0,
}
FRACTION_OPEN_DUMPED_COUNTRY = {
COUNTRY_TO_ISO3[country]: value
Expand Down Expand Up @@ -1615,6 +1620,10 @@ def compost_emission_factor(food, green):
"Australia": 0.52,
"New Zealand": 0.85,
"Nigeria": 0.0,
# decision: china-treatment-split-2020
# China: urban domestic waste, 2020 (China Statistical Yearbook 2021): 235.1 Mt collected,
# 77.7 Mt sanitary landfill, 146.1 Mt incineration, 10.7 Mt other (taken as composting).
"China": 0.33,
}
FRACTION_LANDFILLED_COUNTRY = {
COUNTRY_TO_ISO3[country]: value
Expand All @@ -1641,6 +1650,9 @@ def disposal_split_for(iso3, region, income_id=None):
and Switzerland's rows are all zeros, so they take their region's, which is
landfill only.

The country's share of landfilled waste that goes to landfills with gas capture
(``landfill_capture``) is then moved to ``landfill_w_capture``.

This is the split ``City.load_andre_params`` gives a cities-table row with no
landfill data, so a Custom Location starts from the same split as a mapped
city in the same country.
Expand All @@ -1653,20 +1665,29 @@ def disposal_split_for(iso3, region, income_id=None):
landfill = landfilled.get(key, 0.0)
total = dumpsite + landfill
if total > 0:
return {
"landfill_w_capture": 0.0,
"landfill_wo_capture": landfill / total,
"dumpsite": dumpsite / total,
}
# decision: default-landfill-capture-share
return landfill_capture.with_default_capture(
{
"landfill_w_capture": 0.0,
"landfill_wo_capture": landfill / total,
"dumpsite": dumpsite / total,
},
iso3,
income_id,
)
# Imported here: site_type_defaults imports this module.
from SWEET_python.site_type_defaults import landfill_is_default

landfills = landfill_is_default(iso3, income_id)
return {
"landfill_w_capture": 0.0,
"landfill_wo_capture": 1.0 if landfills else 0.0,
"dumpsite": 0.0 if landfills else 1.0,
}
return landfill_capture.with_default_capture(
{
"landfill_w_capture": 0.0,
"landfill_wo_capture": 1.0 if landfills else 0.0,
"dumpsite": 0.0 if landfills else 1.0,
},
iso3,
income_id,
)


FRACTION_INCINERATED_COUNTRY = {
Expand Down Expand Up @@ -1754,6 +1775,10 @@ def disposal_split_for(iso3, region, income_id=None):
"United States": 0.12,
"Australia": 0.08,
"New Zealand": 0.0,
# decision: china-treatment-split-2020
# China: urban domestic waste, 2020 (China Statistical Yearbook 2021): 235.1 Mt collected,
# 77.7 Mt sanitary landfill, 146.1 Mt incineration, 10.7 Mt other (taken as composting).
"China": 0.62,
}
FRACTION_INCINERATED_COUNTRY = {
COUNTRY_TO_ISO3[country]: value
Expand Down Expand Up @@ -1844,6 +1869,10 @@ def disposal_split_for(iso3, region, income_id=None):
"United States": 0.08,
"Australia": 0.0,
"New Zealand": 0.0,
# decision: china-treatment-split-2020
# China: urban domestic waste, 2020 (China Statistical Yearbook 2021): 235.1 Mt collected,
# 77.7 Mt sanitary landfill, 146.1 Mt incineration, 10.7 Mt other (taken as composting).
"China": 0.05,
}
FRACTION_COMPOSTED_COUNTRY = {
COUNTRY_TO_ISO3[country]: value
Expand Down Expand Up @@ -1934,6 +1963,10 @@ def disposal_split_for(iso3, region, income_id=None):
"United States": 0.26,
"Australia": 0.4,
"New Zealand": 0.15,
# decision: china-treatment-split-2020
# China: urban domestic waste, 2020 (China Statistical Yearbook 2021): 235.1 Mt collected,
# 77.7 Mt sanitary landfill, 146.1 Mt incineration, 10.7 Mt other (taken as composting).
"China": 0.0,
}
FRACTION_UNSPECIFIED_COUNTRY = {
COUNTRY_TO_ISO3[country]: value
Expand Down
133 changes: 133 additions & 0 deletions SWEET_python/landfill_capture.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
"""How much of a country's landfilled waste goes to landfills that capture their gas.

A city or Custom Location with no landfill shares of its own takes its country's or
region's disposal split (``defaults_2019.disposal_split_for``, ``City.load_andre_params``).
That split comes from IPCC 2019 Table 2.1, which says how much waste a country landfills
and dumps, but not how much of the landfilled waste goes to sites with a gas collection
system. Until this module, every defaulted landfill was modelled without capture: a city
in the US or the EU emitted as if no landfill there collected its gas.

``capture_share`` gives the share of a country's landfilled waste that goes to landfills
with an active gas collection system:

1. the country's own share, where research gives one (``CAPTURE_SHARE_COUNTRY``);
2. else ``HIGH_INCOME_SHARE`` (0.5) for a World Bank high-income country, the main test
of SWEET's site-type rule (``site_type_defaults.landfill_is_default``): gas-collection
rules track it (the EU Landfill Directive, US federal rules, Japan, Korea);
3. else none, as before.

``with_default_capture`` moves that share of a defaulted split's "landfill without
capture" to "landfill with capture"; the capture bucket then captures
``gas_capture.GAS_CAPTURE_EFFICIENCY["landfill"]`` (60%) of its methane, as a reported
"sanitary landfill with landfill gas system" share does. The dumpsite share is untouched.
A city that reports its own landfill shares keeps them (``city-treatment-buckets``).

**Provisional.** Only four countries have a researched share, and two of those are
derived rather than published. The 0.5 is a placeholder, not a finding: the Gulf states
and Russia are high income but capture little, and upper-middle-income countries with
real capture (Turkey, Mexico, Chile before 2023...) get none. Each country needs its own
researched share before this is relied on. See MODEL_DECISIONS.md,
``default-landfill-capture-share``.
"""

from __future__ import annotations

from typing import Mapping, NamedTuple, Optional

__all__ = [
"CAPTURE_SHARE_COUNTRY",
"HIGH_INCOME_SHARE",
"CaptureShare",
"capture_share",
"with_default_capture",
]


class CaptureShare(NamedTuple):
#: Share of landfilled waste going to landfills with gas collection, 0-1.
share: float
#: The year the evidence describes.
year: int
#: What the share is a share of: "mass landfilled", "methane generated"...
basis: str
source: str
url: str


#: The share a high-income country without a researched share of its own takes.
#: A placeholder, Hugh 2026-11-19: "a default of 0.5 where we don't have serious research".
HIGH_INCOME_SHARE = 0.5

# decision: default-landfill-capture-share
CAPTURE_SHARE_COUNTRY: dict[str, CaptureShare] = {
# Derived, not published: GHGRP 2021 emissions at MSW landfills without a collection
# system (21.3 Mt CO2e) against those with one (61.8), back-calculated to methane
# generated (~90% at sites with a system), then scaled for the ~11% of generation at
# landfills that don't report (assumed uncollected). Cross-checks: the Inventory
# recovers 60% of generated methane (2021); 845 of 1,125 GHGRP landfills had a system
# (2023).
"USA": CaptureShare(
0.85, 2021, "methane generated (derived)",
"US EPA GHG Inventory 1990-2021, ch. 7, Table 7-3; EPA GHGRP waste sector profile 2011-2023, Tables 8-9",
"https://www.epa.gov/system/files/documents/2024-12/waste_profile_ry23.pdf",
),
# "66% of MSW disposed at landfills with LFG recovery systems" (ECCC Landfill Gas
# Inventory, about 2023); 37% of methane generated is recovered.
"CAN": CaptureShare(
0.66, 2023, "mass landfilled",
"ECCC, Landfill Methane Regulations Overview (June 2026), citing the ECCC Landfill Gas Inventory",
"https://acuerdochilecanada.mma.gob.cl/wp-content/uploads/2026/06/ECCC-Presentation-Landfill-Methane-Regulations-Overview-June-2026.pdf",
),
# 3,350 kt to municipal landfills with capture, 279 kt without (2019). Municipal
# landfills only: non-municipal and farm fills are left out.
"NZL": CaptureShare(
0.92, 2019, "mass landfilled",
"Climate Change Commission (2021), Supporting Evidence ch. 8 (waste), Table 8.1",
"https://www.climatecommission.govt.nz/assets/Evidence-21/Evidence-CH-8-reducing-emissions-waste.pdf",
),
# Derived: 45% of methane generated is captured nationally (5-year inventory mean), and
# a site with capture takes about 75% of its own gas, so 0.45 / 0.75. Secondary source.
"AUS": CaptureShare(
0.6, 2022, "methane generated (derived)",
"Macintosh et al. (ANU, 2024), quoting DCCEEW (2024) ACCU landfill gas method reform options paper",
"https://law.anu.edu.au/files/2024-06/Reform%20of%20ACCU%20Landfill%20Method%20-%20a%20critique%20070623%20%28final%29.pdf",
),
}


def capture_share(
iso3: Optional[str],
income_id: Optional[str] = None,
shares: Optional[Mapping[str, CaptureShare]] = None,
) -> float:
"""The share of *iso3*'s landfilled waste that goes to landfills with gas capture.

*income_id* is the country's World Bank income group ('HIC', 'UMC', ...), from the
caller, as for ``site_type_defaults.landfill_is_default``; without one, only a
researched share applies.
"""
shares = CAPTURE_SHARE_COUNTRY if shares is None else shares
row = shares.get(str(iso3).upper()) if iso3 else None
if row is not None:
return float(row.share)
if isinstance(income_id, str) and income_id == "HIC":
return HIGH_INCOME_SHARE
return 0.0


def with_default_capture(
split: Mapping[str, float],
iso3: Optional[str],
income_id: Optional[str] = None,
shares: Optional[Mapping[str, CaptureShare]] = None,
) -> dict:
"""*split* (a defaulted disposal split) with the country's capture share of its
"landfill without capture" moved to "landfill with capture". The total is unchanged."""
out = dict(split)
share = capture_share(iso3, income_id, shares)
if share <= 0:
return out
moved = out.get("landfill_wo_capture", 0.0) * share
out["landfill_w_capture"] = out.get("landfill_w_capture", 0.0) + moved
out["landfill_wo_capture"] = out.get("landfill_wo_capture", 0.0) - moved
return out
25 changes: 25 additions & 0 deletions changelog/2026-11.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,31 @@ landfill, and incineration burns what composting and recycling leave.

## Added

- **A defaulted landfill share captures gas where its country's landfills do**
(model-output change, PROVISIONAL, [#131](https://github.com/RMI/SWEET_python/pull/131); decision `default-landfill-capture-share`). A
city with no landfill shares of its own, and every Custom Location, takes its
country's or region's split from IPCC 2019 Table 2.1, which has no gas-capture
share, so every defaulted landfill was modelled without capture. The new
`landfill_capture` module moves a share of the split's "landfill without capture"
to "landfill with capture", which captures 60% of its methane:
- a researched share for the US (0.85), Canada (0.66), New Zealand (0.92) and
Australia (0.6);
- else 0.5 for a World Bank high-income country, when the caller passes the income
group (`income_id`, as for the site-type rule);
- else none, as before.
A city that reports its own landfill shares keeps them. **The shares need research
before this is relied on**: 0.5 is a placeholder, two of the four researched shares
are derived rather than published, and income is a rough proxy (the Gulf states and
Russia are high income but capture little; Turkey and Mexico capture some but get
none).
- **China has a treatment split of its own** (model-output change, PROVISIONAL, [#131](https://github.com/RMI/SWEET_python/pull/131);
decision `china-treatment-split-2020`). It took Eastern Asia's, which landfilled
76% of its waste. It now takes its urban domestic waste in 2020 (China Statistical
Yearbook 2021): 33% landfilled, 62% incinerated, 5% composted. China landfilled
60% in 2015 and 5% in 2024; 2020 is near the average, and SWEET applies one split
to every year (`city-shares-constant`). A split by year is needed before the
cities pipeline relies on it.

- **The city model sends a controlled-dumpsite share to a controlled dumpsite**
(no output change until a caller passes the share,
[#121](https://github.com/RMI/SWEET_python/pull/121)). The generic city model had
Expand Down
Loading
Loading