diff --git a/mfsetup/mfnwtmodel.py b/mfsetup/mfnwtmodel.py index 6c4018fe..7602f5f2 100644 --- a/mfsetup/mfnwtmodel.py +++ b/mfsetup/mfnwtmodel.py @@ -91,6 +91,9 @@ def __init__(self, parent=None, cfg=None, # set the list file path self.lst.file_name = [self.cfg['model']['list_filename_fmt'].format(self.name)] + # the "drop thin cells" option is not available for MODFLOW-2005 models + self._drop_thin_cells = False + # property arrays self._ibound = None diff --git a/mfsetup/sourcedata.py b/mfsetup/sourcedata.py index 90a0fbfc..399b1d89 100644 --- a/mfsetup/sourcedata.py +++ b/mfsetup/sourcedata.py @@ -1467,16 +1467,18 @@ def setup_array(model, package, var, data=None, # botm[k][bathy != 0][inlayer] = lake_botm_elevations[inlayer] # fix any layering conflicts and save out botm files - #if model.version == 'mf6' and model._drop_thin_cells: - botm = fix_model_layer_conflicts(top, botm, - minimum_thickness=min_thickness) - isvalid = verify_minimum_layer_thickness(top, botm, - np.ones(botm.shape, dtype=int), - min_thickness) - if not isvalid: - raise Exception('Model layers less than {} {} thickness'.format(min_thickness, + # only adjust layer elevations if we want to keep thin cells + # (instead of making them inactive) + if not model._drop_thin_cells: + botm = fix_model_layer_conflicts(top, botm, + minimum_thickness=min_thickness) + isvalid = verify_minimum_layer_thickness(top, botm, + np.ones(botm.shape, dtype=int), + min_thickness) + if not isvalid: + raise Exception('Model layers less than {} {} thickness'.format(min_thickness, model.length_units)) - # fill nan values adjacent to active cells to avoid cell thickness errors + # fill any nan values that are above or below active cells to avoid cell thickness errors top, botm = fill_cells_vertically(top, botm) # the top may have been modified by fill_cells_vertically # update the top in the model