Skip to content

Behavior of pvlib.solarposition.get_sun_rise_set_transit #316

Closed
@cwhanse

Description

@cwhanse

Why does this function return a sunset time >24 hours ahead of the specified time?

E.g.,

import pandas as pd
import pvlib

dr = pd.DatetimeIndex(start=datetime(2017, 2, 12, 0, 0, 0, tzinfo=pytz.UTC), end=datetime(2017, 2, 12, 0, 15, 0, tzinfo=pytz.UTC), freq='15T')
tmp = pvlib.solarposition.get_sun_rise_set_transit(dr, 35.05, -115)
tmp['sunset']

returns

2017-02-12 00:00:00+00:00   2017-02-13 01:19:07.319358208+00:00
2017-02-12 00:15:00+00:00   2017-02-13 01:19:07.319358208+00:00
Freq: 15T, Name: sunset, dtype: datetime64[ns, UTC]

The comments in get_sun_rise_set_transit don't describe what the output should be.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions