Repository navigation
Compute the coarse-to-fine cell mapping once - #27
Merged
Merged
Conversation
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
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.
IgnitionPredictRunregridded the coarse ignition raster toflammableRTMwithpostProcess()every year (fireSense_ignitionPredict.R:191on 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 inmod, 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