-
Notifications
You must be signed in to change notification settings - Fork 3
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
_set_idomain function; assign idomain = 0 #175
Comments
@RdWitte, thanks for posting this issue, I vaguely recall running into this issue as well. If you feel comfortable, feel free to submit a Pull Request with those two lines added to the |
Isn't it better to compare resistances instead of thicknesses, and ideally compare it to the resistances/conductances of the neighbouring cells? This arbitrary 1cm can have severe impact when given a low conductance. |
Do you mean the method This methods set However, it it is better to set the values of the upper and lower inactive cells to 0. I do not think your lines solve the problem, as it sets idomain of all cells with an absolute thickness smaller than 0.01 in the first layer to 0. The inactive cells could also be present in the second layer though, and I agree with @bdestombe that a value of 0.01 is quitrer arbitrary, I would just stick with a positive thickness (>0), like we do now. |
@bdestombe I don't think the .set_idomain function has anything to do with resistances. The function sets nodes to inactive, active or non-existent. I agree the value is quite arbitrary. I have done this because i found that Python sometimes calculates thickness values of X^10-30 instead of 0 and I'm using a minimum increment of 0,1 for the thickness of the layers. @rubencalje In my model, some rivers heads were ignored (points = modelgrid, shape = area of surface water in model, colors = head) In hindsight, the problem might've occurred because of the fact that some cells where given a very small thickness, and therefore given an idomain value of 1. Which led me to adjusting the idomain value for the top layer for these instances to 0. |
This solved by PR #250. |
The current version of _set_idomain does not (correctly) set the idomain to 0 for the top layer when the top layer has a thickness of 0.
For example; cells with a river level will not be calculated correctly if the idomain value is set to -1 at a node with the top layer having a thickness of 0.
Currently, i have added the following two lines in my model to account for this.
mask = np.logical_and(ds["thickness"][0] > -0.01, ds["thickness"][0] < 0.01)
ds["idomain"][0].loc[mask] = 0
Is this something that could be added in a future update?
The text was updated successfully, but these errors were encountered: