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>
  1. A Inputs element MUST contain one or more Input element child.

  2. Each Input element MUST have exactly one of each of the following attributes:

    1. The name attribute. The value of the name MUST be a valid Crop2ML name attribute.

      The value of a name attribute MUST NOT be identical to the value of the name attribute on any sibling Input element

    2. The description attribute

    3. The datatype attribute

      The value of a datatype attribute is the data type of the value that input can take. A set of types is defined in Crop2ML as

    4. An Unit attribute 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 empty unit is 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

  1. The inputtype attribute

    The value of an inputtype attribute is either variable or parameter.

  1. Each Input element MAY have exactly one of each of the following attributes:

  1. The parametercategory attribute SHOULD be defined when the value of inputtype attribute is parameter

The value of parametercategory attribute 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

  1. The variablecategory attribute SHOULD be defined when the value of inputtype attribute is variable

    The value of variablecategory attribute 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.

  1. Other attributes max, min, default and uri MAY be specified.

    max and min are 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.