Support for flux output over the Basic Model Interface and other BMI improvements - #111
Merged
Merged
Conversation
- BMI only supports flux output for now
- config variables are the same as for CustomOutput:
- To:SOIL[0]: flux
- From:SOIL[0]: flux
- Between:SOIL[0].And.SOIL[1]: flux
- check if state var named in config.txt is present in model - check if model was previously initialized when executing 'CRavenBMI::Finalize'
- previously the output array was indexed by the values in the index array e.g requesting indices [0, 5, 10] would try to write to out[0], out[5] and out[10] - now the output array is indexed by the the position of the index in the index array
for more information, see https://pre-commit.ci
This was referenced Sep 18, 2026
Closed
analytophile
approved these changes
Sep 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Important
This pull request contains changes which are also included in pull request #112. In case pull request #112 gets accepted, this one here should be closed without accepting. Please see issue #110 for a discussion of both pull requests.
This pull requests adds support for accessing fluxes through Raven's Basic Model Interface (BMI) and has additional improvements and fixes to the BMI.
BMI flux output
The implementation of the access to flux output variables during runtime follows Raven's
CustomOutputfunctionality for fluxes. The configuration in the BMIconfig.txtfor fluxes uses a similar syntax, e.g.:BMI: more initialization / config checks
BMI: fix index error in 'GetValueAtIndices'
[0, 5, 10]would try to write toout[0],out[5]andout[10]