Skip to content

Issue #1290 infiltration from imod5#1291

Merged
JoerivanEngelen merged 11 commits into
issue_#1260_from_imod5_data_metaswapfrom
issue_#1290_infiltration_from_imod5
Nov 15, 2024
Merged

Issue #1290 infiltration from imod5#1291
JoerivanEngelen merged 11 commits into
issue_#1260_from_imod5_data_metaswapfrom
issue_#1290_infiltration_from_imod5

Conversation

@JoerivanEngelen

Copy link
Copy Markdown
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

@sonarqubecloud

Copy link
Copy Markdown

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

Comment thread imod/msw/infiltration.py
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
Copy Markdown
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
Copy Markdown
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
@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