def jdn2jul( jdn ):
    """Calculate julian year, month, day from julian day number
    """
    b = 0
    c = jdn + 32082

    d = (4*c+3)//1461
    e = c - (1461*d)//4
    m = (5*e+2)//153

    day   = e - (153*m+2)//5 + 1
    month = m + 3 - 12*(m//10)
    year  = b*100 + d - 4800 + m//10

    return year,month,day