Author Image

FINAM – Python model coupling framework

About FINAM

A lightweight model coupling framework in Python

FINAM is a lighweight, easy to use model coupling framework. Written in Python, it can be used to link models written in virtually any language.

We put particular focus on ease of use, and on making it possible to link existing models with as few programming work as possible.

FINAM is open source software under the LGPL3 license.


Features

1
Written in Python, for any language

Use the power and convenience of Python to wrap you models, write adapters, and set up model linkage.

Benefit from Python as glue code to couple models from different programming languages. Exchange any data between models in any language!

(
    cpp_model.outputs["precip"]
    >> TimeIntegration()
    >> fortran_model.inputs["precip"]
)

Flexible, component-based model coupling
Component-based coupling warrants high modularity and easy code-driven introspection of coupling setups.
[IMAGE COUPLING]
2

3
Minimal, unified component interface
Wrapping existing models is easy! Write python bindings for initialization and step functionality, and implement the straight-forward FINAM interface.
class MyComponent(ATimeComponent):
    def __init__(self, ...)
    def initialize(self)
    def connect(self)
    def validate(self)
    def update(self)
    def finalize(self)

Minimal-effort adapters
Adapters are used for data transformations between components. Examples are regridding, unit conversions or temporal interpolation. FINAM’s adapter interface is simple and easy to implement.
class ScaleAdapter(AAdapter):
    def __init__(self, scale):
        super().__init__()
        self.scale = scale
    def get_data(self, time):
        d = self.pull_data(time)
        return d * self.scale
4

5
Bi-directional and circular coupling
FINAM’s scheduling algorithm allows for bi-directional and circular coupling setups.
[IMAGE BIDIR COUPLING]

Spatio-temporal data types

FINAM is primarily designed for linking environmental models for different domains, like hydrosphere, pedosphere and biosphere.

For fast development, FINAM provides built-in support for a variety of spatial and spatio-temporal data types. But still, any data types can be exchanged.

[IMAGE???]
6

Projects

FINAM core
FINAM core

The FINAM core framework and basic tools

FINAM graphs
FINAM graphs

A tool for visualizing FINAM model linkage setups

FINAM NetCDF I/O
FINAM NetCDF I/O

NetCDF file I/O components for FINAM

Publications

A technical paper about FINAM

Abstract of the paper…