Skip to content

Compute the coarse-to-fine cell mapping once - #27

Merged
eliotmcintire merged 1 commit into
developmentfrom
perf/coarse-to-fine-map
Oct 1, 2026
Merged

eliotmcintire merged 1 commit into
developmentfrom
perf/coarse-to-fine-map

Conversation

@eliotmcintire

@eliotmcintire eliotmcintire commented Oct 1, 2026 •

Copy link
Copy Markdown
Collaborator

IgnitionPredictRun regridded the coarse ignition raster to flammableRTM with postProcess() every year (fireSense_ignitionPredict.R:191 on development), about 3.6 s a year at 6.7M fine cells in a benchmark. The fine-cell to coarse-cell mapping never changes within a run, so it is now computed once, kept in mod, rebuilt only if the extent, dimensions or crs of either raster change, and applied each year by indexing. New tests compare the fine-grid table and raster with the old regrid for two years on non-round grids with non-flammable and NA cells, and check the rebuild. The full suite passes on the branch (41 tests, 0 failed); on development only the two new tests fail.

🤖 Generated with Claude Code

https://claude.ai/code/session_01CwcjqqK59FmTJscyi7xUqv

postProcess() regridded the coarse ignition raster to flammableRTM each year (fireSense_ignitionPredict.R:191); the mapping is kept in mod and applied by indexing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CwcjqqK59FmTJscyi7xUqv
@eliotmcintire
eliotmcintire merged commit 9253de8 into development Oct 1, 2026
6 checks passed
@eliotmcintire
eliotmcintire deleted the perf/coarse-to-fine-map branch October 1, 2026 02:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant