Repository navigation
S8/S9 per parameter set; seeded fires as GeoTIFFs - #35
Merged
Merged
Conversation
elfOfSet() subset only simYears/simSizes, so S8/S9 could not be scored per set. The reader now keeps run ids and fire ids of the burn maps; scoreBySet() adds the S8/S9 ELF rows per set; writeSeededFires() writes the scored observed and per-run fires as GeoTIFFs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…per folder Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
This lets us rank the parameter sets of a fit by how well each one sizes and shapes the observed fires it was given. It also writes the scored fires as maps (observed and simulated) to share with a collaborator, so another score can be compared on exactly the same data.
Affects: in-sample scores gain per-set S8/S9 columns in
wave1_bySet.csvand a newseededFires/folder of GeoTIFFs; per-set scoring now turns on by itself when the runs hold more than one set.Reuses:
escapeResultRows(),scoreS8(),scoreS9(),escapeStats,hindcastRun(),readHindcastSetFiles(), terra's cell/row/col helpers. A fresh-agent reuse review ran before opening; its three points are applied.Technical details
elfOfSet()(R/bySet.R) subset onlysimYearsandsimSizes, so the seeded sizes and burn maps of S8/S9 still held every set. The burn maps also recorded neither the run's set nor which fire burned a cell.readHindcastLocation()recordsburn$runIds(newburnRunIds(), fromhindcast_reps.csv) and afirecolumn (the burn ID) inburn$sim.readHindcastSeeded()keepsfireinsizes, andgridOf()addscrs. Cached ELF reads rebuild once.elfOfSet()subsetslocation$seeded$sizesandlocation$burnby the set's runs and renumbers burn runs 1..n. Burns withoutrunIdsare dropped, never scored as the set's.scoreBySet()addsS8_*/S9_*columns with_runLo/_runHi, from the ELF rows ofescapeResultRows().writeSeededFires(), called inwriteOutputs, writesseededFires/<ELF>/<year>_<start>/observed.tifandpredicted.tif, plusfires.csv.predicted.tifhas one layer per run, namedset<k>_rep<r>, holding only the fire grown from that start.bySetdefaults toNA, meaning on when some ELF has more than oneparamSet. FireSenseTesting's global.R passesFALSEexplicitly today; it needsNAafter this merges.Tests: new tests in test-byset.R (per-set subsetting, S8/S9 ranking of a perfect set over a random one,
burnRunIds()) and test-escapes.R (writeSeededFires(): values, NA off scored cells, only the start's own fire, band names, window).seedToy()moved to helper-source.R. Full suite: 0 failed, 0 skipped.🤖 Generated with Claude Code