Skip to content
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 #1290 infiltration from imod5 #1291

Conversation

JoerivanEngelen
Copy link
Contributor

Fixes #1290

Description

Adds from_imod5_data classmethod.

Requirements:

  • Set runon/runoff resistance to downward/upward resistance respectively
  • Set extra storage coefficient and bottom resistance to 1
  • If resistance smaller than 5.0, deactivate resistance by setting it to MetaSWAP nodata value.

I also added the upward_resistance and downward_resistance to the list with grids which have a subunit coordinate, as a comment in @HendrikKok's script mentioned this was missing, and a required feature.

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

Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
C Reliability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

def from_imod5_data(cls, imod5_data: dict[str, GridDataDict]) -> "Infiltration":
cap_data = imod5_data["cap"]
data = {}
# Use runon resistance as downward resistance, and runoff for downward
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think run-on needs to have a dash in it. At least that's what i find online. The weird thing is that it is not needed for runoff

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Weird! I think I prefer keeping the naming consistent (i.e. "runon" and "runoff"), as I like consistency and python variable names cannot contain a dash

@JoerivanEngelen JoerivanEngelen merged commit c2f9f52 into issue_#1260_from_imod5_data_metaswap Nov 15, 2024
5 of 6 checks passed
@JoerivanEngelen JoerivanEngelen deleted the issue_#1290_infiltration_from_imod5 branch November 15, 2024 14:03
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