Introduction is a simple script that runs two or more wflow modules connection via the BMI interface (the combined version). A configfile is used to control which models to start as well as the exchange of data between the models.

The config file contains a list of models configured with the name of the wflow modules to run and the ini file that is used by the model. Furthermore, in the exchanges section the data flows from model to model are configured.

# module name = path to config of module relative to the dir of this ini file

# From_model/var -> To_model/var

To setup a combined model you should first configure and setup the individual models. They can be setup in separate case directories or they can be merged in one case directory. Each model should have it’s own config/ini file. The following principles apply when using the bmi2runner script:

  • the models are executed in the order they are listed in the models section

  • the variables are get/set in the order they appear in the exchanges section

  • the script runs explicitly, no iteration is performed


In the examples directory the file bmirunner.ini is present. You can use this to run a combined wflow_sbm/wflow_routing model. Start this up using the following command (in the examples dir): -c bmirunner.ini

A second example runs wflow_sbm next wflow_routing followed by the wflow_floodmap module: -c bmirunner-floodmap.ini

The contents of the ini file (bmirunner-floodmap.ini) is given below:


# From_model.var -> To_model.var

In this case the floodmap module uses the same directory as the routing module (but a different config file).

bmi2runner script