Deltares / Deltares/imod-python

Mask topsystem packages where IBOUND == -1

Open
#1,787 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

backwards_compatibility enhancement
Dominant language
Python
Stars
41
Forks
12
Avg merge
21h 8m
Merged PRs (30d)
1

Description

In issue #1766 it turned out that iMOD5 filters away RIV & DRN cells where IBOUND == -1 (and thus CHD cells are created), as these create shortcircuits in model cells, potentially leading to unnecessary stability issues.

We can approach this in two ways:

  • Only implement this in the from_imod5 logic. We can then relatively easily use IBOUND == -1 as mask.
  • Generalize this: Create a method on the groundwatermodel flow object to filter all GHB, RIV, & DRN cells where a CHD cell is located. MODFLOW6 only accepts one CHD package, so we don't require any logic to merge CHD packages together for this masking. This can then also be called when calling Modflow6Simulation.clip_box with states_for_boundary.

I prefer the latter option.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the from_imod5 logic and the groundwatermodel flow object, then inspect Modflow6Simulation.clip_box with states_for_boundary. Determine how GHB, RIV, and DRN cells are filtered when a CHD cell occupies the same location, and consider the preferred generalized behavior. Done means IBOUND == -1 and overlapping CHD cells no longer leave conflicting boundary cells in either entry point.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.