Generic distance-decaying correlation function

        :param dist: Distance between catchment centrolds in km
        :type dist: float
        :param phi1: Decay function parameters 1
        :type phi1: float
        :param phi2: Decay function parameters 2
        :type phi2: float
        :param phi3: Decay function parameters 3
        :type phi3: float
        :return: Correlation coefficient, r
        :rtype: float

def _dist_corr(dist, phi1, phi2, phi3):
        """
        Generic distance-decaying correlation function

        :param dist: Distance between catchment centrolds in km
        :type dist: float
        :param phi1: Decay function parameters 1
        :type phi1: float
        :param phi2: Decay function parameters 2
        :type phi2: float
        :param phi3: Decay function parameters 3
        :type phi3: float
        :return: Correlation coefficient, r
        :rtype: float
        """
        return phi1 * exp(-phi2 * dist) + (1 - phi1) * exp(-phi3 * dist)