distributed-buffer-resilience-utac 1.0.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- distributed_buffer_resilience_utac-1.0.0/.github/workflows/ci.yml +44 -0
- distributed_buffer_resilience_utac-1.0.0/.github/workflows/release.yml +118 -0
- distributed_buffer_resilience_utac-1.0.0/.gitignore +22 -0
- distributed_buffer_resilience_utac-1.0.0/.pre-commit-config.yaml +14 -0
- distributed_buffer_resilience_utac-1.0.0/.zenodo.json +29 -0
- distributed_buffer_resilience_utac-1.0.0/CITATION.cff +102 -0
- distributed_buffer_resilience_utac-1.0.0/DISCLAIMER.md +104 -0
- distributed_buffer_resilience_utac-1.0.0/LICENSE +21 -0
- distributed_buffer_resilience_utac-1.0.0/PKG-INFO +118 -0
- distributed_buffer_resilience_utac-1.0.0/README.md +100 -0
- distributed_buffer_resilience_utac-1.0.0/pyproject.toml +47 -0
- distributed_buffer_resilience_utac-1.0.0/src/distributed_buffer_resilience_utac/__init__.py +86 -0
- distributed_buffer_resilience_utac-1.0.0/src/distributed_buffer_resilience_utac/constants.py +186 -0
- distributed_buffer_resilience_utac-1.0.0/src/distributed_buffer_resilience_utac/drought_buffer.py +52 -0
- distributed_buffer_resilience_utac-1.0.0/src/distributed_buffer_resilience_utac/ecosystem_services.py +38 -0
- distributed_buffer_resilience_utac-1.0.0/src/distributed_buffer_resilience_utac/gbr.py +77 -0
- distributed_buffer_resilience_utac-1.0.0/src/distributed_buffer_resilience_utac/storage_portfolio.py +93 -0
- distributed_buffer_resilience_utac-1.0.0/src/distributed_buffer_resilience_utac/water_towers.py +49 -0
- distributed_buffer_resilience_utac-1.0.0/tests/__init__.py +0 -0
- distributed_buffer_resilience_utac-1.0.0/tests/test_main.py +169 -0
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: ["main", "master", "claude/**"]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: ["main", "master"]
|
|
8
|
+
|
|
9
|
+
concurrency:
|
|
10
|
+
group: ${{ github.workflow }}-${{ github.ref }}
|
|
11
|
+
cancel-in-progress: true
|
|
12
|
+
|
|
13
|
+
jobs:
|
|
14
|
+
lint:
|
|
15
|
+
name: Lint (ruff + mypy)
|
|
16
|
+
runs-on: ubuntu-latest
|
|
17
|
+
steps:
|
|
18
|
+
- uses: actions/checkout@v4
|
|
19
|
+
- uses: actions/setup-python@v5
|
|
20
|
+
with:
|
|
21
|
+
python-version: "3.11"
|
|
22
|
+
- name: Install dev dependencies
|
|
23
|
+
run: pip install -e ".[dev]"
|
|
24
|
+
- name: Run ruff
|
|
25
|
+
run: ruff check src tests
|
|
26
|
+
- name: Run mypy
|
|
27
|
+
run: mypy src
|
|
28
|
+
|
|
29
|
+
test:
|
|
30
|
+
name: Tests (Python ${{ matrix.python-version }})
|
|
31
|
+
runs-on: ubuntu-latest
|
|
32
|
+
strategy:
|
|
33
|
+
fail-fast: false
|
|
34
|
+
matrix:
|
|
35
|
+
python-version: ["3.11", "3.12"]
|
|
36
|
+
steps:
|
|
37
|
+
- uses: actions/checkout@v4
|
|
38
|
+
- uses: actions/setup-python@v5
|
|
39
|
+
with:
|
|
40
|
+
python-version: ${{ matrix.python-version }}
|
|
41
|
+
- name: Install dependencies
|
|
42
|
+
run: pip install -e ".[dev]"
|
|
43
|
+
- name: Run pytest with coverage
|
|
44
|
+
run: pytest --cov=src --cov-report=xml
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
name: Release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- "v*.*.*"
|
|
7
|
+
- "v*.*.*-rc*"
|
|
8
|
+
- "v*.*.*-alpha*"
|
|
9
|
+
- "v*.*.*-beta*"
|
|
10
|
+
|
|
11
|
+
permissions:
|
|
12
|
+
contents: write
|
|
13
|
+
id-token: write # for PyPI trusted publishing, if configured
|
|
14
|
+
|
|
15
|
+
jobs:
|
|
16
|
+
build:
|
|
17
|
+
name: Build distribution
|
|
18
|
+
runs-on: ubuntu-latest
|
|
19
|
+
steps:
|
|
20
|
+
- uses: actions/checkout@v4
|
|
21
|
+
with:
|
|
22
|
+
fetch-depth: 0
|
|
23
|
+
|
|
24
|
+
- name: Set up Python
|
|
25
|
+
uses: actions/setup-python@v5
|
|
26
|
+
with:
|
|
27
|
+
python-version: "3.12"
|
|
28
|
+
|
|
29
|
+
- name: Install build tooling
|
|
30
|
+
run: python -m pip install --upgrade pip build
|
|
31
|
+
|
|
32
|
+
- name: Build sdist and wheel
|
|
33
|
+
run: python -m build
|
|
34
|
+
|
|
35
|
+
- name: Upload build artifacts
|
|
36
|
+
uses: actions/upload-artifact@v4
|
|
37
|
+
with:
|
|
38
|
+
name: dist
|
|
39
|
+
path: dist/
|
|
40
|
+
|
|
41
|
+
test:
|
|
42
|
+
name: Run test suite
|
|
43
|
+
runs-on: ubuntu-latest
|
|
44
|
+
steps:
|
|
45
|
+
- uses: actions/checkout@v4
|
|
46
|
+
|
|
47
|
+
- name: Set up Python
|
|
48
|
+
uses: actions/setup-python@v5
|
|
49
|
+
with:
|
|
50
|
+
python-version: "3.12"
|
|
51
|
+
|
|
52
|
+
- name: Install package with dev/test extras
|
|
53
|
+
run: |
|
|
54
|
+
python -m pip install --upgrade pip
|
|
55
|
+
if python -c "import tomllib" 2>/dev/null; then :; fi
|
|
56
|
+
pip install -e ".[dev]" 2>/dev/null || pip install -e ".[test]" 2>/dev/null || pip install -e "."
|
|
57
|
+
pip install pytest pytest-cov
|
|
58
|
+
|
|
59
|
+
- name: Run tests
|
|
60
|
+
run: pytest -q || pytest -q --no-header
|
|
61
|
+
|
|
62
|
+
publish-canary:
|
|
63
|
+
name: Publish canary (TestPyPI + pre-release)
|
|
64
|
+
needs: [build, test]
|
|
65
|
+
if: contains(github.ref_name, '-rc') || contains(github.ref_name, '-alpha') || contains(github.ref_name, '-beta')
|
|
66
|
+
runs-on: ubuntu-latest
|
|
67
|
+
environment: testpypi
|
|
68
|
+
steps:
|
|
69
|
+
- uses: actions/download-artifact@v4
|
|
70
|
+
with:
|
|
71
|
+
name: dist
|
|
72
|
+
path: dist/
|
|
73
|
+
|
|
74
|
+
- name: Publish to TestPyPI
|
|
75
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
76
|
+
with:
|
|
77
|
+
repository-url: https://test.pypi.org/legacy/
|
|
78
|
+
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
|
|
79
|
+
skip-existing: true
|
|
80
|
+
|
|
81
|
+
- name: Create GitHub pre-release
|
|
82
|
+
uses: softprops/action-gh-release@v2
|
|
83
|
+
with:
|
|
84
|
+
files: dist/*
|
|
85
|
+
prerelease: true
|
|
86
|
+
generate_release_notes: true
|
|
87
|
+
|
|
88
|
+
publish-production:
|
|
89
|
+
name: Publish production (PyPI + release + Zenodo archive)
|
|
90
|
+
needs: [build, test]
|
|
91
|
+
if: ${{ !contains(github.ref_name, '-rc') && !contains(github.ref_name, '-alpha') && !contains(github.ref_name, '-beta') }}
|
|
92
|
+
runs-on: ubuntu-latest
|
|
93
|
+
environment: pypi
|
|
94
|
+
steps:
|
|
95
|
+
- uses: actions/download-artifact@v4
|
|
96
|
+
with:
|
|
97
|
+
name: dist
|
|
98
|
+
path: dist/
|
|
99
|
+
|
|
100
|
+
- name: Publish to PyPI
|
|
101
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
102
|
+
with:
|
|
103
|
+
password: ${{ secrets.PYPI_API_TOKEN }}
|
|
104
|
+
skip-existing: true
|
|
105
|
+
|
|
106
|
+
- name: Create GitHub Release
|
|
107
|
+
uses: softprops/action-gh-release@v2
|
|
108
|
+
with:
|
|
109
|
+
files: dist/*
|
|
110
|
+
prerelease: false
|
|
111
|
+
generate_release_notes: true
|
|
112
|
+
|
|
113
|
+
# NOTE: Zenodo archival of this GitHub Release happens automatically
|
|
114
|
+
# IF this repo has Zenodo-GitHub integration enabled at
|
|
115
|
+
# https://zenodo.org/account/settings/github/ (a per-repo, per-owner
|
|
116
|
+
# OAuth toggle on zenodo.org — cannot be set from a workflow file).
|
|
117
|
+
# Once enabled, every GitHub Release like this one mints/updates a
|
|
118
|
+
# Zenodo DOI automatically using the .zenodo.json metadata in this repo.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
repos:
|
|
2
|
+
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
3
|
+
rev: v0.6.0
|
|
4
|
+
hooks:
|
|
5
|
+
- id: ruff
|
|
6
|
+
args: [--fix]
|
|
7
|
+
- id: ruff-format
|
|
8
|
+
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
9
|
+
rev: v4.6.0
|
|
10
|
+
hooks:
|
|
11
|
+
- id: trailing-whitespace
|
|
12
|
+
- id: end-of-file-fixer
|
|
13
|
+
- id: check-yaml
|
|
14
|
+
- id: check-toml
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
{
|
|
2
|
+
"title": "distributed-buffer-resilience-utac — P103: Distributed hydrological/ecosystem buffer resilience",
|
|
3
|
+
"description": "<p>Distributed hydrological/ecosystem buffer resilience for deglacierizing catchments: van Tiel et al. 2026's drought-buffer evidence (the strongest empirical anchor in the P99-P103 series), Farinotti et al. 2016/2019's storage-portfolio figures, Immerzeel/Pritchard water-tower science, and Casallas et al. 2025 ecosystem-service trade-offs, plus a clearly-flagged speculative Glacier Buffer Replacement (GBR) score. Companion to glacier-buffer-utac (P99) and glacier-buffer-replacement-utac (P100). Deliberately has NO UTAC/CREP/AFET bridge. See DISCLAIMER.md. Part of the <strong>GenesisAeon</strong> ecosystem (P103, domain: climate / hydrology / ecosystem services).</p>",
|
|
4
|
+
"creators": [
|
|
5
|
+
{
|
|
6
|
+
"name": "Römer, Johann",
|
|
7
|
+
"affiliation": "Independent Researcher / MOR Research Collective"
|
|
8
|
+
}
|
|
9
|
+
],
|
|
10
|
+
"license": "MIT",
|
|
11
|
+
"upload_type": "software",
|
|
12
|
+
"access_right": "open",
|
|
13
|
+
"version": "1.0.0",
|
|
14
|
+
"keywords": [
|
|
15
|
+
"GenesisAeon",
|
|
16
|
+
"P103",
|
|
17
|
+
"climate",
|
|
18
|
+
"glacier",
|
|
19
|
+
"hydrology",
|
|
20
|
+
"ecosystem-services",
|
|
21
|
+
"water-towers",
|
|
22
|
+
"open-science"
|
|
23
|
+
],
|
|
24
|
+
"communities": [
|
|
25
|
+
{
|
|
26
|
+
"identifier": "genesisaeon"
|
|
27
|
+
}
|
|
28
|
+
]
|
|
29
|
+
}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
cff-version: 1.2.0
|
|
2
|
+
message: "If you use this software, please cite it as below."
|
|
3
|
+
type: software
|
|
4
|
+
authors:
|
|
5
|
+
- family-names: Römer
|
|
6
|
+
given-names: Johann
|
|
7
|
+
affiliation: "MOR Research Collective"
|
|
8
|
+
title: "distributed-buffer-resilience-utac"
|
|
9
|
+
version: "1.0.0"
|
|
10
|
+
date-released: "2026-08-14"
|
|
11
|
+
url: "https://github.com/GenesisAeon/distributed-buffer-resilience-utac"
|
|
12
|
+
repository-code: "https://github.com/GenesisAeon/distributed-buffer-resilience-utac"
|
|
13
|
+
license: MIT
|
|
14
|
+
abstract: "Distributed hydrological/ecosystem buffer resilience for deglacierizing catchments: van Tiel et al. 2026's drought-buffer evidence, Farinotti et al. 2016/2019's storage-portfolio figures, Immerzeel/Pritchard water-tower science, Casallas et al. 2025 ecosystem-service trade-offs, plus a clearly-flagged speculative Glacier Buffer Replacement score. Companion to glacier-buffer-utac (P99) and glacier-buffer-replacement-utac (P100). Deliberately no UTAC/CREP/AFET bridge. GenesisAeon P103."
|
|
15
|
+
keywords:
|
|
16
|
+
- GenesisAeon
|
|
17
|
+
- P103
|
|
18
|
+
- climate
|
|
19
|
+
- glacier
|
|
20
|
+
- hydrology
|
|
21
|
+
- ecosystem-services
|
|
22
|
+
- water-towers
|
|
23
|
+
- open-science
|
|
24
|
+
references:
|
|
25
|
+
- type: article
|
|
26
|
+
title: "Swiss glacier mass loss during the 2022 drought: persistent streamflow contributions amid declining melt water volumes"
|
|
27
|
+
authors:
|
|
28
|
+
- name: "van Tiel, M."
|
|
29
|
+
- name: "Huss, M."
|
|
30
|
+
- name: "Zappa, M."
|
|
31
|
+
- name: "Jonas, T."
|
|
32
|
+
- name: "Farinotti, D."
|
|
33
|
+
year: 2026
|
|
34
|
+
journal: "Hydrology and Earth System Sciences"
|
|
35
|
+
volume: 30
|
|
36
|
+
start: 23
|
|
37
|
+
doi: "10.5194/hess-30-23-2026"
|
|
38
|
+
- type: article
|
|
39
|
+
title: "From dwindling ice to headwater lakes: could dams replace glaciers in the European Alps?"
|
|
40
|
+
authors:
|
|
41
|
+
- name: "Farinotti, D."
|
|
42
|
+
- name: "Pistocchi, A."
|
|
43
|
+
- name: "Huss, M."
|
|
44
|
+
year: 2016
|
|
45
|
+
journal: "Environmental Research Letters"
|
|
46
|
+
volume: 11
|
|
47
|
+
issue: 5
|
|
48
|
+
doi: "10.1088/1748-9326/11/5/054022"
|
|
49
|
+
- type: article
|
|
50
|
+
title: "Large hydropower and water-storage potential in future glacier-free basins"
|
|
51
|
+
authors:
|
|
52
|
+
- name: "Farinotti, D."
|
|
53
|
+
- name: "Round, V."
|
|
54
|
+
- name: "Huss, M."
|
|
55
|
+
- name: "Compagno, L."
|
|
56
|
+
- name: "Zekollari, H."
|
|
57
|
+
year: 2019
|
|
58
|
+
journal: "Nature"
|
|
59
|
+
volume: 575
|
|
60
|
+
start: 341
|
|
61
|
+
doi: "10.1038/s41586-019-1740-z"
|
|
62
|
+
- type: article
|
|
63
|
+
title: "Global-scale hydrological response to future glacier mass loss"
|
|
64
|
+
authors:
|
|
65
|
+
- name: "Huss, M."
|
|
66
|
+
- name: "Hock, R."
|
|
67
|
+
year: 2018
|
|
68
|
+
journal: "Nature Climate Change"
|
|
69
|
+
volume: 8
|
|
70
|
+
start: 135
|
|
71
|
+
doi: "10.1038/s41558-017-0049-x"
|
|
72
|
+
- type: article
|
|
73
|
+
title: "Asia's glaciers are a regionally important buffer against drought"
|
|
74
|
+
authors:
|
|
75
|
+
- name: "Pritchard, H.D."
|
|
76
|
+
year: 2017
|
|
77
|
+
journal: "Nature"
|
|
78
|
+
volume: 545
|
|
79
|
+
start: 169
|
|
80
|
+
doi: "10.1038/nature22062"
|
|
81
|
+
- type: article
|
|
82
|
+
title: "Importance and vulnerability of the world's water towers"
|
|
83
|
+
authors:
|
|
84
|
+
- name: "Immerzeel, W.W."
|
|
85
|
+
- name: "Lutz, A.F."
|
|
86
|
+
- name: "Andrade, M."
|
|
87
|
+
year: 2020
|
|
88
|
+
journal: "Nature"
|
|
89
|
+
volume: 577
|
|
90
|
+
start: 364
|
|
91
|
+
doi: "10.1038/s41586-019-1822-y"
|
|
92
|
+
- type: article
|
|
93
|
+
title: "Global impacts of glacier retreat on ecosystem services provided by soil and vegetation in mountain regions: A literature review"
|
|
94
|
+
authors:
|
|
95
|
+
- name: "Velasquez Casallas, L.M."
|
|
96
|
+
- name: "Khelidj, N."
|
|
97
|
+
- name: "Moran-Ordonez, A."
|
|
98
|
+
- name: "Losapio, G."
|
|
99
|
+
year: 2025
|
|
100
|
+
journal: "Ecosystem Services"
|
|
101
|
+
volume: 73
|
|
102
|
+
doi: "10.1016/j.ecoser.2025.101730"
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
# DISCLAIMER — Two Confidence Tiers, No Framework Bridge
|
|
2
|
+
|
|
3
|
+
**Status: Core = real, independently re-verified science. Optional =
|
|
4
|
+
this ecosystem's own discretization of a source document's proposed
|
|
5
|
+
formula, not a peer-reviewed metric. NO UTAC/CREP/AFET bridge.**
|
|
6
|
+
|
|
7
|
+
## Core tier — real, independently re-verified 2026-08-14
|
|
8
|
+
|
|
9
|
+
Every figure below was checked directly against the paper (DOI lookup
|
|
10
|
+
or publisher/press summary) on 2026-08-14.
|
|
11
|
+
|
|
12
|
+
- **van Tiel, Huss, Zappa, Jonas & Farinotti (2026)**, *HESS* 30,
|
|
13
|
+
23-43, DOI: 10.5194/hess-30-23-2026 — the strongest empirical anchor
|
|
14
|
+
in this package series. 88 glacierized Swiss catchments; 2022 mass
|
|
15
|
+
loss ~6% of remaining volume; glacier melt still substantially
|
|
16
|
+
buffered the 2022 drought's precipitation/snowmelt deficits, while
|
|
17
|
+
absolute summer meltwater volume was already below the comparable
|
|
18
|
+
2003 extreme in roughly two-thirds of catchments. The buffer works
|
|
19
|
+
and its capacity is eroding, simultaneously, already observed.
|
|
20
|
+
- **Farinotti, Pistocchi & Huss (2016)**, *ERL* 11(5), 054022, DOI:
|
|
21
|
+
10.1088/1748-9326/11/5/054022 — the ~65% reservoir-strategy ceiling
|
|
22
|
+
on Alpine summer-runoff-CHANGE compensation, reused from P100 with
|
|
23
|
+
the same scoping discipline: a specific regional scenario-bound
|
|
24
|
+
estimate, not a universal replacement constant. Farinotti et al.
|
|
25
|
+
explicitly state reservoirs cannot compensate the annual
|
|
26
|
+
non-renewable runoff share permanently lost as glacier ice
|
|
27
|
+
disappears.
|
|
28
|
+
- **Farinotti, Round, Huss, Compagno & Zekollari (2019)**, *Nature*
|
|
29
|
+
575, 341-344, DOI: 10.1038/s41586-019-1740-z — global theoretical
|
|
30
|
+
ice-free-basin storage potential (875±260 km³ across ~185,000
|
|
31
|
+
glaciers analyzed), of which only ~40% (355 km³) was judged
|
|
32
|
+
potentially suitable after a first-pass technical/ecological/
|
|
33
|
+
economic screen. The paper itself stresses the theoretical character
|
|
34
|
+
of the 875 km³ figure.
|
|
35
|
+
- **Huss & Hock (2018)**, *Nature Climate Change* 8, 135-140, DOI:
|
|
36
|
+
10.1038/s41558-017-0049-x — "peak water" (reused from P99).
|
|
37
|
+
- **Pritchard (2017)**, *Nature* 545, 169-174, DOI:
|
|
38
|
+
10.1038/nature22062 — the origin of the "glaciers as a regionally
|
|
39
|
+
important drought buffer" framing this entire package series builds
|
|
40
|
+
on.
|
|
41
|
+
- **Immerzeel, Lutz, Andrade et al. (2020)**, *Nature* 577, 364-369,
|
|
42
|
+
DOI: 10.1038/s41586-019-1822-y — the Water Tower Index: 1.9 billion
|
|
43
|
+
people dependent globally; some of the most hydrologically important
|
|
44
|
+
water towers (Indus, Amu Darya, Tarim) are simultaneously among the
|
|
45
|
+
most vulnerable.
|
|
46
|
+
- **Velasquez Casallas, Khelidj, Moran-Ordonez & Losapio (2025)**,
|
|
47
|
+
*Ecosystem Services* 73, 101730, DOI: 10.1016/j.ecoser.2025.101730 —
|
|
48
|
+
a systematic literature review: postglacial regulating ecosystem
|
|
49
|
+
services (climate regulation, erosion control) can increase, but
|
|
50
|
+
heterogeneously, with real trade-offs — not a uniform net benefit.
|
|
51
|
+
|
|
52
|
+
## Optional tier — this ecosystem's own construction, flagged
|
|
53
|
+
|
|
54
|
+
- **`gbr.py`'s Glacier Buffer Replacement (GBR) score** is **not a
|
|
55
|
+
peer-reviewed metric**. It is a discretized implementation of a
|
|
56
|
+
formula proposed in `P102.md` (Kimi's own synthesis, itself building
|
|
57
|
+
on this package's real drought/streamflow evidence) — the scoring
|
|
58
|
+
formula carries no primary citation. This mirrors
|
|
59
|
+
`glacier-buffer-replacement-utac` (P100)'s Resilience Replacement
|
|
60
|
+
Factor precedent: every function in `gbr.py` is exported alongside
|
|
61
|
+
`GBR_NOT_PEER_REVIEWED_WARNING`.
|
|
62
|
+
|
|
63
|
+
## What this is NOT
|
|
64
|
+
|
|
65
|
+
- **Not a claim that ecosystem restoration or storage portfolios fully
|
|
66
|
+
replace lost glacier hydrology.** `theoretical_vs_realistic_gap_fraction()`
|
|
67
|
+
and `FARINOTTI_2016_SCOPE_NOTE` make the same physical ceiling
|
|
68
|
+
explicit that P100's `mass_balance` module encodes for reservoirs
|
|
69
|
+
alone: this package broadens the portfolio, it does not remove the
|
|
70
|
+
underlying mass-balance limit.
|
|
71
|
+
- **`nbs_effect_is_guaranteed_positive()` always returns `False`** —
|
|
72
|
+
intentionally. Nature-based Solutions are real and often valuable,
|
|
73
|
+
but their hydrological effect must be measured locally, never
|
|
74
|
+
assumed from the "natural" label.
|
|
75
|
+
- **No UTAC/CREP/AFET bridge.** This is a real, standalone hydrology
|
|
76
|
+
and ecosystem-science topic; the cited papers already provide the
|
|
77
|
+
relevant quantitative structure without this ecosystem's
|
|
78
|
+
cross-domain vocabulary.
|
|
79
|
+
|
|
80
|
+
## References
|
|
81
|
+
|
|
82
|
+
- van Tiel, M., Huss, M., Zappa, M., Jonas, T., Farinotti, D. (2026).
|
|
83
|
+
*HESS*, 30, 23-43. DOI: 10.5194/hess-30-23-2026.
|
|
84
|
+
- Farinotti, D., Pistocchi, A., Huss, M. (2016). *ERL*, 11(5), 054022.
|
|
85
|
+
DOI: 10.1088/1748-9326/11/5/054022.
|
|
86
|
+
- Farinotti, D., Round, V., Huss, M., Compagno, L., Zekollari, H.
|
|
87
|
+
(2019). *Nature*, 575, 341-344. DOI: 10.1038/s41586-019-1740-z.
|
|
88
|
+
- Huss, M., Hock, R. (2018). *Nature Climate Change*, 8, 135-140. DOI:
|
|
89
|
+
10.1038/s41558-017-0049-x.
|
|
90
|
+
- Pritchard, H.D. (2017). *Nature*, 545, 169-174. DOI:
|
|
91
|
+
10.1038/nature22062.
|
|
92
|
+
- Immerzeel, W.W., Lutz, A.F., Andrade, M. et al. (2020). *Nature*,
|
|
93
|
+
577, 364-369. DOI: 10.1038/s41586-019-1822-y.
|
|
94
|
+
- Velasquez Casallas, L.M., Khelidj, N., Moran-Ordonez, A., Losapio, G.
|
|
95
|
+
(2025). *Ecosystem Services*, 73, 101730. DOI:
|
|
96
|
+
10.1016/j.ecoser.2025.101730.
|
|
97
|
+
|
|
98
|
+
All verified directly (2026-08-14) via WebSearch against the
|
|
99
|
+
publisher/journal record for each paper. Originating dialogue:
|
|
100
|
+
`P 102.txt` (Johann + Kimi) and `P102.md` (Kimi's own deep-research
|
|
101
|
+
audit, which proposed splitting P102 into a paraglacial-hazard package
|
|
102
|
+
[P102, see `paraglacial-hazard-utac`] and this hydrological/ecosystem
|
|
103
|
+
package [P103] rather than one monolithic three-pillar package —
|
|
104
|
+
independently spot-checked before building either).
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 JohannRömer
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: distributed-buffer-resilience-utac
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
Summary: Distributed hydrological/ecosystem buffer resilience for deglacierizing catchments -- van Tiel et al. 2026's drought-buffer evidence, Farinotti et al. 2016/2019's storage-portfolio figures, Immerzeel/Pritchard water-tower science, Casallas et al. 2025 ecosystem-service trade-offs, plus a clearly-flagged speculative GBR score -- companion to glacier-buffer-utac (P99) and glacier-buffer-replacement-utac (P100), no UTAC/CREP bridge
|
|
5
|
+
Project-URL: Homepage, https://github.com/GenesisAeon/distributed-buffer-resilience-utac
|
|
6
|
+
Project-URL: Repository, https://github.com/GenesisAeon/distributed-buffer-resilience-utac
|
|
7
|
+
Author: Römer, Johann
|
|
8
|
+
License: MIT
|
|
9
|
+
License-File: LICENSE
|
|
10
|
+
Requires-Python: >=3.11
|
|
11
|
+
Provides-Extra: dev
|
|
12
|
+
Requires-Dist: mypy>=1.10.0; extra == 'dev'
|
|
13
|
+
Requires-Dist: pre-commit>=3.7.0; extra == 'dev'
|
|
14
|
+
Requires-Dist: pytest-cov>=5.0.0; extra == 'dev'
|
|
15
|
+
Requires-Dist: pytest>=8.0.0; extra == 'dev'
|
|
16
|
+
Requires-Dist: ruff>=0.6.0; extra == 'dev'
|
|
17
|
+
Description-Content-Type: text/markdown
|
|
18
|
+
|
|
19
|
+
# distributed-buffer-resilience-utac
|
|
20
|
+
|
|
21
|
+
GenesisAeon Package 103 — distributed hydrological/ecosystem buffer
|
|
22
|
+
resilience for deglacierizing catchments. Companion to
|
|
23
|
+
[glacier-buffer-utac](https://github.com/GenesisAeon/glacier-buffer-utac)
|
|
24
|
+
(P99, the loss) and
|
|
25
|
+
[glacier-buffer-replacement-utac](https://github.com/GenesisAeon/glacier-buffer-replacement-utac)
|
|
26
|
+
(P100, technical replacement). **Deliberately has no UTAC/CREP/AFET
|
|
27
|
+
bridge** — see [DISCLAIMER.md](DISCLAIMER.md).
|
|
28
|
+
|
|
29
|
+
## The core idea
|
|
30
|
+
|
|
31
|
+
A single storage type can't replace a glacier. What actually buffers a
|
|
32
|
+
deglacierizing catchment is a **portfolio** of reservoirs, groundwater,
|
|
33
|
+
wetlands, snow, and demand management, each with a different response
|
|
34
|
+
time — not one component sized to do the whole job.
|
|
35
|
+
|
|
36
|
+
## Two explicit confidence tiers
|
|
37
|
+
|
|
38
|
+
- **Core** (`drought_buffer`, `storage_portfolio`, `water_towers`,
|
|
39
|
+
`ecosystem_services`): real, peer-reviewed findings independently
|
|
40
|
+
re-verified 2026-08-14.
|
|
41
|
+
- **Optional / speculative** (`gbr`): a ratio-style score this
|
|
42
|
+
ecosystem constructed from a source document's own proposed formula
|
|
43
|
+
— not a published metric. Always exposed with
|
|
44
|
+
`GBR_NOT_PEER_REVIEWED_WARNING`.
|
|
45
|
+
|
|
46
|
+
## What's real here (core)
|
|
47
|
+
|
|
48
|
+
- **van Tiel et al. (2026, *HESS*)** — the strongest empirical anchor
|
|
49
|
+
in the whole P99–P103 series: during the extreme 2022 Swiss drought,
|
|
50
|
+
glacier melt across 88 catchments still substantially buffered
|
|
51
|
+
precipitation/snowmelt deficits — yet absolute summer meltwater
|
|
52
|
+
volume was already lower than 2003 in roughly two-thirds of studied
|
|
53
|
+
catchments. The buffer works AND its capacity is eroding, at the
|
|
54
|
+
same time, already observed, not projected.
|
|
55
|
+
- **Farinotti et al. (2016, *ERL*)** — the ~65% Alpine reservoir
|
|
56
|
+
summer-deficit ceiling, correctly scoped as a specific, regional,
|
|
57
|
+
scenario-bound estimate (not a universal constant — see
|
|
58
|
+
`FARINOTTI_2016_SCOPE_NOTE`).
|
|
59
|
+
- **Farinotti et al. (2019, *Nature*)** — global theoretical
|
|
60
|
+
ice-free-basin storage potential (875±260 km³ across ~185,000
|
|
61
|
+
glaciers), with only ~40% (355 km³) judged realistically suitable
|
|
62
|
+
after a first-pass screen.
|
|
63
|
+
- **Pritchard (2017, *Nature*)** and **Immerzeel et al. (2020,
|
|
64
|
+
*Nature*)** — glaciers as a disproportionate drought buffer, and the
|
|
65
|
+
Water Tower Index ranking mountain water systems by importance AND
|
|
66
|
+
vulnerability (1.9 billion people dependent globally).
|
|
67
|
+
- **Velasquez Casallas et al. (2025, *Ecosystem Services*)** — a
|
|
68
|
+
systematic review finding postglacial ecosystem services can
|
|
69
|
+
increase, but heterogeneously, with real trade-offs — never assume a
|
|
70
|
+
Nature-based Solution is hydrologically positive purely from its
|
|
71
|
+
label. `nbs_effect_is_guaranteed_positive()` always returns `False`.
|
|
72
|
+
|
|
73
|
+
## Quickstart
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
pip install distributed-buffer-resilience-utac
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
```python
|
|
80
|
+
from distributed_buffer_resilience_utac import (
|
|
81
|
+
SWISS_2022_DROUGHT,
|
|
82
|
+
buffer_functions_while_eroding,
|
|
83
|
+
reservoir_summer_deficit_ceiling_fraction,
|
|
84
|
+
GLOBAL_STORAGE_POTENTIAL,
|
|
85
|
+
is_disproportionate_drought_buffer,
|
|
86
|
+
nbs_effect_is_guaranteed_positive,
|
|
87
|
+
GBR_NOT_PEER_REVIEWED_WARNING,
|
|
88
|
+
glacier_buffer_replacement_score,
|
|
89
|
+
)
|
|
90
|
+
|
|
91
|
+
print(SWISS_2022_DROUGHT.catchment_count) # 88
|
|
92
|
+
print(buffer_functions_while_eroding()) # True
|
|
93
|
+
print(reservoir_summer_deficit_ceiling_fraction()) # 0.65
|
|
94
|
+
print(GLOBAL_STORAGE_POTENTIAL.realistic_km3) # 355.0
|
|
95
|
+
print(is_disproportionate_drought_buffer(10.0, 40.0)) # True
|
|
96
|
+
print(nbs_effect_is_guaranteed_positive()) # False
|
|
97
|
+
|
|
98
|
+
print(GBR_NOT_PEER_REVIEWED_WARNING)
|
|
99
|
+
score = glacier_buffer_replacement_score(
|
|
100
|
+
deficit_without_adaptation=[10.0, 10.0],
|
|
101
|
+
flow_gain_from_adaptation=[5.0, 0.0],
|
|
102
|
+
)
|
|
103
|
+
print(score) # 0.25
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
## Development
|
|
107
|
+
|
|
108
|
+
```bash
|
|
109
|
+
pip install -e ".[dev]"
|
|
110
|
+
pre-commit install
|
|
111
|
+
ruff check src tests
|
|
112
|
+
mypy src
|
|
113
|
+
pytest
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
## Citation
|
|
117
|
+
|
|
118
|
+
See [CITATION.cff](CITATION.cff) and [.zenodo.json](.zenodo.json).
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
# distributed-buffer-resilience-utac
|
|
2
|
+
|
|
3
|
+
GenesisAeon Package 103 — distributed hydrological/ecosystem buffer
|
|
4
|
+
resilience for deglacierizing catchments. Companion to
|
|
5
|
+
[glacier-buffer-utac](https://github.com/GenesisAeon/glacier-buffer-utac)
|
|
6
|
+
(P99, the loss) and
|
|
7
|
+
[glacier-buffer-replacement-utac](https://github.com/GenesisAeon/glacier-buffer-replacement-utac)
|
|
8
|
+
(P100, technical replacement). **Deliberately has no UTAC/CREP/AFET
|
|
9
|
+
bridge** — see [DISCLAIMER.md](DISCLAIMER.md).
|
|
10
|
+
|
|
11
|
+
## The core idea
|
|
12
|
+
|
|
13
|
+
A single storage type can't replace a glacier. What actually buffers a
|
|
14
|
+
deglacierizing catchment is a **portfolio** of reservoirs, groundwater,
|
|
15
|
+
wetlands, snow, and demand management, each with a different response
|
|
16
|
+
time — not one component sized to do the whole job.
|
|
17
|
+
|
|
18
|
+
## Two explicit confidence tiers
|
|
19
|
+
|
|
20
|
+
- **Core** (`drought_buffer`, `storage_portfolio`, `water_towers`,
|
|
21
|
+
`ecosystem_services`): real, peer-reviewed findings independently
|
|
22
|
+
re-verified 2026-08-14.
|
|
23
|
+
- **Optional / speculative** (`gbr`): a ratio-style score this
|
|
24
|
+
ecosystem constructed from a source document's own proposed formula
|
|
25
|
+
— not a published metric. Always exposed with
|
|
26
|
+
`GBR_NOT_PEER_REVIEWED_WARNING`.
|
|
27
|
+
|
|
28
|
+
## What's real here (core)
|
|
29
|
+
|
|
30
|
+
- **van Tiel et al. (2026, *HESS*)** — the strongest empirical anchor
|
|
31
|
+
in the whole P99–P103 series: during the extreme 2022 Swiss drought,
|
|
32
|
+
glacier melt across 88 catchments still substantially buffered
|
|
33
|
+
precipitation/snowmelt deficits — yet absolute summer meltwater
|
|
34
|
+
volume was already lower than 2003 in roughly two-thirds of studied
|
|
35
|
+
catchments. The buffer works AND its capacity is eroding, at the
|
|
36
|
+
same time, already observed, not projected.
|
|
37
|
+
- **Farinotti et al. (2016, *ERL*)** — the ~65% Alpine reservoir
|
|
38
|
+
summer-deficit ceiling, correctly scoped as a specific, regional,
|
|
39
|
+
scenario-bound estimate (not a universal constant — see
|
|
40
|
+
`FARINOTTI_2016_SCOPE_NOTE`).
|
|
41
|
+
- **Farinotti et al. (2019, *Nature*)** — global theoretical
|
|
42
|
+
ice-free-basin storage potential (875±260 km³ across ~185,000
|
|
43
|
+
glaciers), with only ~40% (355 km³) judged realistically suitable
|
|
44
|
+
after a first-pass screen.
|
|
45
|
+
- **Pritchard (2017, *Nature*)** and **Immerzeel et al. (2020,
|
|
46
|
+
*Nature*)** — glaciers as a disproportionate drought buffer, and the
|
|
47
|
+
Water Tower Index ranking mountain water systems by importance AND
|
|
48
|
+
vulnerability (1.9 billion people dependent globally).
|
|
49
|
+
- **Velasquez Casallas et al. (2025, *Ecosystem Services*)** — a
|
|
50
|
+
systematic review finding postglacial ecosystem services can
|
|
51
|
+
increase, but heterogeneously, with real trade-offs — never assume a
|
|
52
|
+
Nature-based Solution is hydrologically positive purely from its
|
|
53
|
+
label. `nbs_effect_is_guaranteed_positive()` always returns `False`.
|
|
54
|
+
|
|
55
|
+
## Quickstart
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
pip install distributed-buffer-resilience-utac
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
```python
|
|
62
|
+
from distributed_buffer_resilience_utac import (
|
|
63
|
+
SWISS_2022_DROUGHT,
|
|
64
|
+
buffer_functions_while_eroding,
|
|
65
|
+
reservoir_summer_deficit_ceiling_fraction,
|
|
66
|
+
GLOBAL_STORAGE_POTENTIAL,
|
|
67
|
+
is_disproportionate_drought_buffer,
|
|
68
|
+
nbs_effect_is_guaranteed_positive,
|
|
69
|
+
GBR_NOT_PEER_REVIEWED_WARNING,
|
|
70
|
+
glacier_buffer_replacement_score,
|
|
71
|
+
)
|
|
72
|
+
|
|
73
|
+
print(SWISS_2022_DROUGHT.catchment_count) # 88
|
|
74
|
+
print(buffer_functions_while_eroding()) # True
|
|
75
|
+
print(reservoir_summer_deficit_ceiling_fraction()) # 0.65
|
|
76
|
+
print(GLOBAL_STORAGE_POTENTIAL.realistic_km3) # 355.0
|
|
77
|
+
print(is_disproportionate_drought_buffer(10.0, 40.0)) # True
|
|
78
|
+
print(nbs_effect_is_guaranteed_positive()) # False
|
|
79
|
+
|
|
80
|
+
print(GBR_NOT_PEER_REVIEWED_WARNING)
|
|
81
|
+
score = glacier_buffer_replacement_score(
|
|
82
|
+
deficit_without_adaptation=[10.0, 10.0],
|
|
83
|
+
flow_gain_from_adaptation=[5.0, 0.0],
|
|
84
|
+
)
|
|
85
|
+
print(score) # 0.25
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
## Development
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
pip install -e ".[dev]"
|
|
92
|
+
pre-commit install
|
|
93
|
+
ruff check src tests
|
|
94
|
+
mypy src
|
|
95
|
+
pytest
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
## Citation
|
|
99
|
+
|
|
100
|
+
See [CITATION.cff](CITATION.cff) and [.zenodo.json](.zenodo.json).
|