-
Notifications
You must be signed in to change notification settings - Fork 3
Issue #1462 move clip utilities #1464
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
Conversation
imod/common/utilities/hfb.py
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't this a mf6 specific utility? Or is it also needed for msw? or something else?
If it is mf6 only then i think you can better leave it in the mf6.utilitlies module
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done, renamed to imod/common/utilities/line_data.py
also renamed some of the methods to have less confusing names.
@@ -624,7 +626,11 @@ def regrid_like( | |||
similar to the one used in input argument "target_grid" | |||
""" | |||
try: | |||
if hasattr(self, "auxiliary_data_fields"): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm this is also something that can be cleaned up using interfaces. In the future we ma y introduce an IAuxiliaryData interface
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be a possiblity, I'm not sure as it would be a very MODFLOW6 specific interface.
Other idea, somewhat relevant to your remark: What would reduce code complexity somewhat and be nice here is creating a decorator which removes auxiliary fields before calling a function and then adds them again. Still a bit on the fence, as I find decorators harder to debug.
|
Fixes #1462
Description
clip
utilities fromimod.mf6.utilities
toimod.common.utilities
hfb
utilities fromimod.mf6.utilities
toimod.common.utilities
grid
utilities fromimod.mf6.utilities
toimod.common.utilities
auxiliary variables
(a MODFLOW6 affair) to theimod.mf6.Package.regrid_like
method.np.where(active > 0) == np.nonzero(active > 0)
, the latter is more explicit.Checklist
Issue #nr
, e.g.Issue #737