Skip to content

Climate slope split into ignition, escape-rate and fire-size slopes - #30

Merged
eliotmcintire merged 2 commits into
developmentfrom
slopeSplit
Dec 1, 2026
Merged

eliotmcintire merged 2 commits into
developmentfrom
slopeSplit

Conversation

@eliotmcintire

Copy link
Copy Markdown
Contributor

The simulated annual area burned responds to the year's climate at only about 60% of the observed slope. This adds a table that says which of three channels (how many ignitions, how many of them escape, how big the escaped fires are) holds the missing response.

Affects: adds a table to the validation page and rows to the results file (test C); existing scores, gates and tables are unchanged.

Depends-on: #29

Technical details

log(area) = log(ignitions) + log(escapes / ignitions) + log(area50 / escapes), so the slope of log area on the standardised covariate is the sum of three slopes. scoreSlopeSplit() (R/climateResponse.R) computes them for the observed record and for each run, over the same years: scored years with at least one ignition, one escape and some area. A year with no escape has no log(area / escapes), so it is dropped from all three parts. The parts then add up exactly to the total slope on those years (least-squares slopes are linear in the response). Per ELF: simulated (median of runs, single-run range), observed, difference sim - obs, obs N%. Pooled: median over ELFs with the 2.5-97.5% range over ELFs (elfRange() via poolRatios()). runWave1() returns slopeSplit and adds rows to results (test C, null slopeIgnitions / slopeEscapeRate / slopeSize, measure difference). buildValidationPage() has a new slopeSplit argument; the page has a sortable table under the climate table with a note that the three differences add up to the total slope difference. NEWS has a bullet.

Reuses: scoredYears(), covariateOf(), obsBy(), runSummary(), poolRatios(), elfRange(), longRows(), rangeCell(), ratioCell(), the page's sortableTable(); the covariate standardisation, the slope fit and the pooled rows were pulled out of scoreClimateResponse() / climateTable() into climateInputs(), logSlope() and withPooled() and are called by both. New: slopeParts(), scoreSlopeSplit(), slopeSplitTable(), slopeSplitResultRows(), slopeSplitPageRows() (nothing existing splits a slope by channel; the last two follow the climate versions' output but for other columns and measure).

Tests: new test-slopeSplit.R (toy ELF where only the escape rate responds: the escape component carries the whole difference, the others are 0; parts add to the total; zero-escape years; pooled row and result rows; runWave1 and the page table). climToy() moved to helper-source.R so both test files use it. Full suite (convertToPackage + test_local, BLAS/OMP threads 1, data.table 1): branch 709 expectations, 0 failures, 0 skipped; base (#29 head) 664, 0 failures. The new file fails on base (4 failures, 5 errors: no scoreSlopeSplit, no slopeSplit result).

🤖 Generated with Claude Code

https://claude.ai/code/session_01Lx3DXhXsFis2pbqBTh2PPh

…table, results rows, page table)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Lx3DXhXsFis2pbqBTh2PPh
@eliotmcintire eliotmcintire added enhancement New feature or request backwards compatible Does not break existing behaviour labels Nov 25, 2026
Climate-split page rows carry their own comparison values (ref) as the climate rows now do.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Lx3DXhXsFis2pbqBTh2PPh
@eliotmcintire
eliotmcintire merged commit b82461d into development Dec 1, 2026
3 checks passed
eliotmcintire added a commit that referenced this pull request Dec 1, 2026
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Lx3DXhXsFis2pbqBTh2PPh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backwards compatible Does not break existing behaviour enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant