This document describes the Model Message Interface (MMI): a draft protocol for serializing messages between numerical models and between numerical modesl and other programs.
There is already a common protocol in use for model messages, MPI. This works great for communication within a model. Since MPI2 it can also be used to set up ad hoc communication between models.
There are scenarios where communication through MPI is not the most appropriate approach:
- Flexible process structures (e.g., dynamic populations of distributed programs)
- Communcating through the web (e.g., through firewalls).
Our main focus is sending and receiving n-dimensional arrays of simple fixed-length types such as integers and floating-point values, along with metadata and additional attributes. We base our data model on the Variables and Attributes from the Common Data Model [ref].
A message contains a block of metadata followed by the data raw, binary format.
Metadata is in JSON format and UTF8 encoded. It contains at least the following three attributes:
With CF extension:
An extended example:
With numpy slicing convention: