From ce3d9b5643b3ac17abec0e7ee7c0e92da4587f13 Mon Sep 17 00:00:00 2001 From: RDaxini Date: Tue, 26 Nov 2024 21:19:25 -0700 Subject: [PATCH 1/9] Update irradiance.py --- pvlib/irradiance.py | 63 +++++++++++++++++++++++---------------------- 1 file changed, 32 insertions(+), 31 deletions(-) diff --git a/pvlib/irradiance.py b/pvlib/irradiance.py index cecba6237b..dbdfd851ae 100644 --- a/pvlib/irradiance.py +++ b/pvlib/irradiance.py @@ -41,7 +41,7 @@ def get_extra_radiation(datetime_or_doy, solar_constant=1366.1, Day of year, array of days of year, or datetime-like object solar_constant : float, default 1366.1 - The solar constant. + The solar constant. [Wm⁻²] method : string, default 'spencer' The method by which the ET radiation should be calculated. @@ -61,7 +61,7 @@ def get_extra_radiation(datetime_or_doy, solar_constant=1366.1, The extraterrestrial radiation present in watts per square meter on a surface which is normal to the sun. Pandas Timestamp and DatetimeIndex inputs will yield a Pandas TimeSeries. All other - inputs will yield a float or an array of floats. + inputs will yield a float or an array of floats. See :term:`dni_extra`. References ---------- @@ -162,18 +162,19 @@ def aoi_projection(surface_tilt, surface_azimuth, solar_zenith, solar_azimuth): Parameters ---------- surface_tilt : numeric - Panel tilt from horizontal. + Panel tilt from horizontal [°]. See :term:`surface_tilt`. surface_azimuth : numeric - Panel azimuth from north. + Panel azimuth from north [°]. See :term:`surface_azimuth`. solar_zenith : numeric - Solar zenith angle. + Solar zenith angle. See :term:`solar_zenith`. solar_azimuth : numeric - Solar azimuth angle. + Solar azimuth angle. See :term:`solar_azimuth`. Returns ------- projection : numeric Dot product of panel normal and solar angle. + See :term:`aoi_projection`. """ projection = ( @@ -202,18 +203,18 @@ def aoi(surface_tilt, surface_azimuth, solar_zenith, solar_azimuth): Parameters ---------- surface_tilt : numeric - Panel tilt from horizontal. + Panel tilt from horizontal [°]. See :term:`surface_tilt`. surface_azimuth : numeric - Panel azimuth from north. + Panel azimuth from north [°]. See :term:`surface_azimuth`. solar_zenith : numeric - Solar zenith angle. + Solar zenith angle [°]. See :term:`solar_zenith`. solar_azimuth : numeric - Solar azimuth angle. + Solar azimuth angle [°]. See :term:`solar_azimuth`. Returns ------- aoi : numeric - Angle of incidence in degrees. + Angle of incidence [°]. See :term:`aoi`. """ projection = aoi_projection(surface_tilt, surface_azimuth, @@ -236,20 +237,20 @@ def beam_component(surface_tilt, surface_azimuth, solar_zenith, solar_azimuth, Parameters ---------- surface_tilt : numeric - Panel tilt from horizontal. + Panel tilt from horizontal [°]. See :term:`surface_tilt`. surface_azimuth : numeric - Panel azimuth from north. + Panel azimuth from north [°]. See :term:`surface_azimuth`. solar_zenith : numeric - Solar zenith angle. + Solar zenith angle [°]. See :term:`solar_zenith`. solar_azimuth : numeric - Solar azimuth angle. + Solar azimuth angle [°]. See :term:`solar_azimuth`. dni : numeric - Direct normal irradiance, see :term:`dni`. [Wm⁻²] + Direct normal irradiance [Wm⁻²]. See :term:`dni`. Returns ------- beam : numeric - Beam component + Beam component [Wm⁻²]. """ beam = dni * aoi_projection(surface_tilt, surface_azimuth, solar_zenith, solar_azimuth) @@ -284,21 +285,21 @@ def get_total_irradiance(surface_tilt, surface_azimuth, Parameters ---------- surface_tilt : numeric - Panel tilt from horizontal. [degree] + Panel tilt from horizontal [°]. See :term:`surface_tilt`. surface_azimuth : numeric - Panel azimuth from north. [degree] + Panel azimuth from north [°]. See :term:`surface_azimuth`. solar_zenith : numeric - Solar zenith angle. [degree] + Solar zenith angle [°]. See :term:`solar_zenith`. solar_azimuth : numeric - Solar azimuth angle. [degree] + Solar azimuth angle [°]. See :term:`solar_azimuth`. dni : numeric - Direct Normal Irradiance. [W/m2] + Direct normal irradiance [Wm⁻²]. See :term:`dni`. ghi : numeric - Global horizontal irradiance. [W/m2] + Global horizontal irradiance. [Wm⁻²] dhi : numeric - Diffuse horizontal irradiance. [W/m2] + Diffuse horizontal irradiance. [Wm⁻²] dni_extra : numeric, optional - Extraterrestrial direct normal irradiance. [W/m2] + Extraterrestrial direct normal irradiance. [Wm⁻²] airmass : numeric, optional Relative airmass (not adjusted for pressure). [unitless] albedo : numeric, default 0.25 @@ -371,13 +372,13 @@ def get_sky_diffuse(surface_tilt, surface_azimuth, solar_azimuth : numeric Solar azimuth angle. [degree] dni : numeric - Direct Normal Irradiance. [W/m2] + Direct Normal Irradiance. [Wm⁻²] ghi : numeric - Global horizontal irradiance. [W/m2] + Global horizontal irradiance. [Wm⁻²] dhi : numeric - Diffuse horizontal irradiance. [W/m2] + Diffuse horizontal irradiance. [Wm⁻²] dni_extra : numeric, optional - Extraterrestrial direct normal irradiance. [W/m2] + Extraterrestrial direct normal irradiance. [Wm⁻²] airmass : numeric, optional Relative airmass (not adjusted for pressure). [unitless] model : str, default 'isotropic' @@ -390,7 +391,7 @@ def get_sky_diffuse(surface_tilt, surface_azimuth, Returns ------- poa_sky_diffuse : numeric - Sky diffuse irradiance in the plane of array. [W/m2] + Sky diffuse irradiance in the plane of array. [Wm⁻²] Raises ------ @@ -2823,7 +2824,7 @@ def orgill_hollands(ghi, zenith, datetime_or_doy, dni_extra=None, Day of year or array of days of year e.g. pd.DatetimeIndex.dayofyear, or pd.DatetimeIndex. dni_extra : numeric, optional - Extraterrestrial direct normal irradiance. [W/m2] + Extraterrestrial direct normal irradiance. [Wm⁻²] min_cos_zenith : numeric, default 0.065 Minimum value of cos(zenith) to allow when calculating global clearness index `kt`. Equivalent to zenith = 86.273 degrees. From 89e7e7148b6a32d49655e908ed88baa2a728459a Mon Sep 17 00:00:00 2001 From: RDaxini Date: Tue, 26 Nov 2024 21:35:04 -0700 Subject: [PATCH 2/9] ongoing... --- pvlib/irradiance.py | 138 +++++++++++++++++++++++--------------------- 1 file changed, 71 insertions(+), 67 deletions(-) diff --git a/pvlib/irradiance.py b/pvlib/irradiance.py index dbdfd851ae..29db0ce5a5 100644 --- a/pvlib/irradiance.py +++ b/pvlib/irradiance.py @@ -41,7 +41,7 @@ def get_extra_radiation(datetime_or_doy, solar_constant=1366.1, Day of year, array of days of year, or datetime-like object solar_constant : float, default 1366.1 - The solar constant. [Wm⁻²] + The solar constant [Wm⁻²]. method : string, default 'spencer' The method by which the ET radiation should be calculated. @@ -293,17 +293,19 @@ def get_total_irradiance(surface_tilt, surface_azimuth, solar_azimuth : numeric Solar azimuth angle [°]. See :term:`solar_azimuth`. dni : numeric - Direct normal irradiance [Wm⁻²]. See :term:`dni`. + Direct normal irradiance [Wm⁻²]. See :term:`dni`. ghi : numeric - Global horizontal irradiance. [Wm⁻²] + Global horizontal irradiance [Wm⁻²]. See :term:`ghi`. dhi : numeric - Diffuse horizontal irradiance. [Wm⁻²] + Diffuse horizontal irradiance [Wm⁻²]. See :term:`dhi`. dni_extra : numeric, optional - Extraterrestrial direct normal irradiance. [Wm⁻²] + Extraterrestrial direct normal irradiance [Wm⁻²]. + See :term:`dni_extra`. airmass : numeric, optional - Relative airmass (not adjusted for pressure). [unitless] + Relative airmass (not adjusted for pressure) [unitless]. + See :term:`airmass`. albedo : numeric, default 0.25 - Ground surface albedo. [unitless] + Ground surface albedo [unitless]. See :term:`albedo`. surface_type : str, optional Surface type. See :py:func:`~pvlib.irradiance.get_ground_diffuse` for the list of accepted values. @@ -364,23 +366,25 @@ def get_sky_diffuse(surface_tilt, surface_azimuth, Parameters ---------- surface_tilt : numeric - Panel tilt from horizontal. [degree] + Panel tilt from horizontal [°]. See :term:`surface_tilt`. surface_azimuth : numeric - Panel azimuth from north. [degree] + Panel azimuth from north [°]. See :term:`surface_azimuth`. solar_zenith : numeric - Solar zenith angle. [degree] + Solar zenith angle [°]. See :term:`solar_zenith`. solar_azimuth : numeric - Solar azimuth angle. [degree] + Solar azimuth angle [°]. See :term:`solar_azimuth`. dni : numeric - Direct Normal Irradiance. [Wm⁻²] + Direct normal irradiance [Wm⁻²]. See :term:`dni`. ghi : numeric - Global horizontal irradiance. [Wm⁻²] + Global horizontal irradiance [Wm⁻²]. See :term:`ghi`. dhi : numeric - Diffuse horizontal irradiance. [Wm⁻²] + Diffuse horizontal irradiance [Wm⁻²]. See :term:`dhi`. dni_extra : numeric, optional - Extraterrestrial direct normal irradiance. [Wm⁻²] + Extraterrestrial direct normal irradiance [Wm⁻²]. + See :term:`dni_extra`. airmass : numeric, optional - Relative airmass (not adjusted for pressure). [unitless] + Relative airmass (not adjusted for pressure) [unitless]. + See :term:`airmass`. model : str, default 'isotropic' Irradiance model. Can be one of ``'isotropic'``, ``'klucher'``, ``'haydavies'``, ``'reindl'``, ``'king'``, ``'perez'``, @@ -391,7 +395,7 @@ def get_sky_diffuse(surface_tilt, surface_azimuth, Returns ------- poa_sky_diffuse : numeric - Sky diffuse irradiance in the plane of array. [Wm⁻²] + Sky diffuse irradiance in the plane of array [Wm⁻²]. Raises ------ @@ -530,7 +534,7 @@ def get_ground_diffuse(surface_tilt, ghi, albedo=.25, surface_type=None): (e.g. surface facing up = 0, surface facing horizon = 90). ghi : numeric - Global horizontal irradiance. [Wm⁻²] + Global horizontal irradiance [Wm⁻²]. albedo : numeric, default 0.25 Ground reflectance, typically 0.1-0.4 for surfaces on Earth @@ -547,7 +551,7 @@ def get_ground_diffuse(surface_tilt, ghi, albedo=.25, surface_type=None): Returns ------- grounddiffuse : numeric - Ground reflected irradiance. [Wm⁻²] + Ground reflected irradiance [Wm⁻²]. Notes ----- @@ -603,7 +607,7 @@ def isotropic(surface_tilt, dhi): (e.g. surface facing up = 0, surface facing horizon = 90) dhi : numeric - Diffuse horizontal irradiance. [Wm⁻²] DHI must be >=0. + Diffuse horizontal irradiance [Wm⁻²]. DHI must be >=0. Returns ------- @@ -646,10 +650,10 @@ def klucher(surface_tilt, surface_azimuth, dhi, ghi, solar_zenith, east of north (e.g. North = 0, South=180 East = 90, West = 270). dhi : numeric - Diffuse horizontal irradiance, must be >=0. [Wm⁻²] + Diffuse horizontal irradiance, must be >=0 [Wm⁻²]. ghi : numeric - Global horizontal irradiance, must be >=0. [Wm⁻²] + Global horizontal irradiance, must be >=0 [Wm⁻²]. solar_zenith : numeric Apparent (refraction-corrected) zenith angles in decimal @@ -663,7 +667,7 @@ def klucher(surface_tilt, surface_azimuth, dhi, ghi, solar_zenith, Returns ------- diffuse : numeric - The sky diffuse component of the solar radiation. [Wm⁻²] + The sky diffuse component of the solar radiation [Wm⁻²]. Notes ----- @@ -750,13 +754,13 @@ def haydavies(surface_tilt, surface_azimuth, dhi, dni, dni_extra, South=180, East=90, West=270). dhi : numeric - Diffuse horizontal irradiance. [Wm⁻²] + Diffuse horizontal irradiance [Wm⁻²]. dni : numeric - Direct normal irradiance, see :term:`dni`. [Wm⁻²] + Direct normal irradiance, see :term:`dni` [Wm⁻²]. dni_extra : numeric - Extraterrestrial normal irradiance. [Wm⁻²] + Extraterrestrial normal irradiance [Wm⁻²]. solar_zenith : numeric, optional Solar apparent (refraction-corrected) zenith angles in decimal @@ -893,16 +897,16 @@ def reindl(surface_tilt, surface_azimuth, dhi, dni, ghi, dni_extra, South=180 East = 90, West = 270). dhi : numeric - diffuse horizontal irradiance. [Wm⁻²] + diffuse horizontal irradiance [Wm⁻²]. dni : numeric - direct normal irradiance. [Wm⁻²] + direct normal irradiance [Wm⁻²]. ghi: numeric - Global horizontal irradiance. [Wm⁻²] + Global horizontal irradiance [Wm⁻²]. dni_extra : numeric - Extraterrestrial normal irradiance. [Wm⁻²] + Extraterrestrial normal irradiance [Wm⁻²]. solar_zenith : numeric Apparent (refraction-corrected) zenith angles in decimal degrees. @@ -1005,10 +1009,10 @@ def king(surface_tilt, dhi, ghi, solar_zenith): surface facing horizon = 90) dhi : numeric - Diffuse horizontal irradiance. [Wm⁻²] + Diffuse horizontal irradiance [Wm⁻²]. ghi : numeric - Global horizontal irradiance. [Wm⁻²] + Global horizontal irradiance [Wm⁻²]. solar_zenith : numeric Apparent (refraction-corrected) zenith angles in decimal degrees. @@ -1062,13 +1066,13 @@ def perez(surface_tilt, surface_azimuth, dhi, dni, dni_extra, east of north (e.g. North = 0, South=180 East = 90, West = 270). dhi : numeric - Diffuse horizontal irradiance. [Wm⁻²] DHI must be >=0. + Diffuse horizontal irradiance [Wm⁻²]. DHI must be >=0. dni : numeric - Direct normal irradiance. [Wm⁻²] DNI must be >=0. + Direct normal irradiance [Wm⁻²]. DNI must be >=0. dni_extra : numeric - Extraterrestrial normal irradiance. [Wm⁻²] + Extraterrestrial normal irradiance [Wm⁻²]. solar_zenith : numeric apparent (refraction-corrected) zenith angles in decimal @@ -1328,13 +1332,13 @@ def perez_driesse(surface_tilt, surface_azimuth, dhi, dni, dni_extra, east of north (e.g. North = 0, South=180 East = 90, West = 270). dhi : numeric - Diffuse horizontal irradiance. [Wm⁻²] dhi must be >=0. + Diffuse horizontal irradiance [Wm⁻²]. dhi must be >=0. dni : numeric - Direct normal irradiance. [Wm⁻²] dni must be >=0. + Direct normal irradiance [Wm⁻²]. dni must be >=0. dni_extra : numeric - Extraterrestrial normal irradiance. [Wm⁻²] + Extraterrestrial normal irradiance [Wm⁻²]. solar_zenith : numeric apparent (refraction-corrected) zenith angles in decimal @@ -1549,16 +1553,16 @@ def ghi_from_poa_driesse_2023(surface_tilt, surface_azimuth, solar_azimuth : numeric Solar azimuth angle. [degree] poa_global : numeric - Plane-of-array global irradiance, aka global tilted irradiance. [Wm⁻²] + Plane-of-array global irradiance, aka global tilted irradiance [Wm⁻²]. dni_extra : numeric, optional - Extraterrestrial direct normal irradiance. [Wm⁻²] + Extraterrestrial direct normal irradiance [Wm⁻²]. airmass : numeric, optional - Relative airmass (not adjusted for pressure). [unitless] + Relative airmass (not adjusted for pressure) [unitless]. albedo : numeric, default 0.25 - Ground surface albedo. [unitless] + Ground surface albedo [unitless]. xtol : numeric, default 0.01 Convergence criterion. The estimated GHI will be within xtol of the - true value. Must be positive. [Wm⁻²] + true value. Must be positive [Wm⁻²]. full_output : boolean, default False If full_output is False, only ghi is returned, otherwise the return value is (ghi, converged, niter). (see Returns section for details). @@ -1566,7 +1570,7 @@ def ghi_from_poa_driesse_2023(surface_tilt, surface_azimuth, Returns ------- ghi : numeric - Estimated GHI. [Wm⁻²] + Estimated GHI [Wm⁻²]. converged : boolean, optional Present if full_output=True. Indicates which elements converged successfully. @@ -1625,7 +1629,7 @@ def clearsky_index(ghi, clearsky_ghi, max_clearsky_index=2.0): Parameters ---------- ghi : numeric - Global horizontal irradiance. [Wm⁻²] + Global horizontal irradiance [Wm⁻²]. clearsky_ghi : numeric Modeled clearsky GHI @@ -1668,7 +1672,7 @@ def clearness_index(ghi, solar_zenith, extra_radiation, min_cos_zenith=0.065, Parameters ---------- ghi : numeric - Global horizontal irradiance. [Wm⁻²] + Global horizontal irradiance [Wm⁻²]. solar_zenith : numeric True (not refraction-corrected) solar zenith angle in decimal @@ -1781,7 +1785,7 @@ def disc(ghi, solar_zenith, datetime_or_doy, pressure=101325, Parameters ---------- ghi : numeric - Global horizontal irradiance. [Wm⁻²] + Global horizontal irradiance [Wm⁻²]. solar_zenith : numeric True (not refraction-corrected) solar zenith angles in decimal @@ -1927,7 +1931,7 @@ def dirint(ghi, solar_zenith, times, pressure=101325., use_delta_kt_prime=True, Parameters ---------- ghi : array-like - Global horizontal irradiance. [Wm⁻²] + Global horizontal irradiance [Wm⁻²]. solar_zenith : array-like True (not refraction-corrected) solar_zenith angles in decimal @@ -2169,13 +2173,13 @@ def dirindex(ghi, ghi_clearsky, dni_clearsky, zenith, times, pressure=101325., Parameters ---------- ghi : array-like - Global horizontal irradiance. [Wm⁻²] + Global horizontal irradiance [Wm⁻²]. ghi_clearsky : array-like - Global horizontal irradiance from clear sky model. [Wm⁻²] + Global horizontal irradiance from clear sky model [Wm⁻²]. dni_clearsky : array-like - Direct normal irradiance from clear sky model. [Wm⁻²] + Direct normal irradiance from clear sky model [Wm⁻²]. zenith : array-like True (not refraction-corrected) zenith angles in decimal @@ -2214,7 +2218,7 @@ def dirindex(ghi, ghi_clearsky, dni_clearsky, zenith, times, pressure=101325., Returns ------- dni : array-like - The modeled direct normal irradiance. [Wm⁻²] + The modeled direct normal irradiance [Wm⁻²]. Notes ----- @@ -2266,7 +2270,7 @@ def gti_dirint(poa_global, aoi, solar_zenith, solar_azimuth, times, Parameters ---------- poa_global : array-like - Plane of array global irradiance. [Wm⁻²] + Plane of array global irradiance [Wm⁻²]. aoi : array-like Angle of incidence of solar rays with respect to the module @@ -2312,7 +2316,7 @@ def gti_dirint(poa_global, aoi, solar_zenith, solar_azimuth, times, applied. albedo : numeric, default 0.25 - Ground surface albedo. [unitless] + Ground surface albedo [unitless]. model : String, default 'perez' Irradiance model. See :py:func:`get_sky_diffuse` for allowed values. @@ -2333,8 +2337,8 @@ def gti_dirint(poa_global, aoi, solar_zenith, solar_azimuth, times, data : DataFrame Contains the following keys/columns: - * ``ghi``: the modeled global horizontal irradiance. [Wm⁻²] - * ``dni``: the modeled direct normal irradiance. [Wm⁻²] + * ``ghi``: the modeled global horizontal irradiance [Wm⁻²]. + * ``dni``: the modeled direct normal irradiance [Wm⁻²]. * ``dhi``: the modeled diffuse horizontal irradiance in Wm⁻². @@ -2598,7 +2602,7 @@ def erbs(ghi, zenith, datetime_or_doy, min_cos_zenith=0.065, max_zenith=87): Parameters ---------- ghi: numeric - Global horizontal irradiance. [Wm⁻²] + Global horizontal irradiance [Wm⁻²]. zenith: numeric True (not refraction-corrected) zenith angles in decimal degrees. datetime_or_doy : int, float, array, pd.DatetimeIndex @@ -2616,7 +2620,7 @@ def erbs(ghi, zenith, datetime_or_doy, min_cos_zenith=0.065, max_zenith=87): data : OrderedDict or DataFrame Contains the following keys/columns: - * ``dni``: the modeled direct normal irradiance. [Wm⁻²] + * ``dni``: the modeled direct normal irradiance [Wm⁻²]. * ``dhi``: the modeled diffuse horizontal irradiance in Wm⁻². * ``kt``: Ratio of global to extraterrestrial irradiance @@ -2696,7 +2700,7 @@ def erbs_driesse(ghi, zenith, datetime_or_doy=None, dni_extra=None, Parameters ---------- ghi: numeric - Global horizontal irradiance. [Wm⁻²] + Global horizontal irradiance [Wm⁻²]. zenith: numeric True (not refraction-corrected) zenith angles in decimal degrees. datetime_or_doy : int, float, array or pd.DatetimeIndex, optional @@ -2719,7 +2723,7 @@ def erbs_driesse(ghi, zenith, datetime_or_doy=None, dni_extra=None, data : OrderedDict or DataFrame Contains the following keys/columns: - * ``dni``: the modeled direct normal irradiance. [Wm⁻²] + * ``dni``: the modeled direct normal irradiance [Wm⁻²]. * ``dhi``: the modeled diffuse horizontal irradiance in Wm⁻². * ``kt``: Ratio of global to extraterrestrial irradiance @@ -2817,14 +2821,14 @@ def orgill_hollands(ghi, zenith, datetime_or_doy, dni_extra=None, Parameters ---------- ghi: numeric - Global horizontal irradiance. [Wm⁻²] + Global horizontal irradiance [Wm⁻²]. zenith: numeric True (not refraction-corrected) zenith angles in decimal degrees. datetime_or_doy : int, float, array, pd.DatetimeIndex Day of year or array of days of year e.g. pd.DatetimeIndex.dayofyear, or pd.DatetimeIndex. dni_extra : numeric, optional - Extraterrestrial direct normal irradiance. [Wm⁻²] + Extraterrestrial direct normal irradiance [Wm⁻²]. min_cos_zenith : numeric, default 0.065 Minimum value of cos(zenith) to allow when calculating global clearness index `kt`. Equivalent to zenith = 86.273 degrees. @@ -2837,7 +2841,7 @@ def orgill_hollands(ghi, zenith, datetime_or_doy, dni_extra=None, data : OrderedDict or DataFrame Contains the following keys/columns: - * ``dni``: the modeled direct normal irradiance. [Wm⁻²] + * ``dni``: the modeled direct normal irradiance [Wm⁻²]. * ``dhi``: the modeled diffuse horizontal irradiance in Wm⁻². * ``kt``: Ratio of global to extraterrestrial irradiance @@ -2910,7 +2914,7 @@ def boland(ghi, solar_zenith, datetime_or_doy, a_coeff=8.645, b_coeff=0.613, Parameters ---------- ghi: numeric - Global horizontal irradiance. [Wm⁻²] + Global horizontal irradiance [Wm⁻²]. solar_zenith: numeric True (not refraction-corrected) zenith angles in decimal degrees. datetime_or_doy : numeric, pandas.DatetimeIndex @@ -2932,7 +2936,7 @@ def boland(ghi, solar_zenith, datetime_or_doy, a_coeff=8.645, b_coeff=0.613, data : OrderedDict or DataFrame Contains the following keys/columns: - * ``dni``: the modeled direct normal irradiance. [Wm⁻²] + * ``dni``: the modeled direct normal irradiance [Wm⁻²]. * ``dhi``: the modeled diffuse horizontal irradiance in Wm⁻². * ``kt``: Ratio of global to extraterrestrial irradiance @@ -3754,7 +3758,7 @@ def louche(ghi, solar_zenith, datetime_or_doy, max_zenith=90): Parameters ---------- ghi : numeric - Global horizontal irradiance. [Wm⁻²] + Global horizontal irradiance [Wm⁻²]. solar_zenith : numeric True (not refraction-corrected) zenith angles in decimal @@ -3769,7 +3773,7 @@ def louche(ghi, solar_zenith, datetime_or_doy, max_zenith=90): data: OrderedDict or DataFrame Contains the following keys/columns: - * ``dni``: the modeled direct normal irradiance. [Wm⁻²] + * ``dni``: the modeled direct normal irradiance [Wm⁻²]. * ``dhi``: the modeled diffuse horizontal irradiance in Wm⁻². * ``kt``: Ratio of global to extraterrestrial irradiance From 4f78af50bb852b8e8a482a09b2e4b4f5028d6d60 Mon Sep 17 00:00:00 2001 From: RDaxini Date: Fri, 6 Dec 2024 15:10:56 -0700 Subject: [PATCH 3/9] ongoing... --- pvlib/irradiance.py | 87 +++++++++++++++++++++++++-------------------- 1 file changed, 49 insertions(+), 38 deletions(-) diff --git a/pvlib/irradiance.py b/pvlib/irradiance.py index 29db0ce5a5..f598c6c040 100644 --- a/pvlib/irradiance.py +++ b/pvlib/irradiance.py @@ -465,18 +465,18 @@ def poa_components(aoi, dni, poa_sky_diffuse, poa_ground_diffuse): ---------- aoi : numeric Angle of incidence of solar rays with respect to the module - surface, from :func:`aoi`. + surface, from :func:`aoi` [°]. See :term:`aoi`. dni : numeric - Direct normal irradiance (Wm⁻²), as measured from a TMY file or - calculated with a clearsky model. + Direct normal irradiance [Wm⁻²], as measured from a TMY file or + calculated with a clearsky model. See :term:`dni`. poa_sky_diffuse : numeric - Diffuse irradiance (Wm⁻²) in the plane of the modules, as - calculated by a diffuse irradiance translation function + Diffuse irradiance [Wm⁻²] in the plane of the modules, as + calculated by a diffuse irradiance translation function. poa_ground_diffuse : numeric - Ground reflected irradiance (Wm⁻²) in the plane of the modules, + Ground reflected irradiance [Wm⁻²] in the plane of the modules, as calculated by an albedo model (eg. :func:`grounddiffuse`) Returns @@ -484,12 +484,12 @@ def poa_components(aoi, dni, poa_sky_diffuse, poa_ground_diffuse): irrads : OrderedDict or DataFrame Contains the following keys: - * ``poa_global`` : Total in-plane irradiance (Wm⁻²) - * ``poa_direct`` : Total in-plane beam irradiance (Wm⁻²) - * ``poa_diffuse`` : Total in-plane diffuse irradiance (Wm⁻²) - * ``poa_sky_diffuse`` : In-plane diffuse irradiance from sky (Wm⁻²) + * ``poa_global`` : Total in-plane irradiance [Wm⁻²] + * ``poa_direct`` : Total in-plane beam irradiance [Wm⁻²] + * ``poa_diffuse`` : Total in-plane diffuse irradiance [Wm⁻²] + * ``poa_sky_diffuse`` : In-plane diffuse irradiance from sky [Wm⁻²] * ``poa_ground_diffuse`` : In-plane diffuse irradiance from ground - (Wm⁻²) + [Wm⁻²] Notes ------ @@ -1545,13 +1545,13 @@ def ghi_from_poa_driesse_2023(surface_tilt, surface_azimuth, Parameters ---------- surface_tilt : numeric - Panel tilt from horizontal. [degree] + Panel tilt from horizontal. [°] surface_azimuth : numeric - Panel azimuth from north. [degree] + Panel azimuth from north. [°] solar_zenith : numeric - Solar zenith angle. [degree] + Solar zenith angle. [°] solar_azimuth : numeric - Solar azimuth angle. [degree] + Solar azimuth angle. [°] poa_global : numeric Plane-of-array global irradiance, aka global tilted irradiance [Wm⁻²]. dni_extra : numeric, optional @@ -3707,24 +3707,35 @@ def complete_irradiance(solar_zenith, Parameters ---------- - solar_zenith : Series - Zenith angles in decimal degrees, with datetime index. + solar_zenith : series + Solar zenith angle [°], with datetime index. Angles must be >=0 and <=180. Must have the same datetime index - as ghi, dhi, and dni series, when available. + as ghi, dhi, and dni series, when available. See :term:`solar_zenith`. ghi : Series, optional - Pandas series of dni data, with datetime index. Must have the same - datetime index as dni, dhi, and zenith series, when available. + Pandas series of dni data [Wm⁻²], with datetime index. Must have the + same datetime index as dni, dhi, and zenith series, when available. + See :term:`ghi`. dhi : Series, optional - Pandas series of dni data, with datetime index. Must have the same - datetime index as ghi, dni, and zenith series, when available. + Pandas series of dni data [Wm⁻²], with datetime index. Must have the + same datetime index as ghi, dni, and zenith series, when available. + See :term:`dhi`. dni : Series, optional - Pandas series of dni data, with datetime index. Must have the same - datetime index as ghi, dhi, and zenith series, when available. + Pandas series of dni data [Wm⁻²], with datetime index. Must have the + same datetime index as ghi, dhi, and zenith series, when available. + See :term:`dni`. dni_clear : Series, optional - Pandas series of clearsky dni data. Must have the same datetime index - as ghi, dhi, dni, and zenith series, when available. See - :py:func:`dni` for details. - + Pandas series of clearsky dni data [Wm⁻²]. Must have the same datetime + index as ghi, dhi, dni, and zenith series, when available. See + :py:func:`dni` for details. See :term:`dni_clear` for glossary + definition. + + +solar_azimuth : numeric + Solar azimuth angle. [°] +poa_global : numeric + Plane-of-array global irradiance, aka global tilted irradiance . +dni_extra : numeric, optional + Extraterrestrial direct normal irradiance [Wm⁻²]. Returns ------- component_sum_df : Dataframe @@ -3758,11 +3769,11 @@ def louche(ghi, solar_zenith, datetime_or_doy, max_zenith=90): Parameters ---------- ghi : numeric - Global horizontal irradiance [Wm⁻²]. + Global horizontal irradiance [Wm⁻²]. See :term:`ghi`. solar_zenith : numeric - True (not refraction-corrected) zenith angles in decimal - degrees. Angles must be >=0 and <=90. + True (not refraction-corrected) zenith angles [°]. + Angles must be >=0° and <=90°. See :term:`solar_zenith`. datetime_or_doy : numeric, pandas.DatetimeIndex Day of year or array of days of year e.g. @@ -3773,11 +3784,11 @@ def louche(ghi, solar_zenith, datetime_or_doy, max_zenith=90): data: OrderedDict or DataFrame Contains the following keys/columns: - * ``dni``: the modeled direct normal irradiance [Wm⁻²]. - * ``dhi``: the modeled diffuse horizontal irradiance in - Wm⁻². - * ``kt``: Ratio of global to extraterrestrial irradiance - on a horizontal plane. + * ``dni``: the modeled direct normal irradiance [Wm⁻²]. See :term:`dni` + * ``dhi``: the modeled diffuse horizontal irradiance [Wm⁻²]. + See :term:`dhi` + * ``kt``: Clearness index [unitless], ratio of global to + extraterrestrial irradiance on a horizontal plane. References ------- @@ -3822,12 +3833,12 @@ def diffuse_par_spitters(daily_solar_zenith, global_diffuse_fraction): .. note:: The diffuse fraction is defined as the ratio of - diffuse to global daily insolation, in J m⁻² day⁻¹ or equivalent. + diffuse to global daily insolation, in Jm⁻² day⁻¹ or equivalent. Parameters ---------- daily_solar_zenith : numeric - Average daily solar zenith angle. In degrees [°]. + Average daily solar zenith angle [°]. global_diffuse_fraction : numeric Fraction of daily global broadband insolation that is diffuse. From 91d4a011b07d3e97e5b62e2a7bb0ee65d1e78c1e Mon Sep 17 00:00:00 2001 From: RDaxini Date: Fri, 3 Jan 2025 10:54:02 -0700 Subject: [PATCH 4/9] fix . + [ ] --- pvlib/irradiance.py | 216 ++++++++++++++++++++++---------------------- 1 file changed, 108 insertions(+), 108 deletions(-) diff --git a/pvlib/irradiance.py b/pvlib/irradiance.py index f598c6c040..4a20aee25c 100644 --- a/pvlib/irradiance.py +++ b/pvlib/irradiance.py @@ -41,7 +41,7 @@ def get_extra_radiation(datetime_or_doy, solar_constant=1366.1, Day of year, array of days of year, or datetime-like object solar_constant : float, default 1366.1 - The solar constant [Wm⁻²]. + The solar constant. [Wm⁻²] method : string, default 'spencer' The method by which the ET radiation should be calculated. @@ -69,7 +69,7 @@ def get_extra_radiation(datetime_or_doy, solar_constant=1366.1, Clear Sky Models: Implementation and Analysis", Sandia National Laboratories, SAND2012-2389, 2012. - .. [2] http://solardata.uoregon.edu/SolarRadiationBasics.html, Eqs. + .. [2] http://solardatauoregon.edu/SolarRadiationBasics.html, Eqs. SR1 and SR2 .. [3] Partridge, G. W. and Platt, C. M. R. 1976. Radiative Processes @@ -162,9 +162,9 @@ def aoi_projection(surface_tilt, surface_azimuth, solar_zenith, solar_azimuth): Parameters ---------- surface_tilt : numeric - Panel tilt from horizontal [°]. See :term:`surface_tilt`. + Panel tilt from horizontal. [°] See :term:`surface_tilt`. surface_azimuth : numeric - Panel azimuth from north [°]. See :term:`surface_azimuth`. + Panel azimuth from north. [°] See :term:`surface_azimuth`. solar_zenith : numeric Solar zenith angle. See :term:`solar_zenith`. solar_azimuth : numeric @@ -203,18 +203,18 @@ def aoi(surface_tilt, surface_azimuth, solar_zenith, solar_azimuth): Parameters ---------- surface_tilt : numeric - Panel tilt from horizontal [°]. See :term:`surface_tilt`. + Panel tilt from horizontal. [°] See :term:`surface_tilt`. surface_azimuth : numeric - Panel azimuth from north [°]. See :term:`surface_azimuth`. + Panel azimuth from north. [°] See :term:`surface_azimuth`. solar_zenith : numeric - Solar zenith angle [°]. See :term:`solar_zenith`. + Solar zenith angle. [°] See :term:`solar_zenith`. solar_azimuth : numeric - Solar azimuth angle [°]. See :term:`solar_azimuth`. + Solar azimuth angle. [°] See :term:`solar_azimuth`. Returns ------- aoi : numeric - Angle of incidence [°]. See :term:`aoi`. + Angle of incidence. [°] See :term:`aoi`. """ projection = aoi_projection(surface_tilt, surface_azimuth, @@ -237,20 +237,20 @@ def beam_component(surface_tilt, surface_azimuth, solar_zenith, solar_azimuth, Parameters ---------- surface_tilt : numeric - Panel tilt from horizontal [°]. See :term:`surface_tilt`. + Panel tilt from horizontal. [°] See :term:`surface_tilt`. surface_azimuth : numeric - Panel azimuth from north [°]. See :term:`surface_azimuth`. + Panel azimuth from north. [°] See :term:`surface_azimuth`. solar_zenith : numeric - Solar zenith angle [°]. See :term:`solar_zenith`. + Solar zenith angle. [°] See :term:`solar_zenith`. solar_azimuth : numeric - Solar azimuth angle [°]. See :term:`solar_azimuth`. + Solar azimuth angle. [°] See :term:`solar_azimuth`. dni : numeric - Direct normal irradiance [Wm⁻²]. See :term:`dni`. + Direct normal irradiance. [Wm⁻²] See :term:`dni`. Returns ------- beam : numeric - Beam component [Wm⁻²]. + Beam component. [Wm⁻²] """ beam = dni * aoi_projection(surface_tilt, surface_azimuth, solar_zenith, solar_azimuth) @@ -285,27 +285,27 @@ def get_total_irradiance(surface_tilt, surface_azimuth, Parameters ---------- surface_tilt : numeric - Panel tilt from horizontal [°]. See :term:`surface_tilt`. + Panel tilt from horizontal. [°] See :term:`surface_tilt`. surface_azimuth : numeric - Panel azimuth from north [°]. See :term:`surface_azimuth`. + Panel azimuth from north. [°] See :term:`surface_azimuth`. solar_zenith : numeric - Solar zenith angle [°]. See :term:`solar_zenith`. + Solar zenith angle. [°] See :term:`solar_zenith`. solar_azimuth : numeric - Solar azimuth angle [°]. See :term:`solar_azimuth`. + Solar azimuth angle. [°] See :term:`solar_azimuth`. dni : numeric - Direct normal irradiance [Wm⁻²]. See :term:`dni`. + Direct normal irradiance. [Wm⁻²] See :term:`dni`. ghi : numeric - Global horizontal irradiance [Wm⁻²]. See :term:`ghi`. + Global horizontal irradiance. [Wm⁻²] See :term:`ghi`. dhi : numeric - Diffuse horizontal irradiance [Wm⁻²]. See :term:`dhi`. + Diffuse horizontal irradiance. [Wm⁻²] See :term:`dhi`. dni_extra : numeric, optional - Extraterrestrial direct normal irradiance [Wm⁻²]. + Extraterrestrial direct normal irradiance. [Wm⁻²] See :term:`dni_extra`. airmass : numeric, optional - Relative airmass (not adjusted for pressure) [unitless]. + Relative airmass (not adjusted for pressure). [unitless] See :term:`airmass`. albedo : numeric, default 0.25 - Ground surface albedo [unitless]. See :term:`albedo`. + Ground surface albedo. [unitless] See :term:`albedo`. surface_type : str, optional Surface type. See :py:func:`~pvlib.irradiance.get_ground_diffuse` for the list of accepted values. @@ -366,24 +366,24 @@ def get_sky_diffuse(surface_tilt, surface_azimuth, Parameters ---------- surface_tilt : numeric - Panel tilt from horizontal [°]. See :term:`surface_tilt`. + Panel tilt from horizontal. [°] See :term:`surface_tilt`. surface_azimuth : numeric - Panel azimuth from north [°]. See :term:`surface_azimuth`. + Panel azimuth from north. [°] See :term:`surface_azimuth`. solar_zenith : numeric - Solar zenith angle [°]. See :term:`solar_zenith`. + Solar zenith angle. [°] See :term:`solar_zenith`. solar_azimuth : numeric - Solar azimuth angle [°]. See :term:`solar_azimuth`. + Solar azimuth angle. [°] See :term:`solar_azimuth`. dni : numeric - Direct normal irradiance [Wm⁻²]. See :term:`dni`. + Direct normal irradiance. [Wm⁻²] See :term:`dni`. ghi : numeric - Global horizontal irradiance [Wm⁻²]. See :term:`ghi`. + Global horizontal irradiance. [Wm⁻²] See :term:`ghi`. dhi : numeric - Diffuse horizontal irradiance [Wm⁻²]. See :term:`dhi`. + Diffuse horizontal irradiance. [Wm⁻²] See :term:`dhi`. dni_extra : numeric, optional - Extraterrestrial direct normal irradiance [Wm⁻²]. + Extraterrestrial direct normal irradiance. [Wm⁻²] See :term:`dni_extra`. airmass : numeric, optional - Relative airmass (not adjusted for pressure) [unitless]. + Relative airmass (not adjusted for pressure). [unitless] See :term:`airmass`. model : str, default 'isotropic' Irradiance model. Can be one of ``'isotropic'``, ``'klucher'``, @@ -395,7 +395,7 @@ def get_sky_diffuse(surface_tilt, surface_azimuth, Returns ------- poa_sky_diffuse : numeric - Sky diffuse irradiance in the plane of array [Wm⁻²]. + Sky diffuse irradiance in the plane of array. [Wm⁻²] Raises ------ @@ -465,10 +465,10 @@ def poa_components(aoi, dni, poa_sky_diffuse, poa_ground_diffuse): ---------- aoi : numeric Angle of incidence of solar rays with respect to the module - surface, from :func:`aoi` [°]. See :term:`aoi`. + surface, from :func:`aoi`. [°] See :term:`aoi`. dni : numeric - Direct normal irradiance [Wm⁻²], as measured from a TMY file or + Direct normal irradiance. [Wm⁻²], as measured from a TMY file or calculated with a clearsky model. See :term:`dni`. poa_sky_diffuse : numeric @@ -484,12 +484,12 @@ def poa_components(aoi, dni, poa_sky_diffuse, poa_ground_diffuse): irrads : OrderedDict or DataFrame Contains the following keys: - * ``poa_global`` : Total in-plane irradiance [Wm⁻²] - * ``poa_direct`` : Total in-plane beam irradiance [Wm⁻²] - * ``poa_diffuse`` : Total in-plane diffuse irradiance [Wm⁻²] - * ``poa_sky_diffuse`` : In-plane diffuse irradiance from sky [Wm⁻²] + * ``poa_global`` : Total in-plane irradiance. [Wm⁻²] + * ``poa_direct`` : Total in-plane beam irradiance. [Wm⁻²] + * ``poa_diffuse`` : Total in-plane diffuse irradiance. [Wm⁻²] + * ``poa_sky_diffuse`` : In-plane diffuse irradiance from sky. [Wm⁻²] * ``poa_ground_diffuse`` : In-plane diffuse irradiance from ground - [Wm⁻²] + . [Wm⁻²] Notes ------ @@ -534,7 +534,7 @@ def get_ground_diffuse(surface_tilt, ghi, albedo=.25, surface_type=None): (e.g. surface facing up = 0, surface facing horizon = 90). ghi : numeric - Global horizontal irradiance [Wm⁻²]. + Global horizontal irradiance. [Wm⁻²] albedo : numeric, default 0.25 Ground reflectance, typically 0.1-0.4 for surfaces on Earth @@ -551,7 +551,7 @@ def get_ground_diffuse(surface_tilt, ghi, albedo=.25, surface_type=None): Returns ------- grounddiffuse : numeric - Ground reflected irradiance [Wm⁻²]. + Ground reflected irradiance. [Wm⁻²] Notes ----- @@ -607,7 +607,7 @@ def isotropic(surface_tilt, dhi): (e.g. surface facing up = 0, surface facing horizon = 90) dhi : numeric - Diffuse horizontal irradiance [Wm⁻²]. DHI must be >=0. + Diffuse horizontal irradiance. [Wm⁻²] DHI must be >=0. Returns ------- @@ -650,10 +650,10 @@ def klucher(surface_tilt, surface_azimuth, dhi, ghi, solar_zenith, east of north (e.g. North = 0, South=180 East = 90, West = 270). dhi : numeric - Diffuse horizontal irradiance, must be >=0 [Wm⁻²]. + Diffuse horizontal irradiance, must be >=0. [Wm⁻²] ghi : numeric - Global horizontal irradiance, must be >=0 [Wm⁻²]. + Global horizontal irradiance, must be >=0. [Wm⁻²] solar_zenith : numeric Apparent (refraction-corrected) zenith angles in decimal @@ -667,7 +667,7 @@ def klucher(surface_tilt, surface_azimuth, dhi, ghi, solar_zenith, Returns ------- diffuse : numeric - The sky diffuse component of the solar radiation [Wm⁻²]. + The sky diffuse component of the solar radiation. [Wm⁻²] Notes ----- @@ -754,13 +754,13 @@ def haydavies(surface_tilt, surface_azimuth, dhi, dni, dni_extra, South=180, East=90, West=270). dhi : numeric - Diffuse horizontal irradiance [Wm⁻²]. + Diffuse horizontal irradiance. [Wm⁻²] dni : numeric - Direct normal irradiance, see :term:`dni` [Wm⁻²]. + Direct normal irradiance, see :term:`dni`. [Wm⁻²] dni_extra : numeric - Extraterrestrial normal irradiance [Wm⁻²]. + Extraterrestrial normal irradiance. [Wm⁻²] solar_zenith : numeric, optional Solar apparent (refraction-corrected) zenith angles in decimal @@ -897,16 +897,16 @@ def reindl(surface_tilt, surface_azimuth, dhi, dni, ghi, dni_extra, South=180 East = 90, West = 270). dhi : numeric - diffuse horizontal irradiance [Wm⁻²]. + diffuse horizontal irradiance. [Wm⁻²] dni : numeric - direct normal irradiance [Wm⁻²]. + direct normal irradiance. [Wm⁻²] ghi: numeric - Global horizontal irradiance [Wm⁻²]. + Global horizontal irradiance. [Wm⁻²] dni_extra : numeric - Extraterrestrial normal irradiance [Wm⁻²]. + Extraterrestrial normal irradiance. [Wm⁻²] solar_zenith : numeric Apparent (refraction-corrected) zenith angles in decimal degrees. @@ -1009,10 +1009,10 @@ def king(surface_tilt, dhi, ghi, solar_zenith): surface facing horizon = 90) dhi : numeric - Diffuse horizontal irradiance [Wm⁻²]. + Diffuse horizontal irradiance. [Wm⁻²] ghi : numeric - Global horizontal irradiance [Wm⁻²]. + Global horizontal irradiance. [Wm⁻²] solar_zenith : numeric Apparent (refraction-corrected) zenith angles in decimal degrees. @@ -1066,13 +1066,13 @@ def perez(surface_tilt, surface_azimuth, dhi, dni, dni_extra, east of north (e.g. North = 0, South=180 East = 90, West = 270). dhi : numeric - Diffuse horizontal irradiance [Wm⁻²]. DHI must be >=0. + Diffuse horizontal irradiance. [Wm⁻²] DHI must be >=0. dni : numeric - Direct normal irradiance [Wm⁻²]. DNI must be >=0. + Direct normal irradiance. [Wm⁻²] DNI must be >=0. dni_extra : numeric - Extraterrestrial normal irradiance [Wm⁻²]. + Extraterrestrial normal irradiance. [Wm⁻²] solar_zenith : numeric apparent (refraction-corrected) zenith angles in decimal @@ -1332,13 +1332,13 @@ def perez_driesse(surface_tilt, surface_azimuth, dhi, dni, dni_extra, east of north (e.g. North = 0, South=180 East = 90, West = 270). dhi : numeric - Diffuse horizontal irradiance [Wm⁻²]. dhi must be >=0. + Diffuse horizontal irradiance. [Wm⁻²] dhi must be >=0. dni : numeric - Direct normal irradiance [Wm⁻²]. dni must be >=0. + Direct normal irradiance. [Wm⁻²] dni must be >=0. dni_extra : numeric - Extraterrestrial normal irradiance [Wm⁻²]. + Extraterrestrial normal irradiance. [Wm⁻²] solar_zenith : numeric apparent (refraction-corrected) zenith angles in decimal @@ -1384,7 +1384,7 @@ def perez_driesse(surface_tilt, surface_azimuth, dhi, dni, dni_extra, 1990 Perez model using the ``'allsitescomposite1990'`` coefficient set. Deviations between the two are very small, as demonstrated in [1]_. Other coefficient sets are not supported because the 1990 set is - based on the largest and most diverse set of empirical data. + based on the largest and most diverse set of empirical data References ---------- @@ -1553,16 +1553,16 @@ def ghi_from_poa_driesse_2023(surface_tilt, surface_azimuth, solar_azimuth : numeric Solar azimuth angle. [°] poa_global : numeric - Plane-of-array global irradiance, aka global tilted irradiance [Wm⁻²]. + Plane-of-array global irradiance, aka global tilted irradiance. [Wm⁻²] dni_extra : numeric, optional - Extraterrestrial direct normal irradiance [Wm⁻²]. + Extraterrestrial direct normal irradiance. [Wm⁻²] airmass : numeric, optional - Relative airmass (not adjusted for pressure) [unitless]. + Relative airmass (not adjusted for pressure). [unitless] albedo : numeric, default 0.25 - Ground surface albedo [unitless]. + Ground surface albedo. [unitless] xtol : numeric, default 0.01 Convergence criterion. The estimated GHI will be within xtol of the - true value. Must be positive [Wm⁻²]. + true value. Must be positive. [Wm⁻²] full_output : boolean, default False If full_output is False, only ghi is returned, otherwise the return value is (ghi, converged, niter). (see Returns section for details). @@ -1570,7 +1570,7 @@ def ghi_from_poa_driesse_2023(surface_tilt, surface_azimuth, Returns ------- ghi : numeric - Estimated GHI [Wm⁻²]. + Estimated GHI. [Wm⁻²] converged : boolean, optional Present if full_output=True. Indicates which elements converged successfully. @@ -1629,14 +1629,14 @@ def clearsky_index(ghi, clearsky_ghi, max_clearsky_index=2.0): Parameters ---------- ghi : numeric - Global horizontal irradiance [Wm⁻²]. + Global horizontal irradiance. [Wm⁻²] clearsky_ghi : numeric Modeled clearsky GHI max_clearsky_index : numeric, default 2.0 Maximum value of the clearsky index. The default, 2.0, allows - for over-irradiance events typically seen in sub-hourly data. + for over-irradiance events typically seen in sub-hourly data Returns ------- @@ -1672,7 +1672,7 @@ def clearness_index(ghi, solar_zenith, extra_radiation, min_cos_zenith=0.065, Parameters ---------- ghi : numeric - Global horizontal irradiance [Wm⁻²]. + Global horizontal irradiance. [Wm⁻²] solar_zenith : numeric True (not refraction-corrected) solar zenith angle in decimal @@ -1687,8 +1687,8 @@ def clearness_index(ghi, solar_zenith, extra_radiation, min_cos_zenith=0.065, max_clearness_index : numeric, default 2.0 Maximum value of the clearness index. The default, 2.0, allows - for over-irradiance events typically seen in sub-hourly data. - NREL's SRRL Fortran code used 0.82 for hourly data. + for over-irradiance events typically seen in sub-hourly data + NREL's SRRL Fortran code used 0.82 for hourly data Returns ------- @@ -1732,8 +1732,8 @@ def clearness_index_zenith_independent(clearness_index, airmass, max_clearness_index : numeric, default 2.0 Maximum value of the clearness index. The default, 2.0, allows - for over-irradiance events typically seen in sub-hourly data. - NREL's SRRL Fortran code used 0.82 for hourly data. + for over-irradiance events typically seen in sub-hourly data + NREL's SRRL Fortran code used 0.82 for hourly data Returns ------- @@ -1785,7 +1785,7 @@ def disc(ghi, solar_zenith, datetime_or_doy, pressure=101325, Parameters ---------- ghi : numeric - Global horizontal irradiance [Wm⁻²]. + Global horizontal irradiance. [Wm⁻²] solar_zenith : numeric True (not refraction-corrected) solar zenith angles in decimal @@ -1931,7 +1931,7 @@ def dirint(ghi, solar_zenith, times, pressure=101325., use_delta_kt_prime=True, Parameters ---------- ghi : array-like - Global horizontal irradiance [Wm⁻²]. + Global horizontal irradiance. [Wm⁻²] solar_zenith : array-like True (not refraction-corrected) solar_zenith angles in decimal @@ -2173,13 +2173,13 @@ def dirindex(ghi, ghi_clearsky, dni_clearsky, zenith, times, pressure=101325., Parameters ---------- ghi : array-like - Global horizontal irradiance [Wm⁻²]. + Global horizontal irradiance. [Wm⁻²] ghi_clearsky : array-like - Global horizontal irradiance from clear sky model [Wm⁻²]. + Global horizontal irradiance from clear sky model. [Wm⁻²] dni_clearsky : array-like - Direct normal irradiance from clear sky model [Wm⁻²]. + Direct normal irradiance from clear sky model. [Wm⁻²] zenith : array-like True (not refraction-corrected) zenith angles in decimal @@ -2218,7 +2218,7 @@ def dirindex(ghi, ghi_clearsky, dni_clearsky, zenith, times, pressure=101325., Returns ------- dni : array-like - The modeled direct normal irradiance [Wm⁻²]. + The modeled direct normal irradiance. [Wm⁻²] Notes ----- @@ -2270,7 +2270,7 @@ def gti_dirint(poa_global, aoi, solar_zenith, solar_azimuth, times, Parameters ---------- poa_global : array-like - Plane of array global irradiance [Wm⁻²]. + Plane of array global irradiance. [Wm⁻²] aoi : array-like Angle of incidence of solar rays with respect to the module @@ -2284,7 +2284,7 @@ def gti_dirint(poa_global, aoi, solar_zenith, solar_azimuth, times, Solar azimuth angles in decimal degrees. times : DatetimeIndex - Time indices for the input array-like data. + Time indices for the input array-like data surface_tilt : numeric Surface tilt angles in decimal degrees. Tilt must be >=0 and @@ -2316,7 +2316,7 @@ def gti_dirint(poa_global, aoi, solar_zenith, solar_azimuth, times, applied. albedo : numeric, default 0.25 - Ground surface albedo [unitless]. + Ground surface albedo. [unitless] model : String, default 'perez' Irradiance model. See :py:func:`get_sky_diffuse` for allowed values. @@ -2337,8 +2337,8 @@ def gti_dirint(poa_global, aoi, solar_zenith, solar_azimuth, times, data : DataFrame Contains the following keys/columns: - * ``ghi``: the modeled global horizontal irradiance [Wm⁻²]. - * ``dni``: the modeled direct normal irradiance [Wm⁻²]. + * ``ghi``: the modeled global horizontal irradiance. [Wm⁻²] + * ``dni``: the modeled direct normal irradiance. [Wm⁻²] * ``dhi``: the modeled diffuse horizontal irradiance in Wm⁻². @@ -2569,7 +2569,7 @@ def _gti_dirint_gte_90_kt_prime(aoi, solar_zenith, solar_azimuth, times, kt_prime_am_avg = data[aoi_65_80_morning].mean() kt_prime_pm_avg = data[aoi_65_80_afternoon].mean() - kt_prime_by_date = pd.Series(np.nan, index=data.index) + kt_prime_by_date = pd.Series(np.nan, index=dataindex) kt_prime_by_date[zenith_lt_90_aoi_gte_90_morning] = kt_prime_am_avg kt_prime_by_date[zenith_lt_90_aoi_gte_90_afternoon] = kt_prime_pm_avg kt_prime_gte_90.append(kt_prime_by_date) @@ -2602,7 +2602,7 @@ def erbs(ghi, zenith, datetime_or_doy, min_cos_zenith=0.065, max_zenith=87): Parameters ---------- ghi: numeric - Global horizontal irradiance [Wm⁻²]. + Global horizontal irradiance. [Wm⁻²] zenith: numeric True (not refraction-corrected) zenith angles in decimal degrees. datetime_or_doy : int, float, array, pd.DatetimeIndex @@ -2620,7 +2620,7 @@ def erbs(ghi, zenith, datetime_or_doy, min_cos_zenith=0.065, max_zenith=87): data : OrderedDict or DataFrame Contains the following keys/columns: - * ``dni``: the modeled direct normal irradiance [Wm⁻²]. + * ``dni``: the modeled direct normal irradiance. [Wm⁻²] * ``dhi``: the modeled diffuse horizontal irradiance in Wm⁻². * ``kt``: Ratio of global to extraterrestrial irradiance @@ -2700,7 +2700,7 @@ def erbs_driesse(ghi, zenith, datetime_or_doy=None, dni_extra=None, Parameters ---------- ghi: numeric - Global horizontal irradiance [Wm⁻²]. + Global horizontal irradiance. [Wm⁻²] zenith: numeric True (not refraction-corrected) zenith angles in decimal degrees. datetime_or_doy : int, float, array or pd.DatetimeIndex, optional @@ -2723,7 +2723,7 @@ def erbs_driesse(ghi, zenith, datetime_or_doy=None, dni_extra=None, data : OrderedDict or DataFrame Contains the following keys/columns: - * ``dni``: the modeled direct normal irradiance [Wm⁻²]. + * ``dni``: the modeled direct normal irradiance. [Wm⁻²] * ``dhi``: the modeled diffuse horizontal irradiance in Wm⁻². * ``kt``: Ratio of global to extraterrestrial irradiance @@ -2821,14 +2821,14 @@ def orgill_hollands(ghi, zenith, datetime_or_doy, dni_extra=None, Parameters ---------- ghi: numeric - Global horizontal irradiance [Wm⁻²]. + Global horizontal irradiance. [Wm⁻²] zenith: numeric True (not refraction-corrected) zenith angles in decimal degrees. datetime_or_doy : int, float, array, pd.DatetimeIndex Day of year or array of days of year e.g. pd.DatetimeIndex.dayofyear, or pd.DatetimeIndex. dni_extra : numeric, optional - Extraterrestrial direct normal irradiance [Wm⁻²]. + Extraterrestrial direct normal irradiance. [Wm⁻²] min_cos_zenith : numeric, default 0.065 Minimum value of cos(zenith) to allow when calculating global clearness index `kt`. Equivalent to zenith = 86.273 degrees. @@ -2841,7 +2841,7 @@ def orgill_hollands(ghi, zenith, datetime_or_doy, dni_extra=None, data : OrderedDict or DataFrame Contains the following keys/columns: - * ``dni``: the modeled direct normal irradiance [Wm⁻²]. + * ``dni``: the modeled direct normal irradiance. [Wm⁻²] * ``dhi``: the modeled diffuse horizontal irradiance in Wm⁻². * ``kt``: Ratio of global to extraterrestrial irradiance @@ -2914,7 +2914,7 @@ def boland(ghi, solar_zenith, datetime_or_doy, a_coeff=8.645, b_coeff=0.613, Parameters ---------- ghi: numeric - Global horizontal irradiance [Wm⁻²]. + Global horizontal irradiance. [Wm⁻²] solar_zenith: numeric True (not refraction-corrected) zenith angles in decimal degrees. datetime_or_doy : numeric, pandas.DatetimeIndex @@ -2936,7 +2936,7 @@ def boland(ghi, solar_zenith, datetime_or_doy, a_coeff=8.645, b_coeff=0.613, data : OrderedDict or DataFrame Contains the following keys/columns: - * ``dni``: the modeled direct normal irradiance [Wm⁻²]. + * ``dni``: the modeled direct normal irradiance. [Wm⁻²] * ``dhi``: the modeled diffuse horizontal irradiance in Wm⁻². * ``kt``: Ratio of global to extraterrestrial irradiance @@ -3708,7 +3708,7 @@ def complete_irradiance(solar_zenith, Parameters ---------- solar_zenith : series - Solar zenith angle [°], with datetime index. + Solar zenith angle. [°], with datetime index. Angles must be >=0 and <=180. Must have the same datetime index as ghi, dhi, and dni series, when available. See :term:`solar_zenith`. ghi : Series, optional @@ -3724,7 +3724,7 @@ def complete_irradiance(solar_zenith, same datetime index as ghi, dhi, and zenith series, when available. See :term:`dni`. dni_clear : Series, optional - Pandas series of clearsky dni data [Wm⁻²]. Must have the same datetime + Pandas series of clearsky dni data [Wm⁻²] Must have the same datetime index as ghi, dhi, dni, and zenith series, when available. See :py:func:`dni` for details. See :term:`dni_clear` for glossary definition. @@ -3735,7 +3735,7 @@ def complete_irradiance(solar_zenith, poa_global : numeric Plane-of-array global irradiance, aka global tilted irradiance . dni_extra : numeric, optional - Extraterrestrial direct normal irradiance [Wm⁻²]. + Extraterrestrial direct normal irradiance. [Wm⁻²] Returns ------- component_sum_df : Dataframe @@ -3769,10 +3769,10 @@ def louche(ghi, solar_zenith, datetime_or_doy, max_zenith=90): Parameters ---------- ghi : numeric - Global horizontal irradiance [Wm⁻²]. See :term:`ghi`. + Global horizontal irradiance. [Wm⁻²] See :term:`ghi`. solar_zenith : numeric - True (not refraction-corrected) zenith angles [°]. + True (not refraction-corrected) zenith angles. [°] Angles must be >=0° and <=90°. See :term:`solar_zenith`. datetime_or_doy : numeric, pandas.DatetimeIndex @@ -3784,8 +3784,8 @@ def louche(ghi, solar_zenith, datetime_or_doy, max_zenith=90): data: OrderedDict or DataFrame Contains the following keys/columns: - * ``dni``: the modeled direct normal irradiance [Wm⁻²]. See :term:`dni` - * ``dhi``: the modeled diffuse horizontal irradiance [Wm⁻²]. + * ``dni``: the modeled direct normal irradiance. [Wm⁻²] See :term:`dni` + * ``dhi``: the modeled diffuse horizontal irradiance. [Wm⁻²] See :term:`dhi` * ``kt``: Clearness index [unitless], ratio of global to extraterrestrial irradiance on a horizontal plane. @@ -3838,17 +3838,17 @@ def diffuse_par_spitters(daily_solar_zenith, global_diffuse_fraction): Parameters ---------- daily_solar_zenith : numeric - Average daily solar zenith angle [°]. + Average daily solar zenith angle. [°] global_diffuse_fraction : numeric Fraction of daily global broadband insolation that is diffuse. - Unitless [0, 1]. + Unitless [0, 1] Returns ------- par_diffuse_fraction : numeric Fraction of daily photosynthetically active radiation (PAR) that is - diffuse. Unitless [0, 1]. + diffuse. Unitless [0, 1] Notes ----- From 2d219a342c0421fff2ce78c48981d94c0bd6a0fc Mon Sep 17 00:00:00 2001 From: RDaxini <143435106+RDaxini@users.noreply.github.com> Date: Fri, 3 Jan 2025 10:55:04 -0700 Subject: [PATCH 5/9] Update pvlib/irradiance.py Co-authored-by: Adam R. Jensen <39184289+AdamRJensen@users.noreply.github.com> --- pvlib/irradiance.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pvlib/irradiance.py b/pvlib/irradiance.py index 4a20aee25c..9b167644d5 100644 --- a/pvlib/irradiance.py +++ b/pvlib/irradiance.py @@ -58,8 +58,8 @@ def get_extra_radiation(datetime_or_doy, solar_constant=1366.1, Returns ------- dni_extra : float, array, or Series - The extraterrestrial radiation present in watts per square meter - on a surface which is normal to the sun. Pandas Timestamp and + The extraterrestrial radiation normal to the sun. [Wm⁻²] + Pandas Timestamp and DatetimeIndex inputs will yield a Pandas TimeSeries. All other inputs will yield a float or an array of floats. See :term:`dni_extra`. From 7c6bb5da8d4e5fe09957be29e79449575fd0b0db Mon Sep 17 00:00:00 2001 From: RDaxini Date: Fri, 3 Jan 2025 11:01:18 -0700 Subject: [PATCH 6/9] =?UTF-8?q?in=20decimal=20degrees=20->=20[=C2=B0]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pvlib/irradiance.py | 50 ++++++++++++++++++++++----------------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/pvlib/irradiance.py b/pvlib/irradiance.py index 52cc65cf4f..d1a105aab4 100644 --- a/pvlib/irradiance.py +++ b/pvlib/irradiance.py @@ -529,7 +529,7 @@ def get_ground_diffuse(surface_tilt, ghi, albedo=.25, surface_type=None): Parameters ---------- surface_tilt : numeric - Surface tilt angles in decimal degrees. Tilt must be >=0 and + Surface tilt angles. [°] Tilt must be >=0 and <=180. The tilt angle is defined as degrees from horizontal (e.g. surface facing up = 0, surface facing horizon = 90). @@ -640,12 +640,12 @@ def klucher(surface_tilt, surface_azimuth, dhi, ghi, solar_zenith, Parameters ---------- surface_tilt : numeric - Surface tilt angles in decimal degrees. ``surface_tilt`` must be >=0 + Surface tilt angles. [°] ``surface_tilt`` must be >=0 and <=180. The tilt angle is defined as degrees from horizontal (e.g. surface facing up = 0, surface facing horizon = 90) surface_azimuth : numeric - Surface azimuth angles in decimal degrees. ``surface_azimuth`` must + Surface azimuth angles. [°] ``surface_azimuth`` must be >=0 and <=360. The Azimuth convention is defined as degrees east of north (e.g. North = 0, South=180 East = 90, West = 270). @@ -660,7 +660,7 @@ def klucher(surface_tilt, surface_azimuth, dhi, ghi, solar_zenith, degrees. ``solar_zenith`` must be >=0 and <=180. solar_azimuth : numeric - Sun azimuth angles in decimal degrees. ``solar_azimuth`` must be >=0 + Sun azimuth angles. [°] ``solar_azimuth`` must be >=0 and <=360. The Azimuth convention is defined as degrees east of north (e.g. North = 0, East = 90, West = 270). @@ -749,7 +749,7 @@ def haydavies(surface_tilt, surface_azimuth, dhi, dni, dni_extra, :term:`surface_tilt`. surface_azimuth : numeric - Surface azimuth angles in decimal degrees. The azimuth + Surface azimuth angles. [°] The azimuth convention is defined as degrees east of north (e.g. North=0, South=180, East=90, West=270). @@ -768,7 +768,7 @@ def haydavies(surface_tilt, surface_azimuth, dhi, dni, dni_extra, supply ``projection_ratio``. solar_azimuth : numeric, optional - Solar azimuth angles in decimal degrees. Must supply + Solar azimuth angles. [°] Must supply ``solar_zenith`` and ``solar_azimuth`` or supply ``projection_ratio``. @@ -887,12 +887,12 @@ def reindl(surface_tilt, surface_azimuth, dhi, dni, ghi, dni_extra, Parameters ---------- surface_tilt : numeric - Surface tilt angles in decimal degrees. The tilt angle is + Surface tilt angles. [°] The tilt angle is defined as degrees from horizontal (e.g. surface facing up = 0, surface facing horizon = 90) surface_azimuth : numeric - Surface azimuth angles in decimal degrees. The azimuth + Surface azimuth angles. [°] The azimuth convention is defined as degrees east of north (e.g. North = 0, South=180 East = 90, West = 270). @@ -909,10 +909,10 @@ def reindl(surface_tilt, surface_azimuth, dhi, dni, ghi, dni_extra, Extraterrestrial normal irradiance. [Wm⁻²] solar_zenith : numeric - Apparent (refraction-corrected) zenith angles in decimal degrees. + Apparent (refraction-corrected) zenith angles. [°] solar_azimuth : numeric - Sun azimuth angles in decimal degrees. The azimuth convention is + Sun azimuth angles. [°] The azimuth convention is defined as degrees east of north (e.g. North = 0, East = 90, West = 270). @@ -1004,7 +1004,7 @@ def king(surface_tilt, dhi, ghi, solar_zenith): Parameters ---------- surface_tilt : numeric - Surface tilt angles in decimal degrees. The tilt angle is + Surface tilt angles. [°] The tilt angle is defined as degrees from horizontal (e.g. surface facing up = 0, surface facing horizon = 90) @@ -1015,7 +1015,7 @@ def king(surface_tilt, dhi, ghi, solar_zenith): Global horizontal irradiance. [Wm⁻²] solar_zenith : numeric - Apparent (refraction-corrected) zenith angles in decimal degrees. + Apparent (refraction-corrected) zenith angles. [°] Returns -------- @@ -1056,12 +1056,12 @@ def perez(surface_tilt, surface_azimuth, dhi, dni, dni_extra, Parameters ---------- surface_tilt : numeric - Surface tilt angles in decimal degrees. surface_tilt must be >=0 + Surface tilt angles. [°] surface_tilt must be >=0 and <=180. The tilt angle is defined as degrees from horizontal (e.g. surface facing up = 0, surface facing horizon = 90) surface_azimuth : numeric - Surface azimuth angles in decimal degrees. surface_azimuth must + Surface azimuth angles. [°] surface_azimuth must be >=0 and <=360. The azimuth convention is defined as degrees east of north (e.g. North = 0, South=180 East = 90, West = 270). @@ -1079,7 +1079,7 @@ def perez(surface_tilt, surface_azimuth, dhi, dni, dni_extra, degrees. solar_zenith must be >=0 and <=180. solar_azimuth : numeric - Sun azimuth angles in decimal degrees. solar_azimuth must be >=0 + Sun azimuth angles. [°] solar_azimuth must be >=0 and <=360. The azimuth convention is defined as degrees east of north (e.g. North = 0, East = 90, West = 270). @@ -1322,12 +1322,12 @@ def perez_driesse(surface_tilt, surface_azimuth, dhi, dni, dni_extra, Parameters ---------- surface_tilt : numeric - Surface tilt angles in decimal degrees. surface_tilt must be >=0 + Surface tilt angles. [°] surface_tilt must be >=0 and <=180. The tilt angle is defined as degrees from horizontal (e.g. surface facing up = 0, surface facing horizon = 90) surface_azimuth : numeric - Surface azimuth angles in decimal degrees. surface_azimuth must + Surface azimuth angles. [°] surface_azimuth must be >=0 and <=360. The azimuth convention is defined as degrees east of north (e.g. North = 0, South=180 East = 90, West = 270). @@ -1345,7 +1345,7 @@ def perez_driesse(surface_tilt, surface_azimuth, dhi, dni, dni_extra, degrees. solar_zenith must be >=0 and <=180. solar_azimuth : numeric - Sun azimuth angles in decimal degrees. solar_azimuth must be >=0 + Sun azimuth angles. [°] solar_azimuth must be >=0 and <=360. The azimuth convention is defined as degrees east of north (e.g. North = 0, East = 90, West = 270). @@ -2305,18 +2305,18 @@ def gti_dirint(poa_global, aoi, solar_zenith, solar_azimuth, times, degrees. solar_azimuth : array-like - Solar azimuth angles in decimal degrees. + Solar azimuth angles. [°] times : DatetimeIndex Time indices for the input array-like data surface_tilt : numeric - Surface tilt angles in decimal degrees. Tilt must be >=0 and + Surface tilt angles. [°] Tilt must be >=0 and <=180. The tilt angle is defined as degrees from horizontal (e.g. surface facing up = 0, surface facing horizon = 90). surface_azimuth : numeric - Surface azimuth angles in decimal degrees. surface_azimuth must + Surface azimuth angles. [°] surface_azimuth must be >=0 and <=360. The Azimuth convention is defined as degrees east of north (e.g. North = 0, South=180 East = 90, West = 270). @@ -2628,7 +2628,7 @@ def erbs(ghi, zenith, datetime_or_doy, min_cos_zenith=0.065, max_zenith=87): ghi: numeric Global horizontal irradiance. [Wm⁻²] zenith: numeric - True (not refraction-corrected) zenith angles in decimal degrees. + True (not refraction-corrected) zenith angles. [°] datetime_or_doy : int, float, array, pd.DatetimeIndex Day of year or array of days of year e.g. pd.DatetimeIndex.dayofyear, or pd.DatetimeIndex. @@ -2726,7 +2726,7 @@ def erbs_driesse(ghi, zenith, datetime_or_doy=None, dni_extra=None, ghi: numeric Global horizontal irradiance. [Wm⁻²] zenith: numeric - True (not refraction-corrected) zenith angles in decimal degrees. + True (not refraction-corrected) zenith angles. [°] datetime_or_doy : int, float, array or pd.DatetimeIndex, optional Day of year or array of days of year e.g. pd.DatetimeIndex.dayofyear, or pd.DatetimeIndex. @@ -2847,7 +2847,7 @@ def orgill_hollands(ghi, zenith, datetime_or_doy, dni_extra=None, ghi: numeric Global horizontal irradiance. [Wm⁻²] zenith: numeric - True (not refraction-corrected) zenith angles in decimal degrees. + True (not refraction-corrected) zenith angles. [°] datetime_or_doy : int, float, array, pd.DatetimeIndex Day of year or array of days of year e.g. pd.DatetimeIndex.dayofyear, or pd.DatetimeIndex. @@ -2940,7 +2940,7 @@ def boland(ghi, solar_zenith, datetime_or_doy, a_coeff=8.645, b_coeff=0.613, ghi: numeric Global horizontal irradiance. [Wm⁻²] solar_zenith: numeric - True (not refraction-corrected) zenith angles in decimal degrees. + True (not refraction-corrected) zenith angles. [°] datetime_or_doy : numeric, pandas.DatetimeIndex Day of year or array of days of year e.g. pd.DatetimeIndex.dayofyear, or pd.DatetimeIndex. From 94ea3ab21c3376bab7eb5512b1017fc637210673 Mon Sep 17 00:00:00 2001 From: RDaxini Date: Fri, 3 Jan 2025 11:02:55 -0700 Subject: [PATCH 7/9] reinsert . --- pvlib/irradiance.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pvlib/irradiance.py b/pvlib/irradiance.py index d1a105aab4..ee36305e0f 100644 --- a/pvlib/irradiance.py +++ b/pvlib/irradiance.py @@ -2593,7 +2593,7 @@ def _gti_dirint_gte_90_kt_prime(aoi, solar_zenith, solar_azimuth, times, kt_prime_am_avg = data[aoi_65_80_morning].mean() kt_prime_pm_avg = data[aoi_65_80_afternoon].mean() - kt_prime_by_date = pd.Series(np.nan, index=dataindex) + kt_prime_by_date = pd.Series(np.nan, index=data.index) kt_prime_by_date[zenith_lt_90_aoi_gte_90_morning] = kt_prime_am_avg kt_prime_by_date[zenith_lt_90_aoi_gte_90_afternoon] = kt_prime_pm_avg kt_prime_gte_90.append(kt_prime_by_date) From 7e13249620e85da12094153b277ef7aa42f9cb28 Mon Sep 17 00:00:00 2001 From: RDaxini Date: Fri, 3 Jan 2025 20:02:30 -0700 Subject: [PATCH 8/9] Update irradiance.py --- pvlib/irradiance.py | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/pvlib/irradiance.py b/pvlib/irradiance.py index ee36305e0f..48874ce32f 100644 --- a/pvlib/irradiance.py +++ b/pvlib/irradiance.py @@ -534,7 +534,7 @@ def get_ground_diffuse(surface_tilt, ghi, albedo=.25, surface_type=None): (e.g. surface facing up = 0, surface facing horizon = 90). ghi : numeric - Global horizontal irradiance. [Wm⁻²] + Global horizontal irradiance. [Wm⁻²] albedo : numeric, default 0.25 Ground reflectance, typically 0.1-0.4 for surfaces on Earth @@ -602,12 +602,13 @@ def isotropic(surface_tilt, dhi): Parameters ---------- surface_tilt : numeric - Surface tilt angle in decimal degrees. Tilt must be >=0 and + Surface tilt angle. [°] Tilt must be >=0 and <=180. The tilt angle is defined as degrees from horizontal - (e.g. surface facing up = 0, surface facing horizon = 90) + (e.g. surface facing up = 0, surface facing horizon = 90). + See :term:`surface_tilt`. dhi : numeric - Diffuse horizontal irradiance. [Wm⁻²] DHI must be >=0. + Diffuse horizontal irradiance. [Wm⁻²] DHI must be >=0. See :term:`dhi`. Returns ------- @@ -656,8 +657,8 @@ def klucher(surface_tilt, surface_azimuth, dhi, ghi, solar_zenith, Global horizontal irradiance, must be >=0. [Wm⁻²] solar_zenith : numeric - Apparent (refraction-corrected) zenith angles in decimal - degrees. ``solar_zenith`` must be >=0 and <=180. + Apparent (refraction-corrected) zenith angles. [°] + ``solar_zenith`` must be >=0 and <=180. See :term:`solar_zenith`. solar_azimuth : numeric Sun azimuth angles. [°] ``solar_azimuth`` must be >=0 @@ -745,22 +746,21 @@ def haydavies(surface_tilt, surface_azimuth, dhi, dni, dni_extra, Parameters ---------- surface_tilt : numeric - Panel tilt from the horizontal, in decimal degrees, see - :term:`surface_tilt`. + Panel tilt from the horizontal. [°] See :term:`surface_tilt`. surface_azimuth : numeric Surface azimuth angles. [°] The azimuth convention is defined as degrees east of north (e.g. North=0, - South=180, East=90, West=270). + South=180, East=90, West=270). See :term:`surface_azimuth`. dhi : numeric - Diffuse horizontal irradiance. [Wm⁻²] + Diffuse horizontal irradiance. [Wm⁻²] See :term:`dhi`. dni : numeric Direct normal irradiance, see :term:`dni`. [Wm⁻²] dni_extra : numeric - Extraterrestrial normal irradiance. [Wm⁻²] + Extraterrestrial normal irradiance, see :term:`dni_extra`. [Wm⁻²] solar_zenith : numeric, optional Solar apparent (refraction-corrected) zenith angles in decimal @@ -3660,17 +3660,17 @@ def dni(ghi, dhi, zenith, dni_clear=None, clearsky_tolerance=1.1, Parameters ---------- ghi : Series - Global horizontal irradiance. + Global horizontal irradiance. [Wm⁻²] See :term:`ghi`. dhi : Series - Diffuse horizontal irradiance. + Diffuse horizontal irradiance. [Wm⁻²] See :term:`dhi`. zenith : Series True (not refraction-corrected) zenith angles in decimal degrees. Angles must be >=0 and <=180. dni_clear : Series, optional - Clearsky direct normal irradiance. [Wm⁻²] + Clearsky direct normal irradiance. [Wm⁻²] See :term:`dni_clear`. .. versionchanged:: 0.11.2 Renamed from ``clearsky_dni`` to ``dni_clear``. From 3c651e747242bd33ed5c473e5eb7d641cb661a09 Mon Sep 17 00:00:00 2001 From: RDaxini Date: Fri, 3 Jan 2025 20:06:50 -0700 Subject: [PATCH 9/9] linter --- pvlib/irradiance.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pvlib/irradiance.py b/pvlib/irradiance.py index 48874ce32f..8ee784815d 100644 --- a/pvlib/irradiance.py +++ b/pvlib/irradiance.py @@ -534,7 +534,7 @@ def get_ground_diffuse(surface_tilt, ghi, albedo=.25, surface_type=None): (e.g. surface facing up = 0, surface facing horizon = 90). ghi : numeric - Global horizontal irradiance. [Wm⁻²] + Global horizontal irradiance. [Wm⁻²] albedo : numeric, default 0.25 Ground reflectance, typically 0.1-0.4 for surfaces on Earth