Repository navigation
Zero-ignition year keeps the ignitionsAndEscapes columns - #31
Merged
Merged
Conversation
placeIgnitions() returned rbindlist(list()), a table with no columns, so a year with no ignitions had no pixelID/escaped and hindcastSimulated() failed. 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 16, 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.
A year in which no fires start now gives an empty but correctly shaped list of ignitions, instead of a table with no columns. This stops hindcast runs from failing in such years.
Affects: Only years with zero ignitions; years with ignitions give identical results and use the same random numbers.
Technical details
Defect:
placeIgnitions()(fireSense_ignitionPredict.R, last line) ends withrbindlist(out); with no ignited coarse pixelsoutislist(), giving a 0-row, 0-column table. Theif (NROW(pixelID_igs))guard in the ignition event then skipped addingescaped, sosim$ignitionsAndEscapes$pixelIDwasNULLandfireSenseUtils::hindcastSimulated()failed interra::xyFromCell(burnID, NULL).Fix:
placeIgnitions()returnsigs[integer(0), ..cols]when nothing is drawn; the guard gets anelsethat addsescaped = logical(0);chunkyPixelsis dropped in both cases.sample(1:nrow(x))becamesample.int(nrow(x)): same stream for n >= 1, andsample(1:0)would otherwise return two rows for an empty table.Verified: new test in test-escaped.R fails on the base (5 expectations) and passes on the branch. Module tests via
convertToPackage()+test_local(): base with the new test 45 tests, 1 failing; branch 45 tests, 0 failing (2 skipped in both).🤖 Generated with Claude Code
https://claude.ai/code/session_01CwcjqqK59FmTJscyi7xUqv