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

update_until() alongside update() #460

Closed
pauwiersma opened this issue Sep 30, 2024 · 2 comments
Closed

update_until() alongside update() #460

pauwiersma opened this issue Sep 30, 2024 · 2 comments

Comments

@pauwiersma
Copy link

To run WflowJl I've added a update_until() function in the eWaterCycleModel class alongside the update()function. Is there a reason why update_until() is left out as a BMI function? If not it would be great to have it included in a next release so I don't need to make offline adjustments.

The function I added is

    def update_until(self, time:float) -> None:
        """Advance model state until time"""
        self._bmi.update_until(time)

Thanks!

@BSchilperoort
Copy link
Member

Hi Pau,

I think not all functions have been reimplemented in the eWaterCycleModel class because the bmi is still available, and we would want to hide some functionality from end users (e.g. get_grid_size). However this is mainly not clearly explained in the documentation, and I do think that update_until should be re-exposed. It was probably just forgotten (and usually we have been extracting the streamflow each timestep anyway.

Related is this: eWaterCycle/grpc4bmi#152)

By the way, in general you can (also) access the bmi through model.bmi.

@pauwiersma
Copy link
Author

Hi Bart, thanks for the clarification. I didn't realize I could also do model.bmi.update_until(), that works and solves my problem so I'll close this issue if you agree.

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

No branches or pull requests

2 participants