Skip to content

Apply an escape fit's year climate term to the expected escapes - #49

Merged
eliotmcintire merged 5 commits into
developmentfrom
escapeYearClimate
Nov 26, 2026
Merged

eliotmcintire merged 5 commits into
developmentfrom
escapeYearClimate

Conversation

@eliotmcintire

@eliotmcintire eliotmcintire commented Nov 25, 2026 •

Copy link
Copy Markdown
Collaborator

When an escape fit has a year-level climate term, the predicted escapes in dry years now follow it, the same way ignitions already do. This also applies the S-shaped option stored in a fit.

Affects: nothing for existing fits (they have no escape term). Fits made with escapeYearClimate in fireSense_ignitionFit give escapes that follow the year's climate.

Depends-on: PredictiveEcology/fireSenseUtils#264

Technical details

Defect: IgnitionPredictRun() (fireSense_ignitionPredict.R) multiplied only the ignition predictions by yearClimateMultiplierOf(); predsEscs had no term. Fix: the escape prediction is multiplied by yearClimateMultiplierOf(f$esc, igCovAll[f$allRows]), the same year mean as the ignitions'. A fit without a term gives 1 and does not read the covariates (lazy argument, so the old if (!is.null(...yearClimate)) guard is dropped). A logistic term goes through fireSenseUtils::yearClimateMultiplier(). fireSense_burn needs no change.

Reuses: yearClimateMultiplierOf() (now for either fit), fireSenseUtils::yearClimateMeans(), yearClimateMultiplier(); new: nothing.

Tests (module converted to a package): branch 148 passed, 0 failed; base (development) 139 passed, 0 failed. The new escape tests (loglinear, logistic, saturation both sides) fail on the base. fireSenseUtils floor >= 0.2.3.9195 (the version #264 gets after its merge bump). No version bump.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Lx3DXhXsFis2pbqBTh2PPh

@eliotmcintire eliotmcintire added enhancement New feature or request backwards compatible Existing code and results keep working unchanged labels Nov 25, 2026
eliotmcintire and others added 4 commits November 25, 2026 16:20
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Lx3DXhXsFis2pbqBTh2PPh
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Lx3DXhXsFis2pbqBTh2PPh
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Lx3DXhXsFis2pbqBTh2PPh
@eliotmcintire
eliotmcintire merged commit d593269 into development Nov 26, 2026
9 checks passed
@eliotmcintire
eliotmcintire deleted the escapeYearClimate branch November 26, 2026 02:53
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
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