Skip to content

Conversation

@adlzanchetta
Copy link
Contributor

What kind of change does this PR introduce?

The BMI interface had hardcoded 2 input and 3 output variables. This PR makes the number and the type of input/output variables dynamic and defined by the user through the BMI config file.

Does this PR introduce a breaking change?

It only affects the BMI interface (only files changed were Raven_BMI.cpp and Raven_BMI.h).

Prior to this PR, a valid BMI .yaml config file would have the following one-line content:

cli_args: /.../Alouette -o /.../raven_output -n

After this PR, the BMI .yaml NEEDs to include input/output variables. The following content would provide the same output as the above-mentioned example:

cli_args: /.../Alouette -o /.../raven_output -n
input_vars:
- PRECIP: forcing
- TEMP_AVE: forcing
output_vars:
- OUTFLOW: subbasin_state
- SOIL[0]: hru_state
- SNOW: hru_state

Other information:

  • only forcing variables are currently supported as input_vars, but the code is structured to be easily expanded in the future to support subbasin_state and hru_state variables;
  • similarly, only subbasin_state and hru_state variables are currently supported as output_vars;
  • subbasin_state variables supported: RESERVOIR_STAGE, STREAMFLOW and OUTFLOW (STREAMFLOW = OUTFLOW).

adlzanchetta and others added 7 commits August 28, 2023 14:00
…-NextGen

Feature/functions required by next gen
Input variables accepted: forcings

Output variables accepted: state variables and outflow (special case)

BMI config file now requires the definition of both input and output variables
…t variables

Also variables types changed from 'state' and 'derived' to 'hru_state' and 'subbasin_state', respectively.
As pModel->Initialize() changes the value of Options.duration to 365 (the default), the setting of Options.duration to "almost infinite" needs to take place after pModel->Initialize() to persist.

This commit moves the setting of Options.duration to the right place.
@analytophile
Copy link
Collaborator

Hi @adlzanchetta - just getting around to this now. Apologies for the delay. Can you merge with newest branch and re-pull. Can't figure out how to resolve the (unimportant) conflicts via GitHub. Such a non-intuitive UI.

Copy link
Collaborator

@analytophile analytophile left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you merge with current branch such that all diffs are in Raven_BMI.cpp/.h? It will be easier for me to merge afterwards. Sorry for the massive delay.

@adlzanchetta
Copy link
Contributor Author

Can you merge with current branch such that all diffs are in Raven_BMI.cpp/.h? It will be easier for me to merge afterwards. Sorry for the massive delay.

Hi @analytophile . Unfortunately, it has been so long since I've touched it that the amount of time I would have to dedicate just to reconnect with the project would be prohibitive for me at the moment...

@analytophile
Copy link
Collaborator

analytophile commented Mar 15, 2025 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants