Adding new cultivars to an existing crop module
There are two parts to this document; the technical procedures involved in associating parameters with cultivars, and a discussion on the scientific basis for adding new cultivars. As well, users should be aware that each crop module may have specific parameters that are described in the module documentation.
When apsim is installed on your computer, it comes with a set of standard parameter files; one for each crop. By default, these are read-only and should not be changed, which complicates the process of adding new features to standard modules. The “ini” component addresses this problem by allowing the user to specify a non-standard parameter file. To use the ini component, drag a copy from the Standard Toolbox under the Structural folder onto your crop module. Then, in windows explorer copy the standard parameter file from the Model folder underneath the apsim installation directory (eg C:\Program Files (x86)\Apsim-r1234\Model\Wheat.xml) to your work area. Back in your simulation, use the “Browse” button to select this parameter file in your work area.
You’ll need a text editor (eg Notepad++) to edit this xml formatted file. Cultivars are defined towards the end of the document – they are specified by an XML attribute (cultivar=”yes”). To make a new cultivar, copy one that is similar to your own, and paste it into the document alongside the existing cultivar. Change the name of the cultivar to yours – and ensure it’s unique within the file. You must preserve the XML structure of the document.
The cultivar sections use an inheritance technique to say that the parameters described in that block (eg photop_sens) override the parameters in the parent (derived_from=base_cultivar) block.
This new cultivar can now be used in a sowing rule. It won’t show up in the dropdown list, but can be typed directly into the entry cell:
It should be emphasised that the parameter file is specific to an apsim version; and may change between versions. Tools such as WinMerge are well suited to displaying the differences between these files.
A discussion on the scientific basis for adding new cultivars