pvlib 0.11.0a1__py3-none-any.whl → 0.11.2__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (62) hide show
  1. pvlib/_deprecation.py +73 -0
  2. pvlib/atmosphere.py +236 -1
  3. pvlib/bifacial/__init__.py +4 -4
  4. pvlib/bifacial/loss_models.py +163 -0
  5. pvlib/clearsky.py +53 -51
  6. pvlib/data/pvgis_tmy_meta.json +32 -93
  7. pvlib/data/pvgis_tmy_test.csv +8761 -0
  8. pvlib/data/tmy_45.000_8.000_2005_2023.csv +8789 -0
  9. pvlib/data/tmy_45.000_8.000_2005_2023.epw +8768 -0
  10. pvlib/data/tmy_45.000_8.000_2005_2023.json +1 -0
  11. pvlib/data/tmy_45.000_8.000_2005_2023.txt +8761 -0
  12. pvlib/data/tmy_45.000_8.000_userhorizon.json +1 -1
  13. pvlib/iam.py +4 -4
  14. pvlib/iotools/midc.py +1 -1
  15. pvlib/iotools/pvgis.py +39 -13
  16. pvlib/irradiance.py +237 -173
  17. pvlib/ivtools/sdm.py +75 -52
  18. pvlib/location.py +5 -5
  19. pvlib/modelchain.py +1 -1
  20. pvlib/pvsystem.py +134 -86
  21. pvlib/shading.py +8 -8
  22. pvlib/singlediode.py +1 -1
  23. pvlib/solarposition.py +101 -80
  24. pvlib/spa.py +28 -24
  25. pvlib/spectrum/__init__.py +9 -4
  26. pvlib/spectrum/irradiance.py +273 -0
  27. pvlib/spectrum/mismatch.py +118 -508
  28. pvlib/spectrum/response.py +280 -0
  29. pvlib/spectrum/spectrl2.py +18 -17
  30. pvlib/temperature.py +49 -3
  31. pvlib/tests/bifacial/test_losses_models.py +54 -0
  32. pvlib/tests/iotools/test_pvgis.py +58 -12
  33. pvlib/tests/ivtools/test_sdm.py +23 -1
  34. pvlib/tests/spectrum/__init__.py +0 -0
  35. pvlib/tests/spectrum/conftest.py +40 -0
  36. pvlib/tests/spectrum/test_irradiance.py +138 -0
  37. pvlib/tests/{test_spectrum.py → spectrum/test_mismatch.py} +32 -306
  38. pvlib/tests/spectrum/test_response.py +124 -0
  39. pvlib/tests/spectrum/test_spectrl2.py +72 -0
  40. pvlib/tests/test__deprecation.py +97 -0
  41. pvlib/tests/test_atmosphere.py +218 -0
  42. pvlib/tests/test_clearsky.py +44 -26
  43. pvlib/tests/test_conftest.py +0 -44
  44. pvlib/tests/test_irradiance.py +62 -16
  45. pvlib/tests/test_pvsystem.py +17 -1
  46. pvlib/tests/test_solarposition.py +117 -36
  47. pvlib/tests/test_spa.py +30 -1
  48. pvlib/tools.py +26 -2
  49. pvlib/tracking.py +53 -47
  50. {pvlib-0.11.0a1.dist-info → pvlib-0.11.2.dist-info}/METADATA +34 -31
  51. {pvlib-0.11.0a1.dist-info → pvlib-0.11.2.dist-info}/RECORD +55 -47
  52. {pvlib-0.11.0a1.dist-info → pvlib-0.11.2.dist-info}/WHEEL +1 -1
  53. pvlib/data/aod550_tcwv_20121101_test.nc +0 -0
  54. pvlib/data/pvgis_tmy_test.dat +0 -8761
  55. pvlib/data/tmy_45.000_8.000_2005_2016.csv +0 -8789
  56. pvlib/data/tmy_45.000_8.000_2005_2016.epw +0 -8768
  57. pvlib/data/tmy_45.000_8.000_2005_2016.json +0 -1
  58. pvlib/data/tmy_45.000_8.000_2005_2016.txt +0 -8761
  59. pvlib/data/variables_style_rules.csv +0 -55
  60. {pvlib-0.11.0a1.dist-info → pvlib-0.11.2.dist-info}/AUTHORS.md +0 -0
  61. {pvlib-0.11.0a1.dist-info → pvlib-0.11.2.dist-info}/LICENSE +0 -0
  62. {pvlib-0.11.0a1.dist-info → pvlib-0.11.2.dist-info}/top_level.txt +0 -0
pvlib/irradiance.py CHANGED
@@ -16,7 +16,7 @@ from scipy.optimize import bisect
16
16
  from pvlib import atmosphere, solarposition, tools
17
17
  import pvlib # used to avoid dni name collision in complete_irradiance
18
18
 
19
- from pvlib._deprecation import pvlibDeprecationWarning
19
+ from pvlib._deprecation import pvlibDeprecationWarning, renamed_kwarg_warning
20
20
  import warnings
21
21
 
22
22
 
@@ -244,7 +244,7 @@ def beam_component(surface_tilt, surface_azimuth, solar_zenith, solar_azimuth,
244
244
  solar_azimuth : numeric
245
245
  Solar azimuth angle.
246
246
  dni : numeric
247
- Direct Normal Irradiance
247
+ Direct normal irradiance, see :term:`dni`. [Wm⁻²]
248
248
 
249
249
  Returns
250
250
  -------
@@ -395,8 +395,8 @@ def get_sky_diffuse(surface_tilt, surface_azimuth,
395
395
  Raises
396
396
  ------
397
397
  ValueError
398
- If model is one of ``'haydavies'``, ``'reindl'``, or ``'perez'`` and
399
- ``dni_extra`` is not specified.
398
+ If model is one of ``'haydavies'``, ``'reindl'``, ``'perez'``, or
399
+ ``'perez_driesse'`` and ``dni_extra`` is not specified.
400
400
 
401
401
  Notes
402
402
  -----
@@ -463,15 +463,15 @@ def poa_components(aoi, dni, poa_sky_diffuse, poa_ground_diffuse):
463
463
  surface, from :func:`aoi`.
464
464
 
465
465
  dni : numeric
466
- Direct normal irradiance (W/m^2), as measured from a TMY file or
466
+ Direct normal irradiance (Wm⁻²), as measured from a TMY file or
467
467
  calculated with a clearsky model.
468
468
 
469
469
  poa_sky_diffuse : numeric
470
- Diffuse irradiance (W/m^2) in the plane of the modules, as
470
+ Diffuse irradiance (Wm⁻²) in the plane of the modules, as
471
471
  calculated by a diffuse irradiance translation function
472
472
 
473
473
  poa_ground_diffuse : numeric
474
- Ground reflected irradiance (W/m^2) in the plane of the modules,
474
+ Ground reflected irradiance (Wm⁻²) in the plane of the modules,
475
475
  as calculated by an albedo model (eg. :func:`grounddiffuse`)
476
476
 
477
477
  Returns
@@ -479,12 +479,12 @@ def poa_components(aoi, dni, poa_sky_diffuse, poa_ground_diffuse):
479
479
  irrads : OrderedDict or DataFrame
480
480
  Contains the following keys:
481
481
 
482
- * ``poa_global`` : Total in-plane irradiance (W/m^2)
483
- * ``poa_direct`` : Total in-plane beam irradiance (W/m^2)
484
- * ``poa_diffuse`` : Total in-plane diffuse irradiance (W/m^2)
485
- * ``poa_sky_diffuse`` : In-plane diffuse irradiance from sky (W/m^2)
482
+ * ``poa_global`` : Total in-plane irradiance (Wm⁻²)
483
+ * ``poa_direct`` : Total in-plane beam irradiance (Wm⁻²)
484
+ * ``poa_diffuse`` : Total in-plane diffuse irradiance (Wm⁻²)
485
+ * ``poa_sky_diffuse`` : In-plane diffuse irradiance from sky (Wm⁻²)
486
486
  * ``poa_ground_diffuse`` : In-plane diffuse irradiance from ground
487
- (W/m^2)
487
+ (Wm⁻²)
488
488
 
489
489
  Notes
490
490
  ------
@@ -529,7 +529,7 @@ def get_ground_diffuse(surface_tilt, ghi, albedo=.25, surface_type=None):
529
529
  (e.g. surface facing up = 0, surface facing horizon = 90).
530
530
 
531
531
  ghi : numeric
532
- Global horizontal irradiance. :math:`W/m^2`
532
+ Global horizontal irradiance. [Wm⁻²]
533
533
 
534
534
  albedo : numeric, default 0.25
535
535
  Ground reflectance, typically 0.1-0.4 for surfaces on Earth
@@ -546,7 +546,7 @@ def get_ground_diffuse(surface_tilt, ghi, albedo=.25, surface_type=None):
546
546
  Returns
547
547
  -------
548
548
  grounddiffuse : numeric
549
- Ground reflected irradiance. :math:`W/m^2`
549
+ Ground reflected irradiance. [Wm⁻²]
550
550
 
551
551
  Notes
552
552
  -----
@@ -602,7 +602,7 @@ def isotropic(surface_tilt, dhi):
602
602
  (e.g. surface facing up = 0, surface facing horizon = 90)
603
603
 
604
604
  dhi : numeric
605
- Diffuse horizontal irradiance in W/m^2. DHI must be >=0.
605
+ Diffuse horizontal irradiance. [Wm⁻²] DHI must be >=0.
606
606
 
607
607
  Returns
608
608
  -------
@@ -630,66 +630,74 @@ def klucher(surface_tilt, surface_azimuth, dhi, ghi, solar_zenith,
630
630
  solar_azimuth):
631
631
  r'''
632
632
  Determine diffuse irradiance from the sky on a tilted surface
633
- using Klucher's 1979 model
634
-
635
- .. math::
636
-
637
- I_{d} = DHI \frac{1 + \cos\beta}{2} (1 + F' \sin^3(\beta/2))
638
- (1 + F' \cos^2\theta\sin^3\theta_z)
639
-
640
- where
641
-
642
- .. math::
643
-
644
- F' = 1 - (I_{d0} / GHI)^2
645
-
646
- Klucher's 1979 model determines the diffuse irradiance from the sky
647
- (ground reflected irradiance is not included in this algorithm) on a
648
- tilted surface using the surface tilt angle, surface azimuth angle,
649
- diffuse horizontal irradiance, direct normal irradiance, global
650
- horizontal irradiance, extraterrestrial irradiance, sun zenith
651
- angle, and sun azimuth angle.
633
+ using the Klucher (1979) model.
652
634
 
653
635
  Parameters
654
636
  ----------
655
637
  surface_tilt : numeric
656
- Surface tilt angles in decimal degrees. surface_tilt must be >=0
638
+ Surface tilt angles in decimal degrees. ``surface_tilt`` must be >=0
657
639
  and <=180. The tilt angle is defined as degrees from horizontal
658
640
  (e.g. surface facing up = 0, surface facing horizon = 90)
659
641
 
660
642
  surface_azimuth : numeric
661
- Surface azimuth angles in decimal degrees. surface_azimuth must
643
+ Surface azimuth angles in decimal degrees. ``surface_azimuth`` must
662
644
  be >=0 and <=360. The Azimuth convention is defined as degrees
663
645
  east of north (e.g. North = 0, South=180 East = 90, West = 270).
664
646
 
665
647
  dhi : numeric
666
- Diffuse horizontal irradiance in W/m^2. DHI must be >=0.
648
+ Diffuse horizontal irradiance, must be >=0. [Wm⁻²]
667
649
 
668
650
  ghi : numeric
669
- Global irradiance in W/m^2. DNI must be >=0.
651
+ Global horizontal irradiance, must be >=0. [Wm⁻²]
670
652
 
671
653
  solar_zenith : numeric
672
654
  Apparent (refraction-corrected) zenith angles in decimal
673
- degrees. solar_zenith must be >=0 and <=180.
655
+ degrees. ``solar_zenith`` must be >=0 and <=180.
674
656
 
675
657
  solar_azimuth : numeric
676
- Sun azimuth angles in decimal degrees. solar_azimuth must be >=0
658
+ Sun azimuth angles in decimal degrees. ``solar_azimuth`` must be >=0
677
659
  and <=360. The Azimuth convention is defined as degrees east of
678
660
  north (e.g. North = 0, East = 90, West = 270).
679
661
 
680
662
  Returns
681
663
  -------
682
664
  diffuse : numeric
683
- The sky diffuse component of the solar radiation.
665
+ The sky diffuse component of the solar radiation. [Wm⁻²]
666
+
667
+ Notes
668
+ -----
669
+ The Klucher (1979) model [1]_ [2]_ determines the diffuse irradiance
670
+ from the sky (ground reflected irradiance is not included in this
671
+ algorithm) on a tilted surface using the surface tilt angle, surface
672
+ azimuth angle, diffuse horizontal irradiance, global horizontal irradiance,
673
+ sun zenith angle, and sun azimuth angle. The expression for the sky diffuse
674
+ irradiance, :math:`I_d`, is as follows:
675
+
676
+ .. math::
677
+
678
+ I_{d} = DHI \frac{1 + \cos\beta}{2} (1 + F' \sin^3(\beta/2))
679
+ (1 + F' \cos^2\theta\sin^3\theta_z).
680
+
681
+ DHI is the diffuse horizontal irradiance, :math:`\beta` is the surface
682
+ tilt angle, :math:`\theta_z` is the solar zenith angle, and :math:`\theta`
683
+ is the angle of incidence. :math:`F'` is a modulating function to account
684
+ for when the sky changes from clear to overcast, and is defined as follows:
685
+
686
+ .. math::
687
+
688
+ F' = 1 - (DHI / GHI)^2,
689
+
690
+ where GHI is the global horiztonal irradiance.
684
691
 
685
692
  References
686
693
  ----------
687
- .. [1] Loutzenhiser P.G. et. al. "Empirical validation of models to compute
688
- solar irradiance on inclined surfaces for building energy simulation"
689
- 2007, Solar Energy vol. 81. pp. 254-267
690
-
691
- .. [2] Klucher, T.M., 1979. Evaluation of models to predict insolation on
692
- tilted surfaces. Solar Energy 23 (2), 111-114.
694
+ .. [1] Klucher, T. M. "Evaluation of models to predict insolation on
695
+ tilted surfaces" 1979, Solar Energy vol. 23 (2), pp. 111-114
696
+ :doi:`10.1016/0038-092X(79)90110-5`
697
+ .. [2] Loutzenhiser P. G. et al. "Empirical validation of models to
698
+ compute solar irradiance on inclined surfaces for building energy
699
+ simulation" 2007, Solar Energy vol. 81. pp. 254-267
700
+ :doi:`10.1016/j.solener.2006.03.009`
693
701
  '''
694
702
 
695
703
  # zenith angle with respect to panel normal.
@@ -720,25 +728,20 @@ def haydavies(surface_tilt, surface_azimuth, dhi, dni, dni_extra,
720
728
  solar_zenith=None, solar_azimuth=None, projection_ratio=None,
721
729
  return_components=False):
722
730
  r'''
723
- Determine diffuse irradiance from the sky on a tilted surface using
724
- Hay & Davies' 1980 model
731
+ Determine diffuse irradiance from the sky on a tilted surface using the
732
+ Hay and Davies (1980) model.
725
733
 
726
- .. math::
727
- I_{d} = DHI ( A R_b + (1 - A) (\frac{1 + \cos\beta}{2}) )
728
-
729
- Hay and Davies' 1980 model determines the diffuse irradiance from
734
+ The Hay and Davies model determines the diffuse irradiance from
730
735
  the sky (ground reflected irradiance is not included in this
731
736
  algorithm) on a tilted surface using the surface tilt angle, surface
732
- azimuth angle, diffuse horizontal irradiance, direct normal
733
- irradiance, extraterrestrial irradiance, sun zenith angle, and sun
734
- azimuth angle.
737
+ azimuth angle, diffuse horizontal irradiance, direct normal irradiance,
738
+ extraterrestrial irradiance, sun zenith angle, and sun azimuth angle.
735
739
 
736
740
  Parameters
737
741
  ----------
738
742
  surface_tilt : numeric
739
- Surface tilt angles in decimal degrees. The tilt angle is
740
- defined as degrees from horizontal (e.g. surface facing up = 0,
741
- surface facing horizon = 90)
743
+ Panel tilt from the horizontal, in decimal degrees, see
744
+ :term:`surface_tilt`.
742
745
 
743
746
  surface_azimuth : numeric
744
747
  Surface azimuth angles in decimal degrees. The azimuth
@@ -746,13 +749,13 @@ def haydavies(surface_tilt, surface_azimuth, dhi, dni, dni_extra,
746
749
  South=180, East=90, West=270).
747
750
 
748
751
  dhi : numeric
749
- Diffuse horizontal irradiance in W/m^2.
752
+ Diffuse horizontal irradiance. [Wm⁻²]
750
753
 
751
754
  dni : numeric
752
- Direct normal irradiance in W/m^2.
755
+ Direct normal irradiance, see :term:`dni`. [Wm⁻²]
753
756
 
754
757
  dni_extra : numeric
755
- Extraterrestrial normal irradiance in W/m^2.
758
+ Extraterrestrial normal irradiance. [Wm⁻²]
756
759
 
757
760
  solar_zenith : numeric, optional
758
761
  Solar apparent (refraction-corrected) zenith angles in decimal
@@ -769,16 +772,16 @@ def haydavies(surface_tilt, surface_azimuth, dhi, dni, dni_extra,
769
772
  projection. Must supply ``solar_zenith`` and ``solar_azimuth``
770
773
  or supply ``projection_ratio``.
771
774
 
772
- return_components : bool, default False
773
- Flag used to decide whether to return the calculated diffuse components
774
- or not.
775
+ return_components : bool, default `False`
776
+ If `False`, ``sky_diffuse`` is returned.
777
+ If `True`, ``diffuse_components`` is returned.
775
778
 
776
779
  Returns
777
780
  --------
778
781
  numeric, OrderedDict, or DataFrame
779
- Return type controlled by `return_components` argument.
780
- If ``return_components=False``, `sky_diffuse` is returned.
781
- If ``return_components=True``, `diffuse_components` is returned.
782
+ Return type controlled by ``return_components`` argument.
783
+ If `False`, ``sky_diffuse`` is returned.
784
+ If `True`, ``diffuse_components`` is returned.
782
785
 
783
786
  sky_diffuse : numeric
784
787
  The sky diffuse component of the solar radiation on a tilted
@@ -793,20 +796,36 @@ def haydavies(surface_tilt, surface_azimuth, dhi, dni, dni_extra,
793
796
 
794
797
  Notes
795
798
  ------
796
- When supplying ``projection_ratio``, consider constraining its values
797
- when zenith angle approaches 90 degrees or angle of incidence
798
- projection is negative. See code for details.
799
+ In the Hay and Davies (1980) model [1]_ [2]_, sky diffuse irradiance,
800
+ :math:`I_d`, is as follows:
801
+
802
+ .. math::
803
+ I_{d} = DHI \left( A\cdot R_b + (1 - A) \left(\frac{
804
+ 1 + \cos\beta}{2}\right ) \right ).
805
+
806
+ :math:`DHI` is the diffuse horizontal irradiance,
807
+ :math:`A` is the anisotropy index, which is the ratio of the direct normal
808
+ irradiance to the extraterrestrial irradiation,
809
+ :math:`R_b` is the projection ratio, which is defined as the ratio of the
810
+ cosine of the angle of incidence (AOI) to the cosine of the zenith angle,
811
+ and finally :math:`\beta` is the tilt angle of the array.
812
+
813
+ If supplying ``projection_ratio``, consider constraining its values
814
+ when the zenith angle approaches 90 degrees or the AOI projection is
815
+ negative. See code for details.
799
816
 
800
817
  References
801
818
  -----------
802
- .. [1] Loutzenhiser P.G. et. al. "Empirical validation of models to
803
- compute solar irradiance on inclined surfaces for building energy
804
- simulation" 2007, Solar Energy vol. 81. pp. 254-267
805
-
806
- .. [2] Hay, J.E., Davies, J.A., 1980. Calculations of the solar
819
+ .. [1] Hay, J. E., Davies, J. A., 1980. Calculations of the solar
807
820
  radiation incident on an inclined surface. In: Hay, J.E., Won, T.K.
808
821
  (Eds.), Proc. of First Canadian Solar Radiation Data Workshop, 59.
809
- Ministry of Supply and Services, Canada.
822
+ Ministry of Supply and Services, Canada. Available from:
823
+ https://archive.org/details/proceedingsfirst00cana/mode/2up
824
+ (Last accessed: 17/09/24)
825
+ .. [2] Loutzenhiser P. G. et al. "Empirical validation of models to
826
+ compute solar irradiance on inclined surfaces for building energy
827
+ simulation" 2007, Solar Energy vol. 81. pp. 254-267
828
+ :doi:`10.1016/j.solener.2006.03.009`
810
829
  '''
811
830
 
812
831
  # if necessary, calculate ratio of titled and horizontal beam irradiance
@@ -850,19 +869,14 @@ def haydavies(surface_tilt, surface_azimuth, dhi, dni, dni_extra,
850
869
  def reindl(surface_tilt, surface_azimuth, dhi, dni, ghi, dni_extra,
851
870
  solar_zenith, solar_azimuth):
852
871
  r'''
853
- Determine diffuse irradiance from the sky on a tilted surface using
854
- Reindl's 1990 model
855
-
856
- .. math::
872
+ Determine the diffuse irradiance from the sky on a tilted surface using
873
+ the Reindl (1990) model.
857
874
 
858
- I_{d} = DHI \left(A R_b + (1 - A) \left(\frac{1 + \cos\beta}{2}\right)
859
- \left(1 + \sqrt{\frac{I_{hb}}{I_h}} \sin^3(\beta/2)\right) \right)
860
-
861
- Reindl's 1990 model determines the diffuse irradiance from the sky
862
- (ground reflected irradiance is not included in this algorithm) on a
863
- tilted surface using the surface tilt angle, surface azimuth angle,
875
+ The Reindl (1990) model [1]_ [2]_ determines the diffuse irradiance from
876
+ the sky on
877
+ a tilted surface using the surface tilt angle, surface azimuth angle,
864
878
  diffuse horizontal irradiance, direct normal irradiance, global
865
- horizontal irradiance, extraterrestrial irradiance, sun zenith
879
+ horizontal irradiance, extraterrestrial normal irradiance, sun zenith
866
880
  angle, and sun azimuth angle.
867
881
 
868
882
  Parameters
@@ -878,16 +892,16 @@ def reindl(surface_tilt, surface_azimuth, dhi, dni, ghi, dni_extra,
878
892
  South=180 East = 90, West = 270).
879
893
 
880
894
  dhi : numeric
881
- diffuse horizontal irradiance in W/m^2.
895
+ diffuse horizontal irradiance. [Wm⁻²]
882
896
 
883
897
  dni : numeric
884
- direct normal irradiance in W/m^2.
898
+ direct normal irradiance. [Wm⁻²]
885
899
 
886
900
  ghi: numeric
887
- Global irradiance in W/m^2.
901
+ Global horizontal irradiance. [Wm⁻²]
888
902
 
889
903
  dni_extra : numeric
890
- Extraterrestrial normal irradiance in W/m^2.
904
+ Extraterrestrial normal irradiance. [Wm⁻²]
891
905
 
892
906
  solar_zenith : numeric
893
907
  Apparent (refraction-corrected) zenith angles in decimal degrees.
@@ -904,23 +918,41 @@ def reindl(surface_tilt, surface_azimuth, dhi, dni, ghi, dni_extra,
904
918
 
905
919
  Notes
906
920
  -----
907
- The poa_sky_diffuse calculation is generated from the Loutzenhiser et al.
908
- (2007) paper, equation 8. Note that I have removed the beam and ground
909
- reflectance portion of the equation and this generates ONLY the diffuse
910
- radiation from the sky and circumsolar, so the form of the equation
911
- varies slightly from equation 8.
921
+ The Reindl (1990) model for the sky diffuse irradiance,
922
+ :math:`I_d`, is as follows:
923
+
924
+ .. math::
925
+
926
+ I_{d} = DHI \left(A \cdot R_b + (1 - A)
927
+ \left(\frac{1 + \cos\beta}{2}\right)
928
+ \left(1 + \sqrt{\frac{BHI}{GHI}} \sin^3(\beta/2)\right) \right).
929
+
930
+ :math:`DHI`, :math:`BHI`, and :math:`GHI` are the diffuse horizontal, beam
931
+ (direct) horizontal and global horizontal irradiances, respectively.
932
+ :math:`A` is the anisotropy index, which is the ratio of the direct normal
933
+ irradiance to the direct extraterrestrial irradiation, :math:`R_b` is the
934
+ projection ratio, which is defined as the ratio of the cosine of the angle
935
+ of incidence (AOI) to the cosine of the zenith angle, and :math:`\beta`
936
+ is the tilt angle of the array.
937
+
938
+ Implementation is based on Loutzenhiser et al.
939
+ (2007) [3]_, Equation 8. The beam and ground reflectance portion of the
940
+ equation have been removed, therefore the model described here generates
941
+ ONLY the diffuse radiation from the sky and circumsolar, so the form of the
942
+ equation varies slightly from Equation 8 in [3]_.
912
943
 
913
944
  References
914
945
  ----------
915
- .. [1] Loutzenhiser P.G. et. al. "Empirical validation of models to
916
- compute solar irradiance on inclined surfaces for building energy
917
- simulation" 2007, Solar Energy vol. 81. pp. 254-267
918
-
919
- .. [2] Reindl, D.T., Beckmann, W.A., Duffie, J.A., 1990a. Diffuse
946
+ .. [1] Reindl, D. T., Beckmann, W. A., Duffie, J. A., 1990a. Diffuse
920
947
  fraction correlations. Solar Energy 45(1), 1-7.
921
-
922
- .. [3] Reindl, D.T., Beckmann, W.A., Duffie, J.A., 1990b. Evaluation of
948
+ :doi:`10.1016/0038-092X(90)90060-P`
949
+ .. [2] Reindl, D. T., Beckmann, W. A., Duffie, J. A., 1990b. Evaluation of
923
950
  hourly tilted surface radiation models. Solar Energy 45(1), 9-17.
951
+ :doi:`10.1016/0038-092X(90)90061-G`
952
+ .. [3] Loutzenhiser P. G. et. al., 2007. Empirical validation of models to
953
+ compute solar irradiance on inclined surfaces for building energy
954
+ simulation. Solar Energy 81(2), 254-267
955
+ :doi:`10.1016/j.solener.2006.03.009`
924
956
  '''
925
957
 
926
958
  cos_tt = aoi_projection(surface_tilt, surface_azimuth,
@@ -972,10 +1004,10 @@ def king(surface_tilt, dhi, ghi, solar_zenith):
972
1004
  surface facing horizon = 90)
973
1005
 
974
1006
  dhi : numeric
975
- Diffuse horizontal irradiance in W/m^2.
1007
+ Diffuse horizontal irradiance. [Wm⁻²]
976
1008
 
977
1009
  ghi : numeric
978
- Global horizontal irradiance in W/m^2.
1010
+ Global horizontal irradiance. [Wm⁻²]
979
1011
 
980
1012
  solar_zenith : numeric
981
1013
  Apparent (refraction-corrected) zenith angles in decimal degrees.
@@ -1029,13 +1061,13 @@ def perez(surface_tilt, surface_azimuth, dhi, dni, dni_extra,
1029
1061
  east of north (e.g. North = 0, South=180 East = 90, West = 270).
1030
1062
 
1031
1063
  dhi : numeric
1032
- Diffuse horizontal irradiance in W/m^2. DHI must be >=0.
1064
+ Diffuse horizontal irradiance. [Wm⁻²] DHI must be >=0.
1033
1065
 
1034
1066
  dni : numeric
1035
- Direct normal irradiance in W/m^2. DNI must be >=0.
1067
+ Direct normal irradiance. [Wm⁻²] DNI must be >=0.
1036
1068
 
1037
1069
  dni_extra : numeric
1038
- Extraterrestrial normal irradiance in W/m^2.
1070
+ Extraterrestrial normal irradiance. [Wm⁻²]
1039
1071
 
1040
1072
  solar_zenith : numeric
1041
1073
  apparent (refraction-corrected) zenith angles in decimal
@@ -1255,8 +1287,8 @@ def _f(i, j, zeta):
1255
1287
  [+0.328, +0.471, -0.216, +0.069, -0.105, -0.028],
1256
1288
  [+0.557, +0.241, -0.300, +0.086, -0.085, -0.012],
1257
1289
  [+0.861, -0.323, -0.355, +0.240, -0.467, -0.008],
1258
- [ 1.212, -1.239, -0.444, +0.305, -0.797, +0.047],
1259
- [ 1.099, -1.847, -0.365, +0.275, -1.132, +0.124],
1290
+ [+1.212, -1.239, -0.444, +0.305, -0.797, +0.047],
1291
+ [+1.099, -1.847, -0.365, +0.275, -1.132, +0.124],
1260
1292
  [+0.544, +0.157, -0.213, +0.118, -1.455, +0.292],
1261
1293
  [+0.544, +0.157, -0.213, +0.118, -1.455, +0.292],
1262
1294
  [+0.000, +0.000, +0.000, +0.000, +0.000, +0.000],
@@ -1295,13 +1327,13 @@ def perez_driesse(surface_tilt, surface_azimuth, dhi, dni, dni_extra,
1295
1327
  east of north (e.g. North = 0, South=180 East = 90, West = 270).
1296
1328
 
1297
1329
  dhi : numeric
1298
- Diffuse horizontal irradiance in W/m^2. dhi must be >=0.
1330
+ Diffuse horizontal irradiance. [Wm⁻²] dhi must be >=0.
1299
1331
 
1300
1332
  dni : numeric
1301
- Direct normal irradiance in W/m^2. dni must be >=0.
1333
+ Direct normal irradiance. [Wm⁻²] dni must be >=0.
1302
1334
 
1303
1335
  dni_extra : numeric
1304
- Extraterrestrial normal irradiance in W/m^2.
1336
+ Extraterrestrial normal irradiance. [Wm⁻²]
1305
1337
 
1306
1338
  solar_zenith : numeric
1307
1339
  apparent (refraction-corrected) zenith angles in decimal
@@ -1496,7 +1528,7 @@ def _ghi_from_poa(surface_tilt, surface_azimuth,
1496
1528
  def ghi_from_poa_driesse_2023(surface_tilt, surface_azimuth,
1497
1529
  solar_zenith, solar_azimuth,
1498
1530
  poa_global,
1499
- dni_extra=None, airmass=None, albedo=0.25,
1531
+ dni_extra, airmass=None, albedo=0.25,
1500
1532
  xtol=0.01,
1501
1533
  full_output=False):
1502
1534
  '''
@@ -1516,16 +1548,16 @@ def ghi_from_poa_driesse_2023(surface_tilt, surface_azimuth,
1516
1548
  solar_azimuth : numeric
1517
1549
  Solar azimuth angle. [degree]
1518
1550
  poa_global : numeric
1519
- Plane-of-array global irradiance, aka global tilted irradiance. [W/m^2]
1520
- dni_extra : numeric, optional
1521
- Extraterrestrial direct normal irradiance. [W/m^2]
1551
+ Plane-of-array global irradiance, aka global tilted irradiance. [Wm⁻²]
1552
+ dni_extra : numeric
1553
+ Extraterrestrial direct normal irradiance. [Wm⁻²]
1522
1554
  airmass : numeric, optional
1523
1555
  Relative airmass (not adjusted for pressure). [unitless]
1524
1556
  albedo : numeric, default 0.25
1525
1557
  Ground surface albedo. [unitless]
1526
1558
  xtol : numeric, default 0.01
1527
1559
  Convergence criterion. The estimated GHI will be within xtol of the
1528
- true value. Must be positive. [W/m^2]
1560
+ true value. Must be positive. [Wm⁻²]
1529
1561
  full_output : boolean, default False
1530
1562
  If full_output is False, only ghi is returned, otherwise the return
1531
1563
  value is (ghi, converged, niter). (see Returns section for details).
@@ -1533,7 +1565,7 @@ def ghi_from_poa_driesse_2023(surface_tilt, surface_azimuth,
1533
1565
  Returns
1534
1566
  -------
1535
1567
  ghi : numeric
1536
- Estimated GHI. [W/m^2]
1568
+ Estimated GHI. [Wm⁻²]
1537
1569
  converged : boolean, optional
1538
1570
  Present if full_output=True. Indicates which elements converged
1539
1571
  successfully.
@@ -1582,7 +1614,12 @@ def ghi_from_poa_driesse_2023(surface_tilt, surface_azimuth,
1582
1614
  return ghi
1583
1615
 
1584
1616
 
1585
- def clearsky_index(ghi, clearsky_ghi, max_clearsky_index=2.0):
1617
+ @renamed_kwarg_warning(
1618
+ since='0.11.2',
1619
+ old_param_name='clearsky_ghi',
1620
+ new_param_name='ghi_clear',
1621
+ removal="0.13.0")
1622
+ def clearsky_index(ghi, ghi_clear, max_clearsky_index=2.0):
1586
1623
  """
1587
1624
  Calculate the clearsky index.
1588
1625
 
@@ -1592,11 +1629,14 @@ def clearsky_index(ghi, clearsky_ghi, max_clearsky_index=2.0):
1592
1629
  Parameters
1593
1630
  ----------
1594
1631
  ghi : numeric
1595
- Global horizontal irradiance in W/m^2.
1632
+ Global horizontal irradiance. [Wm⁻²]
1596
1633
 
1597
- clearsky_ghi : numeric
1634
+ ghi_clear : numeric
1598
1635
  Modeled clearsky GHI
1599
1636
 
1637
+ .. versionchanged:: 0.11.2
1638
+ Renamed from ``ghi_clearsky`` to ``ghi_clear``.
1639
+
1600
1640
  max_clearsky_index : numeric, default 2.0
1601
1641
  Maximum value of the clearsky index. The default, 2.0, allows
1602
1642
  for over-irradiance events typically seen in sub-hourly data.
@@ -1606,12 +1646,12 @@ def clearsky_index(ghi, clearsky_ghi, max_clearsky_index=2.0):
1606
1646
  clearsky_index : numeric
1607
1647
  Clearsky index
1608
1648
  """
1609
- clearsky_index = ghi / clearsky_ghi
1649
+ clearsky_index = ghi / ghi_clear
1610
1650
  # set +inf, -inf, and nans to zero
1611
1651
  clearsky_index = np.where(~np.isfinite(clearsky_index), 0,
1612
1652
  clearsky_index)
1613
1653
  # but preserve nans in the input arrays
1614
- input_is_nan = ~np.isfinite(ghi) | ~np.isfinite(clearsky_ghi)
1654
+ input_is_nan = ~np.isfinite(ghi) | ~np.isfinite(ghi_clear)
1615
1655
  clearsky_index = np.where(input_is_nan, np.nan, clearsky_index)
1616
1656
 
1617
1657
  clearsky_index = np.maximum(clearsky_index, 0)
@@ -1635,7 +1675,7 @@ def clearness_index(ghi, solar_zenith, extra_radiation, min_cos_zenith=0.065,
1635
1675
  Parameters
1636
1676
  ----------
1637
1677
  ghi : numeric
1638
- Global horizontal irradiance in W/m^2.
1678
+ Global horizontal irradiance. [Wm⁻²]
1639
1679
 
1640
1680
  solar_zenith : numeric
1641
1681
  True (not refraction-corrected) solar zenith angle in decimal
@@ -1748,7 +1788,7 @@ def disc(ghi, solar_zenith, datetime_or_doy, pressure=101325,
1748
1788
  Parameters
1749
1789
  ----------
1750
1790
  ghi : numeric
1751
- Global horizontal irradiance in W/m^2.
1791
+ Global horizontal irradiance. [Wm⁻²]
1752
1792
 
1753
1793
  solar_zenith : numeric
1754
1794
  True (not refraction-corrected) solar zenith angles in decimal
@@ -1781,7 +1821,7 @@ def disc(ghi, solar_zenith, datetime_or_doy, pressure=101325,
1781
1821
  Contains the following keys:
1782
1822
 
1783
1823
  * ``dni``: The modeled direct normal irradiance
1784
- in W/m^2 provided by the
1824
+ in Wm⁻² provided by the
1785
1825
  Direct Insolation Simulation Code (DISC) model.
1786
1826
  * ``kt``: Ratio of global to extraterrestrial
1787
1827
  irradiance on a horizontal plane.
@@ -1894,7 +1934,7 @@ def dirint(ghi, solar_zenith, times, pressure=101325., use_delta_kt_prime=True,
1894
1934
  Parameters
1895
1935
  ----------
1896
1936
  ghi : array-like
1897
- Global horizontal irradiance in W/m^2.
1937
+ Global horizontal irradiance. [Wm⁻²]
1898
1938
 
1899
1939
  solar_zenith : array-like
1900
1940
  True (not refraction-corrected) solar_zenith angles in decimal
@@ -1932,7 +1972,7 @@ def dirint(ghi, solar_zenith, times, pressure=101325., use_delta_kt_prime=True,
1932
1972
  Returns
1933
1973
  -------
1934
1974
  dni : array-like
1935
- The modeled direct normal irradiance in W/m^2 provided by the
1975
+ The modeled direct normal irradiance in Wm⁻² provided by the
1936
1976
  DIRINT model.
1937
1977
 
1938
1978
  Notes
@@ -2119,7 +2159,17 @@ def _dirint_bins(times, kt_prime, zenith, w, delta_kt_prime):
2119
2159
  return kt_prime_bin, zenith_bin, w_bin, delta_kt_prime_bin
2120
2160
 
2121
2161
 
2122
- def dirindex(ghi, ghi_clearsky, dni_clearsky, zenith, times, pressure=101325.,
2162
+ @renamed_kwarg_warning(
2163
+ since='0.11.2',
2164
+ old_param_name='ghi_clearsky',
2165
+ new_param_name='ghi_clear',
2166
+ removal="0.13.0")
2167
+ @renamed_kwarg_warning(
2168
+ since='0.11.2',
2169
+ old_param_name='dni_clearsky',
2170
+ new_param_name='dni_clear',
2171
+ removal="0.13.0")
2172
+ def dirindex(ghi, ghi_clear, dni_clear, zenith, times, pressure=101325.,
2123
2173
  use_delta_kt_prime=True, temp_dew=None, min_cos_zenith=0.065,
2124
2174
  max_zenith=87):
2125
2175
  """
@@ -2127,7 +2177,7 @@ def dirindex(ghi, ghi_clearsky, dni_clearsky, zenith, times, pressure=101325.,
2127
2177
 
2128
2178
  The DIRINDEX model [1]_ modifies the DIRINT model implemented in
2129
2179
  :py:func:`pvlib.irradiance.dirint` by taking into account information
2130
- from a clear sky model. It is recommended that ``ghi_clearsky`` be
2180
+ from a clear sky model. It is recommended that ``ghi_clear`` be
2131
2181
  calculated using the Ineichen clear sky model
2132
2182
  :py:func:`pvlib.clearsky.ineichen` with ``perez_enhancement=True``.
2133
2183
 
@@ -2136,13 +2186,19 @@ def dirindex(ghi, ghi_clearsky, dni_clearsky, zenith, times, pressure=101325.,
2136
2186
  Parameters
2137
2187
  ----------
2138
2188
  ghi : array-like
2139
- Global horizontal irradiance in W/m^2.
2189
+ Global horizontal irradiance. [Wm⁻²]
2190
+
2191
+ ghi_clear : array-like
2192
+ Global horizontal irradiance from clear sky model. [Wm⁻²]
2193
+
2194
+ .. versionchanged:: 0.11.2
2195
+ Renamed from ``ghi_clearsky`` to ``ghi_clear``.
2140
2196
 
2141
- ghi_clearsky : array-like
2142
- Global horizontal irradiance from clear sky model, in W/m^2.
2197
+ dni_clear : array-like
2198
+ Direct normal irradiance from clear sky model. [Wm⁻²]
2143
2199
 
2144
- dni_clearsky : array-like
2145
- Direct normal irradiance from clear sky model, in W/m^2.
2200
+ .. versionchanged:: 0.11.2
2201
+ Renamed from ``dni_clearsky`` to ``dni_clear``.
2146
2202
 
2147
2203
  zenith : array-like
2148
2204
  True (not refraction-corrected) zenith angles in decimal
@@ -2181,7 +2237,7 @@ def dirindex(ghi, ghi_clearsky, dni_clearsky, zenith, times, pressure=101325.,
2181
2237
  Returns
2182
2238
  -------
2183
2239
  dni : array-like
2184
- The modeled direct normal irradiance in W/m^2.
2240
+ The modeled direct normal irradiance. [Wm⁻²]
2185
2241
 
2186
2242
  Notes
2187
2243
  -----
@@ -2200,14 +2256,14 @@ def dirindex(ghi, ghi_clearsky, dni_clearsky, zenith, times, pressure=101325.,
2200
2256
  temp_dew=temp_dew, min_cos_zenith=min_cos_zenith,
2201
2257
  max_zenith=max_zenith)
2202
2258
 
2203
- dni_dirint_clearsky = dirint(ghi_clearsky, zenith, times,
2259
+ dni_dirint_clearsky = dirint(ghi_clear, zenith, times,
2204
2260
  pressure=pressure,
2205
2261
  use_delta_kt_prime=use_delta_kt_prime,
2206
2262
  temp_dew=temp_dew,
2207
2263
  min_cos_zenith=min_cos_zenith,
2208
2264
  max_zenith=max_zenith)
2209
2265
 
2210
- dni_dirindex = dni_clearsky * dni_dirint / dni_dirint_clearsky
2266
+ dni_dirindex = dni_clear * dni_dirint / dni_dirint_clearsky
2211
2267
 
2212
2268
  dni_dirindex[dni_dirindex < 0] = 0.
2213
2269
 
@@ -2228,12 +2284,12 @@ def gti_dirint(poa_global, aoi, solar_zenith, solar_azimuth, times,
2228
2284
 
2229
2285
  Model performance is poor for AOI greater than approximately
2230
2286
  80 degrees `and` plane of array irradiance greater than
2231
- approximately 200 W/m^2.
2287
+ approximately 200 Wm⁻².
2232
2288
 
2233
2289
  Parameters
2234
2290
  ----------
2235
2291
  poa_global : array-like
2236
- Plane of array global irradiance in W/m^2.
2292
+ Plane of array global irradiance. [Wm⁻²]
2237
2293
 
2238
2294
  aoi : array-like
2239
2295
  Angle of incidence of solar rays with respect to the module
@@ -2300,10 +2356,10 @@ def gti_dirint(poa_global, aoi, solar_zenith, solar_azimuth, times,
2300
2356
  data : DataFrame
2301
2357
  Contains the following keys/columns:
2302
2358
 
2303
- * ``ghi``: the modeled global horizontal irradiance in W/m^2.
2304
- * ``dni``: the modeled direct normal irradiance in W/m^2.
2359
+ * ``ghi``: the modeled global horizontal irradiance. [Wm⁻²]
2360
+ * ``dni``: the modeled direct normal irradiance. [Wm⁻²]
2305
2361
  * ``dhi``: the modeled diffuse horizontal irradiance in
2306
- W/m^2.
2362
+ Wm⁻².
2307
2363
 
2308
2364
  References
2309
2365
  ----------
@@ -2384,7 +2440,7 @@ def _gti_dirint_lt_90(poa_global, aoi, aoi_lt_90, solar_zenith, solar_azimuth,
2384
2440
  for iteration, coeff in enumerate(coeffs):
2385
2441
 
2386
2442
  # test if difference between modeled GTI and
2387
- # measured GTI (poa_global) is less than 1 W/m^2
2443
+ # measured GTI (poa_global) is less than 1 Wm⁻²
2388
2444
  # only test for aoi less than 90 deg
2389
2445
  best_diff_lte_1 = best_diff <= 1
2390
2446
  best_diff_lte_1_lt_90 = best_diff_lte_1[aoi_lt_90]
@@ -2565,7 +2621,7 @@ def erbs(ghi, zenith, datetime_or_doy, min_cos_zenith=0.065, max_zenith=87):
2565
2621
  Parameters
2566
2622
  ----------
2567
2623
  ghi: numeric
2568
- Global horizontal irradiance in W/m^2.
2624
+ Global horizontal irradiance. [Wm⁻²]
2569
2625
  zenith: numeric
2570
2626
  True (not refraction-corrected) zenith angles in decimal degrees.
2571
2627
  datetime_or_doy : int, float, array, pd.DatetimeIndex
@@ -2583,9 +2639,9 @@ def erbs(ghi, zenith, datetime_or_doy, min_cos_zenith=0.065, max_zenith=87):
2583
2639
  data : OrderedDict or DataFrame
2584
2640
  Contains the following keys/columns:
2585
2641
 
2586
- * ``dni``: the modeled direct normal irradiance in W/m^2.
2642
+ * ``dni``: the modeled direct normal irradiance. [Wm⁻²]
2587
2643
  * ``dhi``: the modeled diffuse horizontal irradiance in
2588
- W/m^2.
2644
+ Wm⁻².
2589
2645
  * ``kt``: Ratio of global to extraterrestrial irradiance
2590
2646
  on a horizontal plane.
2591
2647
 
@@ -2663,7 +2719,7 @@ def erbs_driesse(ghi, zenith, datetime_or_doy=None, dni_extra=None,
2663
2719
  Parameters
2664
2720
  ----------
2665
2721
  ghi: numeric
2666
- Global horizontal irradiance in W/m^2.
2722
+ Global horizontal irradiance. [Wm⁻²]
2667
2723
  zenith: numeric
2668
2724
  True (not refraction-corrected) zenith angles in decimal degrees.
2669
2725
  datetime_or_doy : int, float, array or pd.DatetimeIndex, optional
@@ -2686,9 +2742,9 @@ def erbs_driesse(ghi, zenith, datetime_or_doy=None, dni_extra=None,
2686
2742
  data : OrderedDict or DataFrame
2687
2743
  Contains the following keys/columns:
2688
2744
 
2689
- * ``dni``: the modeled direct normal irradiance in W/m^2.
2745
+ * ``dni``: the modeled direct normal irradiance. [Wm⁻²]
2690
2746
  * ``dhi``: the modeled diffuse horizontal irradiance in
2691
- W/m^2.
2747
+ Wm⁻².
2692
2748
  * ``kt``: Ratio of global to extraterrestrial irradiance
2693
2749
  on a horizontal plane.
2694
2750
 
@@ -2784,7 +2840,7 @@ def orgill_hollands(ghi, zenith, datetime_or_doy, dni_extra=None,
2784
2840
  Parameters
2785
2841
  ----------
2786
2842
  ghi: numeric
2787
- Global horizontal irradiance in W/m^2.
2843
+ Global horizontal irradiance. [Wm⁻²]
2788
2844
  zenith: numeric
2789
2845
  True (not refraction-corrected) zenith angles in decimal degrees.
2790
2846
  datetime_or_doy : int, float, array, pd.DatetimeIndex
@@ -2804,9 +2860,9 @@ def orgill_hollands(ghi, zenith, datetime_or_doy, dni_extra=None,
2804
2860
  data : OrderedDict or DataFrame
2805
2861
  Contains the following keys/columns:
2806
2862
 
2807
- * ``dni``: the modeled direct normal irradiance in W/m^2.
2863
+ * ``dni``: the modeled direct normal irradiance. [Wm⁻²]
2808
2864
  * ``dhi``: the modeled diffuse horizontal irradiance in
2809
- W/m^2.
2865
+ Wm⁻².
2810
2866
  * ``kt``: Ratio of global to extraterrestrial irradiance
2811
2867
  on a horizontal plane.
2812
2868
 
@@ -2877,7 +2933,7 @@ def boland(ghi, solar_zenith, datetime_or_doy, a_coeff=8.645, b_coeff=0.613,
2877
2933
  Parameters
2878
2934
  ----------
2879
2935
  ghi: numeric
2880
- Global horizontal irradiance. [W/m^2]
2936
+ Global horizontal irradiance. [Wm⁻²]
2881
2937
  solar_zenith: numeric
2882
2938
  True (not refraction-corrected) zenith angles in decimal degrees.
2883
2939
  datetime_or_doy : numeric, pandas.DatetimeIndex
@@ -2899,9 +2955,9 @@ def boland(ghi, solar_zenith, datetime_or_doy, a_coeff=8.645, b_coeff=0.613,
2899
2955
  data : OrderedDict or DataFrame
2900
2956
  Contains the following keys/columns:
2901
2957
 
2902
- * ``dni``: the modeled direct normal irradiance in W/m^2.
2958
+ * ``dni``: the modeled direct normal irradiance. [Wm⁻²]
2903
2959
  * ``dhi``: the modeled diffuse horizontal irradiance in
2904
- W/m^2.
2960
+ Wm⁻².
2905
2961
  * ``kt``: Ratio of global to extraterrestrial irradiance
2906
2962
  on a horizontal plane.
2907
2963
 
@@ -2990,7 +3046,7 @@ def campbell_norman(zenith, transmittance, pressure=101325.0,
2990
3046
  -------
2991
3047
  irradiance: DataFrame
2992
3048
  Modeled direct normal irradiance, direct horizontal irradiance,
2993
- and global horizontal irradiance in W/m^2
3049
+ and global horizontal irradiance in Wm⁻²
2994
3050
 
2995
3051
  References
2996
3052
  ----------
@@ -3047,7 +3103,7 @@ def _liujordan(zenith, transmittance, airmass, dni_extra=1367.0):
3047
3103
  -------
3048
3104
  irradiance: DataFrame
3049
3105
  Modeled direct normal irradiance, direct horizontal irradiance,
3050
- and global horizontal irradiance in W/m^2
3106
+ and global horizontal irradiance in Wm⁻²
3051
3107
 
3052
3108
  References
3053
3109
  ----------
@@ -3579,7 +3635,12 @@ def _get_dirint_coeffs():
3579
3635
  return coeffs[1:, 1:, :, :]
3580
3636
 
3581
3637
 
3582
- def dni(ghi, dhi, zenith, clearsky_dni=None, clearsky_tolerance=1.1,
3638
+ @renamed_kwarg_warning(
3639
+ since='0.11.2',
3640
+ old_param_name='clearsky_dni',
3641
+ new_param_name='dni_clear',
3642
+ removal="0.13.0")
3643
+ def dni(ghi, dhi, zenith, dni_clear=None, clearsky_tolerance=1.1,
3583
3644
  zenith_threshold_for_zero_dni=88.0,
3584
3645
  zenith_threshold_for_clearsky_limit=80.0):
3585
3646
  """
@@ -3603,11 +3664,14 @@ def dni(ghi, dhi, zenith, clearsky_dni=None, clearsky_tolerance=1.1,
3603
3664
  True (not refraction-corrected) zenith angles in decimal
3604
3665
  degrees. Angles must be >=0 and <=180.
3605
3666
 
3606
- clearsky_dni : Series, optional
3607
- Clearsky direct normal irradiance.
3667
+ dni_clear : Series, optional
3668
+ Clearsky direct normal irradiance. [Wm⁻²]
3669
+
3670
+ .. versionchanged:: 0.11.2
3671
+ Renamed from ``clearsky_dni`` to ``dni_clear``.
3608
3672
 
3609
3673
  clearsky_tolerance : float, default 1.1
3610
- If 'clearsky_dni' is given this parameter can be used to allow a
3674
+ If ``dni_clear`` is given this parameter can be used to allow a
3611
3675
  tolerance by how much the calculated DNI value can be greater than
3612
3676
  the clearsky value before it is identified as an unreasonable value.
3613
3677
 
@@ -3620,7 +3684,7 @@ def dni(ghi, dhi, zenith, clearsky_dni=None, clearsky_tolerance=1.1,
3620
3684
  'zenith_threshold_for_clearsky_limit' and smaller the
3621
3685
  'zenith_threshold_for_zero_dni' that are greater than the clearsky DNI
3622
3686
  (times allowed tolerance) will be corrected. Only applies if
3623
- 'clearsky_dni' is not None.
3687
+ ``dni_clear`` is not None.
3624
3688
 
3625
3689
  Returns
3626
3690
  -------
@@ -3642,8 +3706,8 @@ def dni(ghi, dhi, zenith, clearsky_dni=None, clearsky_tolerance=1.1,
3642
3706
  # zenith_threshold_for_clearsky_limit and smaller than the
3643
3707
  # upper_cutoff_zenith that are greater than the clearsky DNI (times
3644
3708
  # clearsky_tolerance)
3645
- if clearsky_dni is not None:
3646
- max_dni = clearsky_dni * clearsky_tolerance
3709
+ if dni_clear is not None:
3710
+ max_dni = dni_clear * clearsky_tolerance
3647
3711
  dni[(zenith >= zenith_threshold_for_clearsky_limit) &
3648
3712
  (zenith < zenith_threshold_for_zero_dni) &
3649
3713
  (dni > max_dni)] = max_dni
@@ -3684,8 +3748,8 @@ def complete_irradiance(solar_zenith,
3684
3748
  Pandas series of dni data, with datetime index. Must have the same
3685
3749
  datetime index as ghi, dhi, and zenith series, when available.
3686
3750
  dni_clear : Series, optional
3687
- Pandas series of clearsky dni data. Must have the same datetime index
3688
- as ghi, dhi, dni, and zenith series, when available. See
3751
+ Pandas series of clearsky dni data [Wm⁻²]. Must have the same datetime
3752
+ index as ghi, dhi, dni, and zenith series, when available. See
3689
3753
  :py:func:`dni` for details.
3690
3754
 
3691
3755
  Returns
@@ -3695,7 +3759,7 @@ def complete_irradiance(solar_zenith,
3695
3759
  """
3696
3760
  if ghi is not None and dhi is not None and dni is None:
3697
3761
  dni = pvlib.irradiance.dni(ghi, dhi, solar_zenith,
3698
- clearsky_dni=dni_clear,
3762
+ dni_clear=dni_clear,
3699
3763
  clearsky_tolerance=1.1)
3700
3764
  elif dni is not None and dhi is not None and ghi is None:
3701
3765
  ghi = (dhi + dni * tools.cosd(solar_zenith))
@@ -3721,7 +3785,7 @@ def louche(ghi, solar_zenith, datetime_or_doy, max_zenith=90):
3721
3785
  Parameters
3722
3786
  ----------
3723
3787
  ghi : numeric
3724
- Global horizontal irradiance. [W/m^2]
3788
+ Global horizontal irradiance. [Wm⁻²]
3725
3789
 
3726
3790
  solar_zenith : numeric
3727
3791
  True (not refraction-corrected) zenith angles in decimal
@@ -3736,9 +3800,9 @@ def louche(ghi, solar_zenith, datetime_or_doy, max_zenith=90):
3736
3800
  data: OrderedDict or DataFrame
3737
3801
  Contains the following keys/columns:
3738
3802
 
3739
- * ``dni``: the modeled direct normal irradiance in W/m^2.
3803
+ * ``dni``: the modeled direct normal irradiance. [Wm⁻²]
3740
3804
  * ``dhi``: the modeled diffuse horizontal irradiance in
3741
- W/m^2.
3805
+ Wm⁻².
3742
3806
  * ``kt``: Ratio of global to extraterrestrial irradiance
3743
3807
  on a horizontal plane.
3744
3808