Skip to content

Linke turbidity out of bounds error at (90, 180) #262

@mikofski

Description

@mikofski

Some of the edge cases don't work:

>>> from pvlib.clearsky import lookup_linke_turbidity
>>> import pandas as pd
>>> time = pd.DatetimeIndex(start='1/1/2016', end='1/2/2016', freq='H')
>>> import os
>>> lookup_linke_turbidity(time, 90, 180, os.path.join('Downloads', 'LinkeTurbidities.mat'))

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Python27\lib\site-packages\pvlib\clearsky.py", line 210, in lookup_linke_turbidity
    g = linke_turbidity_table[latitude_index][longitude_index]
IndexError: index 4320 is out of bounds for axis 0 with size 4320

Should be an easy fix, I will try to submit something today, and obviously since these edge cases are north and south poles, I don't think that this issue occurs very often if ever - nevertheless, it should be handled gracefully.

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