Configuring model though BMI or via config

For context: in one of our projects we are working on a hydrological model (rewritten in Julia) that can coupled to MODFLOW for groundwater and WOFOST for crop growth.

The hydrological model currently handles the routing, and by default adds the groundwater recharge for each land cell to the routing model’s inflow.

routing_inflow = surface_runoff + subsurface_runoff

For coupling to MODFLOW, this should of course not happen as the subsurface runoff should go into the groundwater instead. We can add a config flag to change this behavior:

external_groundwater_routing = true

Or we can do this through BMI, as this setting is only required when coupling the hydrological model to other models.

BMI.set_value(hydrological_model, "model_config__external_gw_routing", [true])

This variable needs its own rank 1, size 1 grid, of course.


This leads me to my main question: has anyone else moved (some) model configuration to BMI, or are people opposed to doing this?

One downside I see is that with this “configuring the model” can happen in two locations (file + BMI).