
Build the calibration scenario template directory
build_calibration_scenario_template.RdMaterialises a self-contained LANDIS-II scenario directory that DEoptim
workers copy from. Each per-trial worker copies this template into a scratch
dir, patches just dynamic-fire.txt with candidate parameters, and runs
LANDIS-II. Anything that does NOT vary across trials (ForCS config, fire
ecoregions map, ground slope, weather DB, species file, ...) lives in this
template so it's built once.
Usage
build_calibration_scenario_template(
out_dir,
template_dir,
snapshot_ic_csv,
snapshot_ic_tif,
baseline_fire_size_table = NULL,
baseline_fuel_type_table = NULL,
baseline_fire_damage_table = NULL,
baseline_seasons_sim_table = NULL,
sim_years = 10L,
cell_length,
overrides = list()
)Arguments
- out_dir
Character. Destination directory (created or overwritten).
- template_dir
Character. Existing production fire scenario directory to copy from.
- snapshot_ic_csv, snapshot_ic_tif
Character. Paths to the spun-up community CSV / TIF (return of
build_calibration_spinup_scenario()).- baseline_fire_size_table, baseline_fuel_type_table, baseline_fire_damage_table, baseline_seasons_sim_table
data.frame or NULL. Baseline (uncalibrated) tables. When all four are supplied, the function writes a fresh
dynamic-fire.txtfrom them.- sim_years
Integer. Calibration sim duration (years). Default 10.
- cell_length
Integer. Raster cell size in metres.
- overrides
Named list. Optional per-file overrides applied AFTER the bulk template-dir copy. Keys are output filenames (relative to
out_dir); values are paths to source files to copy in place of whatever was copied fromtemplate_dir. Useful for swapping in a coarser fuel raster, a cropped slope/aspect, alternative weather, etc. for calibration without touching the production scenario. Accepted keys:"ground_slope.tif","uphill_slope_azimuth.tif","fire-ecoregions.tif","initial_weather_database.csv","DynamicFire_Spp_Table.csv","species.txt","ecoregions.txt","ecoregions.tif","climate.txt"..tifoverrides also copy their.aux.xml/.tfwsidecars if present alongside the source.
Details
Composition:
ForC Succession backend with both spinup flags OFF and a frozen Timestep (succession effectively a no-op).
Dynamic Fire System + Dynamic Fuel System as the only disturbances.
Initial communities point at the spun-up snapshot from
build_calibration_spinup_scenario()(renamed to the standardinitial-communities.csv+.tifso the existing ForCS config references work without further modification).Duration =
sim_years.
When the baseline fire-config tables are supplied (recommended), the function
overwrites the copied dynamic-fire.txt with a fresh uncalibrated config
built from these tables. This breaks the otherwise-circular dependency
between the production fire config and the calibration loop (production fire
config -> calibrated_fire_params -> calibration -> production fire config).
See also
Other Dynamic Fire calibration helpers:
apply_calibrated_hi_prop(),
apply_calibrated_ignprob(),
bc_fuel_code_to_base(),
build_calibration_spinup_scenario(),
calibrate_dynamic_fire(),
calibration_par_names(),
default_severity_prior_sturtevant2009(),
loss_from_stats(),
parse_dynamic_fire_logs(),
patch_fire_config(),
run_calibration_spinup(),
save_observed_fire_targets(),
sim_landis(),
sim_mock(),
sim_r_reimpl()