DOI-USGS / DOI-USGS/modflow-setup

Tmr._source_grid_mask does not exclude inactive parent cells

Open
#139 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
65
Forks
24
PR merge metrics
No merged PRs in 30d

Description

## Problem
`Tmr._source_grid_mask` does not exclude inactive parent cells. Inactive cells containing HNOFLO/HDRY values (MODFLOW-NWT) or the hardcoded 1E30/-1E30 values for inactive/dry cells (MODFLOW 6) are included in the 3D interpolation as valid source points, contaminating interpolated perimeter boundary heads at nearby inset cells.

## Expected behavior
The source grid mask should filter out cells where ibound !=0 or idomain ≤ 0 so that inactive/dry values are not passed to the interpolator as valid head data.

## Fix
Exclude inactive parent cells from _source_grid_mask by combining the spatial mask with the parent's idomain/ibound so that only active cells are used as interpolation source points.

Contributor guide

No contributing guide indexed for this repository

Research direction

Locate Tmr._source_grid_mask and inspect how the spatial mask is combined with the parent grid's idomain or ibound data. The fix is done when inactive or dry parent cells, including HNOFLO/HDRY and MODFLOW 6 sentinel values, are excluded from the 3D interpolation source points.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.