Skip to content
Merged
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
3 changes: 3 additions & 0 deletions SWEET_python/defaults_2019.py
Original file line number Diff line number Diff line change
Expand Up @@ -686,6 +686,7 @@ def waste_composition_for(iso3, region):
for country in region_lookup:
iso3 = country_to_iso3[country]
region_lookup_iso3[iso3] = region_lookup[country]
# tonnes/cap/yr: IPCC 2019 Refinement, Vol. 5 Ch. 2, Table 2.1 (Updated)
msw_per_capita_defaults = {
"Australia and New Zealand": 0.6,
"Caribbean": 0.78,
Expand All @@ -712,6 +713,7 @@ def waste_composition_for(iso3, region):
msw_per_capita_defaults = {
key: (value / 365) * 1000 for key, value in msw_per_capita_defaults.items()
} # convert from tons/year to kg/day
# tonnes/cap/yr: IPCC 2019 Refinement, Vol. 5 Ch. 2, Table 2A.1 (Updated), 2010 column
msw_per_capita_country = {
"Tajikistan": 0.32,
"Turkmenistan": 0.36,
Expand All @@ -720,6 +722,7 @@ def waste_composition_for(iso3, region):
"Mongolia": 0.24,
"South Korea": 0.35,
"Brunei Darussalam": 0.32,
"Indonesia": 0.19,
"Laos": 0.26,
"Malaysia": 0.55,
"Myanmar": 0.16,
Expand Down
29 changes: 29 additions & 0 deletions changelog/2026-10.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# SWEET_python Changelog — October 2026

**Highlights:** Indonesia sizes its waste from its own row of the IPCC table
SWEET copies its per-capita waste rates from, instead of the South-Eastern Asia
default, which was 2.4 times higher (model-output change).

## Fixed

- **Indonesia has a per-capita waste rate of its own** (model-output change).
`defaults_2019.msw_per_capita_country` copies IPCC 2019 Refinement, Vol. 5
Ch. 2, Table 2A.1 (Updated), 2010 column, in tonnes per person per year. All
167 of its rows match the IPCC's, but Indonesia's, 0.19, was never typed in.
Indonesia fell back to the South-Eastern Asia default, 0.46. The IPCC's source
for the row, What a Waste 2012, agrees: 0.52 kg per person per day is 0.19 t
a year.
- A Custom Location (`dst_baseline_blank`) in Indonesia is sized at 190,000 t
a year per million people, down from 460,000 (−58.7%). Its emissions fall by
the same share once a Custom Location in South-Eastern Asia disposes of its
waste ([#74](https://github.com/RMI/SWEET_python/pull/74)); until then
they are zero either way.
- WasteMAP's June 2026 cities table does not move. All 11 Indonesian cities
have waste figures of their own, so `load_andre_params` never reaches the
default for them.
- Climate TRACE's pipeline does not move. It drops a site with no tonnage
before SWEET runs.

The comments on `msw_per_capita_defaults` and `msw_per_capita_country` now
name the IPCC tables they come from.
([#76](https://github.com/RMI/SWEET_python/pull/76))
1 change: 1 addition & 0 deletions changelog/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ The project does not publish semantic version tags, so releases are tracked by

Newest first:

- [2026-10](2026-10.md) — Indonesia sizes its waste from its own IPCC per-capita row instead of the South-Eastern Asia default, 2.4× higher (model-output change)
- [2026-09](2026-09.md) — WasteMAP's site tool, city tool and Custom Location grow waste with the country's UN population year by year, as Climate TRACE does; big cities keep their own UN city rates (model-output change); model output frames get one fixed waste-type column order instead of a per-process one (a `set` fed the ordering, and Python randomizes set iteration per process), moving values in the last bit only, where a sum runs across the reordered columns; City DST's diversion sum stops passing pandas a keyword pandas is removing, which would have broken the model path on pandas 4 behind a misleading `AttributeError` (no output change); annual model no longer charges a flare's inefficiency twice (a hardcoded 2% slip stacked on the `flaring` destruction efficiency), so it agrees with the monthly model again and a site with gas capture emits ~3.5% less (model-output change); `gas_capture_efficiency` bounded to [0, 1], where an out-of-range value used to produce negative emissions silently; one methane density constant instead of two 9.1% apart
- [2026-08](2026-08.md) — Single-site adst gains optional `depth` (deep-dump MCF bump) and `k_override` (caller-supplied decomposition rate) inputs, restoring the last two site-DST levers; `/sdst` flaring efficiency reaches the model again after a variable-name bug silently forced flare destruction to 0.98; annual model applies cover oxidation by emission year not deposit year, fixing biocover having no effect on closed landfills (WasteMAP #719); `City.sdst_v1_5` custom-site path holds the scenario equal to the baseline before the implementation year even when composition changes (was back-dating the new composition onto pre-implementation deposits) (model-output change); MCF consolidated into a new `SWEET_python.mcf` module and both dump types moved to the IPCC uncategorised-SWDS 0.6 (open dumps up from 0.4, controlled dumps down from 0.7), with a supplied depth now selecting the deep/shallow category (model-output change)
- [2026-07](2026-07.md) — All ten waste types eligible for combustion (metal/glass/other added); methane-only model treats combustion as landfill diversion (model-output change)
Expand Down
53 changes: 53 additions & 0 deletions tests/test_msw_per_capita.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
"""Per-capita waste generation defaults (`defaults_2019.msw_per_capita_country`).

The table is IPCC 2019 Refinement, Vol. 5 Ch. 2, Table 2A.1 (Updated), 2010
column, in tonnes per person per year, converted to kg per person per day. Every
row matched the IPCC's except one: Indonesia, which the IPCC lists at 0.19, had
no row. A Custom Location or a cities-table city in Indonesia with no waste
figure of its own was sized from the South-Eastern Asia default instead, 0.46,
2.4 times the country's own row.
"""

import numpy as np
import pytest

from SWEET_python import defaults_2019
from SWEET_python.city_params import City

_POP = 1_000_000


def _kg_per_day(tonnes_per_year):
return tonnes_per_year / 365 * 1000


def test_indonesia_has_its_own_row():
assert defaults_2019.msw_per_capita_country["IDN"] == pytest.approx(_kg_per_day(0.19))


def test_every_south_eastern_asian_country_the_ipcc_lists_has_a_row():
# Table 2A.1's South-Eastern Asia block. Cambodia and Timor-Leste are not in
# it, so they take the regional default.
ipcc_rows = {
"BRN": 0.32, "IDN": 0.19, "LAO": 0.26, "MYS": 0.55, "MMR": 0.16,
"PHL": 0.18, "SGP": 1.28, "THA": 0.64, "VNM": 0.53,
}
for iso3, tonnes_per_year in ipcc_rows.items():
assert defaults_2019.msw_per_capita_country[iso3] == pytest.approx(
_kg_per_day(tonnes_per_year)
), iso3


def test_a_custom_location_in_indonesia_is_sized_from_indonesias_row():
city = City("custom")
city.dst_baseline_blank("Indonesia", _POP, 2000.0, 27.0)

# Was 460,000: the South-Eastern Asia default, 0.46 t per person per year.
assert np.allclose(city.baseline_parameters.waste_mass, 0.19 * _POP)


def test_a_country_without_a_row_still_takes_its_regions_default():
city = City("custom")
city.dst_baseline_blank("Cambodia", _POP, 2000.0, 27.0)

assert np.allclose(city.baseline_parameters.waste_mass, 0.46 * _POP)
Loading