@jcompile('float64(int64, int64, int64, int64, int64, int64, int64)',
          nopython=True)
def julian_day_dt(year, month, day, hour, minute, second, microsecond):
    if month <= 2:
        year = year-1
        month = month+12
    a = int(year/100)
    b = 2 - a + int(a * 0.25)
    frac_of_day = (microsecond + (second + minute * 60 + hour * 3600)
                   ) * 1.0 / (3600*24)
    d = day + frac_of_day
    jd = (int(365.25 * (year + 4716)) + int(30.6001 * (month + 1)) + d +
          b - 1524.5)
    return jd
This is the original way to calculate the julian day from the NREL paper.
dataset/ETHPy150Open pvlib/pvlib-python/pvlib/spa.py/julian_day_dt