Repository navigation
Spread covariates of a ~ 1 spread fit: no climate layer to select - #47
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014G18Mik3fH4z5M5CyMSUS6
…gnition uses it too Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014G18Mik3fH4z5M5CyMSUS6
eliotmcintire
added a commit
that referenced
this pull request
Nov 17, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014G18Mik3fH4z5M5CyMSUS6
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.
Predictions for an ELF whose spread model has no covariates (a constant spread probability) stopped while building the year's covariates. They now build, without a climate column, so the null-arm hindcasts can run.
Affects: hindcasts and forecasts that use an intercept-only spread fit; any fit with a spread climate variable is unchanged.
Depends-on: PredictiveEcology/fireSenseUtils#241 (the same null hindcast fails first in
fireSense_dataPrepFit, inclimateRasterToDataTable()).Technical details
Defect:
fireSense_dataPrepPredict.Rprepare_SpreadPredict()andcovariatesBuilt()indexcurrentClimateRasters[[climateVariablesForFire$spread]]; withcharacter(0)(fireSenseUtils::addFitClimateVariablesForFire()of a ledger with no spread climate) terra errors (is.numeric(i) is not TRUE). The oldis.nullguard inprepare_SpreadPredict()was unreachable.Fix: new
climateLayers(sim, what)returns the layers,NULLforcharacter(0)(no variable), and stops for aNULL/absent entry (a malformed sim).prepare_SpreadPredict()skips the climate join onNULL;covariatesBuilt()andprepare_IgnitionAndEscapePredict()use it too (ignition keeps its stop: it always needs climate).Reuses:
useOwnELFRows(),inputDigest(), the existing toy helpers (toyPrepRun()); new:climateLayers()(the same[[vars]]selection was written in three places and none handled no variable).Tests: new test in
test-covariates.R(spread covariates withspread = character(0):pixelID,youngAge, noMDC; ignition keepsMDC). Added tests:NULLspread variable stops;character(0)ignition variable stops. Base: 488 run, 1 error (the new test). Branch: 495, 0 failures, 0 errors, 0 skipped (convertToPackage(buildDocuments = TRUE)+test_local, scratch librarylib9175).Checked beyond this PR:
fireSense_spreadPredictspreadProbOneELF()with zero covariates gives a constant surface (toy run, 0.2128 for intercept 0.4, NaN only outside flammable cells);fireSense_burn,fireSense_spreadPredictandfireSense_summarynever readclimateVariablesForFire. NoreqdPkgsfloor yet: set it after the fireSenseUtils merge.🤖 Generated with Claude Code
https://claude.ai/code/session_014G18Mik3fH4z5M5CyMSUS6