Skip to content

feat(scoring): severity anchors measured again on ms:modis.ba.poly - #764

Merged
gzileni merged 1 commit into
mainfrom
feat/frp-anchors-modis
Nov 28, 2026
Merged

gzileni merged 1 commit into
mainfrom
feat/frp-anchors-modis

Conversation

@gzileni

@gzileni gzileni commented Nov 28, 2026

Copy link
Copy Markdown
Contributor

Summary

This PR moves numbers: merge it only if you accept the new values. It is based on #763 (the same computation, moved into limen-core) and will retarget to main when #763 is merged.

The two anchors of the post-fire severity ramp in src/limen/config/hazards/landslide.yaml, measured again on the layer Limen now reads:

  • frp_floor_mw_per_ha: 0.08 → 0.06 (p10 of the FRP density)
  • frp_saturation_mw_per_ha: 0.88 → 1.61 (p90)

What they rest on

  • 4,831 perimeters of ms:modis.ba.poly with at least one detection that counts, fires from 22 May 2016 to 28 December 2025.
  • The old values rested on 2,419 perimeters of nrt.ba.poly, 2012-2024.
  • The density, measured. In MW/ha: p10 0.059, p25 0.147, p50 0.356, p75 0.819, p90 1.613, max 26.1.
  • Correlation with the area. The sum of FRP: 0.78. The density: 0.03, against 0.26 on the old layer. Density remains the right measure of intensity, more clearly than before.

How it was measured:

  • A throwaway PostGIS with every migration.
  • 12,399 perimeters of ms:modis.ba.poly loaded with Limen's own run_effis_sync on the 20 region boxes.
  • 198,235 FIRMS vegetation detections with a power, 2015-2025, MODIS and VIIRS S-NPP for Italy, loaded with Limen's own fetch_archive_year.
  • refresh_perimeter_frp from refactor(wildfire): the FRP of a perimeter from limen-core's seen_inside_all #763, then the query now written next to the values in the YAML.

Limits

  • 2026 is not in the measure. The FIRMS archive stops at 2025; in production 2026 comes from the NRT feed, which needs a key.
  • The region boxes reach past the border, as in production: a few foreign perimeters near the border can carry Italian detections. That is how Limen computes them, so the measure matches what it uses.

What it changes

The ramp gets longer and moves up. A burn that was "most severe" at 0.88 MW/ha now weighs (0.88 - 0.06) / (1.61 - 0.06) = 0.53. The post-fire factor F of the landslide score is lower for medium-intensity burns. Because the multiplier is ≤ 1 by construction, the severity can only soften an alarm, never create one. Every landslide measure that used the post-fire factor with a measured severity changes.

Epic

Part of #714 (wildfire)

Type of change

  • Scoring / thresholds

Verification

  • Unit tests: 2224 passed. 1 failed, test_il_raster_corine_dallo_shapefile, which fails the same way on main in my local environment.
  • Integration tests that touch the post-fire severity: 34 passed.
  • ruff, mypy clean.
  • The test that pins the anchors now pins the new values and the new median (0.356).

Risk/scoring impact

Moves the post-fire factor of the landslide score. The landslide backtests that cross a measured burn must be rerun.

🤖 Generated with Claude Code

)

frp_floor_mw_per_ha 0.08 -> 0.06 and frp_saturation_mw_per_ha 0.88 -> 1.61:
the 10th and 90th percentile of the FRP density on 4,831 perimeters of
ms:modis.ba.poly with detections inside, fires from 2016-05-22 to
2025-12-28. Before: 2,419 perimeters of nrt.ba.poly, 2012-2024.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 28, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-28T17:55:17.992064Z 12a60b0 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

Base automatically changed from feat/frp-limen-core to main November 28, 2026 18:47
@gzileni
gzileni merged commit 46c2a5b into main Nov 28, 2026
7 checks passed
@gzileni
gzileni deleted the feat/frp-anchors-modis branch November 28, 2026 18:49
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