Create a PEcAn XML file and use it to run a PEcAn workflow

create_execute_test_xml(
  model_id,
  met,
  site_id,
  start_date,
  end_date,
  dbfiles_folder,
  user_id,
  output_folder = "batch_test_output",
  pecan_path = getwd(),
  pft = NULL,
  ensemble_size = 1,
  sensitivity_variable = "NPP",
  sensitivity = FALSE,
  db_bety_username = NULL,
  db_bety_password = NULL,
  db_bety_hostname = NULL,
  db_bety_port = NULL,
  db_bety_driver = "Postgres"
)

Arguments

model_id

(numeric) Model ID (from `models` table)

met

(character) Name of meteorology input source (e.g. `"CRUNCEP"`)

site_id

(numeric) Site ID (from `sites` table)

start_date

(character or date) Run start date

end_date

(character or date) Run end date

dbfiles_folder

(character) Path to `dbfiles` directory

user_id

(numeric) User ID to associate with the workflow

output_folder

(character) Path to root directory for storing outputs. Default = `"batch_test_output"`

pecan_path

(character) Path to PEcAn source code. Default is current working directory.

pft

(character) Name of PFT to run. If `NULL` (default), use the first PFT in BETY associated with the model.

ensemble_size

(numeric) Number of ensembles to run. Default = 1.

sensitivity_variable

(character) Variable for performing sensitivity analysis. Default = `"NPP"`

sensitivity

(logical) Whether or not to perform a sensitivity analysis (default = `FALSE`)

db_bety_username, db_bety_password, db_bety_hostname, db_bety_port

(character) BETY database connection options. Default values for all of these are pulled from `<pecan_path>/web/config.php`.

db_bety_driver

(character) BETY database connection driver (default = `"Postgres"`)

Value

A list with two entries: * `sys`: Exit value returned by the workflow (0 for sucess). * `outdir`: Path where the workflow results are saved

Author

Alexey Shiklomanov, Tony Gardella