Skip to contents

This function serves as the orchestration layer between PEcAn workflows and the config-writing machinery. It generates appropriate input designs (ensemble and/or SA) if not provided. For MultiSettings, it generates designs once from the first site then shares across all sites for consistent sampling. Finally, it delegates to run.write.configs for actual config generation. The input design determines how parameter samples and input files (met, soil, etc.) are coordinated across runs. Ensemble designs typically use random or quasi-random sampling, while SA designs hold non-parameter inputs constant (OAT methodology).

Usage

runModule.run.write.configs(settings, overwrite = TRUE, input_design = NULL)

Arguments

settings

a PEcAn Settings or MultiSettings object

overwrite

logical: Replace config files if they already exist?

input_design

Optional. The parameter/input design for the runs, normally the full result of generate_joint_ensemble_design(): a list with design_matrix (a data.frame whose param column selects rows of trait.samples/ensemble.samples, plus optional columns named for settings$run$inputs tags such as met or soil) and samples (the parameter bundle those indices point into). Can be:

  • The list(design_matrix, samples) returned by generate_joint_ensemble_design()

  • NULL to generate the design and samples internally from settings

A bare design data.frame is not accepted: its param indices are only meaningful together with the samples they index into, so the design and its samples must travel together.

Value

A modified settings object, invisibly