Repository navigation
Residual climate signal in the hindcast score - #34
Open
eliotmcintire wants to merge 2 commits into
Open
eliotmcintire wants to merge 2 commits into
eliotmcintire wants to merge 2 commits into
Conversation
…mate?
Per ELF and scored year, log(sim / obs) of annual area, mean and median fire size, regressed on the
within-ELF z-score of every annual climate covariate and on the ELF's own spread-fit variable (slope,
SE, n, slope after the own variable); pooled over ELFs (median, random-effects). The SD of the fitted
spread climate term next to yearSpreadSD. Written as residualClimate_{years,slopes,pooled,spreadSD}.csv.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Lx3DXhXsFis2pbqBTh2PPh
…ate response; read the covariates once Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Lx3DXhXsFis2pbqBTh2PPh
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.
The hindcast score now checks whether what the simulation gets wrong (area burned, fire size) still follows the year's climate. If it does, the simulator is missing something.
Affects: four new score tables (
residualClimate_years.csv,_slopes.csv,_pooled.csv,_spreadSD.csv) beside the existing ones; existing tables and scores do not change. The module now needs fireSenseUtils >= 0.2.3.9196.Reuses:
readHindcastSim,readHindcastObserved,readHindcastCovariate,hindcastCore,readLedgerRow(extended),scoredYears,obsBy,climateInputsandclimatePooledYears(now sharezScore(),medianAreaBy(),logRatio()),logSlope(now calls the newolsSlope()),fireSenseUtils::climateTermBase/climateCovRanges; new:residualYears,residualSlopes,poolResidualSlopes,spreadClimateSD,readHindcastCovariates,writeResidualClimate(nothing existing gives residuals by year, a random-effects pool, the fitted climate term SD, or a temp-then-rename csv write),olsSlope/logRatio/medianAreaBy(generalised fromlogSlopeand the pooled-years code, which now call them).Technical details
log(median over runs of sim / obs)for annual area (area50), mean and median size of fires ofminHaor more. Years with observed area 0 have no area, mean or median residual;areaOffset(minHaadded to both) is defined for them. A simulated size is NA with fewer than 10 runs with a fire.elf$covariates(CMD, CMDsm, CMDsp, cumMDC, Tmaxsm, PPTsm, whichever the hindcast has) and onown, the first climate term of the ledger row. Output slope, SE, n, and the slope with the own variable also in the model (NA for the own variable, and for ELFs without spread coefficients).spreadClimateSD: per kept set, SD over the scored years ofcoefficient * (value - min) / (max - min)next toyearSpreadSD, with a median row per ELF. Only plain and_yrterms (_dev,_curveneed pixel values). Withoutfit$paramsit returns NULL, so other simulators are scored too.covariates;readLedgerRow()also returnsparamsandcovMinMax.runWave1()returnsresidualClimate. fireSenseUtils floor raised to 0.2.3.9196 (first withclimateTermBase).test-residualClimate.R(injected slope recovered for area and both sizes, obs = 0 years, after-own slope, NA without a fit, pooled summary, writer) and one intest-byset.R. Full suite: branch 165 passed, 0 failed, 0 skipped; base 154 passed. The new tests fail on base (functions missing).write.csv,saveRDS) still write in place.🤖 Generated with Claude Code
https://claude.ai/code/session_01Lx3DXhXsFis2pbqBTh2PPh