Skip to content

Wrong Return in documentation of cloud_covr_to_transmittance_linear #1367

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
JoLo90 opened this issue Jan 5, 2022 · 5 comments
Closed

Wrong Return in documentation of cloud_covr_to_transmittance_linear #1367

JoLo90 opened this issue Jan 5, 2022 · 5 comments

Comments

@JoLo90
Copy link
Contributor

JoLo90 commented Jan 5, 2022

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`
@AdamRJensen
Copy link
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?

@cwhanse
Copy link
Member

cwhanse commented Jan 5, 2022

it's worth denoting that it is a fraction

Absolutely

@AdamRJensen
Copy link
Member

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

@JoLo90
Copy link
Contributor Author

JoLo90 commented Jan 5, 2022

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

@kandersolar
Copy link
Member

Closed by #1370, thanks @JoLo90!

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

No branches or pull requests

4 participants