Repository navigation
Predict with the fitted terms, not the spread formula's - #28
Merged
Merged
Conversation
spreadProbOneELF() (fireSense_spreadPredict.R:290-305) took the covariates from sim$fireSense_spreadFormula for a single ELF, so a formula rebuilt on another year's land cover stopped a hindcast. The single-ELF path now uses the fitted parameters' terms, as the multi-ELF path did. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CwcjqqK59FmTJscyi7xUqv
eliotmcintire
added a commit
that referenced
this pull request
Oct 14, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CwcjqqK59FmTJscyi7xUqv
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.
A hindcast run stopped with "not found in data objects" because the spread formula had a term that the fitted model does not have. The module now predicts with the terms the fit actually has.
Affects: Runs where the formula already matched the fit give identical results; runs whose formula had an extra term now predict instead of stopping.
Technical details
Defect:
fireSense_spreadPredict.R:290-305(spreadProbOneELF) took the single-ELF covariates fromsim$fireSense_spreadFormula, while the multi-ELF path (byParams = TRUE) used the fitted terms. In a hindcast the formula is rebuilt on 1985 land cover and can containtreedWetland_agb, which the ledger fit lacks.Fix: both paths now cut the covariates to the fitted terms and the
formulaandbyParamsarguments are gone. A fitted coefficient with no covariate still stops, naming it. The warning for unused covariates is removed because it can no longer fire. No RNG is used here.Tests: new
test-fittedTerms.R(extra formula term, missing formula term, extra covariate column); it errors on the base and passes on the branch. Three old tests that asserted errors on formula terms were removed and one test now expects no warning. Module tests viaconvertToPackage+test_local, scratch libraryphase4/lib: base with the new tests 58 tests, 1 error; branch 55 tests, 0 failures.🤖 Generated with Claude Code
https://claude.ai/code/session_01CwcjqqK59FmTJscyi7xUqv