Computational Models

Reuse, don’t lose, process-based models and components

A new system automatically transforms existing process-based crop models into different languages and simulation platforms.

This new approach, described in in silico Plants, will improve the reproducibility, exchange and reuse of process-based crop models (PBM). PBM are increasingly implemented as autonomous components describing each biophysical process.

According to lead author, Dr. Cyrille Ahmed Midingoyi, researcher for the joint research unit LEPSE (Laboratory of Ecophysiology of Plants under Environmental Stress) at the University of Montpellier, and the French National Institute for Agriculture, Food, and Environment (INRAE), “the diversity of plant and crop process-based modeling platforms in terms of implementation language, software design, and architectural constraints limits the reusability of the model components outside the platform in which they were originally developed, making model reuse a persistent issue.”

To facilitate the intercomparison and improvement of process-based models and the exchange of model components, several groups joined to create the Agricultural Model Exchange Initiative (AMEI). The AMEI has now created a centralized framework, Crop2ML, for exchanging and reusing model components between modeling groups.  Crop2ML provides a meta-language based on shared concepts between crop simulation platforms to describe specifications of model components and compositions.

Diagram of CyML

First, the authors designed CyML (pronounced “sai-mil”), a Cython-derived language that provides a common method to describe a process with the capacity to be integrated automatically in various platforms.

Next, the authors created the CyML transformer (CyMLT), an extensible source-to-source transformation system that transforms CyML source code into different target languages and programming paradigms. CyMLT enables users to focus on the scientific aspect of their model rather than on the internal knowledge of platforms’ specificities.

In the article, the authors demonstrated their reuse approach with a component of an existing model by transforming it into a Crop2ML composite model and rewriting its algorithms in CyML to the simulation platform, APSIM-PMF (Plant Modelling Framework). APSIM-PMF is a software framework used to build models that represent plant components. It includes a wide range of processes involved in plant growth and development.

CyMLT is able to directly generate components to target modeling platforms such as DSSAT, BioMA, Record, SIMPLACE, and OpenAlea. It is currently available in several different target languages such as R, Fortran, C#, C++, Java, and Python. Future work will explore the extension of CyMLT with other imperative programming languages such as Matlab, Julia, JavaScript and other modeling platforms that use imperative languages.

The CyMLT source code are available publicly on Github at https://github.com/AgriculturalModelExchangeInitiative/PyCrop2ML. Full documentation for CyML and CYMLT can be found at https://pycrop2ml.readthedocs.io.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.