Submit a PEcAn workflow using various user-defined parameters Hits the POST /api/workflows/ API endpoint.

submit.workflow(
  server,
  model_id,
  site_id,
  pfts,
  start_date,
  end_date,
  inputs,
  meta.analysis = list(),
  ensemble_size = 1,
  sensitivity_variable = "NPP",
  sensitivity.analysis = FALSE,
  notes = NULL,
  workflow_list_mods = list()
)

Arguments

server

Server object obtained using the connect() function

model_id

ID of the model to be used (character)

site_id

ID of the site to be used (character)

pfts

List of PFTs to be used (list)

start_date

Starting date of the analysis (character)

end_date

Ending date of the analysis (character)

inputs

Inputs to the workflow (including meteorological data, etc.) (object)

meta.analysis

Meta-analysis settings object for the workflow. Default: NULL (uses default parameters)

ensemble_size

Ensemble size for the workflow. Default: 1

sensitivity_variable

Variable for performing sensitivity. Default: NPP

sensitivity.analysis

Whether or not to perform a sensitivity analysis. Can also take a sensitivity setting object as input. Default: FALSE (logical or list)

notes

Additional notes that the user need to specify for the submitted workflow. Default: NULL

workflow_list_mods

List of additional changes to be applied to the workflow list. Passed to utils::modifyList(). Default = list() (no changes).

Value

Response obtained from the POST /api/workflows/ endpoint

Author

Tezan Sahu, Alexey Shiklomanov

Examples

server <- connect(url="http://pecan.localhost:80", username="carya", password="illinois")

# Submit a workflow with the SIPNET r136 model (id = 1000000014) for Niwot Ridge site (id = 772) with 
# PFT as 'temperate.coniferous' starting from 01-01-2002 to 31-12-2003 using the input met data with
# id = 99000000003
res <- submit.workflow(server, model_id=1000000014, site_id=772, pfts=c("temperate.coniferous"), start_date="2002-01-01", 
  end_date="2003-12-31", inputs=list(met=list(id=99000000003)))
#> Error in loadNamespace(x): there is no package called ‘XML’