Bmi
The Basic Model Interface is a set of functions for coupling models to models and models to data
Install / Use
/learn @csdms/BmiREADME
The Basic Model Interface
The Basic Model Interface (BMI) is a standardized set of functions that allows coupling of models to models and models to data.
The Basic Model Interface (BMI), developed by the Community Surface Dynamics Modeling System (CSDMS), is a standardized set of control and query functions that, when added to a software element such as a model or a dataset, makes that software easier to couple with other software that also exposes a BMI.
A BMI makes a model self-describing and fully controllable by a modeling framework or application. By design, the BMI functions are straightforward to implement in any language, using basic data types from standard language libraries. Also by design, the BMI functions are noninvasive. This means that a model's BMI does not make calls to other components or tools and is not modified to use any framework-specific data structures. A BMI, therefore, introduces no dependencies into a model, so the model can still be used in a stand-alone manner.
The BMI is expressed in the Scientific Interface Definition Language (SIDL). From bmi.sidl, CSDMS has derived BMI specifications for five languages--C, C++, Fortran, Java, and Python. For each language, links to the specification and an example implementation are listed in the table below.
| Language | Specification | Example implementation | | -------- | ------------- | ---------------------- | | C | bmi-c | bmi-example-c | | C++ | bmi-cxx | bmi-example-cxx | | Fortran | bmi-fortran | bmi-example-fortran | | Java | bmi-java | bmi-example-java | | Python | bmi-python | bmi-example-python | | R | bmi-r | bmi-example-r |
Detailed instructions for building the specifications and examples are given at each link above. Alternatively, the specifications can be installed through conda (C, C++, Fortran, Python) or Maven (Java). See the links above for details.
While CSDMS currently supports the languages listed above, a BMI specification can be written for any language. BMI is a community-driven standard; contributions that follow the contributor code of conduct are welcomed, and are acknowledged.
The table below lists community-contributed language specifications and examples for two languages, Javascript and Julia.
| Language | Specification | Example implementation | | ---------- | ------------- | ---------------------- | | Javascript | bmi-js | bmi-example-js | | Julia | bmi-julia | bmi-example-julia |
The default branch of this repository reflects the current state of development for the BMI. When implementing a BMI, please use the latest release listed in the right sidebar; currently this is Basic Model Interface 2.0. For more information on implementing a BMI, see the documentation.
BMI is open source software released under the MIT License. BMI is an element of the CSDMS Workbench, an integrated system of software tools, technologies, and standards for building and coupling models.
The Community Surface Dynamics Modeling System is supported by the National Science Foundation.
<!-- Links -->Related Skills
node-connect
344.4kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
claude-opus-4-5-migration
99.2kMigrate prompts and code from Claude Sonnet 4.0, Sonnet 4.5, or Opus 4.1 to Opus 4.5
frontend-design
99.2kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
model-usage
344.4kUse CodexBar CLI local cost usage to summarize per-model usage for Codex or Claude, including the current (most recent) model or a full model breakdown. Trigger when asked for model-level usage/cost data from codexbar, or when you need a scriptable per-model summary from codexbar cost JSON.
