def temp_separation_ts(T_c, fc, T_air, t0):
    """Compute soil temperature

    Parameters
    ----------
    T_c : ee.Image
        Canopy temperature (Kelvin).
    fc : ee.Image
    T_air : ee.Image
        Air temperature (Kelvin).
    t0

    Returns
    -------
    T_s : ee.Image

    """
    Delta = fc.expression('(t0 ** 4) - (fc * (T_c ** 4))', {'fc': fc, 't0':
        t0, 'T_c': T_c})
    Delta = Delta.where(Delta.lte(0), 10)
    T_s = fc.expression('(Delta / (1 - fc)) ** 0.25', {'Delta': Delta, 'fc':
        fc}).where(fc.expression('((t0 ** 4) - (fc * T_c ** 4)) <= 0.', {
        'fc': fc, 't0': t0, 'T_c': T_c}), fc.expression(
        '(t0 - (fc * T_c)) / (1 - fc)', {'fc': fc, 't0': t0, 'T_c': T_c})
        ).where(fc.lt(0.1), t0).where(fc.gt(0.9), t0)
    T_s = T_s.where(T_s.lte(T_air.subtract(10.0)), T_air.subtract(10.0))
    T_s = T_s.where(T_s.gte(T_air.add(50.0)), T_air.add(50.0))
    return T_s
