2.2.3. The Inputs element¶
The Inputs element information item is a child of a ModelUnit element.
<ModelUnit modelid=" " timestep=" " name=" " version =" ">
...
<Inputs>
<Input name=" " description=" " variablecategory=" " datatype=" " min=" " max=" " default=" " unit=" " uri="" inputtype="variable"/>
<Input name=" " description=" " parametercategory=" " datatype=" " min=" " max=" " default=" " unit=" " uri=" " inputtype="parameter"/>
...
</Inputs>
...
</ModelUnit>
A
Inputselement MUST contain one or moreInputelement child.Each
Inputelement MUST have exactly one of each of the following attributes:The
nameattribute. The value of the name MUST be a valid Crop2ML name attribute.The value of a
nameattribute MUST NOT be identical to the value of thenameattribute on any siblingInputelementThe
descriptionattributeThe
datatypeattributeThe value of a
datatypeattribute is the data type of the value that input can take. A set of types is defined in Crop2ML asAn
Unitattribute MUST be associated to each variable or parameter. Crop2Ml uses by default the SI units or their composition.Eg: unit of Temperature is “degC”,unit of thermal time is “degC*d”, d represents “day”.The symbole*is used for the product of two units.The symbole/is used for the division of two units.The symbole**is used for the exponential of two units.An emptyunitis expressed by : “dimensionless”.
See Data Representation Format in Crop2ML
The required datatype attribute is the type of input value specified in default (the default value in the input), min (the minimum value in the input) and max (the maximum value in the input). A set of types is defined in Crop2ML as:
STRING to manipulate string variables, eg: phenology development stade “Anthesis”
DATE : A convention used to express date is dd/mm/yyyy where dd is the day, mm the month and yyyy the year. eg: “15/12/2007”
DOUBLE: a real number with a decimal eg (15.0 not 15)
INT: an integer number
BOOLEAN: A boolean variable takes one of these two values “TRUE” or “FALSE”
Array variables have fixed length which values are between “[” and “]” brackets:
STRINGARRAY: an array of string variables.
DOUBLEARRAY: an array of real variables
INTARRAY: an array of integer variables
DATEARRAY: an array of dates variables
BOOLEANARRAY: an array of boolean variables
List variables have variable length which values are between “[” and “]” brackets:
STRINGLIST: a list of string variables
INTLIST: a list of integer variables
DOUBLELIST: a list of real variables
BOOLEANLIST: a list of boolean variable
DATELIST: a list of date variable
The
inputtypeattributeThe value of an
inputtypeattribute is either variable or parameter.
Each
Inputelement MAY have exactly one of each of the following attributes:
The
parametercategoryattribute SHOULD be defined when the value ofinputtypeattribute is parameterThe value of
parametercategoryattribute MUST be : constant, species, soil or genotypic value.
Constant does not depend on the species, the soil and genotypic traits. Eg: Avogadro constant, latitude
soil is related to soil properties, eg : soil water retention
species is related to species properties: Response of vernalization rate to temperature
genotypic is related to the genotype
The
variablecategoryattribute SHOULD be defined when the value ofinputtypeattribute is variableThe value of
variablecategoryattribute MUST be a state, a rate or an “auxiliary”.
State variables characterize the behavior of the model. They result from the exchange processus in the system.
Rate variables characterizes the flux of these exchanges
Auxiliary variables may be the intermediate product or other.
Other attributes
max,min,defaultanduriMAY be specified.
maxandminare often used to implement tests of pre- and post-conditions.They state the domain of validity of the variables and parameters and constitute a criteria of model composability.