A software framework for rapid prototyping of artificial intelligence in Earth system models: the SORTIE-NG approach
Abstract
A central barrier in the application of artificial intelligence (AI) to Earth system models is related to the two-language problem: it is often difficult and time-consuming to expose low-level C/C++ or FORTRAN classes and methods to high-level languages such as Python, the most widely used language for deep learning. Applying machine learning to models typically involves developing model wrappers in a high-level language exposed only to model inputs and outputs, severely limiting the type of models that can be developed. While the TensorFlow and PyTorch libraries both provide a C++ interface, this language requirement limits the potential userbase of data scientists and incurs additional complexity and developer time through their respective compilation requirements.
A recent approach to addressing the two-language problem is to use a JIT compiled language developed on the LLVM compiler infrastructure, such as Julia, Python Numba, or Dropbox's former Pyston; this is the approach being taken by Caltech's CLIMA initiative, who aim to build the Climate Machine purely in Julia. Yet, while the language itself is now stable, Julia's machine/deep learning libraries continue to mature. An alternative approach is to simplify the generation of a Python interface from C++ code. While most existing Earth system models are implemented in FORTRAN, modeling groups such as DOE E 3 SM are reportedly aiming to transition from FORTRAN to C++ for its large number of mature scientific libraries and industry-standard tooling. We describe the approach used in the SORTIE-NG forest biogeochemistry model, which follows the approach used by PyTorch. This approach is based on a combination of CMake, pybind11, setuptools, pytest, and a C++ testing framework such as Google Test or Catch2. This allows high-performance C++ computation from a high-level Python interface, exposing model classes and methods to a number of industry-standard deep learning frameworks.- Publication:
-
AGU Fall Meeting Abstracts
- Pub Date:
- December 2019
- Bibcode:
- 2019AGUFMIN43A..02E
- Keywords:
-
- 0555 Neural networks;
- fuzzy logic;
- machine learning;
- COMPUTATIONAL GEOPHYSICS;
- 1849 Numerical approximations and analysis;
- HYDROLOGY;
- 1910 Data assimilation;
- integration and fusion;
- INFORMATICS;
- 1942 Machine learning;
- INFORMATICS