def rprpet_point(pet, snowmelt, avh2o_3, precip):
    """Calculate the ratio of precipitation to ref evapotranspiration.

    The ratio of precipitation or snowmelt to reference
    evapotranspiration influences agdefac and bgdefac, the above- and
    belowground decomposition factors.

    Parameters:
        pet (float): derived, reference evapotranspiration
        snowmelt (float): derived, snowmelt occuring this month
        avh2o_3 (float): derived, moisture in top two soil layers
        precip (float): input, precipitation for this month

    Returns:
        rprpet, the ratio of precipitation or snowmelt to reference
            evapotranspiration

    """
    if snowmelt > 0:
        rprpet = snowmelt / pet
    else:
        rprpet = (avh2o_3 + precip) / pet
    return rprpet