Upload
others
View
4
Download
0
Embed Size (px)
Citation preview
Crop2ML: A multi-language crop modeling framework for the exchange and reuse of
crop model components
Cyrille Midingoyi
Christophe Pradal, Andreas Enders, Davide Fumagalli, Hélène Raynal, Ioannis Athanasiadis, Cheryl Porter, Gerrit Hoogenboom, Dean Holzworth,
Frédérick Garcia, Peter Thorburn, Marcello Donatelli, Pierre Martre
October, 10th 2019 - Montpellier, France
Atelier #DigitAg
Modélisation
Atelier #DigitAg Axe 6 Modélisation,Montpellier, 17 octobre 2019
Introduction Standard Crop model representation (Crop2ML) CyML: Common modelling language of crop model PyCrop2ML software Use cases Perspectives
Outline
Context
Soil (RU, Infiltration….)
Atmosphere
Organ, Plant, Crop…
Agricultural policy Research
Decision support Tool
use:
Importance:
Objectives - Crop yield - Nutrient content
- Bio-Energy - Erosion - Emissions - ….
Agricultural practices (Sowing date, irrigation,….)
1
- Climate - Soil - Management - Plant
Model
Yield Soil, Water dynamics…
Introduction: Context
+40 wheat models in use (AgMIP)
𝐶𝑟𝑜𝑝𝑀𝑜𝑑𝑒𝑙 = 𝐸 𝐸𝑐𝑜𝑝ℎ𝑦𝑠𝑖𝑜𝑙𝑜𝑔𝑖𝑐𝑎𝑙 𝑃𝑟𝑜𝑐𝑒𝑠𝑠𝑒𝑠 = 𝑓(𝑃𝑙𝑎𝑛𝑡, 𝑆𝑜𝑖𝑙, 𝐶𝑙𝑖𝑚𝑎𝑡𝑒,
𝑀𝑎𝑛𝑎𝑔𝑒𝑚𝑒𝑛𝑡, 𝑡𝑖𝑚𝑒, … )
Ecosystem Level
Crop Level
Plant Level
Organ Level
Cell Level
Molecular Level
Different Levels of organization
Different objectives
Gene regulation…
Metabolism…
Organ growth…
Phenology…
Biomass…
Carbon flux…
Pla
nt
and
Cro
p S
cien
ce
Cro
p m
od
ellin
g P
latf
orm
s
Syst
ems
Bio
logy
1 Chew et al, 2014
Process-based Crop Models
Introduction: Agricultural Models Exchange Initiative
AMEI
Exchange of model components (Process-level) and code reuse
Propose a solution to the crop modelling community for NexGen crop modeling tools
Realize the benefit of sharing and complementing different expertises
Reuse model parts to leverage the expertise of third parties
Vision Motivation
2
Comparison of biomass (AGBM) of 23 wheat models for AgMIP project (Martre et al., 2015)
Which hypothesis is due to the difference of model outputs?
Introduction: Challenges
RECORD
Crop2ML (Python, Fortran, C++, C#, Java,…)
Transparent Reproducible Less Time-consuming More Modular
Good level abstraction of crop model representation
From abstraction to target
platform (conversely)
3
Objectives Goals
White-box approach
Related work
Declarative modelling language (white-box approach)
Muetzelfeldt and Massheder, 2003
Visual modelling languages Multi-scale modelling and simulation Framework (black-box approach)
Marshall-Colon et al., 2017
Hucka et al., 2017
4
Standard model representation (Crop2ML)
I. Conceptual model independent-platform (XML-based description) II. Formal rules to describe ecophysiological processes (Algorithms) or functions
(CyML language)
Model Unit Structure Model Composition Structure 5
(Equation + control flow)
Models communicate through link elements (scientific workflow)
Standard model representation (Crop2ML)
6
From Crop2ML model specifications to model diagram flow (Eg. Energy balance of SiriusQuality)
Composite
Link
CyML is an extensible subset of Cython (Python + C types) to represent algorithms in crop models.
Control structures (if elif else, for, while) / finite difference equations
Provides standard functions (characteristics) supported by the target languages.
7 Fully automatized Language conversion workflow (Transpiler)
CyML : Common modelling language of crop model
Cpp F90 Java C# Py R
FWSi
mM
od
els
Do
mai
n C
lass
es
Stra
tegy
cla
sses
No
des
(F
acto
ry)
VLE
pac
kage
Sub
mo
du
les
Mo
du
les
Automatic Conversion frameworks
Crop2ML models Repository
Pyt
ho
n
Java
Fort
ran
C+
+
C#
Dat
a Fl
ow
Dis
cret
e-ev
ent
Pro
ced
ura
l
XM
L/ O
-O
PyCrop2ML software
O-O: object –oriented approach 8
XM
L/ O
-O
Phenology Energy Balance
Phenology Energy Balance
Phenology Energy Balance
Crop2ML Algo only in Cyml
Crop2ML Src/Test generated in F90, C#, Py
Transpiler Phenology Energy Balance
Crop2ML Package
Use Cases
9
(Pradal et al., 2008)
(Enders et al., 2010)
(Bergez et al., 2013)
(BioMA, 2012)
(Jones et al., 1998)
(Brisson et al., 1998)
(Holzworth and al., 1996) Semi-automatically
Automatically
CyM
L A
ST
Lan
guag
es
AST
From code to AST From AST to AST From AST to code
1 2 3
Perspectives
Figure 2: CyML transformation extensibility
• User-friendly JupyterLab environment to develop, edit, and
visualize Crop2ML components (in progress)
• Public model repositories (linking publications to models for
reproducibility)
• New functionalities:
Check validity of model units (equations) and model composition
Model annotation (CropML concepts, ontology)
Propose a plant structure representation (Multi-Scale Tree Graph)
• Link with other initiatives (Crops In Silico…) and plant and crop
modelling platforms
Perspectives
10
Follow and contribute to Crop2ML development on GitHub
https://github.com/AgriculturalModelExchangeInitiative/ 11
Thanks