def bgdrat_point(aminrl, varat_1_iel, varat_2_iel, varat_3_iel):
    """Calculate required C/iel ratio for belowground decomposition.

    When belowground material decomposes, its nutrient content is
    compared to this ratio to check whether nutrient content is
    sufficiently high to allow decomposition. This ratio is calculated at
    each decomposition time step.

    Parameters:
        aminrl (float): mineral <iel> (N or P) in top soil layer, averaged
            across decomposition time steps
        varat_1_iel (float): parameter, maximum C/iel ratio
        varat_2_iel (float): parameter, minimum C/iel ratio
        varat_3_iel (float): parameter, amount of iel present when minimum
            ratio applies

    Returns:
        bgdrat, the required C/iel ratio for decomposition

    """
    if aminrl <= 0:
        bgdrat = varat_1_iel
    elif aminrl > varat_3_iel:
        bgdrat = varat_2_iel
    else:
        bgdrat = (
            (1. - aminrl / varat_3_iel) * (varat_1_iel - varat_2_iel) +
            varat_2_iel)
    return bgdrat