A wrapper function for running a sensitivity analysis for AquaCrop using the morris method
aquacrop_morris.Rd
aquacrop_morris
operates in 5 steps:
Define the morris design in terms of parameters, parameter ranges, trajectories and method. See also the
morris
function in the sensitivity package.Run the AquaCrop model with all parameter combinations from the morris design.
Choose the level of integration: model time steps, different variables
Make an array with the correct dimensions based on the simulations (step 2) and the integration level (step 3).
tell
the array to the morris design from step 1.
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.
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"))