Pasture data reader SQLite
CLEM.FileSQLitepasture
Reads external grass production database for pasture production

The Data reader components are used to read external data for use by CLEM. It is recommended that you place this component with the activities using them or below the CLEM component.
This Data reader is used to read a pasture production data cube in SQLite format. This is the most efficient means of supplying pasture production data in terms of simulation time. The data cube contains the results of pasture production simulations for a given historic period across a range of land conditions, grass basal areas and stocking rates.
This is an advanced feature for modelling pasture (e.g. properties in northern Australia). Expertise is required to produce the lookup database with output from a pasture model. Contact the CLEM team to discuss using other models to provide pasture production.
Optimising your database for performance
As the pasture production data-cube contains pasture growth for all the required permutations of land condition, soil type, grass basal area and stocking rate, for at least the duration of your simulation, this is often a large file. The model needs to be query this database for pasture growth for each change in the ecological indicators associated with the pasture which accounts for a large proportion of the CPU requirement of your simulation. For this reason we highly recommend you add an Index to your database to significantly reduce the time taken to perform your simulation, especially for extended simulations and multiple runs using APSIM Experiments. Adding the Index can be performed in SQLite management software (such as DB Browser). The SQL statement to run on your database is:
CREATE INDEX CLEM_next_growth ON Native_Inputs (Region, Soil, GrassBA, LandCon, StkRate, Year, Month);
This index must be named CLEM_next_growth and should include the table and column names appropriate to your database.
CLEM will produce a warning if your database has not been optimised with an appropriate index.
The model will also automatically generate a number of other small tables in your database to store unique values of the ecological indicators to also improve performance.

The following parameters are used to define this component

The name of the SQLite database including extension. Include the full path of the database if not contained in the same folder as the APSIMX file.

Name of the table within the database containing the pasture data.
The following columns are expected in the table. The column name referring to the data can be supplied such that any table can be used to provide data.

The name of the column in the specified table identifying the region to be used. This must relate to the region index used in the CLEM component.
Default: Region

The name of the column in the specified table identifying the land id to be used. This must relate to the land type identifier used in the Land type.
Default: Soil

The name of the column in the specified table identifying the grass basal area to be used. The Grass basal area at the time of production.
Default: GrassBA

The name of the column in the specified table identifying the land condition index to be used. The Land condition index at the time of production is tracked by the ecological indicators section of Manage pasture
Default: LandCon

The name of the column in the specified table identifying the stocking rate to be used.
Default: StkRate

The name of the column in the specified table identifying the year of each record.
Default: Year

The name of the column in the specified table identifying the month of each record.
Default: Month

The name of the column in the specified table identifying the biomass produced for each record. The monthly of biomass production (kg/ha).
Default: Growth
Additional data can be obtained from the database to provide ecological change metrics

The name of the column in the specified table identifying the soil loss predicted by the pasture production model if available.
Default: soiloss

The name of the column in the specified table identifying the run-off predicted by pasture production model if available.
Default: runoff

The name of the column in the specified table identifying the monthly rainfall total used by pasture production model if available.
Default: rainfall

The name of the column in the specified table identifying the cover predicted by pasture production model if available.
Default: cover

The name of the column in the specified table identifying the tree basal area predicted by pasture production model if available.
Default: treeba

The following components will add additional functionality to this component

Provides a very basic means of creating a random rainfall sequence for pasture production.
See also