pvlib 0.11.0__py3-none-any.whl → 0.11.1__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.
- pvlib/atmosphere.py +157 -1
- pvlib/bifacial/__init__.py +4 -4
- pvlib/bifacial/loss_models.py +163 -0
- pvlib/clearsky.py +18 -29
- pvlib/data/pvgis_tmy_meta.json +32 -93
- pvlib/data/pvgis_tmy_test.dat +8761 -8761
- pvlib/data/tmy_45.000_8.000_2005_2020.csv +8789 -0
- pvlib/data/tmy_45.000_8.000_2005_2020.epw +8768 -0
- pvlib/data/tmy_45.000_8.000_2005_2020.json +1 -0
- pvlib/data/tmy_45.000_8.000_2005_2020.txt +8761 -0
- pvlib/data/tmy_45.000_8.000_userhorizon.json +1 -1
- pvlib/data/variables_style_rules.csv +2 -1
- pvlib/iotools/pvgis.py +39 -3
- pvlib/irradiance.py +141 -120
- pvlib/location.py +5 -5
- pvlib/modelchain.py +1 -1
- pvlib/pvsystem.py +2 -2
- pvlib/shading.py +8 -8
- pvlib/singlediode.py +1 -1
- pvlib/solarposition.py +55 -50
- pvlib/spa.py +24 -22
- pvlib/spectrum/__init__.py +9 -4
- pvlib/spectrum/irradiance.py +272 -0
- pvlib/spectrum/mismatch.py +118 -508
- pvlib/spectrum/response.py +280 -0
- pvlib/spectrum/spectrl2.py +16 -16
- pvlib/tests/bifacial/test_losses_models.py +54 -0
- pvlib/tests/iotools/test_pvgis.py +57 -11
- pvlib/tests/spectrum/__init__.py +0 -0
- pvlib/tests/spectrum/conftest.py +40 -0
- pvlib/tests/spectrum/test_irradiance.py +138 -0
- pvlib/tests/{test_spectrum.py → spectrum/test_mismatch.py} +32 -306
- pvlib/tests/spectrum/test_response.py +124 -0
- pvlib/tests/spectrum/test_spectrl2.py +72 -0
- pvlib/tests/test_atmosphere.py +71 -0
- pvlib/tests/test_clearsky.py +37 -25
- pvlib/tests/test_irradiance.py +6 -6
- pvlib/tests/test_solarposition.py +84 -36
- pvlib/tests/test_spa.py +1 -1
- pvlib/tools.py +26 -2
- pvlib/tracking.py +53 -47
- {pvlib-0.11.0.dist-info → pvlib-0.11.1.dist-info}/METADATA +31 -29
- {pvlib-0.11.0.dist-info → pvlib-0.11.1.dist-info}/RECORD +47 -38
- {pvlib-0.11.0.dist-info → pvlib-0.11.1.dist-info}/WHEEL +1 -1
- pvlib/data/tmy_45.000_8.000_2005_2016.csv +0 -8789
- pvlib/data/tmy_45.000_8.000_2005_2016.epw +0 -8768
- pvlib/data/tmy_45.000_8.000_2005_2016.json +0 -1
- pvlib/data/tmy_45.000_8.000_2005_2016.txt +0 -8761
- {pvlib-0.11.0.dist-info → pvlib-0.11.1.dist-info}/AUTHORS.md +0 -0
- {pvlib-0.11.0.dist-info → pvlib-0.11.1.dist-info}/LICENSE +0 -0
- {pvlib-0.11.0.dist-info → pvlib-0.11.1.dist-info}/top_level.txt +0 -0
pvlib/irradiance.py
CHANGED
|
@@ -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'``,
|
|
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 (
|
|
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 (
|
|
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 (
|
|
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 (
|
|
483
|
-
* ``poa_direct`` : Total in-plane beam irradiance (
|
|
484
|
-
* ``poa_diffuse`` : Total in-plane diffuse irradiance (
|
|
485
|
-
* ``poa_sky_diffuse`` : In-plane diffuse irradiance from sky (
|
|
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
|
-
(
|
|
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.
|
|
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.
|
|
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
|
|
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
|
|
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
|
|
648
|
+
Diffuse horizontal irradiance, must be >=0. [Wm⁻²]
|
|
667
649
|
|
|
668
650
|
ghi : numeric
|
|
669
|
-
Global irradiance
|
|
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]
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
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,13 +728,10 @@ 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
|
|
725
|
-
|
|
726
|
-
.. math::
|
|
727
|
-
I_{d} = DHI ( A R_b + (1 - A) (\frac{1 + \cos\beta}{2}) )
|
|
731
|
+
Determine diffuse irradiance from the sky on a tilted surface using the
|
|
732
|
+
Hay and Davies (1980) model.
|
|
728
733
|
|
|
729
|
-
Hay and Davies
|
|
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
737
|
azimuth angle, diffuse horizontal irradiance, direct normal
|
|
@@ -746,13 +751,13 @@ def haydavies(surface_tilt, surface_azimuth, dhi, dni, dni_extra,
|
|
|
746
751
|
South=180, East=90, West=270).
|
|
747
752
|
|
|
748
753
|
dhi : numeric
|
|
749
|
-
Diffuse horizontal irradiance
|
|
754
|
+
Diffuse horizontal irradiance. [Wm⁻²]
|
|
750
755
|
|
|
751
756
|
dni : numeric
|
|
752
|
-
Direct normal irradiance
|
|
757
|
+
Direct normal irradiance. [Wm⁻²]
|
|
753
758
|
|
|
754
759
|
dni_extra : numeric
|
|
755
|
-
Extraterrestrial normal irradiance
|
|
760
|
+
Extraterrestrial normal irradiance. [Wm⁻²]
|
|
756
761
|
|
|
757
762
|
solar_zenith : numeric, optional
|
|
758
763
|
Solar apparent (refraction-corrected) zenith angles in decimal
|
|
@@ -769,16 +774,16 @@ def haydavies(surface_tilt, surface_azimuth, dhi, dni, dni_extra,
|
|
|
769
774
|
projection. Must supply ``solar_zenith`` and ``solar_azimuth``
|
|
770
775
|
or supply ``projection_ratio``.
|
|
771
776
|
|
|
772
|
-
return_components : bool, default False
|
|
773
|
-
|
|
774
|
-
|
|
777
|
+
return_components : bool, default `False`
|
|
778
|
+
If `False`, ``sky_diffuse`` is returned.
|
|
779
|
+
If `True`, ``diffuse_components`` is returned.
|
|
775
780
|
|
|
776
781
|
Returns
|
|
777
782
|
--------
|
|
778
783
|
numeric, OrderedDict, or DataFrame
|
|
779
|
-
Return type controlled by
|
|
780
|
-
If
|
|
781
|
-
If
|
|
784
|
+
Return type controlled by ``return_components`` argument.
|
|
785
|
+
If `False`, ``sky_diffuse`` is returned.
|
|
786
|
+
If `True`, ``diffuse_components`` is returned.
|
|
782
787
|
|
|
783
788
|
sky_diffuse : numeric
|
|
784
789
|
The sky diffuse component of the solar radiation on a tilted
|
|
@@ -793,20 +798,36 @@ def haydavies(surface_tilt, surface_azimuth, dhi, dni, dni_extra,
|
|
|
793
798
|
|
|
794
799
|
Notes
|
|
795
800
|
------
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
801
|
+
In the Hay and Davies (1980) model [1]_ [2]_, sky diffuse irradiance,
|
|
802
|
+
:math:`I_d`, is as follows:
|
|
803
|
+
|
|
804
|
+
.. math::
|
|
805
|
+
I_{d} = DHI \left( A\cdot R_b + (1 - A) \left(\frac{
|
|
806
|
+
1 + \cos\beta}{2}\right ) \right ).
|
|
807
|
+
|
|
808
|
+
:math:`DHI` is the diffuse horizontal irradiance,
|
|
809
|
+
:math:`A` is the anisotropy index, which is the ratio of the direct normal
|
|
810
|
+
irradiance to the extraterrestrial irradiation,
|
|
811
|
+
:math:`R_b` is the projection ratio, which is defined as the ratio of the
|
|
812
|
+
cosine of the angle of incidence (AOI) to the cosine of the zenith angle,
|
|
813
|
+
and finally :math:`\beta` is the tilt angle of the array.
|
|
814
|
+
|
|
815
|
+
If supplying ``projection_ratio``, consider constraining its values
|
|
816
|
+
when the zenith angle approaches 90 degrees or the AOI projection is
|
|
817
|
+
negative. See code for details.
|
|
799
818
|
|
|
800
819
|
References
|
|
801
820
|
-----------
|
|
802
|
-
.. [1]
|
|
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
|
|
821
|
+
.. [1] Hay, J. E., Davies, J. A., 1980. Calculations of the solar
|
|
807
822
|
radiation incident on an inclined surface. In: Hay, J.E., Won, T.K.
|
|
808
823
|
(Eds.), Proc. of First Canadian Solar Radiation Data Workshop, 59.
|
|
809
|
-
Ministry of Supply and Services, Canada.
|
|
824
|
+
Ministry of Supply and Services, Canada. Available from:
|
|
825
|
+
https://archive.org/details/proceedingsfirst00cana/mode/2up
|
|
826
|
+
(Last accessed: 17/09/24)
|
|
827
|
+
.. [2] Loutzenhiser P. G. et al. "Empirical validation of models to
|
|
828
|
+
compute solar irradiance on inclined surfaces for building energy
|
|
829
|
+
simulation" 2007, Solar Energy vol. 81. pp. 254-267
|
|
830
|
+
:doi:`10.1016/j.solener.2006.03.009`
|
|
810
831
|
'''
|
|
811
832
|
|
|
812
833
|
# if necessary, calculate ratio of titled and horizontal beam irradiance
|
|
@@ -878,16 +899,16 @@ def reindl(surface_tilt, surface_azimuth, dhi, dni, ghi, dni_extra,
|
|
|
878
899
|
South=180 East = 90, West = 270).
|
|
879
900
|
|
|
880
901
|
dhi : numeric
|
|
881
|
-
diffuse horizontal irradiance
|
|
902
|
+
diffuse horizontal irradiance. [Wm⁻²]
|
|
882
903
|
|
|
883
904
|
dni : numeric
|
|
884
|
-
direct normal irradiance
|
|
905
|
+
direct normal irradiance. [Wm⁻²]
|
|
885
906
|
|
|
886
907
|
ghi: numeric
|
|
887
|
-
Global irradiance
|
|
908
|
+
Global irradiance. [Wm⁻²]
|
|
888
909
|
|
|
889
910
|
dni_extra : numeric
|
|
890
|
-
Extraterrestrial normal irradiance
|
|
911
|
+
Extraterrestrial normal irradiance. [Wm⁻²]
|
|
891
912
|
|
|
892
913
|
solar_zenith : numeric
|
|
893
914
|
Apparent (refraction-corrected) zenith angles in decimal degrees.
|
|
@@ -972,10 +993,10 @@ def king(surface_tilt, dhi, ghi, solar_zenith):
|
|
|
972
993
|
surface facing horizon = 90)
|
|
973
994
|
|
|
974
995
|
dhi : numeric
|
|
975
|
-
Diffuse horizontal irradiance
|
|
996
|
+
Diffuse horizontal irradiance. [Wm⁻²]
|
|
976
997
|
|
|
977
998
|
ghi : numeric
|
|
978
|
-
Global horizontal irradiance
|
|
999
|
+
Global horizontal irradiance. [Wm⁻²]
|
|
979
1000
|
|
|
980
1001
|
solar_zenith : numeric
|
|
981
1002
|
Apparent (refraction-corrected) zenith angles in decimal degrees.
|
|
@@ -1029,13 +1050,13 @@ def perez(surface_tilt, surface_azimuth, dhi, dni, dni_extra,
|
|
|
1029
1050
|
east of north (e.g. North = 0, South=180 East = 90, West = 270).
|
|
1030
1051
|
|
|
1031
1052
|
dhi : numeric
|
|
1032
|
-
Diffuse horizontal irradiance
|
|
1053
|
+
Diffuse horizontal irradiance. [Wm⁻²] DHI must be >=0.
|
|
1033
1054
|
|
|
1034
1055
|
dni : numeric
|
|
1035
|
-
Direct normal irradiance
|
|
1056
|
+
Direct normal irradiance. [Wm⁻²] DNI must be >=0.
|
|
1036
1057
|
|
|
1037
1058
|
dni_extra : numeric
|
|
1038
|
-
Extraterrestrial normal irradiance
|
|
1059
|
+
Extraterrestrial normal irradiance. [Wm⁻²]
|
|
1039
1060
|
|
|
1040
1061
|
solar_zenith : numeric
|
|
1041
1062
|
apparent (refraction-corrected) zenith angles in decimal
|
|
@@ -1255,8 +1276,8 @@ def _f(i, j, zeta):
|
|
|
1255
1276
|
[+0.328, +0.471, -0.216, +0.069, -0.105, -0.028],
|
|
1256
1277
|
[+0.557, +0.241, -0.300, +0.086, -0.085, -0.012],
|
|
1257
1278
|
[+0.861, -0.323, -0.355, +0.240, -0.467, -0.008],
|
|
1258
|
-
[
|
|
1259
|
-
[
|
|
1279
|
+
[+1.212, -1.239, -0.444, +0.305, -0.797, +0.047],
|
|
1280
|
+
[+1.099, -1.847, -0.365, +0.275, -1.132, +0.124],
|
|
1260
1281
|
[+0.544, +0.157, -0.213, +0.118, -1.455, +0.292],
|
|
1261
1282
|
[+0.544, +0.157, -0.213, +0.118, -1.455, +0.292],
|
|
1262
1283
|
[+0.000, +0.000, +0.000, +0.000, +0.000, +0.000],
|
|
@@ -1295,13 +1316,13 @@ def perez_driesse(surface_tilt, surface_azimuth, dhi, dni, dni_extra,
|
|
|
1295
1316
|
east of north (e.g. North = 0, South=180 East = 90, West = 270).
|
|
1296
1317
|
|
|
1297
1318
|
dhi : numeric
|
|
1298
|
-
Diffuse horizontal irradiance
|
|
1319
|
+
Diffuse horizontal irradiance. [Wm⁻²] dhi must be >=0.
|
|
1299
1320
|
|
|
1300
1321
|
dni : numeric
|
|
1301
|
-
Direct normal irradiance
|
|
1322
|
+
Direct normal irradiance. [Wm⁻²] dni must be >=0.
|
|
1302
1323
|
|
|
1303
1324
|
dni_extra : numeric
|
|
1304
|
-
Extraterrestrial normal irradiance
|
|
1325
|
+
Extraterrestrial normal irradiance. [Wm⁻²]
|
|
1305
1326
|
|
|
1306
1327
|
solar_zenith : numeric
|
|
1307
1328
|
apparent (refraction-corrected) zenith angles in decimal
|
|
@@ -1516,16 +1537,16 @@ def ghi_from_poa_driesse_2023(surface_tilt, surface_azimuth,
|
|
|
1516
1537
|
solar_azimuth : numeric
|
|
1517
1538
|
Solar azimuth angle. [degree]
|
|
1518
1539
|
poa_global : numeric
|
|
1519
|
-
Plane-of-array global irradiance, aka global tilted irradiance. [
|
|
1540
|
+
Plane-of-array global irradiance, aka global tilted irradiance. [Wm⁻²]
|
|
1520
1541
|
dni_extra : numeric, optional
|
|
1521
|
-
Extraterrestrial direct normal irradiance. [
|
|
1542
|
+
Extraterrestrial direct normal irradiance. [Wm⁻²]
|
|
1522
1543
|
airmass : numeric, optional
|
|
1523
1544
|
Relative airmass (not adjusted for pressure). [unitless]
|
|
1524
1545
|
albedo : numeric, default 0.25
|
|
1525
1546
|
Ground surface albedo. [unitless]
|
|
1526
1547
|
xtol : numeric, default 0.01
|
|
1527
1548
|
Convergence criterion. The estimated GHI will be within xtol of the
|
|
1528
|
-
true value. Must be positive. [
|
|
1549
|
+
true value. Must be positive. [Wm⁻²]
|
|
1529
1550
|
full_output : boolean, default False
|
|
1530
1551
|
If full_output is False, only ghi is returned, otherwise the return
|
|
1531
1552
|
value is (ghi, converged, niter). (see Returns section for details).
|
|
@@ -1533,7 +1554,7 @@ def ghi_from_poa_driesse_2023(surface_tilt, surface_azimuth,
|
|
|
1533
1554
|
Returns
|
|
1534
1555
|
-------
|
|
1535
1556
|
ghi : numeric
|
|
1536
|
-
Estimated GHI. [
|
|
1557
|
+
Estimated GHI. [Wm⁻²]
|
|
1537
1558
|
converged : boolean, optional
|
|
1538
1559
|
Present if full_output=True. Indicates which elements converged
|
|
1539
1560
|
successfully.
|
|
@@ -1592,7 +1613,7 @@ def clearsky_index(ghi, clearsky_ghi, max_clearsky_index=2.0):
|
|
|
1592
1613
|
Parameters
|
|
1593
1614
|
----------
|
|
1594
1615
|
ghi : numeric
|
|
1595
|
-
Global horizontal irradiance
|
|
1616
|
+
Global horizontal irradiance. [Wm⁻²]
|
|
1596
1617
|
|
|
1597
1618
|
clearsky_ghi : numeric
|
|
1598
1619
|
Modeled clearsky GHI
|
|
@@ -1635,7 +1656,7 @@ def clearness_index(ghi, solar_zenith, extra_radiation, min_cos_zenith=0.065,
|
|
|
1635
1656
|
Parameters
|
|
1636
1657
|
----------
|
|
1637
1658
|
ghi : numeric
|
|
1638
|
-
Global horizontal irradiance
|
|
1659
|
+
Global horizontal irradiance. [Wm⁻²]
|
|
1639
1660
|
|
|
1640
1661
|
solar_zenith : numeric
|
|
1641
1662
|
True (not refraction-corrected) solar zenith angle in decimal
|
|
@@ -1748,7 +1769,7 @@ def disc(ghi, solar_zenith, datetime_or_doy, pressure=101325,
|
|
|
1748
1769
|
Parameters
|
|
1749
1770
|
----------
|
|
1750
1771
|
ghi : numeric
|
|
1751
|
-
Global horizontal irradiance
|
|
1772
|
+
Global horizontal irradiance. [Wm⁻²]
|
|
1752
1773
|
|
|
1753
1774
|
solar_zenith : numeric
|
|
1754
1775
|
True (not refraction-corrected) solar zenith angles in decimal
|
|
@@ -1781,7 +1802,7 @@ def disc(ghi, solar_zenith, datetime_or_doy, pressure=101325,
|
|
|
1781
1802
|
Contains the following keys:
|
|
1782
1803
|
|
|
1783
1804
|
* ``dni``: The modeled direct normal irradiance
|
|
1784
|
-
in
|
|
1805
|
+
in Wm⁻² provided by the
|
|
1785
1806
|
Direct Insolation Simulation Code (DISC) model.
|
|
1786
1807
|
* ``kt``: Ratio of global to extraterrestrial
|
|
1787
1808
|
irradiance on a horizontal plane.
|
|
@@ -1894,7 +1915,7 @@ def dirint(ghi, solar_zenith, times, pressure=101325., use_delta_kt_prime=True,
|
|
|
1894
1915
|
Parameters
|
|
1895
1916
|
----------
|
|
1896
1917
|
ghi : array-like
|
|
1897
|
-
Global horizontal irradiance
|
|
1918
|
+
Global horizontal irradiance. [Wm⁻²]
|
|
1898
1919
|
|
|
1899
1920
|
solar_zenith : array-like
|
|
1900
1921
|
True (not refraction-corrected) solar_zenith angles in decimal
|
|
@@ -1932,7 +1953,7 @@ def dirint(ghi, solar_zenith, times, pressure=101325., use_delta_kt_prime=True,
|
|
|
1932
1953
|
Returns
|
|
1933
1954
|
-------
|
|
1934
1955
|
dni : array-like
|
|
1935
|
-
The modeled direct normal irradiance in
|
|
1956
|
+
The modeled direct normal irradiance in Wm⁻² provided by the
|
|
1936
1957
|
DIRINT model.
|
|
1937
1958
|
|
|
1938
1959
|
Notes
|
|
@@ -2136,13 +2157,13 @@ def dirindex(ghi, ghi_clearsky, dni_clearsky, zenith, times, pressure=101325.,
|
|
|
2136
2157
|
Parameters
|
|
2137
2158
|
----------
|
|
2138
2159
|
ghi : array-like
|
|
2139
|
-
Global horizontal irradiance
|
|
2160
|
+
Global horizontal irradiance. [Wm⁻²]
|
|
2140
2161
|
|
|
2141
2162
|
ghi_clearsky : array-like
|
|
2142
|
-
Global horizontal irradiance from clear sky model
|
|
2163
|
+
Global horizontal irradiance from clear sky model. [Wm⁻²]
|
|
2143
2164
|
|
|
2144
2165
|
dni_clearsky : array-like
|
|
2145
|
-
Direct normal irradiance from clear sky model
|
|
2166
|
+
Direct normal irradiance from clear sky model. [Wm⁻²]
|
|
2146
2167
|
|
|
2147
2168
|
zenith : array-like
|
|
2148
2169
|
True (not refraction-corrected) zenith angles in decimal
|
|
@@ -2181,7 +2202,7 @@ def dirindex(ghi, ghi_clearsky, dni_clearsky, zenith, times, pressure=101325.,
|
|
|
2181
2202
|
Returns
|
|
2182
2203
|
-------
|
|
2183
2204
|
dni : array-like
|
|
2184
|
-
The modeled direct normal irradiance
|
|
2205
|
+
The modeled direct normal irradiance. [Wm⁻²]
|
|
2185
2206
|
|
|
2186
2207
|
Notes
|
|
2187
2208
|
-----
|
|
@@ -2228,12 +2249,12 @@ def gti_dirint(poa_global, aoi, solar_zenith, solar_azimuth, times,
|
|
|
2228
2249
|
|
|
2229
2250
|
Model performance is poor for AOI greater than approximately
|
|
2230
2251
|
80 degrees `and` plane of array irradiance greater than
|
|
2231
|
-
approximately 200
|
|
2252
|
+
approximately 200 Wm⁻².
|
|
2232
2253
|
|
|
2233
2254
|
Parameters
|
|
2234
2255
|
----------
|
|
2235
2256
|
poa_global : array-like
|
|
2236
|
-
Plane of array global irradiance
|
|
2257
|
+
Plane of array global irradiance. [Wm⁻²]
|
|
2237
2258
|
|
|
2238
2259
|
aoi : array-like
|
|
2239
2260
|
Angle of incidence of solar rays with respect to the module
|
|
@@ -2300,10 +2321,10 @@ def gti_dirint(poa_global, aoi, solar_zenith, solar_azimuth, times,
|
|
|
2300
2321
|
data : DataFrame
|
|
2301
2322
|
Contains the following keys/columns:
|
|
2302
2323
|
|
|
2303
|
-
* ``ghi``: the modeled global horizontal irradiance
|
|
2304
|
-
* ``dni``: the modeled direct normal irradiance
|
|
2324
|
+
* ``ghi``: the modeled global horizontal irradiance. [Wm⁻²]
|
|
2325
|
+
* ``dni``: the modeled direct normal irradiance. [Wm⁻²]
|
|
2305
2326
|
* ``dhi``: the modeled diffuse horizontal irradiance in
|
|
2306
|
-
|
|
2327
|
+
Wm⁻².
|
|
2307
2328
|
|
|
2308
2329
|
References
|
|
2309
2330
|
----------
|
|
@@ -2384,7 +2405,7 @@ def _gti_dirint_lt_90(poa_global, aoi, aoi_lt_90, solar_zenith, solar_azimuth,
|
|
|
2384
2405
|
for iteration, coeff in enumerate(coeffs):
|
|
2385
2406
|
|
|
2386
2407
|
# test if difference between modeled GTI and
|
|
2387
|
-
# measured GTI (poa_global) is less than 1
|
|
2408
|
+
# measured GTI (poa_global) is less than 1 Wm⁻²
|
|
2388
2409
|
# only test for aoi less than 90 deg
|
|
2389
2410
|
best_diff_lte_1 = best_diff <= 1
|
|
2390
2411
|
best_diff_lte_1_lt_90 = best_diff_lte_1[aoi_lt_90]
|
|
@@ -2565,7 +2586,7 @@ def erbs(ghi, zenith, datetime_or_doy, min_cos_zenith=0.065, max_zenith=87):
|
|
|
2565
2586
|
Parameters
|
|
2566
2587
|
----------
|
|
2567
2588
|
ghi: numeric
|
|
2568
|
-
Global horizontal irradiance
|
|
2589
|
+
Global horizontal irradiance. [Wm⁻²]
|
|
2569
2590
|
zenith: numeric
|
|
2570
2591
|
True (not refraction-corrected) zenith angles in decimal degrees.
|
|
2571
2592
|
datetime_or_doy : int, float, array, pd.DatetimeIndex
|
|
@@ -2583,9 +2604,9 @@ def erbs(ghi, zenith, datetime_or_doy, min_cos_zenith=0.065, max_zenith=87):
|
|
|
2583
2604
|
data : OrderedDict or DataFrame
|
|
2584
2605
|
Contains the following keys/columns:
|
|
2585
2606
|
|
|
2586
|
-
* ``dni``: the modeled direct normal irradiance
|
|
2607
|
+
* ``dni``: the modeled direct normal irradiance. [Wm⁻²]
|
|
2587
2608
|
* ``dhi``: the modeled diffuse horizontal irradiance in
|
|
2588
|
-
|
|
2609
|
+
Wm⁻².
|
|
2589
2610
|
* ``kt``: Ratio of global to extraterrestrial irradiance
|
|
2590
2611
|
on a horizontal plane.
|
|
2591
2612
|
|
|
@@ -2663,7 +2684,7 @@ def erbs_driesse(ghi, zenith, datetime_or_doy=None, dni_extra=None,
|
|
|
2663
2684
|
Parameters
|
|
2664
2685
|
----------
|
|
2665
2686
|
ghi: numeric
|
|
2666
|
-
Global horizontal irradiance
|
|
2687
|
+
Global horizontal irradiance. [Wm⁻²]
|
|
2667
2688
|
zenith: numeric
|
|
2668
2689
|
True (not refraction-corrected) zenith angles in decimal degrees.
|
|
2669
2690
|
datetime_or_doy : int, float, array or pd.DatetimeIndex, optional
|
|
@@ -2686,9 +2707,9 @@ def erbs_driesse(ghi, zenith, datetime_or_doy=None, dni_extra=None,
|
|
|
2686
2707
|
data : OrderedDict or DataFrame
|
|
2687
2708
|
Contains the following keys/columns:
|
|
2688
2709
|
|
|
2689
|
-
* ``dni``: the modeled direct normal irradiance
|
|
2710
|
+
* ``dni``: the modeled direct normal irradiance. [Wm⁻²]
|
|
2690
2711
|
* ``dhi``: the modeled diffuse horizontal irradiance in
|
|
2691
|
-
|
|
2712
|
+
Wm⁻².
|
|
2692
2713
|
* ``kt``: Ratio of global to extraterrestrial irradiance
|
|
2693
2714
|
on a horizontal plane.
|
|
2694
2715
|
|
|
@@ -2784,7 +2805,7 @@ def orgill_hollands(ghi, zenith, datetime_or_doy, dni_extra=None,
|
|
|
2784
2805
|
Parameters
|
|
2785
2806
|
----------
|
|
2786
2807
|
ghi: numeric
|
|
2787
|
-
Global horizontal irradiance
|
|
2808
|
+
Global horizontal irradiance. [Wm⁻²]
|
|
2788
2809
|
zenith: numeric
|
|
2789
2810
|
True (not refraction-corrected) zenith angles in decimal degrees.
|
|
2790
2811
|
datetime_or_doy : int, float, array, pd.DatetimeIndex
|
|
@@ -2804,9 +2825,9 @@ def orgill_hollands(ghi, zenith, datetime_or_doy, dni_extra=None,
|
|
|
2804
2825
|
data : OrderedDict or DataFrame
|
|
2805
2826
|
Contains the following keys/columns:
|
|
2806
2827
|
|
|
2807
|
-
* ``dni``: the modeled direct normal irradiance
|
|
2828
|
+
* ``dni``: the modeled direct normal irradiance. [Wm⁻²]
|
|
2808
2829
|
* ``dhi``: the modeled diffuse horizontal irradiance in
|
|
2809
|
-
|
|
2830
|
+
Wm⁻².
|
|
2810
2831
|
* ``kt``: Ratio of global to extraterrestrial irradiance
|
|
2811
2832
|
on a horizontal plane.
|
|
2812
2833
|
|
|
@@ -2877,7 +2898,7 @@ def boland(ghi, solar_zenith, datetime_or_doy, a_coeff=8.645, b_coeff=0.613,
|
|
|
2877
2898
|
Parameters
|
|
2878
2899
|
----------
|
|
2879
2900
|
ghi: numeric
|
|
2880
|
-
Global horizontal irradiance. [
|
|
2901
|
+
Global horizontal irradiance. [Wm⁻²]
|
|
2881
2902
|
solar_zenith: numeric
|
|
2882
2903
|
True (not refraction-corrected) zenith angles in decimal degrees.
|
|
2883
2904
|
datetime_or_doy : numeric, pandas.DatetimeIndex
|
|
@@ -2899,9 +2920,9 @@ def boland(ghi, solar_zenith, datetime_or_doy, a_coeff=8.645, b_coeff=0.613,
|
|
|
2899
2920
|
data : OrderedDict or DataFrame
|
|
2900
2921
|
Contains the following keys/columns:
|
|
2901
2922
|
|
|
2902
|
-
* ``dni``: the modeled direct normal irradiance
|
|
2923
|
+
* ``dni``: the modeled direct normal irradiance. [Wm⁻²]
|
|
2903
2924
|
* ``dhi``: the modeled diffuse horizontal irradiance in
|
|
2904
|
-
|
|
2925
|
+
Wm⁻².
|
|
2905
2926
|
* ``kt``: Ratio of global to extraterrestrial irradiance
|
|
2906
2927
|
on a horizontal plane.
|
|
2907
2928
|
|
|
@@ -2990,7 +3011,7 @@ def campbell_norman(zenith, transmittance, pressure=101325.0,
|
|
|
2990
3011
|
-------
|
|
2991
3012
|
irradiance: DataFrame
|
|
2992
3013
|
Modeled direct normal irradiance, direct horizontal irradiance,
|
|
2993
|
-
and global horizontal irradiance in
|
|
3014
|
+
and global horizontal irradiance in Wm⁻²
|
|
2994
3015
|
|
|
2995
3016
|
References
|
|
2996
3017
|
----------
|
|
@@ -3047,7 +3068,7 @@ def _liujordan(zenith, transmittance, airmass, dni_extra=1367.0):
|
|
|
3047
3068
|
-------
|
|
3048
3069
|
irradiance: DataFrame
|
|
3049
3070
|
Modeled direct normal irradiance, direct horizontal irradiance,
|
|
3050
|
-
and global horizontal irradiance in
|
|
3071
|
+
and global horizontal irradiance in Wm⁻²
|
|
3051
3072
|
|
|
3052
3073
|
References
|
|
3053
3074
|
----------
|
|
@@ -3721,7 +3742,7 @@ def louche(ghi, solar_zenith, datetime_or_doy, max_zenith=90):
|
|
|
3721
3742
|
Parameters
|
|
3722
3743
|
----------
|
|
3723
3744
|
ghi : numeric
|
|
3724
|
-
Global horizontal irradiance. [
|
|
3745
|
+
Global horizontal irradiance. [Wm⁻²]
|
|
3725
3746
|
|
|
3726
3747
|
solar_zenith : numeric
|
|
3727
3748
|
True (not refraction-corrected) zenith angles in decimal
|
|
@@ -3736,9 +3757,9 @@ def louche(ghi, solar_zenith, datetime_or_doy, max_zenith=90):
|
|
|
3736
3757
|
data: OrderedDict or DataFrame
|
|
3737
3758
|
Contains the following keys/columns:
|
|
3738
3759
|
|
|
3739
|
-
* ``dni``: the modeled direct normal irradiance
|
|
3760
|
+
* ``dni``: the modeled direct normal irradiance. [Wm⁻²]
|
|
3740
3761
|
* ``dhi``: the modeled diffuse horizontal irradiance in
|
|
3741
|
-
|
|
3762
|
+
Wm⁻².
|
|
3742
3763
|
* ``kt``: Ratio of global to extraterrestrial irradiance
|
|
3743
3764
|
on a horizontal plane.
|
|
3744
3765
|
|
pvlib/location.py
CHANGED
|
@@ -101,7 +101,8 @@ class Location:
|
|
|
101
101
|
Parameters
|
|
102
102
|
----------
|
|
103
103
|
tmy_metadata : dict
|
|
104
|
-
Returned from
|
|
104
|
+
Returned from :py:func:`~pvlib.iotools.read_tmy2` or
|
|
105
|
+
:py:func:`~pvlib.iotools.read_tmy3`
|
|
105
106
|
tmy_data : DataFrame, optional
|
|
106
107
|
Optionally attach the TMY data to this object.
|
|
107
108
|
|
|
@@ -145,14 +146,13 @@ class Location:
|
|
|
145
146
|
Parameters
|
|
146
147
|
----------
|
|
147
148
|
metadata : dict
|
|
148
|
-
Returned from
|
|
149
|
+
Returned from :py:func:`~pvlib.iotools.read_epw`
|
|
149
150
|
data : DataFrame, optional
|
|
150
151
|
Optionally attach the epw data to this object.
|
|
151
152
|
|
|
152
153
|
Returns
|
|
153
154
|
-------
|
|
154
|
-
Location
|
|
155
|
-
called this method from).
|
|
155
|
+
Location
|
|
156
156
|
"""
|
|
157
157
|
|
|
158
158
|
latitude = metadata['latitude']
|
|
@@ -282,7 +282,7 @@ class Location:
|
|
|
282
282
|
"""
|
|
283
283
|
Calculate the relative and absolute airmass.
|
|
284
284
|
|
|
285
|
-
Automatically chooses zenith or
|
|
285
|
+
Automatically chooses zenith or apparent zenith
|
|
286
286
|
depending on the selected model.
|
|
287
287
|
|
|
288
288
|
Parameters
|
pvlib/modelchain.py
CHANGED
|
@@ -1474,7 +1474,7 @@ class ModelChain:
|
|
|
1474
1474
|
data : DataFrame, or tuple or list of DataFrame
|
|
1475
1475
|
Contains plane-of-array irradiance data. Required column names
|
|
1476
1476
|
include ``'poa_global'``, ``'poa_direct'`` and ``'poa_diffuse'``.
|
|
1477
|
-
Columns with weather-related data are
|
|
1477
|
+
Columns with weather-related data are assigned to the
|
|
1478
1478
|
``weather`` attribute. If columns for ``'temp_air'`` and
|
|
1479
1479
|
``'wind_speed'`` are not provided, air temperature of 20 C and wind
|
|
1480
1480
|
speed of 0 m/s are assumed.
|