def transition_soil_carbon(area_final, carbon_final, depth_final,
                           transition_rate, year, area_initial,
                           carbon_initial, depth_initial):
    """This is the formula for calculating the transition of soil carbon

    .. math:: (af * cf * df) - \
           \\frac{1}{(1 + tr)^y} * \
           [(af * cf * df) - \
            (ai * ci * di)]

    where

    * :math:`af` is area_final
    * :math:`cf` is carbon_final
    * :math:`df` is depth_final
    * :math:`tr` is transition_rate
    * :math:`y` is year
    * :math:`ai` is area_initial
    * :math:`ci` is carbon_initial
    * :math:`di` is depth_initial

    Args:
        area_final (float): The final area of the carbon
        carbon_final (float): The final amount of carbon per volume
        depth_final (float): The final depth of carbon
        transition_rate (float): The rate at which the transition occurs
        year (float): The amount of time in years overwhich the transition occurs
        area_initial (float): The intial area of the carbon
        carbon_initial (float): The iniital amount of carbon per volume
        depth_initial (float): The initial depth of carbon

    Returns:
        float: Transition amount of soil carbon
    """

    return (area_final * carbon_final * depth_final) - \
           (1/((1 + transition_rate) ** year)) * \
           ((area_final * carbon_final * depth_final) - \
            (area_initial * carbon_initial * depth_initial))