| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
…to issue_#1064_wel_from_imod
| 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.
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.
Sorry, something went wrong.
There was a problem hiding this comment.
now reworked the PR to account for different wells in the same well package
Sorry, something went wrong.
| 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.
This shouldn't be necessary
Sorry, something went wrong.
There was a problem hiding this comment.
removed this function
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
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