def _auxLogMinPsi(z_i, d, z0, Psi, Lm):
    """
    Auxiliar function that is used in the denominator of the C_tau-like coefficients

    Taken from Dias, Micrometeorological Approaches to to estimate fluxes of greenhouse gases between the surface and the
    atmosphere, (Chapter 7, eqs. 94-97, p. 22.)

    CONSIDER TAKING THIS SOMEWHERE ELSE!
    """
    import numpy as np
    if hasattr(Psi, '__call__') == False:
        raise TypeError('Psi argument has to be a function')
    a = np.log((z_i - d) / z0)
    b = Psi((z_i - d) / Lm)
    return a - b
