2.2.7. The Function element

..A Function element information item is a child of the ModelUnit element.

Function element is related to a mathematical function or service that can be called into model algorithm.

<ModelUnit modelid=" " timestep=" " name=" " version =" ">
   ...
   <Function name=" " language=" " filename=" "/>

   ...
</ModelUnit>
  1. A Function element MUST contain the following attriutes:

    1. A name attribute

    1. A language attribute

    1. A type attribute

    The value of A type attribute MUST be either internal or external

    Crop2ML provides a library of well-known mathematical functions such as fibonacci, interpolation.

    If the function exists in this library, the value of code:type attribute is internal.

  2. A Function element MAY contain a description attriute

A function can also be used for model adaptation such as temporal aggregation, unit conversion to link two models without changing.

In this case, it won’t be declared as a Function but as a Crop2ML model with no physiology meaning.