geeViz.fireLib.burn¶
A fire’s perimeter, and what it changed: the two-date burn comparison.
The everyday fire questions (“map the Monroe Canyon fire”, “make a before/after change map of it”, “how severe was it”) all start the same way: find the official perimeter and the fire’s dates, then compare a composite from before the fire with one from after it. This module does both in one call each, so the common path is three lines:
fire = fl.burn_change("Monroe Canyon", year=2025)
for name in ("pre", "post", "dnbr", "severity"):
Map.addLayer(fire[name], fire["viz"][name], fire["names"][name])
Map.addLayer(fire["perimeter"], fire["viz"]["perimeter"], fire["names"]["perimeter"])
The perimeter comes from the National Interagency Fire Center
(georest.nifc.perimeters): WFIGS for fires since 2016, with
discovery and containment dates, and the InterAgency history before
that. It is the official interagency perimeter, not a buffer or a
sketch.
The comparison is a median composite of Sentinel-2 (from 2017) and Landsat over a window before discovery, and one over a window after the fire ended, each as surface reflectance on a 0-10000 scale. The window after a fire that ended in winter at a snowy latitude would compare summer with snow, so it moves to the next year’s same season as the pre-fire window (one year on, the way MTBS’s extended assessment does).
dNBR and severity are derived here, not official. dNBR is
(NBR_pre - NBR_post) * 1000; the classes use Key and Benson’s
thresholds (100 / 270 / 440 / 660). MTBS publishes official severity
for large fires, a year or more after they burn. Say which one a map
shows.
Copyright 2026 Ian Housman and the geeViz contributors. Licensed under the Apache License, Version 2.0.
Module Attributes
Key and Benson (2006) dNBR thresholds, scaled by 1000. |
Functions
|
A fire's two-date change: pre and post composites, dNBR and severity. |
|
The pre- and post-fire windows for a fire's dates. |
|
A fire's official perimeter and facts, ready for Earth Engine. |
|
dNBR (x1000) as Key and Benson classes 1-4, unburned masked, with class properties so |
- geeViz.fireLib.burn.SEVERITY_CLASSES = ((1, 'Low', 100, 270, 'ffff73'), (2, 'Moderate-low', 270, 440, 'ffaa00'), (3, 'Moderate-high', 440, 660, 'e60000'), (4, 'High', 660, None, '730000'))¶
Key and Benson (2006) dNBR thresholds, scaled by 1000.
- geeViz.fireLib.burn.fire_perimeter(name: str, year: int | None = None, state: str | None = None, min_acres: float = 0, max_offset_m: float | None = 10) dict[source]¶
A fire’s official perimeter and facts, ready for Earth Engine.
- Parameters:
name (str) – The fire’s name, such as
"Cameron Peak".year (int, optional) – The year it was discovered.
state (str, optional) – Where it started,
"CO"or"Colorado". Names repeat (“Dixie” is a California and an Idaho fire in 2021); give year and state when you know them.min_acres (float, optional) – Ignore fires smaller than this.
max_offset_m (float, optional) – Generalize the outline by up to this many meters (default 10; None for exact).
- Returns:
perimeter(ee.FeatureCollectionof the one fire),info(name, year, state, acres, discovered, contained, fire_out, source, source_url…),candidates(other fires of that name, largest first) andgeojson(the perimeter as GeoJSON).- Return type:
dict
- Raises:
LookupError – NIFC has no fire of that name (and year / state).
- geeViz.fireLib.burn.burn_windows(discovered, ended=None, composite_days: int = 60, lat: float | None = None, today: date | None = None) dict[source]¶
The pre- and post-fire windows for a fire’s dates.
Pre: the
composite_daysbefore discovery. Post: thecomposite_daysafter the fire ended (containment, else fire-out, else 30 days after discovery). When most of that post window falls from November to March poleward of 37 degrees it would be compared with snow (the 2021 Dixie Fire, contained in late October), so the post window becomes the pre window one year on instead.- Returns:
startDatePre,endDatePre,startDatePost,endDatePost(ISO dates) andpost_rule(why the post window is where it is).- Return type:
dict
- Raises:
ValueError – The post window has not begun yet.
- geeViz.fireLib.burn.severity_classes(dnbr: Image) Image[source]¶
dNBR (x1000) as Key and Benson classes 1-4, unburned masked, with class properties so
autoVizcolors and labels it.
- geeViz.fireLib.burn.burn_change(fire: str | None = None, year: int | None = None, state: str | None = None, area: Any = None, startDatePre: str | None = None, endDatePre: str | None = None, startDatePost: str | None = None, endDatePost: str | None = None, composite_days: int = 60, buffer_m: float = 2000, include_landsat: bool = True, clip: bool = True) dict[source]¶
A fire’s two-date change: pre and post composites, dNBR and severity.
Use for any before/after, change or burn severity map of a fire. Give the fire’s name (and year) and everything else is found: the official NIFC perimeter, its discovery and containment dates, and the windows on either side (see
burn_windows()). Or giveareaand the four dates for a fire NIFC does not have.- Parameters:
fire (str, optional) – The fire’s name, such as
"Monroe Canyon".year (int, optional) – The year it was discovered.
state (str, optional) – Where it started,
"UT".area (ee.Geometry | ee.Feature | ee.FeatureCollection, optional) – Instead of
fire: the area to compare. Needs all four dates.startDatePre (str, optional) – Override the windows (
YYYY-MM-DD).endDatePre (str, optional) – Override the windows (
YYYY-MM-DD).startDatePost (str, optional) – Override the windows (
YYYY-MM-DD).endDatePost (str, optional) – Override the windows (
YYYY-MM-DD).composite_days (int, optional) – Window length. Default 60.
buffer_m (float, optional) – Composite this far around the perimeter, so the map shows unburned ground for contrast. Default 2000.
include_landsat (bool, optional) – Merge Landsat with Sentinel-2 to fill cloud gaps. Before 2017 Landsat is used alone. Default True.
clip (bool, optional) – Clip
dnbrandseverityto the perimeter. Default True.
- Returns:
pre,post: composites (0-10000 SR, with anNBRband).dnbr: (NBR_pre - NBR_post) * 1000.severity: classes 1-4.perimeter: the fire (ee.FeatureCollection), or None.area: what was composited.info: the fire’s facts (name, year, state, acres, discovered, contained, source…), or None.candidates: other fires of that name.dates: the four window dates andpost_rule.vizandnames: map settings and layer names for each of pre, post, dnbr, severity and perimeter.notes: one sentence on sources and what is derived.- Return type:
dict
Example
>>> fire = fl.burn_change("Monroe Canyon", year=2025) >>> for k in ("pre", "post", "dnbr", "severity", "perimeter"): ... Map.addLayer(fire[k], fire["viz"][k], fire["names"][k]) >>> Map.centerObject(fire["perimeter"])