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

support Qout=Qin in lake rating curve tables (hq) #418

Open
shartgring opened this issue May 18, 2024 · 1 comment
Open

support Qout=Qin in lake rating curve tables (hq) #418

shartgring opened this issue May 18, 2024 · 1 comment

Comments

@shartgring
Copy link
Collaborator

shartgring commented May 18, 2024

Feature type

Adding new functionality

Improvement Description

Currently, a rating curve table (hq) consists of corresponding discharge values in m³/s. It would be nice to add functionality where the lake/reservoir outflow equals the inflow. This information can be added in the rating curve table by, for example, using -1 as a flag in the hq-csv file.

Using the example in the docs:

H
394,    43,     43,     43,     43
394.01, 44.838, 44.838, 44.838, 44.838
394.02, 46.671, 46.671, 46.671, 46.671
394.03, 48.509, 48.509, 48.509, 48.509
394.04, -1, -1, -1,-1
394.05, -1, -1,-1, -1

This would mean that, when H > 394.05, Qout = Qin for this particular lake

Implementation Description

update takes inflow as an argument. This could therefore be used in the calculation of outflow. Consider:

if lake.outflowfunc[i] == -1
            outflow =
                interpolate_linear(lake.waterlevel[i], lake.hq[i].H, lake.hq[i].Q[:, doy])
            outflow = min(outflow, storage_input)

In lake.hq[i].Q[:, doy], the row with discharges is used for the interpolate function. Adding a step in which all discharges equal to -1 in lake.hq[i].Q[:, doy] are replaced by inflow would yield the suggested result. Older models would not contain -1 in the rating curve table, and therefore this new functionality would be backwards compatible with older models.

Another option would be to add a check where if outflow = -1 then outflow = inflow. However, that may not work due to the interpolate function used to compute outflow which would interpolate -1 and a positive discharge in boundary cases for the storage level

I am not sure if this functionality would work for negative inflows to the lakes. Negative inflows can occur in limited cases, for example when using pits and local-inertial for river routing, right?

Additional Context

No response

@shartgring
Copy link
Collaborator Author

This is also related to the discussion in #353 as this implementation is something typically used in reservoirs and not in lakes. Would the lake module therefore benefit from this addition, or would it make things more confusing? ;)

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

1 participant