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 Ribasim-MetaSWAP-MODFLOW6 exchange scheme #971

Closed
HendrikKok opened this issue Jan 19, 2024 · 4 comments · Fixed by Deltares/imod_coupler#256
Closed

Update Ribasim-MetaSWAP-MODFLOW6 exchange scheme #971

HendrikKok opened this issue Jan 19, 2024 · 4 comments · Fixed by Deltares/imod_coupler#256
Labels
coupling Coupling to other models

Comments

@HendrikKok
Copy link

Level exchange and time stepping scheme between RibaMetaMod and DfmMetaMod drivers. This gives the following sequence per timestep:

sequenceDiagram
    autonumber
    Ribasim ->> MODFLOW6: exchange stage [T-1]
    MODFLOW6 ->> Ribasim: RIV flux estimate [T-1]

    loop Ribasim-MetaSWAP surface water (sub) timestep
        Note over MetaSWAP: prepare surface water timestep t
        MetaSWAP->>Ribasim:  sprinkling demand [t]
        MetaSWAP->>Ribasim:  runoff [t]
        Note over Ribasim: solve t
        Ribasim ->> MetaSWAP: sprinkling realised [t]
    end
    Ribasim ->> MODFLOW6: RIV correction flux [T]
    MODFLOW6 ->> MetaSWAP: HEAD
    loop MODFLOW6-MetaSWAP groundwater timestep
        Note over MetaSWAP: solve T
        MetaSWAP->>MODFLOW6:  storage & uz-flux
        Note over MODFLOW6: solve T
        MODFLOW6 ->> MetaSWAP: HEAD
    end
Loading

The flux estimate(2) is based on the head and stage of the previous MF6 and Ribasim timestep. The sub timesteps between Ribasim and MetaSWAP are needed since the surface water timestep in MetaSWAP can't exceed 1d (see MetaSWAP manual on dtsw). The correction flux (6) is computed for infiltration nodes only.

Positive volumes will always be realized:
1- MetaSWAP ponding
2- MF6 RIV nodes with drainage

Negative volumes (demands) can be shorted if Ribasim runs dry during timestep T. The sequence of shortening is as follows:
1- MetaSWAP sprinkling from surface water
2- MF6 RIV nodes with infiltration

Critical note:
The correction flux is based on the flux estimate and ensures that the water balance between Ribasim and MF6 exchanges are in sink within timestep t. It does not ensure that the waterbalance between MF6 and Ribasim are in sink at the end of timestep t. This is because the flux estimate at the beginning of timestep t, does not take the MF6-stresses into account for timestep t. To get a better flux estimate at the beginning of timestep t, we could start the MF6-MetaSWAP solve, without finalizing it.

Tasks:
[ ] Find out if Ribasim supports the cutoff of infiltration boundary conditions during a timestep, and if this is exposed via XMI.
[ ] Implement water balance class for all exchanges, so corrections can be computed based on specific contributions.
[ ] Add XMI-package to MF6 model, in premod. This is needed for the correction flux
[ ] add new exchanges to the update() method of RibaMetaMod
[ ] update all reference for RibaMetaMod tests
[ ] Investigate possible solutions for better flux estimation’

@HendrikKok HendrikKok added the coupling Coupling to other models label Jan 19, 2024
@github-project-automation github-project-automation bot moved this to To do in Ribasim Jan 19, 2024
@HendrikKok
Copy link
Author

for completeness:

Driver MetaMod

sequenceDiagram
    autonumber
    MODFLOW6 ->> MetaSWAP: HEAD
    loop MODFLOW6-MetaSWAP groundwater timestep
        Note over MetaSWAP: solve T
        MetaSWAP->>MODFLOW6:  storage & uz-flux
        Note over MODFLOW6: solve T
        MODFLOW6 ->> MetaSWAP: HEAD
    end
Loading

Driver RibaMod

sequenceDiagram
    autonumber
    Ribasim ->> MODFLOW6: exchange stage [T-1]
    Note over MODFLOW6: solve T
    MODFLOW6 ->> Ribasim: RIV flux [T-1]
    Note over Ribasim: solve T
Loading

@Huite
Copy link
Contributor

Huite commented Jan 19, 2024

Looks great!

One comment:

Are you sure there's a loop around this?

image

I would expect MetaSWAP to present a runoff term, and a demand to Ribasim. Then Ribasim runs, and it returns the realized sprinkling. This happens once, right? There are multiple timesteps, but that's internal to Ribasim.

Secondly, final diagram is accurate for the current the RibaMod driver implementation, but we probably want it to do the same prediction step, right?

@HendrikKok
Copy link
Author

HendrikKok commented Jan 26, 2024

@Huite:
1: The loop box is maybe not accurate indeed, but it should represent subtimesteps (t) relative to the MF6 timesteps (T). The dT of the surface water timestep is input of the MetaSWAP model (dtsw), but should not be larger than 1 day. When using larger dT, the dt (and related exchanges) remains at 1 day.

2: Yes indeed.

@SnippenE SnippenE moved this from To do to What's next in Ribasim Jan 31, 2024
@SnippenE SnippenE moved this from What's next to Sprint backlog in Ribasim Jan 31, 2024
@SnippenE SnippenE moved this from Sprint backlog to What's next in Ribasim Jan 31, 2024
@SnippenE SnippenE moved this from What's next to 🏗 In progress in Ribasim Feb 15, 2024
@HendrikKok
Copy link
Author

Merged. Follow ups:

#1160

#1164

#1165

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

Successfully merging a pull request may close this issue.

3 participants