Skip to content

Predict with climate outside the maxAsymptote ceiling when the ledger row asks for it - #30

Merged
eliotmcintire merged 1 commit into
developmentfrom
feat/climate-outside-ceiling
Oct 18, 2026
Merged

eliotmcintire merged 1 commit into
developmentfrom
feat/climate-outside-ceiling

Conversation

@eliotmcintire

Copy link
Copy Markdown
Collaborator

Lets spread predictions follow a fit that puts drought after the fuel-driven ceiling on spread probability, using the same formula and the same reference climate the fit stored, so a fit and its forecast cannot disagree. Rows from existing fits predict exactly as before.

Affects: only ledger rows written by fireSense_spreadFit with spreadLink = "climateOutside"; every other row gives the same values as today.

Depends-on: PredictiveEcology/fireSenseUtils#165

Technical details
  • spreadProbOneELF() computes the spread probability with fireSenseUtils::spreadProbFromCovs() (the one function the fit uses) instead of logisticAll(), and hands it the row's climate reference from ledgerClimateRef() (fireSenseUtils::spreadFitClimateRefTxt); with several ELFs each row uses its own. Without a reference spreadProbFromCovs() is logisticAll(), so old rows are unchanged.
  • fireSense_burn already adds the year effect on qlogis(p), which is the new link's last step, so it needs no change.
  • fireSenseUtils floor 0.2.3.9106.

Tests: tests/testthat/test-climateOutside.R (hand-computed values: p0 under the ceiling plus the climate shift on the logit, above maxAsymptote where climate is high and equal to p0 at the reference; rows without a reference identical to the baseline; two ELFs each with their own reference, blended). Whole module suite: 168 pass.

🤖 Generated with Claude Code

https://claude.ai/code/session_014G18Mik3fH4z5M5CyMSUS6

… row asks for it

spreadProbOneELF() computes the spread probability with
fireSenseUtils::spreadProbFromCovs(), the one function the fit uses, and hands
it the row's climate reference (fireSenseUtils::spreadFitClimateRefTxt,
ledgerClimateRef()). A row with a reference (fireSense_spreadFit's
spreadLink = "climateOutside") gets the climate term on the logit after the fuel
ceiling, exactly as in the fit; a row without one predicts as before. With
several ELFs each row uses its own. fireSenseUtils floor 0.2.3.9106.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014G18Mik3fH4z5M5CyMSUS6
@eliotmcintire eliotmcintire added enhancement New feature or request backwards compatible Existing code and results keep working unchanged labels Oct 18, 2026
@eliotmcintire
eliotmcintire merged commit e652209 into development Oct 18, 2026
9 checks passed
@eliotmcintire
eliotmcintire deleted the feat/climate-outside-ceiling branch October 18, 2026 15:06
eliotmcintire added a commit that referenced this pull request Oct 18, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014G18Mik3fH4z5M5CyMSUS6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backwards compatible Existing code and results keep working unchanged enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant