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

Output subgrid levels jump after initialization #952

Closed
Huite opened this issue Jan 15, 2024 · 3 comments · Fixed by #955
Closed

Output subgrid levels jump after initialization #952

Huite opened this issue Jan 15, 2024 · 3 comments · Fixed by #955

Comments

@Huite
Copy link
Contributor

Huite commented Jan 15, 2024

In this example, all subgrid elements are just offset by their bed elevation (so the water depth is constant across the area).

The basin water levels look fine:
image

But sampling over the subgrid levels, we get a jump at the start:
image

@Huite
Copy link
Contributor Author

Huite commented Jan 15, 2024

Likely related to: #903

@Huite
Copy link
Contributor Author

Huite commented Jan 15, 2024

Scratch that: the reason this happens is because the initial basin_level is at zero when the first interpolation occurs.

This is likely because of the order in which the callbacks are called, I guess?
At any rate, it means the first computed subgrid level is nonsense.

@Huite
Copy link
Contributor Author

Huite commented Jan 15, 2024

I think the best way to solve this is by setting the level right after creation of the Parameters struct, maybe?

Huite added a commit that referenced this issue Jan 15, 2024
Huite added a commit that referenced this issue Jan 15, 2024
Fixes #952 

The basin level would remain at 0.0 otherwise.
Then the callback is called at t=0.0, and the resulting interpolated
subgrid levels are nonsense.
@github-project-automation github-project-automation bot moved this from To do to ✅ Done in Ribasim Jan 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant