FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Issue #1064 wel from imod by luitjansl · Pull Request #1066 · Deltares/imod-python · GitHub

Issue #1064 wel from imod - #1066

Merged
JoerivanEngelen merged 22 commits into
imod5_converter_feature_branchfrom
issue_#1064_wel_from_imod
Jun 26, 2024
Merged

Issue #1064 wel from imod#1066
JoerivanEngelen merged 22 commits into
imod5_converter_feature_branchfrom
issue_#1064_wel_from_imod

Conversation

Copy link
Copy Markdown
Contributor

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

  • Links to correct issue
  • Update changelog, if changes affect users
  • PR title starts with Issue #nr, e.g. Issue #737
  • Unit tests were added
  • If feature added: Added/extended example

luitjansl requested review from HendrikKok, JoerivanEngelen and Manangka and removed request for Manangka June 4, 2024 09:31
luitjansl self-assigned this Jun 5, 2024
Comment thread imod/mf6/wel.py Outdated
Comment on lines +620 to +624
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"]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

now reworked the PR to account for different wells in the same well package

Comment thread imod/mf6/wel.py Outdated
Comment on lines +644 to +651
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])

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

This shouldn't be necessary

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

removed this function

JoerivanEngelen merged commit 879d521 into imod5_converter_feature_branch Jun 26, 2024
JoerivanEngelen deleted the issue_#1064_wel_from_imod branch June 26, 2024 15:54
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL