
Write a LANDIS-II scenario.txt file (lower-level helper)
write_landis_scenario_file.RdGenerates a scenario.txt in path using the insert*() helpers.
Lower-level than scenario(): takes already-written extension config-file
paths (named character vectors keyed by extension name) rather than R6
LandisExtension objects. Useful when project pipelines write extension
configs in separate targets-managed steps and just want to assemble the
top-level scenario file from those paths.
Usage
write_landis_scenario_file(
path,
duration,
cell_length,
species_file,
ecoregions_files,
succession_ext_files,
disturbance_ext_files = NULL,
other_ext_files = NULL,
output_manifest = character(0)
)Arguments
- path
Character. Scenario directory path (absolute or relative).
- duration
Integer. Simulation duration in years.
- cell_length
Integer. Raster cell size in metres.
- species_file
Character. Path to the core species input file.
- ecoregions_files
Character vector of length 2: paths to the ecoregions text file and the ecoregions raster map.
- succession_ext_files
Named character vector. Names are extension names (e.g.
"ForC Succession"); values are absolute paths to the per-extension init files. Exactly one entry is required.- disturbance_ext_files, other_ext_files
Named character vector or
NULL. Same structure assuccession_ext_files; zero or more entries.- output_manifest
Character vector of fixed-name output files (paths relative to each replicate directory) that the scenario will produce at run time. Written to
output_manifest.txtsotar_landis()can track these files alongside the recursiveoutput_dirscan.
Details
The RandomNumberSeed line is written in commented-out form so that
landis_replicate() can overwrite it with a per-replicate deterministic
seed (controlled by its base_seed argument).
See also
Other LANDIS-II execution helpers:
host_cpu_info(),
landis_find(),
landis_find_docker(),
landis_pool_exec(),
landis_pool_restart_one(),
landis_pool_start(),
landis_pool_stop(),
landis_replicate(),
landis_run_docker(),
landis_run_local(),
read_landis_resource_logs(),
tar_landis()