Repository navigation
Climate slope as simulated, observed and difference; pooled range is the 2.5-97.5% quantiles over ELFs - #29
Merged
Merged
Conversation
… over ELFs is the 2.5-97.5% quantiles Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Lx3DXhXsFis2pbqBTh2PPh
…ange from runSummary(); one 95% range helper Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Lx3DXhXsFis2pbqBTh2PPh
eliotmcintire
added a commit
that referenced
this pull request
Nov 26, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Lx3DXhXsFis2pbqBTh2PPh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The climate-response table showed the slope as a ratio of simulated to observed. Where the observed climate signal is near zero, that ratio gives wild numbers (for example -3.7 to 13.4 across ELFs) that read as large biases. The slope is now shown in its own units, with the simulated slope, the observed slope and their difference.
Affects: the slope columns of the climate table on the page and the slope rows of
wave1_results.csv(measuredifferenceinstead ofratio); the pooled ranges over ELFs in the bias and climate tables are narrower (2.5-97.5% instead of min-max).Technical details
Defects. (1)
R/climateResponse.R:31(ratioTo) divided the sim slope by the obs slope and set NA when the obs slope was near 0. (2)R/ratioTable.R:9-10(poolRatios()) tookmin()/max()of the finite ELF values as the pooled range (elfLo,elfHi), andR/bias.R:poolBias()did the same formeanLo/meanHi. The page notes call it "the range over ELFs" next to a 95% single-run range, so one wild ELF set it (slope: -3.69..13.42 vs 2.5-97.5% quantiles -0.72..2.49 over the 47 ELFs).Fix. Slope per run is
sim - obs; the table getssimLo/simHiand the observed slope isobserved; an observed slope of 0 gives a finite difference.runSummary()getsat(0 for the slope difference, 1 for ratios), soobsRankfor the slope is the share of runs below the observed slope (this also fixes the rank for a negative observed slope).climateResultRows()writes measuredifferencefor the slope. The page table shows Simulated slope, Observed slope, Difference with run range and "obs N%", Driest 10%, Wetter half; the page'sratioCell()takes the reference value (0 for a difference) for the "observed outside" shading; notes rewritten. NewelfRange()(2.5-97.5% quantiles of the finite values) is used bypoolRatios()andpoolBias(); pooled medians are unchanged. NEWS bullets added; no version bump.Reuses:
runSummary()(generalised withat),poolRatios()(range changed in place),longRows(),rangeCell(),ratioCell()(R and page),sortableTable(),medFinite(); new:elfRange()(nothing else computed the 2.5-97.5% range over ELFs; min/max was inline in two places).Tests (
convertToPackage()+test_local(), BLAS/OMP threads 1, data.table 1 thread): branch 127 tests, 664 passed, 0 failed, 0 skipped. Basedevelopmentwith the branch's test files: 29 failed, 1 error (new slope-difference, observed-slope-0, pooled-quantile, measure and page-column tests, plus the two bias range tests). New tests: per-ELF difference on a toy ELF with known slopes (median, range, rank), observed slope 0 finite, pooled row andelfRange(), result measure, page columns in order.🤖 Generated with Claude Code
https://claude.ai/code/session_01Lx3DXhXsFis2pbqBTh2PPh