You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm not sure if that was already covered in an other issue (couldn't find it) or intentional in the code, but when using the function get_solarposition() with method='nrel_c', it doesn't seem to matter whether the time index is localized or not.
The function will assume that the time index is at 'UTC' no matter what. Which goes against what was described in http://pvlib-python.readthedocs.io/en/latest/timetimezones.html.
So I ended up converting my timezone to 'UTC' before calculation, and then back to local after the calculation
I'd welcome a pull request if you want to fix it or at least document the bug. Personally, I'd vote for removing the nrel_c option all together, but that's probably a separate issue. Is there a reason you're using nrel_c instead of the nrel_numpy or nrel_numba options?
Hi,
I'm not sure if that was already covered in an other issue (couldn't find it) or intentional in the code, but when using the function
get_solarposition()
withmethod='nrel_c'
, it doesn't seem to matter whether the time index is localized or not.The function will assume that the time index is at 'UTC' no matter what. Which goes against what was described in http://pvlib-python.readthedocs.io/en/latest/timetimezones.html.
So I ended up converting my timezone to 'UTC' before calculation, and then back to local after the calculation
Example:
pvlib_loc = location.Location(latitude, longitude, tz='Etc/GMT+8')
localized_index = index.tz_localize('Etc/GMT+8')
utc_index = localized_index.tz_convert('UTC')
solarAngles = pvlib_loc.get_solarposition(utc_index, method='nrel_c')
solarAngles.index = localized_index
The text was updated successfully, but these errors were encountered: