-
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
Issue #1164 cleanup utils #1172
Issue #1164 cleanup utils #1172
Conversation
…up method for every package (yet?)
…ow the RivCases to be imported in other test modules.
…stead of deactivating where negative
""" | ||
dis_dict = {var: dis.dataset[var] for var in ["idomain"]} | ||
cleaned_dict = self._call_func_on_grids(cleanup_drn, dis_dict) | ||
super().__init__(cleaned_dict) |
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.
Shouldn't this be self.__init__(cleaned_dict)
?
I also don't really get what this line does. You are creating a new package but you don't use it?
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.
The call to super().__init__(cleaned_dict)
, overrides the dataset attribute with a new dataset from dict. Just as we do in self.init. This method cleans up the dataset inplace, instead of returning a copy of a river object.
grids["conductance"] = conductance.where(conductance > 0.0) | ||
# Clip negative concentration cells to 0.0 | ||
if (concentration is not None) and not scalar_None(concentration): | ||
grids["concentration"] = concentration.clip(min=0.0) |
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.
Should we inform the user by producing a warning? Or/and should we log this?
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.
For now, I think using the standard_log_decorator
should be sufficient. I added this to the functions. This can be a guidance to the API docs, which will provide more info on what is exactly cleaned up in the function.
|
||
- Removes wells where the screen bottom elevation exceeds screen top. | ||
""" | ||
deactivate = wel_ds["screen_top"] < wel_ds["screen_bottom"] |
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.
General for this file: We are making adjustemesnt to the model. Should we inform the user and/or log this?
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.
Good call, I added the standard_log_decorator
to the cleanup utility functions, to log things.
Quality Gate passedIssues Measures |
20e4bc2
into
imod5_converter_feature_branch
Fixes #1164
Description
This implements the following cleanup utilities for the robin boundary conditions, namely the DRN, GHB, and RIV.
test_mf6_riv
to regular functions, as they were used as such anyway. Without this, RivDisCases could not be used outside thetest_mf6_riv
module, now it can be imported.Checklist
Issue #nr
, e.g.Issue #737