Skip to content

Commit

Permalink
fix(idomain): data checks now treat all positive idomain values as ac…
Browse files Browse the repository at this point in the history
…tive (#929)
  • Loading branch information
spaulins-usgs committed Jun 29, 2020
1 parent 71734e7 commit 27e4191
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion autotest/t505_test.py
Expand Up @@ -378,7 +378,7 @@ def np002():
botm = {'filename': botm_file, 'factor': 1.0}
dis_package = ModflowGwfdis(model, length_units='FEET', nlay=1, nrow=1,
ncol=10, delr=500.0, delc=500.0,
top=top, botm=botm,
top=top, botm=botm, idomain=2,
filename='{}.dis'.format(model_name))
ic_vals = [100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0,
100.0]
Expand Down
2 changes: 1 addition & 1 deletion flopy/mf6/data/mfdatalist.py
Expand Up @@ -366,7 +366,7 @@ def _check_valid_cellids(self):
self._simulation_data.debug)
idomain_val = idomain_val[cellid_part]
# cellid should be at an active cell
if idomain_val != 1:
if idomain_val < 1:
message = 'Cellid {} is outside of the ' \
'active model grid' \
'.'.format(record[index])
Expand Down
3 changes: 1 addition & 2 deletions flopy/utils/check.py
Expand Up @@ -773,5 +773,4 @@ def get_active(self, include_cbd=False):
if idomain is None:
return np.ones(shape=mg.shape, dtype=bool)
else:
id_active_zero = idomain - np.ones(shape=mg.shape, dtype=np.int32)
return np.invert(np.ma.make_mask(id_active_zero, shrink=False))
return idomain > 0

0 comments on commit 27e4191

Please sign in to comment.