Subdivide the layers to capture strain variation.

        Parameters
        ----------
        max_freq: float
            Maximum frequency of interest [Hz].
        wave_frac: float
            Fraction of wavelength required. Typically 1/3 to 1/5.

        Returns
        -------
        profile: Profile
            A new profile with modified layer thicknesses

def auto_discretize(self, max_freq=50., wave_frac=0.2):
        """Subdivide the layers to capture strain variation.

        Parameters
        ----------
        max_freq: float
            Maximum frequency of interest [Hz].
        wave_frac: float
            Fraction of wavelength required. Typically 1/3 to 1/5.

        Returns
        -------
        profile: Profile
            A new profile with modified layer thicknesses
        """
        layers = []
        for l in self:
            if l.soil_type.is_nonlinear:
                opt_thickness = l.shear_vel / max_freq * wave_frac
                count = np.ceil(l.thickness / opt_thickness).astype(int)
                thickness = l.thickness / count
                for _ in range(count):
                    layers.append(Layer(l.soil_type, thickness, l.shear_vel))
            else:
                layers.append(l)

        return Profile(layers, wt_depth=self.wt_depth)