Skip to content

Wrong Return in documentation of cloud_covr_to_transmittance_linear #1367

Closed

Description

@JoLo90

In the documentation of the pvlib.forecast.NDFD.cloud_cover_to_transmittance_linear function, it seems the documented return is the wrong one: It shows the GHI as the return instead of the transmittance.

image

Here is the function in pvlib.forecast that seems to confirm the case.

    """
    Convert cloud cover to atmospheric transmittance using a linear
    model.

    0% cloud cover returns offset.

    100% cloud cover returns 0.

    Parameters
    ----------
    cloud_cover : numeric
        Cloud cover in %.
    offset : numeric, default 0.75
        Determines the maximum transmittance.
    kwargs
        Not used.

    Returns
    -------
    ghi : numeric
        Estimated GHI.
    """
    transmittance = ((100.0 - cloud_cover) / 100.0) * offset

    return transmittance`

Activity

  1. AdamRJensen commented on Jan 5, 2022

    @AdamRJensen
    Member

    Seems like it was a mistake when the function was added in #180.

    Should probably be updated to something like this:

    Returns
    -------
    transmittance: numeric
        Estimated transmittance.
    

    Perhaps it's worth denoting that it is a fraction and not in percentage like the cloud cover?

  2. cwhanse commented on Jan 5, 2022

    @cwhanse
    Member

    it's worth denoting that it is a fraction

    Absolutely

  3. added this to the 0.9.1 milestone on Jan 5, 2022
  4. AdamRJensen commented on Jan 5, 2022

    @AdamRJensen
    Member

    @JoLo90 If you wanted to make a pull request for this issue, that would be more than welcomed.

  5. JoLo90 commented on Jan 5, 2022

    @JoLo90
    ContributorAuthor

    @AdamRJensen I'll create a PR in the next days.

  6. kandersolar commented on Jan 16, 2022

    @kandersolar
    Member

    Closed by #1370, thanks @JoLo90!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions