def t_weighted_mean_temp(T_pelagic, T_bottom, t_frac_pelagic):
    """Compute the time-weighted mean temperature.

    Parameters
    ----------

    T_pelagic : numeric
      Pelagic temperature.

    T_bottom : numeric
      Bottom temperature.

    t_frac_pelagic : numeric
      Fraction of time spent in the pelagic.
    """
    return (T_pelagic * t_frac_pelagic) + (T_bottom * (1.0 - t_frac_pelagic))