def solar_position_numba(unixtime, lat, lon, elev, pressure, temp, delta_t,<EOL>atmos_refract, numthreads, sst=False, esd=False):
<EOL>loc_args = np.array([lat, lon, elev, pressure, temp, delta_t,<EOL>atmos_refract, sst, esd])<EOL>ulength = unixtime.shape[<NUM_LIT:0>]<EOL>if sst:<EOL><INDENT>dims = <NUM_LIT:3><EOL><DEDENT>elif esd:<EOL><INDENT>dims = <NUM_LIT:1><EOL><DEDENT>else:<EOL><INDENT>dims = <NUM_LIT:6><EOL><DEDENT>result = np.empty((dims, ulength), dtype=np.float64)<EOL>if unixtime.dtype != np.float64:<EOL><INDENT>unixtime = unixtime.astype(np.float64)<EOL><DEDENT>if ulength < numthreads:<EOL><INDENT>warnings.warn('<STR_LIT>'<EOL>'<STR_LIT>'.format(ulength))<EOL>numthreads = ulength<EOL><DEDENT>if numthreads <= <NUM_LIT:1>:<EOL><INDENT>solar_position_loop(unixtime, loc_args, result)<EOL>return result<EOL><DEDENT>split0 = np.array_split(unixtime, numthreads)<EOL>split2 = np.array_split(result, numthreads, axis=<NUM_LIT:1>)<EOL>chunks = [[a0, loc_args, split2[i]] for i, a0 in enumerate(split0)]<EOL>threads = [threading.Thread(target=solar_position_loop, args=chunk)<EOL>for chunk in chunks]<EOL>for thread in threads:<EOL><INDENT>thread.start()<EOL><DEDENT>for thread in threads:<EOL><INDENT>thread.join()<EOL><DEDENT>return result<EOL>
Calculate the solar position using the numba compiled functions
    and multiple threads. Very slow if functions are not numba compiled.