Skip to content

Outflow of reservoir/lake #267

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

Open
hboisgon opened this issue Jun 1, 2023 · 5 comments
Open

Outflow of reservoir/lake #267

hboisgon opened this issue Jun 1, 2023 · 5 comments

Comments

@hboisgon
Copy link
Collaborator

hboisgon commented Jun 1, 2023

Maybe a little related to #90 but I have a question on how the reservoir/lake outflow are being given back to the wflow model.
What I see from the code is that the outflow is added into qin of the downstream cell rather than directly changing the q/q_av value of the cell itself (see few line below):

Wflow.jl/src/flow.jl

Lines 284 to 298 in e3de2bc

sf.q[v] = kinematic_wave(
sf.qin[v],
sf.q[v],
sf.qlat[v] + inflow,
sf.α[v],
sf.β,
adt,
sf.dl[v],
)
if !isnothing(sf.reservoir) && sf.reservoir_index[v] != 0
# run reservoir model and copy reservoir outflow to inflow (qin) of
# downstream river cell
i = sf.reservoir_index[v]
update(sf.reservoir, i, sf.q[v] + inflow_wb[v], adt)

The thing is that then for the reservoir/lake outlet cell, if you save q_av you get a completely hypothetic value and the outflow of the lake is masked as an external inflow to the downstream cell instead. So if you would make a mass balance over the surface flow cells as a postprocess (eg coupling to Delwaq) then you have to manually overwrite the volume and q_av of the lake outlet to get the mass balances right. I think it would be easier and maybe more intuitive if for these cells both q/q_av/volume would be overwritten by the lake/reservoir data ?
This would also fix the problem of modelling a lake without a downstream node.

@verseve
Copy link
Contributor

verseve commented Jun 1, 2023

For the reservoirs and lakes we did take a very similar approach as in the wflow Python version. q and q_av are actually not completely hypothetical at a reservoir or lake cell, these values represent the inflow generated by river flow. The reason to also include the river (kinematic wave) of the reservoir/lake cell for the inflow calculation, is for the case when the reservoir/lake area is small compared to the cell resolution.

I think it would be easier and maybe more intuitive if for these cells both q/q_av/volume would be overwritten by the lake/reservoir data ?

This is possible, then we have to take the river flow from the upstream cell. The advantage is that this will indeed also fix the problem of modelling a reservoir/lake without a downstream node. For the case with reservoirs/lakes that are relatively small compared to the cell resolution I would say the current implementation is better. I am not so sure that overwriting volume from the reservoir/lake model is a good idea (mixing of information). I think just using the volume from the lake/reservoir is more explicit for a mass balance calculation (e.g. for local inertial flow h is used as a boundary condition, and would be good to have volume in line with h).

@JoostBuitink: would be good to hear your opinion on this!

@hboisgon
Copy link
Collaborator Author

hboisgon commented Jun 1, 2023

Thanks for your quick reply @verseve !
I agree that for volume then this indeed can be kept to what it is.

I'm not sure it happens so often with the classic resolution of wflow that the lake/reservoir area has a much smaller resolution than the cell itself? I mean qlat and q from upstream would already be considered so the lake would have to be really small to get significant errors (1/3 of the cell or less?). The global lake model is anyhow only good for large lakes (>10km2)

In a way you could also still run the kinematic wave first but then instead of adding the lake outflow to the dowsntream overwrite the q and q_av from the intermediate kinematic wave instead?

@verseve
Copy link
Contributor

verseve commented Jun 1, 2023

I'm not sure it happens so often with the classic resolution of wflow that the lake/reservoir area has a much smaller resolution than the cell itself? I mean qlat and q from upstream would already be considered so the lake would have to be really small to get significant errors (1/3 of the cell or less?). The global lake model is anyhow only good for large lakes (>10km2)

Yes, I agree, for the SBM concept, where we often run with a ~1 km resolution (default) this is not an issue I would say. I am not sure about the model resolution of other concepts like FLEXTopo (@laurenebouaziz ?) or HBV, it is probably close to SBM. Anyway, if we change this, we can also explain this in more detail in the documentation.

In a way you could also still run the kinematic wave first but then instead of adding the lake outflow to the dowsntream overwrite the q and q_av from the intermediate kinematic wave instead?

I am not sure if I understand this question completely. I think you propose to overwrite q and q_av of the kinematic wave in the same cell as the reservoir/lake outlet location with the reservoir/lake outflow? This is indeed possible, but for the inflow (from the river) to the reservoir/lake we then have to take the upstream cell(s). Otherwise, the reservoir/lake outflow is also used as inflow. Or, we have to account for both in one cell, not sure if it is worth to go in that direction.

@laurenebouaziz
Copy link
Contributor

yes I think we can in general assume the flextopo resolution to be similar to the sbm resolution (and same for hbv I would say)

@hboisgon
Copy link
Collaborator Author

hboisgon commented Jun 2, 2023

Otherwise, the reservoir/lake outflow is also used as inflow.

Oh yes indeed, I forgot that part, so ignore what I said, then just indeed overwrite q and q_av

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

3 participants