
Parse a Dynamic Fire run's event and summary logs
parse_dynamic_fire_logs.RdReads <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.
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.
See also
Other Dynamic Fire calibration helpers:
apply_calibrated_damage_age(),
apply_calibrated_hi_prop(),
apply_calibrated_ignprob(),
apply_calibrated_num_fires(),
bc_fuel_code_to_base(),
build_calibration_scenario_template(),
build_calibration_spinup_scenario(),
calibrate_dynamic_fire(),
calibration_par_names(),
dedup_community_snapshot(),
default_severity_prior_sturtevant2009(),
landis_overstory_mortality_share(),
loss_from_stats(),
observed_fire_sizes(),
patch_fire_config(),
run_calibration_spinup(),
run_calibration_validation(),
save_observed_fire_targets(),
sim_landis(),
sim_mock(),
sim_r_reimpl()