INPUT

Most simulation require data, other than module parameters to be available to all modules. This service is provided by the APSIM input module.

The input module is an instantiable module. This means that APSIM can run zero or more instances of the input module. The instance name met is special. If the input module is running as met , it will read its data from a single section called weather , otherwise it will read its data from a single section called data.
There are two types of data that the input module can be used to read, temporal data (eg. weather data), and data that is constant for a given simulation . This is why there are potentially two parts to the input section, an optional constants section followed by an optional temporal data section.
Input file format

alpha = one two three
beta = one two three four five six seven
Lumpia = -7.11
 
year day rug(1) rug(2) paxt
() () (MJ/m2) (MJ/m2) (oC)
1988 1 20 21 33.0
1988 2 23 24 33.8
1988 3 23 24 32.5
1988 4 19 20 30.8
1988 5 17 18 28.2
1988 6 22 23 29.0
1988 7 22 23 28.4
1988 8 25 26 31.2
1988 9 26 27 33.6
1988 10 25 26 34.4
1988 11 22 23 31.6

Constants part

Data in the constants section must be in the format “apsim_name = values …”. Where apsim_name is the name of the APSIM variables and values is one value in the case of scalar data and one to 100 values separated by spaces in the case of array data. There is no limit to the number of variables that may be defined here.
Each value can be at most 50 characters long, with the added restriction that a given line may be at most 2000 characters long.

Temporal data part

Data in the temporal section is in tabular format, very similar to the output of the report module. This is deliberate, so that the input module can potentially use output from the report module.

Headings line
First there must be a line of space separated headings. In the case of scalar data, a heading is the APSIM name of the variable. In the case of array data is the heading is the APSIM name of the variable immediately followed by the array index in parenthesis (no spaces allowed). For a given APSIM array variable, the array elements must appear in order beginning with element 1.
There may be up to 100 headings, each of which may be up to 35 characters long, with the added restriction that a given line may be at most 2000 characters long. The APSIM variable year must be present in the temporal data table. Either the APSIM variable day (meaning day of year) must be present or the APSIM variables month and day_of_moth must be present.

Units line

Then the units line must follow – a space separated units string for each heading. In the case of array data, the units string belonging to elements of the same APSIM variable must be identical.
Each units string may be up to 35 characters long, with the added restriction that a given line may be at most 2000 characters long.

Data lines

Then a line for each day must follow with the space separated data elements corresponding to each of the headings in order.
Each units string may be up to 50 characters long, with the added restriction that a given line may be at most 2000 characters long. Normally, each day for the APSIM simulation must be present in order.

Sparse Data

If the constants part of the section has a scalar APSIM variable allow_sparse_data is present, and its value it “true”, then sparse data is permitted, and each day of the simulation need not be present. An attempt by other modules to get data on a day with no data will normally get the zero elements in its numvals field. Defaults for sparse data can be set in the constants section. In this case, if data is present in the temporal section on that day, the values specified in the temporal section will be returned. Otherwise the data specified in the constants section will be returned.

Met calculated data

If the input module is instantiated as met , then some calculated variables are available:
The real scalar day_length is calculated from lattitude and made avalable.

Examples

Example input data can be found in the Apsim\Examples directory.