Designing modular frameworks for crop modelling. Myriam Adam

20
Designing modular frameworks for crop modelling Implementation and guidelines for use Myriam ADAM Marc CORBEELS, Frank EWERT, Herman VAN KEULEN, Peter LEFFELAAR, Jacques WERY

description

A presentation at the WCCA 2011 event in Brisbane.

Transcript of Designing modular frameworks for crop modelling. Myriam Adam

Page 1: Designing modular frameworks for crop modelling. Myriam Adam

Designing modular frameworks

for crop modellingImplementation and guidelines for use

Myriam ADAM Marc CORBEELS, Frank EWERT, Herman VAN

KEULEN, Peter LEFFELAAR, Jacques WERY

Page 2: Designing modular frameworks for crop modelling. Myriam Adam

/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)

2

Page 3: Designing modular frameworks for crop modelling. Myriam Adam

/20Diversity of objectives diversity of models and their structures

3

1965

1970

1975

1980

1985

1990

1995

2000

ELCROS(de Wit et al. 1970)

BACROS(de Wit et al. 1978)

PAPRAN(Seligman & van Keulen 1981)

ARID CROP(van Keulen 1975)

ARID CROP(SAHEL)

(van Keulen et al. 1986)

PHOTON(de Wit et al. 1978)

MICROWEATHER(Goudriaan 1977)

SWHEAT(van Keulen & Seligman 1987)

ORYZA(Kropff et al. 1995)

ORYZA2000(Bouman et al. 2001)

WOFOST(van Diepen et al. 1988)

(van Keulen & Wolf 1986)

WOFOST 7.0(Boogaard et al. 1998)

SUCROS(van Keulen et al. 1982)

SUCROS87(van Laar et al. 1992)

SUCROS1(Goudriaan & van Laar 1994)

SUCROS2(van Laar et al. 1997)

MACROS(Penning de Vries et al. 1989)

INTERCOM(Kropff & van Laar 1993)

Pedigree of models of the ‘School of de Wit’

(Adapted from Bouman et al. 1996. Agric. Syst. 52:171-198)

GECROS(Yin & van Laar 2005)2005

Photosynthesis of leaf canopies(de Wit 1965)

Page 4: Designing modular frameworks for crop modelling. Myriam Adam

/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

4

Page 5: Designing modular frameworks for crop modelling. Myriam Adam

Decompose a model into parts (different structures)

IMPLEMENTATION

Page 6: Designing modular frameworks for crop modelling. Myriam Adam

/20

Phenologyspring crop

winter crop indetermi

nate

Diverse models = Diverse structuresAnything in common?

6

Light interception Production level

Biomass production Partitioning

Allocation factor

LAI expansion

RUE

Water limited

Nitrogen limited

Nitrogen fixation

Homogenous

Row

Cascading

Darcy

Source sink strength

Farquhar

Structure of these models is based on the same basic crop processes

Page 7: Designing modular frameworks for crop modelling. Myriam Adam

/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

7

Page 8: Designing modular frameworks for crop modelling. Myriam Adam

/20

Design used

8

CROSPAL APES APSIM

Modules Basic crop processes

Strategy design pattern 

Strategy design pattern

Dynamic link libraries (dlls)

Component Crop

Abstract factory and criteria with a GUI

Composite strategy (IStrategy: interface)

Generic model structure/ XML configuration

Crop modelsSoil-crop (i.e. crop simulator)

Definition of new concrete factories

Components linked via wrapper

GCROP linked to the APSIM engine

Biomass production

RUE

Page 9: Designing modular frameworks for crop modelling. Myriam Adam

/20

Implications for the users

9

Flexibility

---

+++

Model users Developers Crop modellers

CROSPAL strategies

APES strategies

CROSPAL factories

APES

GUI

CROSPAL GUI

APSIMGUI

APES Composite strategies

PLANT from APSIM

dlls and xml

Biomass production

RUE

Page 10: Designing modular frameworks for crop modelling. Myriam Adam

/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”

10

Page 11: Designing modular frameworks for crop modelling. Myriam Adam

Select relevant parts to assemble a crop model depending on the crop system and the simulation objective

Guidelines for use

Page 12: Designing modular frameworks for crop modelling. Myriam Adam

/20

CROSPALCROp Simulator: Picking and Assembling Libraries

Criteria

Crop typeLimiting factors

(water, N, P,K…)

ScaleData availability

Management

12

Phenology: spring crop

Biomass partitioning

LAI expansion

Biomass production: RUE

Phenology: winter crop

Water limited

Nitrogen limited

Nitrogen fixation

Phenology: indeterminate

Biomass production: Farquhar

Page 13: Designing modular frameworks for crop modelling. Myriam Adam

/20

Test different model structures

13

The “right”modelling solution

(crop model)

Objective of simulation

Picking the basic crop growth and

development processes according

to criteria

Uncertainty matrixUnderlying the main

assumptions

Expert elicitationConceptual modelling

Models comparison Sensitivity analysis

spring crop

winter crop indeterminate

Page 14: Designing modular frameworks for crop modelling. Myriam Adam

/20

Uncertainty matrix

▫ Study the system in a systematic way▫ Test different modules▫ Document uncertainties by explicitly formulating the

assumptions

14

Source of uncertainty

NatureThe

“known known”

Range The “unknown (to be) known”

Recognized ignorance

The “known unknown”

Contextual: boundaries and definitions

System definition

Input/data uncertainties

Data collection Data availability

Parameters Sensitivity analysis

Model Structure Scenario analysis Data availability/ research

Page 15: Designing modular frameworks for crop modelling. Myriam Adam

/20

Models comparison

▫ Investigate the effect of modelling details on potential yield

▫ Identify which structure in which location

15

North South Detailed Summarized Farq. RUE Farq. RUELAI LAI NORTH SOUTH

Page 16: Designing modular frameworks for crop modelling. Myriam Adam

/20

Participatory modelling

▫Understand the initial model▫Integrate new knowledge▫Test the new model

16

Page 17: Designing modular frameworks for crop modelling. Myriam Adam

CONCLUSIONS

Page 18: Designing modular frameworks for crop modelling. Myriam Adam

/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

18

Page 19: Designing modular frameworks for crop modelling. Myriam Adam

/20

Use of models for different purposes

19

Flexibility

---

+++Basic research Applied research

Model users Developers

CROSPAL strategies

APES strategies

CROSPAL factories

APES

GUI

CROSPAL GUI

APSIMGUI

APES Composite strategies

PLANT from APSIM

dlls and xml

Software engineer

Modeling Solution

Component

Module

Agronomist

Soil-crop system

Basic crop processes

Underlying concept

Uncertainty

Underlying assumptions

Crop modellers

Page 20: Designing modular frameworks for crop modelling. Myriam Adam

Acknowledgements

contact: [email protected]

APES team

Funding: PRI, CIRAD, SEAMLESS

Thanks all for your attention