Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NullDataProvider or ZerosDataProvider for forcing-less simulations #569

Closed
mattw-nws opened this issue Jul 13, 2023 · 1 comment · Fixed by #601
Closed

NullDataProvider or ZerosDataProvider for forcing-less simulations #569

mattw-nws opened this issue Jul 13, 2023 · 1 comment · Fixed by #601
Assignees

Comments

@mattw-nws
Copy link
Contributor

Create a DataProvider that can be used in the forcing block of a realization that needs no actual data. This can be used in the case where a BMI module needs to itself retrieve forcing data, e.g. in a scenario where forcing data cannot be read by (or cannot be transformed into a format currently supported by) ngen. Specifying this provider in the forcing block would obviate the need to put in dummy/irrelevant/synthetic forcing data for such a scenario.

The simplest solution would be a NullDataProvider that has no variables and yet reports that it has valid data for all possible time values. I believe the existing APIs will allow this approach. If not, a ZerosDataProvider could be created that would publish a single variable named zero_data_provider of type double for any time value (in theory this variable could be actually wired to some formulation, though the use-case for this is questionable).

@mattw-nws
Copy link
Contributor Author

Relevant additional info: the implemented DataProvider class needs to pretend to support a request for "data" for any time--I think the DataProvider interface allows the system to ask the DataProvider for what time range it supports--this provider needs to be willing to provide data (either no actual variables or some constant value like 0 or 1) no matter what time the data is requested.

@mattw-nws mattw-nws linked a pull request Aug 7, 2023 that will close this issue
11 tasks
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 a pull request may close this issue.

2 participants