Can the set of input variables of a BMI-compliant model be defined only at the initialization? #141
-
Scenario: Lets say I have a hydrological model that, depending on its config file, may require one of the following sets of inputs:
or
or
So that I can only determine the return of Question: Does the BMI standard requires functions like Suggestion: One of the following items could be added to the BMI specs (if not already there):
I personaly am inclined to the first of them, but there is clear value in both. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
I can't speak for the standard as such, but as a developer of a consumer/client code, I can say that NOAA-OWP/ngen will call If this does end up leading to elaboration in the specification, it's worth noting whether any calls are allowed after |
Beta Was this translation helpful? Give feedback.
-
@adlzanchetta We do have components that have some functions that can be called successfully, and return valid information, even if initialize hasn't yet been called, but a framework can't assume that. These functions are typically ones that return static metadata like a model that, for example, always provides a fixed set of output variables. |
Beta Was this translation helpful? Give feedback.
-
Thank you @PhilMiller and @mcflugen for the clarification. |
Beta Was this translation helpful? Give feedback.
@adlzanchetta
initialize
should be called before any other BMI functions are called. I'm not sure we've specified that in the docs, but we should. In our framework, we assume that any BMI method called before initialize cannot be trusted.We do have components that have some functions that can be called successfully, and return valid information, even if initialize hasn't yet been called, but a framework can't assume that. These functions are typically ones that return static metadata like a model that, for example, always provides a fixed set of output variables.