-
Notifications
You must be signed in to change notification settings - Fork 5
Issue #1064 wel from imod #1066
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 #1064 wel from imod #1066
Conversation
…to issue_#1064_wel_from_imod
imod/mf6/wel.py
Outdated
wel_x = cls.panda_column_to_scalar(imod5_data[key]["dataframe"]["x"]) | ||
wel_y = cls.panda_column_to_scalar(imod5_data[key]["dataframe"]["y"]) | ||
wel_top = cls.panda_column_to_scalar(imod5_data[key]["dataframe"]["filt_top"]) | ||
wel_bot = cls.panda_column_to_scalar(imod5_data[key]["dataframe"]["filt_bot"]) | ||
rate = imod5_data[key]["dataframe"]["rate"] |
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.
I don't think the right thing happens here:
x, y, filt_top, and filt_bot can all be arrays. If wells are transient, a transient rate has to be generated with dimensions ("time", "index").
Wells at multiple locations can be part of one Well package.
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.
now reworked the PR to account for different wells in the same well package
imod/mf6/wel.py
Outdated
def panda_column_to_scalar(cls, column: pd.Series) -> float: | ||
# input is a column of a pandas dataframe expected to contain the same value | ||
# in every row (like the x-coordinate of a well) | ||
# This function returns that value and checks they are all the same | ||
|
||
if not np.all(column == column[0]): | ||
raise ValueError("error while converting pandas column to scalar") | ||
return float(column[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.
This shouldn't be necessary
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.
removed this function
879d521
into
imod5_converter_feature_branch
Fixes #1064
Description
Imports wells as grid-agnostic well packages, based on filter top and filter bottom, and x/y location as stated in the imod5_dataset object.
Checklist
Issue #nr
, e.g.Issue #737