CMI Description

From CSDMS

CSDMS Component Model Interface (version 1.0)

  • Any model that provides the Basic Model Interface (BMI) functions can be easily converted to a CSDMS plug-and-play component that has a CSDMS Component Model Interface or CMI. This conversion/wrapping process is done by CSDMS staff. The BMI functions are called by the CMI, by the framework and by service components. It is not necessary for a developer to learn anything about the CMI unless they're just curious. This page is for those curious people.
  • There is really only one CMI wrapper for each of the programming languages supported by CSDMS (C, C++, Fortran (all years), Java and Python). It can be thought of as a "harness" that "slips onto" a BMI-enabled model.
  • By design, the BMI functions are noninvasive. A BMI-compliant model does not make any calls to CSDMS components or tools and is not modified to use CSDMS data structures. BMI therefore introduces no dependencies into a model and the model can still be used in a "stand-alone" manner.
  • The relationship between BMI and CMI is illustrated by the following diagram.
BMI CMI Image.png
  • The CMI-wrapper makes function calls to a model's BMI functions as well as to Service Components and the CSDMS Framework (which complies with the CCA standard for frameworks). Based on the information that it gets from the Model Information Functions, it can determine whether it needs to call Service Components to adjust for differences between a given model component and other model components that it needs to get data from or pass data to. The Service Components can adjust for differences in (1) the type of computational grid (regridding), (2) the time-stepping scheme, (3) variable names and (4) variable units. The CMI wrapper also uses Service Components to write model output in a standardized way to NetCDF files.
  • CSDMS staff compile the CMI-wrapped model as a dynamically linkable library with a language interoperability tool called Babel so that it can interoperate with (i.e. make CMI function calls to) components that may have been written in a different (possibly quite different!) programming language. CMI-wrapped models are pre-compiled units that are selected by users and then dynamically linked at runtime to form composite models. The components that are to be dynamically linked and their settings are specified in a script (a text file with extension ".rc") that is ingested by the Ccaffeine framework. The CSDMS Web Modeling Tool (WMT) lets users drag model components from a palette into an arena to build a composite model. It also provides a simple tabbed-dialog GUI for each model component that can be used to change a model's settings. These new "custom-built" models can then be run from within the WMT or launched from a command line on the CSDMS high performance cluster, called "beach.colorado.edu".