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

Add interpolation for the volume to waterlevel table #284

Closed
Hofer-Julian opened this issue Jun 7, 2023 · 4 comments
Closed

Add interpolation for the volume to waterlevel table #284

Hofer-Julian opened this issue Jun 7, 2023 · 4 comments
Assignees
Labels
coupling Coupling to other models

Comments

@Hofer-Julian
Copy link
Contributor

We need interpolation for the volume to waterlevel table.
We also need to decide where to put this functionality.

  • If we put it in iMOD Python the input files would become bigger,
  • if we put it in Ribasim, Ribasim would become geometry-aware.
@Hofer-Julian Hofer-Julian added the coupling Coupling to other models label Jun 7, 2023
@github-project-automation github-project-automation bot moved this to To do in Ribasim Jun 7, 2023
@SnippenE SnippenE moved this from To do to Sprint backlog in Ribasim Jun 8, 2023
@Hofer-Julian Hofer-Julian moved this from Sprint backlog to 🏗 In progress in Ribasim Jun 16, 2023
@Huite
Copy link
Contributor

Huite commented Jun 21, 2023

After discussing this with Julian, we've come to some conclusions.

Ribasim can run in multiple configurations (e.g. strongly lumped or not), and that means the water level that is communicated to MODFLOW 6 can be computed in multiple ways. For example:

  • 3.5 "basins" in a single MODFLOW river cell, for a single MODFLOW River boundary
  • 1 basins for dozens of MODFLOW river cells, for a single MODFLOW River boundary
  • 1 basins for dozens of MODFLOW river cells, for multiple MODFLOW River boundaries

And so forth, also for MODFLOW Drainage boundaries, since they are used to simulate a difference between infiltration and drainage conductance.

One solution is to associate weights with the connection, since imod_coupler supports this via sparse matrix operations. The limitation is that the imod_coupler weights are static, which may prove insufficient in the future (e.g. flooding or drying in Ribasim).

The most attractive solution so far seems to let Ribasim present a 1:1 water level for MODFLOW 6. This means that Ribasim will require additional input, describing how to create a spatially distributed water level for basins. Such input ideally be spatially meaningful to help with input inspection and debugging. This is also useful separate from the coupling, since a spatially distributed water level is very useful for interpretation.

However, to get spatially meaning input, we require spatial formats. Given the type of data, something like (UGRID) netCDFs seem like the most obvious choice. At any rate, QGIS should be able to visualize it.

This also means that the imod_coupler logic can remain absolutely minimal: it takes the water levels as computed by Ribasim, and puts them in the MODFLOW 6 memory. Then the only thing to configure for the coupling is which MODFLOW boundary conditions should be coupled.

@visr visr moved this from 🏗 In progress to ✅ Done in Ribasim Jun 23, 2023
@visr visr moved this from ✅ Done to 🏗 In progress in Ribasim Jun 23, 2023
@Hofer-Julian Hofer-Julian moved this from 🏗 In progress to To do in Ribasim Jul 10, 2023
@Hofer-Julian Hofer-Julian moved this from To do to Sprint backlog in Ribasim Jul 17, 2023
@Huite
Copy link
Contributor

Huite commented Aug 16, 2023

Consider:

image

Six MODFLOW cells (with associated river boundary conditions), and four Ribasim basins. For MODFLOW cell 1-2-3, we have to take one water level and expand it into three stages for MODFLOW. For cell 4, we have to aggregate instead.

For the upper cells, we'd want to interpolate based on some input, to enable different river bottom levels for example. This isn't the case for cell 4. In such a case, the water level should be interpreted directly, and no interpolation logic is required. I think that argues for separating the logic into different types, and also separating the input.

The coupling for cell 4 requires aggregation weights. I think it makes most sense to scale them directly by the wetted area of each basin. This is also a good reason to disallow having "3.5" basins in a single cell, since we need an additional set of weight to adjust the area weights.

For the aggregated (ribasim: modflow = one: many) case, we'd need the columns:

  • basin_id
  • basin_level
  • modflow_id (this is the ID of the boundary condition, not the cell number! Node number in MODFLOW may change to re-ordering or inactive cells)
  • modflow_level

("modflow" is a stand-in here, it could be anything, since this functionality can also be used to compute back to the DFM levels.)

For the distributed (ribasim:modflow = many: one) case, we'd need only:

  • basin_id
  • modflow_id

@gijsber gijsber moved this from Sprint backlog to 🏗 In progress in Ribasim Aug 17, 2023
@gijsber gijsber moved this from 🏗 In progress to Sprint backlog in Ribasim Aug 31, 2023
@Huite
Copy link
Contributor

Huite commented Nov 27, 2023

Fixed by #674

@Huite Huite closed this as completed Nov 27, 2023
@github-project-automation github-project-automation bot moved this from Sprint backlog to ✅ Done in Ribasim Nov 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
coupling Coupling to other models
Projects
Archived in project
Development

No branches or pull requests

2 participants