Closed
Description
solarposition.ephemeris
returns results in dataframe with a localized time index, rather than UTC time. This results in slow performance because the dataframe is assembled from Series and np.arrays that are calculated using UTC time, requiring a timezone conversion.
To Reproduce
Change line 693 from
DFOut = pd.DataFrame(index=time)
to
DFOut = pd.DataFrame(index=time_utc)
to observe the speedup: roughly 23 sec calculation time for 500k timesteps with index=time
, and <5 seconds for index=time_utc
pvlib.__version__
: 0.5.2pandas.__version__
: 0.20.3
Recommend that solarposition.ephemeris
return a dataframe indexed in UTC time.