Skip to contents

This function generates a data frame containing input parameters for crop simulation runs, including spatial unit, crop type, soil type, sowing and harvest dates. It also creates climate input files for the specified spatial unit and date range.

Usage

create_inputs(
  GCM = "safran",
  RCM = "",
  BC = "",
  RCP = "",
  crop = "maize",
  scenario = "pluv",
  years = 2020:2030,
  date_start = "04-20",
  date_end = "09-06",
  date_sowing = "04-20",
  date_harvest = "09-06",
  su_label = "climate",
  soil = "Lavalette",
  ...,
  force = FALSE,
  cfg_package = loadConfig(),
  cfg
)

Arguments

GCM

character Global Climate Model (default: "safran").

RCM

character Regional Climate Model (default: "").

BC

character Bias Correction method (default: "").

RCP

character Representative Concentration Pathway (default: "").

crop

character Crop type (default: "maize").

scenario

character Irrigation scenario (default: "pluv").

years

integer Vector of years for the simulation period.

date_start

character Start date in "YYYY-MM-DD" format (default: "2020-04-01").

date_end

character End date in "YYYY-MM-DD" format (default: "2020-09-06").

date_sowing

character Sowing date in "YYYY-MM-DD" format (default: "2020-04-20").

date_harvest

character Harvest date in "YYYY-MM-DD" format (default: "2020-09-06").

su_label

character Label for the spatial unit (default: "climate_depth").

soil

character Soil type (default: "lav").

...

Additional arguments passed to climate input creation.

force

logical Whether to force the creation of the uptakes data from the raw data.

cfg_package

list Configuration parameters for the package.

cfg

a config object. Configuration to use. See loadConfig for details

Value

A data frame with input parameters for each simulation run.