crop.js is a dynamic, deterministic generic crop (-rotation) and grassland growth model in JavaScript. It is a JS port of the soil, water and crop processes of MONICA (C++) code and an implementation of the grassland/pasture growth sub-model of SGS Pasture Model from the publicly available documentation.
var debug = true,
verbose = true,
weather = { // find complete description of optional or mandatory input data in src/configuration.js
tmin: [/*...your data...*/],
tmax: [/*...your data...*/],
precip: [/*...your data...*/]
};
/* create a configuration */
var configuration = new crop.Configuration(weather, debug, verbose,
// optional callback
function (dayOfSimulation, dateString, models, done) {
var model, cropGrowth, soilTemperature, soilMoisture,
soilOrganic, soilColumn, soilTransport;
for (var m = 0; m < models.length; m++) {
model = models[m];
// access sub-models
if (model.isCropPlanted())
cropGrowth = model.cropGrowth();
soilTemperature = model.soilTemperature();
soilMoisture = model.soilMoisture();
soilOrganic = model.soilOrganic();
soilColumn = model.soilColumn()
soilTransport = model.soilTransport();
/* do stuff */
}
});
/* set up simulation, soil and crop parameters */
var simulation = {
time: {
startDate: '1996-01-01',
endDate: '1997-12-31'
},
switches: {
nitrogenResponseOn: true,
waterDeficitResponseOn: true
},
init: {
percentageFC: 1
}
},
site: {
latitude: 52.625,
slope: 0,
heightNN: 1,
horizons: [{
thickness: 2,
organicMatter: 0.015,
sand: 0.60,
clay: 0.05,
sceleton: 0.02
}]
},
production: {
crops: [{ /* a rotation or single crop: dates should not collide */
model: 'generic',
species: [
{
// see available crops at genericcrop.js and grassland.js
// with varying parameter quality!
name: 'winter rye'
}
],
sowingDate: '1996-10-01',
plantDryWeight: 225,
finalHarvestDate: '1997-07-01',
tillageOperations: [],
irrigations: [],
organicFertilisers: [],
mineralFertilisers: []
}]
};
/* run the simulation */
configuration.run(simulation, { site: site, production: production });
See also code and examples: http://jvail.github.io/crop.js/, https://zalf-lse.github.io/solid-dss/. A configuration's parameter description is available from here.
MONICA is based on HERMES and DAISY. HERMES is based on SUCROS. The grassland model is based on the SGS Pasture Model.
Nendel, C., M. Berg, K.C. Kersebaum, W. Mirschel, X. Specka, M. Wegehenkel, K.O. Wenkel, R. Wieland (2011). The MONICA model: Testing predictability for crop growth, soil moisture and nitrogen dynamics. Ecol. Model. 222 (9), 1614–1625.
Johnson I. R., Lodge G. M., White R. E. (2003). The Sustainable Grazing Systems Pasture Model: description, philosophy and application to the SGS National Experiment. Australian Journal of Experimental Agriculture 43, 711–728.
- Replace MONICA's generic grass-legume model with a more sophisticated grassland model that is able to simulate mixtures of species.
- Provide additional nutritional parameters (e.g. digestibility) for forage crops (e.g. maize, whole-crop silage) that may be consumend by animal (ruminants) models.
- Add multi-model support to allow interaction of models (rotations, paddocks).
- Add routines to interact with animal models (grazing).
- Add other grassland species (or functional groups) if parameters are available.
- Add simple rountines for automatic seed, harvest, fertilization, irrigation and tillage date predictions.
- Simplify MONICA's input parameters, configuration and API.
- Provide infrastructure and unified API to easily extend crop.js with custom crop growth models
The study has been supported by the TRY initiative on plant traits (http://www.try-db.org). The TRY initiative and database is hosted, developed and maintained by J. Kattge and G. Bönisch (Max Planck Institute for Biogeochemistry, Jena, Germany). TRY is currently supported by DIVERSITAS/Future Earth and the German Centre for Integrative Biodiversity Research (iDiv) Halle-Jena-Leipzig
The research leading to these results has received funding from the European Community’s Seventh Framework Programme (FP7/2007–2013) under grant agreement No. FP7-266367 (SOLID).