Skip to content

Negative "POA horizontal ratio" when sun behind array #641

Closed
@adriesse

Description

@adriesse

Describe the bug
The function poa_horizontal_ratio gives negative values when the sun is behind the array.

To Reproduce
pvlib.irradiance.poa_horizontal_ratio(60, 90, 60, 270)
-0.99999999999999933

Expected behavior
pvlib.irradiance.poa_horizontal_ratio(60, 90, 60, 270)
0.0

Versions:

  • pvlib.__version__: '0.5.2'
  • pandas.__version__: '0.19.2'
  • python: 3.5.1

Additional context
Similar problems were fixed in other irradiance functions already (#526).

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