Skip to contents

Reads <rep_dir>/fire/dynamic-fire-event-log.csv (one row per fire event) and <rep_dir>/fire/dynamic-fire-summary-log.csv (one row per simulation year per fire ecoregion), returning a small list of summary statistics suitable for loss-function comparison.

Usage

parse_dynamic_fire_logs(rep_dir, pixel_area_ha = 1)

Arguments

rep_dir

Character. Path to the per-rep directory (the rep01/ under the scenario directory). Must contain fire/dynamic-fire-event-log.csv and fire/dynamic-fire-summary-log.csv.

pixel_area_ha

Numeric. Hectares per cell. Default 1.0.

Value

Named list with n_fires_by_year (tibble: year, n_fires), fire_sizes_ha (sorted numeric vector), events (per-event tibble), total_sites_burned (integer), n_events (integer), and area_by_fuel_ha (tibble with fuel_code, cells, area_ha columns, or NULL when the per-timestep severity x fuel-type rasters aren't on disk – e.g. mock-simulator trials).

Details

Columns parsed (Dynamic Fire System v4):

  • event-log: Time, InitFireRegion, InitFuel, SitesChecked, DamagedSites, MeanSeverity.

  • summary-log: Time, NumberFires, TotalSitesBurned.

A fire's size is taken from SitesChecked. The extension logs DamagedSites as one more than the cells the fire burned, on every event, while SitesChecked equals the burned cells on the timestep's severity map. MeanSeverity is divided by that inflated count, so the returned mean_severity is rescaled to MeanSeverity * DamagedSites / SitesChecked, the mean over the burned cells.

Cells -> hectares uses pixel_area_ha (1 ha for a 100 m x 100 m grid).

The area_by_fuel_ha summary is computed by intersecting the per-timestep Dynamic Fire severity rasters (cells with severity > 1 = burned; values 0 and 1 are inactive and active-but-unburned respectively) with the matching per-timestep Dynamic Fuels FuelType rasters from the same <rep_dir>/fire/ subdirectory. Cell-fuel-timestep is the unit of accounting: a cell that burns in two distinct timesteps contributes twice (consistent with NBAC's per-fire-perimeter accounting on the observed side). This replaces the earlier convention of attributing each event's entire DamagedSites count to its InitFuel, which biased simulated burn area toward the dominant-cover fuel since fires ignite where there's igniteable fuel and then spread anywhere.