Skip to content

Fire pixels and the nonForestCanBeYoungAge check come from fireSenseUtils - #106

Merged
eliotmcintire merged 2 commits into
developmentfrom
allfirepixels-to-fsu
Nov 16, 2026
Merged

eliotmcintire merged 2 commits into
developmentfrom
allfirepixels-to-fsu

Conversation

@eliotmcintire

@eliotmcintire eliotmcintire commented Nov 16, 2026 •

Copy link
Copy Markdown
Collaborator

The spread fit and the hindcasts use shared code to find which pixels burned and whether "recently burned" land is allowed to be non-forest, instead of each module keeping its own copy. Results do not change.

Affects: nothing for users; a small cleanup that lets the hindcast module share the fit's rules.

Depends-on: PredictiveEcology/fireSenseUtils#239

Technical details

allFirePixelsByYear() (R/youngAge.R) did the fire-source choice and the geometry check itself; both are now in fireSenseUtils::firePixelsByYear() and the function is one call of it. stopIfNonForestCannotBeYoung() is now fireSenseUtils::stopIfNonForestCannotBeYoung(), called from prepare_SpreadFit() and prepare_IgnitionFit() and listed in prepSpreadFitData's .cacheExtra (the cache-key test requires every reached package function). addAnnualYoungAge() builds its table with fireSenseUtils::tsdTable() (also in the .cacheExtra list). fireSense_dataPrepPredict calls the same functions (PredictiveEcology/fireSense_dataPrepPredict#46). The diff is separate from the open PR #105.

Reuses: fireSenseUtils::firePixelsByYear(), stopIfNonForestCannotBeYoung(), tsdTable(); new: none (code removed). Floor: set after fireSenseUtils#239 merges.

Tests: the stop test moved to fireSenseUtils; the others unchanged. Full suite (convertToPackage() + test_local(), scratch library with the fireSenseUtils branch): branch 512 pass, 0 fail, 1 skip (re-run after the tsdTable() change) (DPF_EQUIVALENCE_FIXTURE not set; also skipped on base); base 513 pass, 1 fail (test-prepSpreadFitDataCacheExtra.R: a package function the module reaches is not in the cache key; fixed here by listing stopIfNonForestCannotBeYoung) with the same library.

🤖 Generated with Claude Code

https://claude.ai/code/session_014G18Mik3fH4z5M5CyMSUS6

@eliotmcintire eliotmcintire added enhancement New feature or request backwards compatible Existing code and results keep working unchanged labels Nov 16, 2026
@eliotmcintire
eliotmcintire merged commit 2312c74 into development Nov 16, 2026
9 checks passed
@eliotmcintire
eliotmcintire deleted the allfirepixels-to-fsu branch November 16, 2026 22:28
eliotmcintire added a commit that referenced this pull request Nov 16, 2026
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 16, 2026
…eeping both bullets

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