Skip to content

WP-419 adst callers can set site depth and override the decomposition rate (k) - #40

Open
HughRunyan wants to merge 2 commits into
mainfrom
adst-depth-k-override
Open

WP-419 adst callers can set site depth and override the decomposition rate (k)#40
HughRunyan wants to merge 2 commits into
mainfrom
adst-depth-k-override

Conversation

@HughRunyan

@HughRunyan HughRunyan commented Aug 6, 2026

Copy link
Copy Markdown
Collaborator

Summary

Single-site advanced DST (adst) gains two optional inputs that restore the last two City.sdst_v1_5 (site-DST) levers the adst model had no equivalent for. Both are opt-in and default to today's derived behavior.

User story: As a /sdst user migrating to the adst endpoint, I want to set a site's depth and override the decomposition rate (k), so that the newer endpoint reproduces the full modeling the current tool exposes.

What changed

  • AdvancedDSTRequest.depth (Optional[Variant[float]], metres): a controlled/open dump (type 1 or 2) deeper than 5 m has its MCF raised to 0.8 (deep dumps decompose more anaerobically), matching City.sdst_v1_5. Implemented in dst_common.mcf_series, which now takes optional per-variant baseline_depth/scenario_depth; never applies to engineered landfills (type 0).
  • AdvancedDSTRequest.k_override (Optional[Variant[YearlyFloat]]): a caller-supplied k applied uniformly to all five biodegradable components, bypassing the derived (temperature/precipitation/composition) k — mirroring City.sdst_v1_5's ks_overrides. New helper dst_common.uniform_decomposition_rates.
  • Both are spliced at implement_year like every other adst input.

Not a model-output change

Both fields default to None = derive exactly as before, so every existing adst call is byte-for-byte unchanged. Output only changes when a caller opts in. Changelog entry is filed under Added (not model-output-change).

Acceptance criteria

  • depth > 5 m on a dump raises MCF to 0.8; ≤ 5 m and engineered landfills (type 0) are unaffected.
  • k_override bypasses the derived k and applies to all five degradable components.
  • Omitting both reproduces current behavior exactly (opt-in).
  • Changelog updated (changelog/2026-08.md).
  • Tests cover both fields (in WasteMAP — see Related).

Definition of Done

Acceptance criteria met · tests pass (13/13 adst, 59/59 fast suite) · changelog updated · reviewed & merged.

Related

Tests + endpoint verification live in RMI/WasteMAP#724 on the same branch name (adst-depth-k-override), so WasteMAP CI installs this SWEET_python branch. Merge that PR alongside this one.

🤖 Generated with Claude Code

Restore the last two City.sdst_v1_5 site-DST levers that adst had no equivalent for. Both are opt-in and default to None (derive exactly as before), so existing adst calls are byte-for-byte unchanged.

- depth (Variant[float], metres): a controlled/open dump (type 1/2) deeper than 5 m has its MCF raised to 0.8, matching City.sdst_v1_5. Implemented in dst_common.mcf_series via optional per-variant baseline/scenario depth; never applies to engineered landfills (type 0).

- k_override (Variant[YearlyFloat]): a caller-supplied decomposition rate applied uniformly to all five biodegradable components, bypassing the derived (temperature/precipitation/composition) k. New helper dst_common.uniform_decomposition_rates.

Changelog: changelog/2026-08.md (Added). Not a model-output change for existing calls.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@HughRunyan HughRunyan added the enhancement New feature or request label Aug 6, 2026
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@HughRunyan HughRunyan changed the title adst callers can set site depth and override the decomposition rate (k) WP-419 adst callers can set site depth and override the decomposition rate (k) Aug 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants