Designing modular frameworks for crop modelling. Myriam Adam
1. Designing modular frameworks
for crop modelling
Implementation and guidelines for use
Myriam ADAM
Marc CORBEELS, Frank EWERT, Herman VAN KEULEN,
Peter LEFFELAAR, Jacques WERY
2. 2 /20
Why having modular frameworks?
• Large collection of crop models
• Increasing interest in model reuse
• Are they directly applicable? How to adapt them for the
specific application/objective?
Need of guidelines for model selection for
a given crop, in a given context and for a given
question (system studied)
3. 3 /20
Diversity of objectives diversity
of models and their structures
Photosynthesis of leaf canopies
1965 (de Wit 1965)
ELCROS
1970 (de Wit et al. 1970) Pedigree of models of
the ‘School of de Wit’
(Adapted from Bouman et al. 1996. Agric. Syst. 52:171-198)
MICROWEATHER
1975 ARID CROP (Goudriaan 1977)
(van Keulen 1975)
ARID CROP BACROS PHOTON
(SAHEL) (de Wit et al. 1978) (de Wit et al. 1978)
(van Keulen et al. 1986)
1980
PAPRAN
(Seligman & van Keulen 1981)
SUCROS
1985 (van Keulen et al. 1982)
SWHEAT SUCROS87 MACROS
WOFOST
1990 (van Keulen & Seligman 1987) (van Laar et al. 1992)
(van Diepen et al. 1988) (Penning de Vries et al. 1989)
(van Keulen & Wolf 1986)
SUCROS1
(Goudriaan & van Laar 1994) INTERCOM
(Kropff & van Laar 1993)
1995 SUCROS2 WOFOST 7.0
(van Laar et al. 1997) (Boogaard et al. 1998)
ORYZA
(Kropff et al. 1995)
2000 ORYZA2000
(Bouman et al. 2001)
GECROS
2005 (Yin & van Laar 2005)
4. 4 /20
Objective
• Develop framework to facilitate the assembly of crop
models depending on the crop system and on the
simulation objective (when to use which model?)
▫ IMPLEMENTATION
▫ Decompose the models into parts (different structures)
▫ Incorporate the different parts in a framework
▫ USE
▫ Develop criteria and approaches to select relevant parts to
assemble a crop model depending on the crop system and the
simulation objective
6. 6 /20
Diverse models = Diverse structures
Anything in common?
Structure of these models is based on the same basic crop
processes
Phenology
spring crop
winter crop
indeterminate
Light interception Production level
Homogenous Cascading
Water
limited Darcy
LAI expansion
Row Nitrogen Nitrogen fixation
limited
Biomass production
Partitioning
RUE
Allocation factor
Farquhar Source sink
strength
7. 7 /20
Applying new software techniques in crop
modelling
• Software engineers also decompose their models into
sub-models
• Applying object-oriented techniques enables to :
▫ Interchange of code among models
▫ Test of alternatives hypotheses
▫ Share expertise
Applying their techniques to more easily reuse parts of
code and build on the existing expertise
8. 8 /20
Design used
CROSPAL APES APSIM
Modules RUE Strategy design Strategy design Dynamic link
Basic crop processes pattern pattern libraries (dlls)
Component Abstract factory Composite Generic model
Crop and criteria with a strategy structure/ XML
Biomass GUI (IStrategy: configuration
production
interface)
Crop models Definition of new Components GCROP linked
Soil-crop concrete factories linked via to the APSIM
(i.e. crop simulator) wrapper engine
9. 9 /20
Implications for the users
Developers Crop modellers Model users
--- CROSPAL GUI
APES
APES APSIM
GUI
Composite
Flexi strategies Biomass
GUI
bility production
CROSPAL
factories
CROSPAL APES
strategies strategies
PLANT from APSIM
dlls and xml
+++ RUE
10. 10 /20
Implications for the users
• How to combine the different parts?
• How to deal with the flexibility?
• Need of criteria or systematic approaches to
define “the logic to assemble the appropriate
modules”
11. Select relevant parts to assemble a
crop model depending on the crop
system and the simulation
objective
Guidelines for use
12. 12 /20
CROSPAL
CROp Simulator: Picking and Assembling Libraries
Phenology:
Criteria
spring crop
Phenology:
winter crop
Phenology:
indeterminate
LAI expansion
Crop type
Limiting factors
Biomass production: (water, N, P,K…)
RUE
Biomass production:
Farquhar
Scale
Biomass
partitioning
Data availability
Management
Water
limited
Nitrogen Nitrogen fixation
limited
13. 13 /20
Test different model structures
winter crop indeterminate
spring crop
Objective of Picking the basic crop The “right”
simulation growth and modelling solution
development processes (crop model)
according to criteria
Models comparison
Sensitivity analysis
Expert elicitation Uncertainty matrix
Conceptual modelling Underlying the main
assumptions
14. 14 /20
Uncertainty matrix
Source of Nature Range Recognized
uncertainty The The “unknown ignorance
“known known” (to be) known” The “known
unknown”
Contextual: System definition
boundaries and
definitions
Input/data Data collection Data availability
uncertainties
Parameters Sensitivity analysis
Model Structure Scenario analysis Data availability/
research
▫ Study the system in a systematic way
▫ Test different modules
▫ Document uncertainties by explicitly formulating the
assumptions
15. 15 /20
Models comparison
North South Detailed Summarized Farq. RUE Farq. RUE
LAI LAI NORTH SOUTH
▫ Investigate the effect of modelling details on potential yield
▫ Identify which structure in which location
16. 16 /20
Participatory modelling
▫ Understand the initial model
▫ Integrate new knowledge
▫ Test the new model
18. 18 /20
Main conclusions
Definition of guidelines to facilitate exchange of
models (or parts of models)
Better documentation of modules but also of
modelling decision-making process (e.g.
use of uncertainty matrix)
Modular modelling is prone to error
seeking for scientific understanding vs. credible set of
outputs
Role of the crop modeller and conceptual models
19. 19 /20
Use of models for different purposes
Developers Crop modellers Model users
--- Software engineer Agronomist
CROSPAL GUI
Modeling Solution Soil-crop system
APES
APES APSIM
GUI
Composite
Flexi strategies
GUI
bility Uncertainty
CROSPAL
Component factories Basic crop processes
CROSPAL APES
strategies strategies
Underlying assumptions
PLANT from APSIM
dlls and xml
Underlying concept
Module
+++
Basic research Applied research
20. APES team
Funding: PRI, CIRAD, SEAMLESS
Thanks all for your attention
Acknowledgements
contact: m.adam@cgiar.org