Skip to content
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

Change g_poa_effective to effective_irradiance #2235

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions docs/sphinx/source/user_guide/pvsystem.rst
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ data irradiance and temperature.

.. ipython:: python

pdc = system.pvwatts_dc(g_poa_effective=1000, temp_cell=30)
pdc = system.pvwatts_dc(effective_irradiance=1000, temp_cell=30)
print(pdc)

Methods attached to a PVSystem object wrap the corresponding functions in
Expand All @@ -84,8 +84,8 @@ using data stored in the PVSystem attributes. Compare the
:py:meth:`~pvlib.pvsystem.PVSystem.pvwatts_dc` method signature to the
:py:func:`~pvlib.pvsystem.pvwatts_dc` function signature:

* :py:meth:`PVSystem.pvwatts_dc(g_poa_effective, temp_cell) <pvlib.pvsystem.PVSystem.pvwatts_dc>`
* :py:func:`pvwatts_dc(g_poa_effective, temp_cell, pdc0, gamma_pdc, temp_ref=25.) <pvlib.pvsystem.pvwatts_dc>`
* :py:meth:`PVSystem.pvwatts_dc(effective_irradiance, temp_cell) <pvlib.pvsystem.PVSystem.pvwatts_dc>`
* :py:func:`pvwatts_dc(effective_irradiance, temp_cell, pdc0, gamma_pdc, temp_ref=25.) <pvlib.pvsystem.pvwatts_dc>`

How does this work? The :py:meth:`~pvlib.pvsystem.PVSystem.pvwatts_dc`
method looks in `PVSystem.module_parameters` for the `pdc0`, and
Expand Down
4 changes: 3 additions & 1 deletion docs/sphinx/source/whatsnew/v0.11.2.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ v0.11.2 (Anticipated December, 2024)

Deprecations
~~~~~~~~~~~~

* Changed the `g_poa_effective` parameter name to
`effective_irradiance` in :py:func:`~pvlib.pvsystem.PVSystem.pvwatts_dc`.
(:pull:`2235`)
AdamRJensen marked this conversation as resolved.
Show resolved Hide resolved

Enhancements
~~~~~~~~~~~~
Expand Down
1 change: 0 additions & 1 deletion pvlib/data/variables_style_rules.csv
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ poa_direct;direct/beam irradiation in plane
poa_diffuse;total diffuse irradiation in plane. sum of ground and sky diffuse.
poa_global;global irradiation in plane. sum of diffuse and beam projection.
poa_sky_diffuse;diffuse irradiation in plane from scattered light in the atmosphere (without ground reflected irradiation)
g_poa_effective;broadband plane of array effective irradiance.
surface_tilt;tilt angle of the surface
surface_azimuth;azimuth angle of the surface
solar_zenith;zenith angle of the sun in degrees
Expand Down
16 changes: 8 additions & 8 deletions pvlib/pvsystem.py
Original file line number Diff line number Diff line change
Expand Up @@ -839,23 +839,23 @@ def scale_voltage_current_power(self, data):
)

@_unwrap_single_value
def pvwatts_dc(self, g_poa_effective, temp_cell):
def pvwatts_dc(self, effective_irradiance, temp_cell):
"""
Calculates DC power according to the PVWatts model using
:py:func:`pvlib.pvsystem.pvwatts_dc`, `self.module_parameters['pdc0']`,
and `self.module_parameters['gamma_pdc']`.

See :py:func:`pvlib.pvsystem.pvwatts_dc` for details.
"""
g_poa_effective = self._validate_per_array(g_poa_effective)
effective_irradiance = self._validate_per_array(effective_irradiance)
temp_cell = self._validate_per_array(temp_cell)
return tuple(
pvwatts_dc(g_poa_effective, temp_cell,
pvwatts_dc(effective_irradiance, temp_cell,
array.module_parameters['pdc0'],
array.module_parameters['gamma_pdc'],
**_build_kwargs(['temp_ref'], array.module_parameters))
for array, g_poa_effective, temp_cell
in zip(self.arrays, g_poa_effective, temp_cell)
for array, effective_irradiance, temp_cell
in zip(self.arrays, effective_irradiance, temp_cell)
)

def pvwatts_losses(self):
Expand Down Expand Up @@ -2764,7 +2764,7 @@ def scale_voltage_current_power(data, voltage=1, current=1):
return df_sorted


def pvwatts_dc(g_poa_effective, temp_cell, pdc0, gamma_pdc, temp_ref=25.):
def pvwatts_dc(effective_irradiance, temp_cell, pdc0, gamma_pdc, temp_ref=25.):
r"""
Implements NREL's PVWatts DC power model. The PVWatts DC model [1]_ is:

Expand All @@ -2780,7 +2780,7 @@ def pvwatts_dc(g_poa_effective, temp_cell, pdc0, gamma_pdc, temp_ref=25.):

Parameters
----------
g_poa_effective: numeric
effective_irradiance: numeric
Irradiance transmitted to the PV cells. To be
fully consistent with PVWatts, the user must have already
applied angle of incidence losses, but not soiling, spectral,
Expand Down Expand Up @@ -2808,7 +2808,7 @@ def pvwatts_dc(g_poa_effective, temp_cell, pdc0, gamma_pdc, temp_ref=25.):
(2014).
""" # noqa: E501

pdc = (g_poa_effective * 0.001 * pdc0 *
pdc = (effective_irradiance * 0.001 * pdc0 *
(1 + gamma_pdc * (temp_cell - temp_ref)))

return pdc
Expand Down
Loading