def slope(self, minimum_slope=1e-4, maximum_slope=1.0):
        headertxt = 'Checking for streambed slopes of less than {}...\n'.format(minimum_slope)
        txt = ''
        if self.verbose:
            print(headertxt.strip())

        passed = False
        if self.sfr.isfropt in [1, 2, 3]:
            if np.diff(self.reach_data.slope).max() == 0:
                txt += 'isfropt setting of 1,2 or 3 requries slope information!\n'
            else:
                is_less = self.reach_data.slope < minimum_slope
                if np.any(is_less):
                    below_minimum = self.reach_data[is_less]
                    txt += '{} instances of streambed slopes below minimum found.\n'.format(len(below_minimum))
                    if self.level == 1:
                        txt += 'Reaches with low slopes:\n'
                        txt += _print_rec_array(below_minimum, delimiter='\t')
                if len(txt) == 0:
                    passed = True
        else:
            txt += 'slope not specified for isfropt={}\n'.format(self.sfr.isfropt)
            passed = True
        self._txt_footer(headertxt, txt, 'minimum slope', passed)

        headertxt = 'Checking for streambed slopes of greater than {}...\n'.format(maximum_slope)
        txt = ''
        if self.verbose:
            print(headertxt.strip())

        passed = False
        if self.sfr.isfropt in [1, 2, 3]:
            if np.diff(self.reach_data.slope).max() == 0:
                txt += 'isfropt setting of 1,2 or 3 requries slope information!\n'
            else:
                is_greater = self.reach_data.slope > maximum_slope

                if np.any(is_greater):
                    above_max = self.reach_data[is_greater]
                    txt += '{} instances of streambed slopes above maximum found.\n'.format(len(above_max))
                    if self.level == 1:
                        txt += 'Reaches with high slopes:\n'
                        txt += _print_rec_array(above_max, delimiter='\t')
                if len(txt) == 0:
                    passed = True
        else:
            txt += 'slope not specified for isfropt={}\n'.format(self.sfr.isfropt)
            passed = True
        self._txt_footer(headertxt, txt, 'maximum slope', passed)
Checks that streambed slopes are greater than or equal to a specified minimum value.
dataset/ETHPy150Open modflowpy/flopy/flopy/modflow/mfsfr2.py/check.slope