Skip to contents

aquacrop_morris operates in 5 steps:

  1. Define the morris design in terms of parameters, parameter ranges, trajectories and method. See also the morris function in the sensitivity package.

  2. Run the AquaCrop model with all parameter combinations from the morris design.

  3. Choose the level of integration: model time steps, different variables

  4. Make an array with the correct dimensions based on the simulations (step 2) and the integration level (step 3).

  5. tell the array to the morris design from step 1.

Usage

aquacrop_morris(
  situation = "S_01",
  cycle_length,
  growth_length = NULL,
  backgroundpar = Spinach,
  r = r,
  binf = c(),
  bsup = c(),
  design = list(type = "oat", levels = 8, grid.jump = 1),
  daily_output = c(1, 2),
  outvars = c("Biomass")
)

Arguments

situation

character string or vector of scenarios to run

cycle_length

an integer representing the length of the simulation period in days

growth_length

an integer representing the length of the growth period in days

backgroundpar

the reference parameter set (as made by read_CRO)

r

number of trajectories in the morris algorithm

binf

named vector with lower boundaries of the parameter ranges

bsup

named vector with upper boundaries of the parameter ranges

design

list for designing the morris algorithm

daily_output

vector for defining the output variables to extract from AquaCrop

outvars

character vector with output variable names for the sensitivity analysis

Value

a list of class morris, containing all the input arguments, plus the following components:

call: the matched call

X a data.frame containing the design of experiments (parameter value combinations)

y either a vector, a matrix or a three-dimensional array of model responses (depends on the output of model)

ee:

  • if y is a vector: a \((r \times p)\) - matrix of elementary effects for all the factors.

  • if y is a matrix: a \((r \times p \times ncol(y))\) - array of elementary effects for all the factors and all columns of y.

  • if y is a three-dimensional array: a \((r \times p \times dim(y)[2] \times dim(y)[3])\) - array of elementary effects for all the factors and all elements of the second and third dimension of y.

Details

[Experimental]

Examples

if (FALSE) Scenario_s <- design_scenario(name = "S_01",
    Input_Date = as.Date("2019-04-01"),
    Plant_Date = as.Date("2019-04-01"),
    IRRI = "IRRI_01",
    Soil = "Soil_01",
    Plu = "Plu_01",
    Tnx = "Tnx_01",
    ETo = "ETo_01") 

if (FALSE) p <- aquacrop_morris(situation = "S_01", backgroundpar=Spinach, r = 20, binf=c(rt_max = 0.12, cgc = 0.1), bsup = c(rt_max = 0.55, cgc = 0.21), outvars = c("Biomass", "YSdryS"))