def calc_times(z_int, vp_mod):
    """
    t_int = calc_times(z_int, vp_mod)
    """
    nlayers = len(vp_mod)
    nint = nlayers - 1
    t_int = []
    for i in range(0, nint):
        if i == 0:
            tbuf = z_int[i] / vp_mod[i]
            t_int.append(tbuf)
        else:
            zdiff = z_int[i] - z_int[i - 1]
            tbuf = 2 * zdiff / vp_mod[i] + t_int[i - 1]
            t_int.append(tbuf)
    return t_int
