pvlib 0.11.2__py3-none-any.whl → 0.12.1a1__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 (147) hide show
  1. pvlib/__init__.py +1 -0
  2. pvlib/atmosphere.py +40 -40
  3. pvlib/bifacial/infinite_sheds.py +4 -3
  4. pvlib/bifacial/utils.py +2 -1
  5. pvlib/iotools/__init__.py +6 -0
  6. pvlib/iotools/psm3.py +1 -1
  7. pvlib/iotools/psm4.py +819 -0
  8. pvlib/iotools/pvgis.py +10 -2
  9. pvlib/iotools/tmy.py +3 -69
  10. pvlib/irradiance.py +38 -15
  11. pvlib/ivtools/sdm/__init__.py +20 -0
  12. pvlib/ivtools/sdm/_fit_desoto_pvsyst_sandia.py +585 -0
  13. pvlib/ivtools/sdm/cec.py +93 -0
  14. pvlib/ivtools/sdm/desoto.py +401 -0
  15. pvlib/ivtools/sdm/pvsyst.py +630 -0
  16. pvlib/location.py +73 -33
  17. pvlib/modelchain.py +19 -36
  18. pvlib/pvsystem.py +114 -65
  19. pvlib/snow.py +64 -28
  20. pvlib/spectrum/__init__.py +0 -1
  21. pvlib/spectrum/irradiance.py +2 -64
  22. pvlib/spectrum/mismatch.py +3 -3
  23. pvlib/tools.py +6 -5
  24. {pvlib-0.11.2.dist-info → pvlib-0.12.1a1.dist-info}/METADATA +6 -5
  25. pvlib-0.12.1a1.dist-info/RECORD +80 -0
  26. {pvlib-0.11.2.dist-info → pvlib-0.12.1a1.dist-info}/WHEEL +1 -1
  27. pvlib/data/BIRD_08_16_2012.csv +0 -8761
  28. pvlib/data/BIRD_08_16_2012_patm.csv +0 -8761
  29. pvlib/data/Burlington, United States SolarAnywhere Time Series 2021 Lat_44_465 Lon_-73_205 TMY3 format.csv +0 -8762
  30. pvlib/data/Burlington, United States SolarAnywhere Time Series 20210101 to 20210103 Lat_44_4675 Lon_-73_2075 SA format.csv +0 -578
  31. pvlib/data/Burlington, United States SolarAnywhere Typical GHI Year Lat_44_465 Lon_-73_205 SA format.csv +0 -74
  32. pvlib/data/CPS SCH275KTL-DO-US-800-250kW_275kVA_1.OND +0 -146
  33. pvlib/data/CRNS0101-05-2019-AZ_Tucson_11_W.txt +0 -4
  34. pvlib/data/CRN_with_problems.txt +0 -3
  35. pvlib/data/ET-M772BH550GL.PAN +0 -75
  36. pvlib/data/NLD_Amsterdam062400_IWEC.epw +0 -8768
  37. pvlib/data/PVsyst_demo.csv +0 -10757
  38. pvlib/data/PVsyst_demo_model.csv +0 -3588
  39. pvlib/data/SRML-day-EUPO1801.txt +0 -1441
  40. pvlib/data/abq19056.dat +0 -6
  41. pvlib/data/bishop88_numerical_precision.csv +0 -101
  42. pvlib/data/bsrn-lr0100-pay0616.dat +0 -86901
  43. pvlib/data/bsrn-pay0616.dat.gz +0 -0
  44. pvlib/data/cams_mcclear_1min_verbose.csv +0 -60
  45. pvlib/data/cams_mcclear_monthly.csv +0 -42
  46. pvlib/data/cams_radiation_1min_verbose.csv +0 -72
  47. pvlib/data/cams_radiation_monthly.csv +0 -47
  48. pvlib/data/detect_clearsky_data.csv +0 -35
  49. pvlib/data/detect_clearsky_threshold_data.csv +0 -126
  50. pvlib/data/greensboro_kimber_soil_manwash.dat +0 -8761
  51. pvlib/data/greensboro_kimber_soil_nowash.dat +0 -8761
  52. pvlib/data/inverter_fit_snl_meas.csv +0 -127
  53. pvlib/data/inverter_fit_snl_sim.csv +0 -19
  54. pvlib/data/ivtools_numdiff.csv +0 -52
  55. pvlib/data/midc_20181014.txt +0 -1441
  56. pvlib/data/midc_raw_20181018.txt +0 -1441
  57. pvlib/data/midc_raw_short_header_20191115.txt +0 -1441
  58. pvlib/data/msn19056.dat +0 -6
  59. pvlib/data/precise_iv_curves1.json +0 -10251
  60. pvlib/data/precise_iv_curves2.json +0 -10251
  61. pvlib/data/precise_iv_curves_parameter_sets1.csv +0 -33
  62. pvlib/data/precise_iv_curves_parameter_sets2.csv +0 -33
  63. pvlib/data/pvgis_hourly_Timeseries_45.000_8.000_SA2_10kWp_CIS_5_2a_2013_2014.json +0 -1
  64. pvlib/data/pvgis_hourly_Timeseries_45.000_8.000_SA_30deg_0deg_2016_2016.csv +0 -35
  65. pvlib/data/pvgis_tmy_meta.json +0 -32
  66. pvlib/data/pvgis_tmy_test.csv +0 -8761
  67. pvlib/data/pvwatts_8760_rackmount.csv +0 -8779
  68. pvlib/data/pvwatts_8760_roofmount.csv +0 -8779
  69. pvlib/data/singleaxis_tracker_wslope.csv +0 -8761
  70. pvlib/data/spectrl2_example_spectra.csv +0 -123
  71. pvlib/data/surfrad-slv16001.dat +0 -1442
  72. pvlib/data/test_psm3_2017.csv +0 -17521
  73. pvlib/data/test_psm3_2019_5min.csv +0 -289
  74. pvlib/data/test_psm3_tmy-2017.csv +0 -8761
  75. pvlib/data/test_read_psm3.csv +0 -17523
  76. pvlib/data/test_read_pvgis_horizon.csv +0 -49
  77. pvlib/data/tmy_45.000_8.000_2005_2023.csv +0 -8789
  78. pvlib/data/tmy_45.000_8.000_2005_2023.epw +0 -8768
  79. pvlib/data/tmy_45.000_8.000_2005_2023.json +0 -1
  80. pvlib/data/tmy_45.000_8.000_2005_2023.txt +0 -8761
  81. pvlib/data/tmy_45.000_8.000_userhorizon.json +0 -1
  82. pvlib/ivtools/sdm.py +0 -1379
  83. pvlib/spa_c_files/README.md +0 -81
  84. pvlib/spa_c_files/cspa_py.pxd +0 -43
  85. pvlib/spa_c_files/spa_py.pyx +0 -30
  86. pvlib/tests/__init__.py +0 -0
  87. pvlib/tests/bifacial/__init__.py +0 -0
  88. pvlib/tests/bifacial/test_infinite_sheds.py +0 -317
  89. pvlib/tests/bifacial/test_losses_models.py +0 -54
  90. pvlib/tests/bifacial/test_pvfactors.py +0 -82
  91. pvlib/tests/bifacial/test_utils.py +0 -192
  92. pvlib/tests/conftest.py +0 -476
  93. pvlib/tests/iotools/__init__.py +0 -0
  94. pvlib/tests/iotools/test_acis.py +0 -213
  95. pvlib/tests/iotools/test_bsrn.py +0 -131
  96. pvlib/tests/iotools/test_crn.py +0 -95
  97. pvlib/tests/iotools/test_epw.py +0 -23
  98. pvlib/tests/iotools/test_midc.py +0 -89
  99. pvlib/tests/iotools/test_panond.py +0 -32
  100. pvlib/tests/iotools/test_psm3.py +0 -198
  101. pvlib/tests/iotools/test_pvgis.py +0 -644
  102. pvlib/tests/iotools/test_sodapro.py +0 -298
  103. pvlib/tests/iotools/test_solaranywhere.py +0 -287
  104. pvlib/tests/iotools/test_solargis.py +0 -68
  105. pvlib/tests/iotools/test_solcast.py +0 -324
  106. pvlib/tests/iotools/test_solrad.py +0 -152
  107. pvlib/tests/iotools/test_srml.py +0 -124
  108. pvlib/tests/iotools/test_surfrad.py +0 -75
  109. pvlib/tests/iotools/test_tmy.py +0 -133
  110. pvlib/tests/ivtools/__init__.py +0 -0
  111. pvlib/tests/ivtools/test_sde.py +0 -230
  112. pvlib/tests/ivtools/test_sdm.py +0 -429
  113. pvlib/tests/ivtools/test_utils.py +0 -173
  114. pvlib/tests/spectrum/__init__.py +0 -0
  115. pvlib/tests/spectrum/conftest.py +0 -40
  116. pvlib/tests/spectrum/test_irradiance.py +0 -138
  117. pvlib/tests/spectrum/test_mismatch.py +0 -304
  118. pvlib/tests/spectrum/test_response.py +0 -124
  119. pvlib/tests/spectrum/test_spectrl2.py +0 -72
  120. pvlib/tests/test__deprecation.py +0 -97
  121. pvlib/tests/test_albedo.py +0 -84
  122. pvlib/tests/test_atmosphere.py +0 -351
  123. pvlib/tests/test_clearsky.py +0 -884
  124. pvlib/tests/test_conftest.py +0 -37
  125. pvlib/tests/test_iam.py +0 -555
  126. pvlib/tests/test_inverter.py +0 -213
  127. pvlib/tests/test_irradiance.py +0 -1487
  128. pvlib/tests/test_location.py +0 -356
  129. pvlib/tests/test_modelchain.py +0 -2020
  130. pvlib/tests/test_numerical_precision.py +0 -124
  131. pvlib/tests/test_pvarray.py +0 -71
  132. pvlib/tests/test_pvsystem.py +0 -2511
  133. pvlib/tests/test_scaling.py +0 -207
  134. pvlib/tests/test_shading.py +0 -391
  135. pvlib/tests/test_singlediode.py +0 -608
  136. pvlib/tests/test_snow.py +0 -212
  137. pvlib/tests/test_soiling.py +0 -230
  138. pvlib/tests/test_solarposition.py +0 -966
  139. pvlib/tests/test_spa.py +0 -454
  140. pvlib/tests/test_temperature.py +0 -470
  141. pvlib/tests/test_tools.py +0 -146
  142. pvlib/tests/test_tracking.py +0 -474
  143. pvlib/tests/test_transformer.py +0 -60
  144. pvlib-0.11.2.dist-info/RECORD +0 -191
  145. {pvlib-0.11.2.dist-info → pvlib-0.12.1a1.dist-info/licenses}/AUTHORS.md +0 -0
  146. {pvlib-0.11.2.dist-info → pvlib-0.12.1a1.dist-info/licenses}/LICENSE +0 -0
  147. {pvlib-0.11.2.dist-info → pvlib-0.12.1a1.dist-info}/top_level.txt +0 -0
pvlib/__init__.py CHANGED
@@ -27,4 +27,5 @@ from pvlib import ( # noqa: F401
27
27
  temperature,
28
28
  tools,
29
29
  tracking,
30
+ transformer,
30
31
  )
pvlib/atmosphere.py CHANGED
@@ -6,9 +6,6 @@ speed at different heights.
6
6
 
7
7
  import numpy as np
8
8
  import pandas as pd
9
- import pvlib
10
-
11
- from pvlib._deprecation import deprecated
12
9
 
13
10
  APPARENT_ZENITH_MODELS = ('simple', 'kasten1966', 'kastenyoung1989',
14
11
  'gueymard1993', 'pickering2002')
@@ -150,20 +147,13 @@ def get_relative_airmass(zenith, model='kastenyoung1989'):
150
147
 
151
148
  * 'simple' - secant(apparent zenith angle) -
152
149
  Note that this gives -Inf at zenith=90
153
- * 'kasten1966' - See reference [1] -
154
- requires apparent sun zenith
155
- * 'youngirvine1967' - See reference [2] -
156
- requires true sun zenith
157
- * 'kastenyoung1989' (default) - See reference [3] -
158
- requires apparent sun zenith
159
- * 'gueymard1993' - See reference [4] -
160
- requires apparent sun zenith
161
- * 'young1994' - See reference [5] -
162
- requires true sun zenith
163
- * 'pickering2002' - See reference [6] -
164
- requires apparent sun zenith
165
- * 'gueymard2003' - See references [7] and [8] -
166
- requires apparent sun zenith
150
+ * 'kasten1966' - See [1]_ - requires apparent sun zenith
151
+ * 'youngirvine1967' - See [2]_ - requires true sun zenith
152
+ * 'kastenyoung1989' (default) - See [3]_ - requires apparent sun zenith
153
+ * 'gueymard1993' - See [4]_, [5]_ - requires apparent sun zenith
154
+ * 'young1994' - See [6]_ - requires true sun zenith
155
+ * 'pickering2002' - See [7]_ - requires apparent sun zenith
156
+ * 'gueymard2003' - See [8]_, [9]_ - requires apparent sun zenith
167
157
 
168
158
  Returns
169
159
  -------
@@ -177,41 +167,57 @@ def get_relative_airmass(zenith, model='kastenyoung1989'):
177
167
  other models use true (not refraction-adjusted) zenith angle. Apparent
178
168
  zenith angles should be calculated at sea level.
179
169
 
170
+ Comparison among several models is reported in [10]_.
171
+
180
172
  References
181
173
  ----------
182
- .. [1] Fritz Kasten. "A New Table and Approximation Formula for the
183
- Relative Optical Air Mass". Technical Report 136, Hanover, N.H.:
184
- U.S. Army Material Command, CRREL.
174
+ .. [1] Fritz Kasten, "A New Table and Approximation Formula for the
175
+ Relative Optical Air Mass," CRREL (U.S. Army), Hanover, NH, USA,
176
+ Technical Report 136, 1965.
177
+ :doi:`11681/5671`
185
178
 
186
179
  .. [2] A. T. Young and W. M. Irvine, "Multicolor Photoelectric
187
- Photometry of the Brighter Planets," The Astronomical Journal, vol.
188
- 72, pp. 945-950, 1967.
180
+ Photometry of the Brighter Planets. I. Program and Procedure,"
181
+ The Astronomical Journal, vol. 72, pp. 945-950, 1967.
182
+ :doi:`10.1086/110366`
189
183
 
190
- .. [3] Fritz Kasten and Andrew Young. "Revised optical air mass tables
191
- and approximation formula". Applied Optics 28:4735-4738
184
+ .. [3] Fritz Kasten and Andrew Young, "Revised optical air mass tables
185
+ and approximation formula," Applied Optics 28:4735-4738, 1989.
186
+ :doi:`10.1364/AO.28.004735`
192
187
 
193
188
  .. [4] C. Gueymard, "Critical analysis and performance assessment of
194
189
  clear sky solar irradiance models using theoretical and measured
195
190
  data," Solar Energy, vol. 51, pp. 121-138, 1993.
191
+ :doi:`10.1016/0038-092X(93)90074-X`
192
+
193
+ .. [5] C. Gueymard, "Development and performance assessment of a clear
194
+ sky spectral radiation model,” in Proc. of the 22nd ASES Conference,
195
+ Solar ’93, 1993, pp. 433–438.
196
196
 
197
- .. [5] A. T. Young, "AIR-MASS AND REFRACTION," Applied Optics, vol. 33,
198
- pp. 1108-1110, Feb 1994.
197
+ .. [6] A. T. Young, "Air-Mass and Refraction," Applied Optics, vol. 33,
198
+ pp. 1108-1110, Feb. 1994.
199
+ :doi:`10.1364/AO.33.001108`
199
200
 
200
- .. [6] Keith A. Pickering. "The Ancient Star Catalog". DIO 12:1, 20,
201
+ .. [7] Keith A. Pickering, "The Southern Limits of the Ancient Star Catalog
202
+ and the Commentary of Hipparchos," DIO, vol. 12, pp. 3-27, Sept. 2002.
203
+ Available at `DIO <http://dioi.org/jc01.pdf>`_
201
204
 
202
- .. [7] C. Gueymard, "Direct solar transmittance and irradiance
205
+ .. [8] C. Gueymard, "Direct solar transmittance and irradiance
203
206
  predictions with broadband models. Part I: detailed theoretical
204
207
  performance assessment". Solar Energy, vol 74, pp. 355-379, 2003.
205
208
  :doi:`10.1016/S0038-092X(03)00195-6`
206
209
 
207
- .. [8] C. Gueymard (2019). Clear-Sky Radiation Models and Aerosol Effects.
208
- In: Polo, J., Martín-Pomares, L., Sanfilippo, A. (eds) Solar Resources
209
- Mapping. Green Energy and Technology. Springer, Cham.
210
+ .. [9] C. Gueymard, "Clear-Sky Radiation Models and Aerosol Effects", in
211
+ Solar Resources Mapping: Fundamentals and Applications,
212
+ Polo, J., Martín-Pomares, L., Sanfilippo, A. (Eds), Cham, CH: Springer,
213
+ 2019, pp. 137-182.
210
214
  :doi:`10.1007/978-3-319-97484-2_5`
211
215
 
212
- .. [9] Matthew J. Reno, Clifford W. Hansen and Joshua S. Stein, "Global
216
+ .. [10] Matthew J. Reno, Clifford W. Hansen and Joshua S. Stein, "Global
213
217
  Horizontal Irradiance Clear Sky Models: Implementation and Analysis"
214
- Sandia Report, (2012).
218
+ Sandia National Laboratories, Albuquerque, NM, USA, SAND2012-2389, 2012.
219
+ :doi:`10.2172/1039404`
220
+
215
221
  '''
216
222
 
217
223
  # set zenith values greater than 90 to nans
@@ -239,7 +245,7 @@ def get_relative_airmass(zenith, model='kastenyoung1989'):
239
245
  (np.cos(zenith_rad) ** 3 +
240
246
  0.149864*(np.cos(zenith_rad) ** 2) +
241
247
  0.0102963*(np.cos(zenith_rad)) + 0.000303978))
242
- elif 'gueymard1993' == model:
248
+ elif 'gueymard1993' == model: # [4], Eq. 22 and [5], Eq. 3b
243
249
  am = (1.0 / (np.cos(zenith_rad) +
244
250
  0.00176759*(z)*((94.37515 - z) ** - 1.21563)))
245
251
  elif 'gueymard2003' == model:
@@ -416,12 +422,6 @@ def tdew_from_rh(temp_air, relative_humidity, coeff=(6.112, 17.62, 243.12)):
416
422
  return dewpoint
417
423
 
418
424
 
419
- first_solar_spectral_correction = deprecated(
420
- since='0.10.0',
421
- alternative='pvlib.spectrum.spectral_factor_firstsolar'
422
- )(pvlib.spectrum.spectral_factor_firstsolar)
423
-
424
-
425
425
  def bird_hulstrom80_aod_bb(aod380, aod500):
426
426
  """
427
427
  Approximate broadband aerosol optical depth.
@@ -260,8 +260,9 @@ def get_irradiance_poa(surface_tilt, surface_azimuth, solar_zenith,
260
260
  Returns
261
261
  -------
262
262
  output : dict or DataFrame
263
- Output is a DataFrame when input ghi is a Series. See Notes for
264
- descriptions of content.
263
+ Output is a ``pandas.DataFrame`` when ``ghi`` is a Series.
264
+ Otherwise it is a dict of ``numpy.ndarray``
265
+ See Notes for descriptions of content.
265
266
 
266
267
  Notes
267
268
  -----
@@ -372,7 +373,7 @@ def get_irradiance_poa(surface_tilt, surface_azimuth, solar_zenith,
372
373
  'poa_global': poa_global, 'poa_direct': poa_direct,
373
374
  'poa_diffuse': poa_diffuse, 'poa_ground_diffuse': poa_gnd_pv,
374
375
  'poa_sky_diffuse': poa_sky_pv, 'shaded_fraction': f_x}
375
- if isinstance(poa_global, pd.Series):
376
+ if isinstance(ghi, pd.Series):
376
377
  output = pd.DataFrame(output)
377
378
  return output
378
379
 
pvlib/bifacial/utils.py CHANGED
@@ -87,7 +87,8 @@ def _unshaded_ground_fraction(surface_tilt, surface_azimuth, solar_zenith,
87
87
  surface_azimuth)
88
88
  f_gnd_beam = 1.0 - np.minimum(
89
89
  1.0, gcr * np.abs(cosd(surface_tilt) + sind(surface_tilt) * tan_phi))
90
- np.where(solar_zenith > max_zenith, 0., f_gnd_beam) # [1], Eq. 4
90
+ # [1], Eq. 4
91
+ f_gnd_beam = np.where(solar_zenith > max_zenith, 0., f_gnd_beam)
91
92
  return f_gnd_beam # 1 - min(1, abs()) < 1 always
92
93
 
93
94
 
pvlib/iotools/__init__.py CHANGED
@@ -11,6 +11,12 @@ from pvlib.iotools.solrad import get_solrad # noqa: F401
11
11
  from pvlib.iotools.psm3 import get_psm3 # noqa: F401
12
12
  from pvlib.iotools.psm3 import read_psm3 # noqa: F401
13
13
  from pvlib.iotools.psm3 import parse_psm3 # noqa: F401
14
+ from pvlib.iotools.psm4 import get_nsrdb_psm4_aggregated # noqa: F401
15
+ from pvlib.iotools.psm4 import get_nsrdb_psm4_tmy # noqa: F401
16
+ from pvlib.iotools.psm4 import get_nsrdb_psm4_conus # noqa: F401
17
+ from pvlib.iotools.psm4 import get_nsrdb_psm4_full_disc # noqa: F401
18
+ from pvlib.iotools.psm4 import read_nsrdb_psm4 # noqa: F401
19
+ from pvlib.iotools.psm4 import parse_nsrdb_psm4 # noqa: F401
14
20
  from pvlib.iotools.pvgis import get_pvgis_tmy, read_pvgis_tmy # noqa: F401
15
21
  from pvlib.iotools.pvgis import read_pvgis_hourly # noqa: F401
16
22
  from pvlib.iotools.pvgis import get_pvgis_hourly # noqa: F401
pvlib/iotools/psm3.py CHANGED
@@ -49,7 +49,7 @@ REQUEST_VARIABLE_MAP = {
49
49
  'ghi_clear': 'clearsky_ghi',
50
50
  'dhi_clear': 'clearsky_dhi',
51
51
  'dni_clear': 'clearsky_dni',
52
- 'zenith': 'solar_zenith_angle',
52
+ 'solar_zenith': 'solar_zenith_angle',
53
53
  'temp_air': 'air_temperature',
54
54
  'temp_dew': 'dew_point',
55
55
  'relative_humidity': 'relative_humidity',