Skip to content

Localized time index not working when using 'nrel_c' method #237

Closed

Description

@anomam

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() 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

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

Activity

  1. wholmgren commented on Aug 17, 2016

    @wholmgren
    Member

    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?

  2. added this to the 0.4.1 milestone on Aug 17, 2016
  3. modified the milestones: Someday, 0.4.1 on Oct 4, 2016
  4. mikofski commented on Nov 4, 2016

    @mikofski
    Member

    At the very least this should be changed in the docstring I think.

  5. modified the milestones: 0.4.5, Someday on Jun 3, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions