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

Read some interpolation tables into the Model struct #674

Merged
merged 43 commits into from
Nov 24, 2023
Merged

Conversation

Huite
Copy link
Contributor

@Huite Huite commented Oct 17, 2023

No description provided.

@Huite Huite requested a review from visr October 17, 2023 16:38
@Huite Huite force-pushed the interpolate-level branch from 49c4185 to 5096122 Compare October 17, 2023 16:39
core/src/export.jl Outdated Show resolved Hide resolved
core/src/export.jl Outdated Show resolved Hide resolved
@visr visr marked this pull request as draft October 19, 2023 10:54
@visr visr changed the title WIP: Read some interpolation tables into the Model struct Read some interpolation tables into the Model struct Oct 19, 2023
@Huite Huite marked this pull request as ready for review November 20, 2023 12:49
Copy link
Contributor

@Hofer-Julian Hofer-Julian left a comment

Choose a reason for hiding this comment

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

One small comment. I don't think I am familiar enough with the rest of the code to review it. I leave that to @visr 🙃

docs/core/usage.qmd Outdated Show resolved Hide resolved
@visr
Copy link
Member

visr commented Nov 23, 2023

I've done some fixes here so we can use "Basin / subgrid_level" as you originally intended. I seem to have broken the test along the way though.

I could use more description of the design though. Main questions are:

  • Why do we need the "name" column?
  • Why distinguish between "subgrid level" and subgrid exporter"? Can they be named the same?

@Huite
Copy link
Contributor Author

Huite commented Nov 24, 2023

Good question about the name. I did some thinking: this stems from my idea that Ribasim would present 1:1 levels to MODFLOW, but it turns out this is impractical for multiple reasons, because we do not necessarily want the subgrid elements to align 1:1 (e.g. because the Ribasim domain is larger spatially than the MODFLOW domain, or vice versa).

The name would still be a useful entry to have when setting up the coupling schemes, but in that sense it's no different from the x and y columns that we discussed yesterday. In that case, all the grouping is a coupler problem only, and in Ribasim everything can be flattened (which also cleans up the BMI).

I guess the idea with exporter and level is that the exporter "does the exporting"; the level is just a level.

I'll omit the name column, and see whether the exporter / level thing can be cleared up somewhat.

core/src/bmi.jl Outdated Show resolved Hide resolved
Huite and others added 11 commits November 24, 2023 12:12
Name struct Subgrid
Becomes Basin / subgrid in Geopackage
Remove name column from subgrid table
Remove nested subgrids (unique subgrid_ids are sufficient)
Also use `nextfloat(-Inf)`, we already use that elsewhere, and perhaps `prevfloat`'s small dx can cause floating point issues.
More consistently with the other validation code.
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.

3 participants