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.
- pvlib/__init__.py +1 -0
- pvlib/atmosphere.py +40 -40
- pvlib/bifacial/infinite_sheds.py +4 -3
- pvlib/bifacial/utils.py +2 -1
- pvlib/iotools/__init__.py +6 -0
- pvlib/iotools/psm3.py +1 -1
- pvlib/iotools/psm4.py +819 -0
- pvlib/iotools/pvgis.py +10 -2
- pvlib/iotools/tmy.py +3 -69
- pvlib/irradiance.py +38 -15
- pvlib/ivtools/sdm/__init__.py +20 -0
- pvlib/ivtools/sdm/_fit_desoto_pvsyst_sandia.py +585 -0
- pvlib/ivtools/sdm/cec.py +93 -0
- pvlib/ivtools/sdm/desoto.py +401 -0
- pvlib/ivtools/sdm/pvsyst.py +630 -0
- pvlib/location.py +73 -33
- pvlib/modelchain.py +19 -36
- pvlib/pvsystem.py +114 -65
- pvlib/snow.py +64 -28
- pvlib/spectrum/__init__.py +0 -1
- pvlib/spectrum/irradiance.py +2 -64
- pvlib/spectrum/mismatch.py +3 -3
- pvlib/tools.py +6 -5
- {pvlib-0.11.2.dist-info → pvlib-0.12.1a1.dist-info}/METADATA +6 -5
- pvlib-0.12.1a1.dist-info/RECORD +80 -0
- {pvlib-0.11.2.dist-info → pvlib-0.12.1a1.dist-info}/WHEEL +1 -1
- pvlib/data/BIRD_08_16_2012.csv +0 -8761
- pvlib/data/BIRD_08_16_2012_patm.csv +0 -8761
- pvlib/data/Burlington, United States SolarAnywhere Time Series 2021 Lat_44_465 Lon_-73_205 TMY3 format.csv +0 -8762
- pvlib/data/Burlington, United States SolarAnywhere Time Series 20210101 to 20210103 Lat_44_4675 Lon_-73_2075 SA format.csv +0 -578
- pvlib/data/Burlington, United States SolarAnywhere Typical GHI Year Lat_44_465 Lon_-73_205 SA format.csv +0 -74
- pvlib/data/CPS SCH275KTL-DO-US-800-250kW_275kVA_1.OND +0 -146
- pvlib/data/CRNS0101-05-2019-AZ_Tucson_11_W.txt +0 -4
- pvlib/data/CRN_with_problems.txt +0 -3
- pvlib/data/ET-M772BH550GL.PAN +0 -75
- pvlib/data/NLD_Amsterdam062400_IWEC.epw +0 -8768
- pvlib/data/PVsyst_demo.csv +0 -10757
- pvlib/data/PVsyst_demo_model.csv +0 -3588
- pvlib/data/SRML-day-EUPO1801.txt +0 -1441
- pvlib/data/abq19056.dat +0 -6
- pvlib/data/bishop88_numerical_precision.csv +0 -101
- pvlib/data/bsrn-lr0100-pay0616.dat +0 -86901
- pvlib/data/bsrn-pay0616.dat.gz +0 -0
- pvlib/data/cams_mcclear_1min_verbose.csv +0 -60
- pvlib/data/cams_mcclear_monthly.csv +0 -42
- pvlib/data/cams_radiation_1min_verbose.csv +0 -72
- pvlib/data/cams_radiation_monthly.csv +0 -47
- pvlib/data/detect_clearsky_data.csv +0 -35
- pvlib/data/detect_clearsky_threshold_data.csv +0 -126
- pvlib/data/greensboro_kimber_soil_manwash.dat +0 -8761
- pvlib/data/greensboro_kimber_soil_nowash.dat +0 -8761
- pvlib/data/inverter_fit_snl_meas.csv +0 -127
- pvlib/data/inverter_fit_snl_sim.csv +0 -19
- pvlib/data/ivtools_numdiff.csv +0 -52
- pvlib/data/midc_20181014.txt +0 -1441
- pvlib/data/midc_raw_20181018.txt +0 -1441
- pvlib/data/midc_raw_short_header_20191115.txt +0 -1441
- pvlib/data/msn19056.dat +0 -6
- pvlib/data/precise_iv_curves1.json +0 -10251
- pvlib/data/precise_iv_curves2.json +0 -10251
- pvlib/data/precise_iv_curves_parameter_sets1.csv +0 -33
- pvlib/data/precise_iv_curves_parameter_sets2.csv +0 -33
- pvlib/data/pvgis_hourly_Timeseries_45.000_8.000_SA2_10kWp_CIS_5_2a_2013_2014.json +0 -1
- pvlib/data/pvgis_hourly_Timeseries_45.000_8.000_SA_30deg_0deg_2016_2016.csv +0 -35
- pvlib/data/pvgis_tmy_meta.json +0 -32
- pvlib/data/pvgis_tmy_test.csv +0 -8761
- pvlib/data/pvwatts_8760_rackmount.csv +0 -8779
- pvlib/data/pvwatts_8760_roofmount.csv +0 -8779
- pvlib/data/singleaxis_tracker_wslope.csv +0 -8761
- pvlib/data/spectrl2_example_spectra.csv +0 -123
- pvlib/data/surfrad-slv16001.dat +0 -1442
- pvlib/data/test_psm3_2017.csv +0 -17521
- pvlib/data/test_psm3_2019_5min.csv +0 -289
- pvlib/data/test_psm3_tmy-2017.csv +0 -8761
- pvlib/data/test_read_psm3.csv +0 -17523
- pvlib/data/test_read_pvgis_horizon.csv +0 -49
- pvlib/data/tmy_45.000_8.000_2005_2023.csv +0 -8789
- pvlib/data/tmy_45.000_8.000_2005_2023.epw +0 -8768
- pvlib/data/tmy_45.000_8.000_2005_2023.json +0 -1
- pvlib/data/tmy_45.000_8.000_2005_2023.txt +0 -8761
- pvlib/data/tmy_45.000_8.000_userhorizon.json +0 -1
- pvlib/ivtools/sdm.py +0 -1379
- pvlib/spa_c_files/README.md +0 -81
- pvlib/spa_c_files/cspa_py.pxd +0 -43
- pvlib/spa_c_files/spa_py.pyx +0 -30
- pvlib/tests/__init__.py +0 -0
- pvlib/tests/bifacial/__init__.py +0 -0
- pvlib/tests/bifacial/test_infinite_sheds.py +0 -317
- pvlib/tests/bifacial/test_losses_models.py +0 -54
- pvlib/tests/bifacial/test_pvfactors.py +0 -82
- pvlib/tests/bifacial/test_utils.py +0 -192
- pvlib/tests/conftest.py +0 -476
- pvlib/tests/iotools/__init__.py +0 -0
- pvlib/tests/iotools/test_acis.py +0 -213
- pvlib/tests/iotools/test_bsrn.py +0 -131
- pvlib/tests/iotools/test_crn.py +0 -95
- pvlib/tests/iotools/test_epw.py +0 -23
- pvlib/tests/iotools/test_midc.py +0 -89
- pvlib/tests/iotools/test_panond.py +0 -32
- pvlib/tests/iotools/test_psm3.py +0 -198
- pvlib/tests/iotools/test_pvgis.py +0 -644
- pvlib/tests/iotools/test_sodapro.py +0 -298
- pvlib/tests/iotools/test_solaranywhere.py +0 -287
- pvlib/tests/iotools/test_solargis.py +0 -68
- pvlib/tests/iotools/test_solcast.py +0 -324
- pvlib/tests/iotools/test_solrad.py +0 -152
- pvlib/tests/iotools/test_srml.py +0 -124
- pvlib/tests/iotools/test_surfrad.py +0 -75
- pvlib/tests/iotools/test_tmy.py +0 -133
- pvlib/tests/ivtools/__init__.py +0 -0
- pvlib/tests/ivtools/test_sde.py +0 -230
- pvlib/tests/ivtools/test_sdm.py +0 -429
- pvlib/tests/ivtools/test_utils.py +0 -173
- pvlib/tests/spectrum/__init__.py +0 -0
- pvlib/tests/spectrum/conftest.py +0 -40
- pvlib/tests/spectrum/test_irradiance.py +0 -138
- pvlib/tests/spectrum/test_mismatch.py +0 -304
- pvlib/tests/spectrum/test_response.py +0 -124
- pvlib/tests/spectrum/test_spectrl2.py +0 -72
- pvlib/tests/test__deprecation.py +0 -97
- pvlib/tests/test_albedo.py +0 -84
- pvlib/tests/test_atmosphere.py +0 -351
- pvlib/tests/test_clearsky.py +0 -884
- pvlib/tests/test_conftest.py +0 -37
- pvlib/tests/test_iam.py +0 -555
- pvlib/tests/test_inverter.py +0 -213
- pvlib/tests/test_irradiance.py +0 -1487
- pvlib/tests/test_location.py +0 -356
- pvlib/tests/test_modelchain.py +0 -2020
- pvlib/tests/test_numerical_precision.py +0 -124
- pvlib/tests/test_pvarray.py +0 -71
- pvlib/tests/test_pvsystem.py +0 -2511
- pvlib/tests/test_scaling.py +0 -207
- pvlib/tests/test_shading.py +0 -391
- pvlib/tests/test_singlediode.py +0 -608
- pvlib/tests/test_snow.py +0 -212
- pvlib/tests/test_soiling.py +0 -230
- pvlib/tests/test_solarposition.py +0 -966
- pvlib/tests/test_spa.py +0 -454
- pvlib/tests/test_temperature.py +0 -470
- pvlib/tests/test_tools.py +0 -146
- pvlib/tests/test_tracking.py +0 -474
- pvlib/tests/test_transformer.py +0 -60
- pvlib-0.11.2.dist-info/RECORD +0 -191
- {pvlib-0.11.2.dist-info → pvlib-0.12.1a1.dist-info/licenses}/AUTHORS.md +0 -0
- {pvlib-0.11.2.dist-info → pvlib-0.12.1a1.dist-info/licenses}/LICENSE +0 -0
- {pvlib-0.11.2.dist-info → pvlib-0.12.1a1.dist-info}/top_level.txt +0 -0
pvlib/iotools/pvgis.py
CHANGED
|
@@ -559,9 +559,17 @@ def _parse_pvgis_tmy_csv(src):
|
|
|
559
559
|
inputs['longitude'] = float(src.readline().split(b':')[1])
|
|
560
560
|
# Elevation (m): 1389.0\r\n
|
|
561
561
|
inputs['elevation'] = float(src.readline().split(b':')[1])
|
|
562
|
+
|
|
563
|
+
# TMY has an extra line here: Irradiance Time Offset (h): 0.1761\r\n
|
|
564
|
+
line = src.readline()
|
|
565
|
+
if line.startswith(b'Irradiance Time Offset'):
|
|
566
|
+
inputs['irradiance time offset'] = float(line.split(b':')[1])
|
|
567
|
+
src.readline() # skip over the "month,year\r\n"
|
|
568
|
+
else:
|
|
569
|
+
# `line` is already the "month,year\r\n" line, so nothing to do
|
|
570
|
+
pass
|
|
562
571
|
# then there's a 13 row comma separated table with two columns: month, year
|
|
563
|
-
# which contains the year used for that month in the
|
|
564
|
-
src.readline() # get "month,year\r\n"
|
|
572
|
+
# which contains the year used for that month in the TMY
|
|
565
573
|
months_selected = []
|
|
566
574
|
for month in range(12):
|
|
567
575
|
months_selected.append(
|
pvlib/iotools/tmy.py
CHANGED
|
@@ -3,8 +3,6 @@
|
|
|
3
3
|
import datetime
|
|
4
4
|
import re
|
|
5
5
|
import pandas as pd
|
|
6
|
-
import warnings
|
|
7
|
-
from pvlib._deprecation import pvlibDeprecationWarning
|
|
8
6
|
|
|
9
7
|
# Dictionary mapping TMY3 names to pvlib names
|
|
10
8
|
VARIABLE_MAP = {
|
|
@@ -24,8 +22,7 @@ VARIABLE_MAP = {
|
|
|
24
22
|
}
|
|
25
23
|
|
|
26
24
|
|
|
27
|
-
def read_tmy3(filename, coerce_year=None, map_variables=
|
|
28
|
-
encoding=None):
|
|
25
|
+
def read_tmy3(filename, coerce_year=None, map_variables=True, encoding=None):
|
|
29
26
|
"""Read a TMY3 file into a pandas dataframe.
|
|
30
27
|
|
|
31
28
|
Note that values contained in the metadata dictionary are unchanged
|
|
@@ -44,13 +41,9 @@ def read_tmy3(filename, coerce_year=None, map_variables=None, recolumn=None,
|
|
|
44
41
|
If supplied, the year of the index will be set to ``coerce_year``, except
|
|
45
42
|
for the last index value which will be set to the *next* year so that
|
|
46
43
|
the index increases monotonically.
|
|
47
|
-
map_variables : bool,
|
|
44
|
+
map_variables : bool, default True
|
|
48
45
|
When True, renames columns of the DataFrame to pvlib variable names
|
|
49
46
|
where applicable. See variable :const:`VARIABLE_MAP`.
|
|
50
|
-
recolumn : bool (deprecated, use map_variables instead)
|
|
51
|
-
If ``True``, apply standard names to TMY3 columns. Typically this
|
|
52
|
-
results in stripping the units from the column name.
|
|
53
|
-
Cannot be used in combination with ``map_variables``.
|
|
54
47
|
encoding : str, optional
|
|
55
48
|
Encoding of the file. For files that contain non-UTF8 characters it may
|
|
56
49
|
be necessary to specify an alternative encoding, e.g., for
|
|
@@ -233,74 +226,15 @@ def read_tmy3(filename, coerce_year=None, map_variables=None, recolumn=None,
|
|
|
233
226
|
# unit must be in (D,h,m,s,ms,us,ns), but pandas>=0.24 allows unit='hour'
|
|
234
227
|
data.index = data_ymd + pd.to_timedelta(shifted_hour, unit='h') \
|
|
235
228
|
+ pd.to_timedelta(minutes, unit='min')
|
|
236
|
-
|
|
237
|
-
if recolumn is not None and map_variables is not None:
|
|
238
|
-
msg = "`map_variables` and `recolumn` cannot both be specified"
|
|
239
|
-
raise ValueError(msg)
|
|
240
|
-
elif map_variables is None and recolumn is not None:
|
|
241
|
-
warnings.warn(
|
|
242
|
-
'The recolumn parameter is deprecated and will be removed in '
|
|
243
|
-
'pvlib 0.11.0. Use `map_variables` instead, although note that '
|
|
244
|
-
'its behavior is different from `recolumn`.',
|
|
245
|
-
pvlibDeprecationWarning)
|
|
246
|
-
elif map_variables is None and recolumn is None:
|
|
247
|
-
warnings.warn(
|
|
248
|
-
'TMY3 variable names will be renamed to pvlib conventions by '
|
|
249
|
-
'default starting in pvlib 0.11.0. Specify map_variables=True '
|
|
250
|
-
'to enable that behavior now, or specify map_variables=False '
|
|
251
|
-
'to hide this warning.', pvlibDeprecationWarning)
|
|
229
|
+
|
|
252
230
|
if map_variables:
|
|
253
231
|
data = data.rename(columns=VARIABLE_MAP)
|
|
254
|
-
elif recolumn or (recolumn is None and map_variables is None):
|
|
255
|
-
data = _recolumn(data)
|
|
256
232
|
|
|
257
233
|
data = data.tz_localize(int(meta['TZ'] * 3600))
|
|
258
234
|
|
|
259
235
|
return data, meta
|
|
260
236
|
|
|
261
237
|
|
|
262
|
-
def _recolumn(tmy3_dataframe):
|
|
263
|
-
"""
|
|
264
|
-
Rename the columns of the TMY3 DataFrame.
|
|
265
|
-
|
|
266
|
-
Parameters
|
|
267
|
-
----------
|
|
268
|
-
tmy3_dataframe : DataFrame
|
|
269
|
-
inplace : bool
|
|
270
|
-
passed to DataFrame.rename()
|
|
271
|
-
|
|
272
|
-
Returns
|
|
273
|
-
-------
|
|
274
|
-
Recolumned DataFrame.
|
|
275
|
-
"""
|
|
276
|
-
# paste in the header as one long line
|
|
277
|
-
raw_columns = 'ETR (W/m^2),ETRN (W/m^2),GHI (W/m^2),GHI source,GHI uncert (%),DNI (W/m^2),DNI source,DNI uncert (%),DHI (W/m^2),DHI source,DHI uncert (%),GH illum (lx),GH illum source,Global illum uncert (%),DN illum (lx),DN illum source,DN illum uncert (%),DH illum (lx),DH illum source,DH illum uncert (%),Zenith lum (cd/m^2),Zenith lum source,Zenith lum uncert (%),TotCld (tenths),TotCld source,TotCld uncert (code),OpqCld (tenths),OpqCld source,OpqCld uncert (code),Dry-bulb (C),Dry-bulb source,Dry-bulb uncert (code),Dew-point (C),Dew-point source,Dew-point uncert (code),RHum (%),RHum source,RHum uncert (code),Pressure (mbar),Pressure source,Pressure uncert (code),Wdir (degrees),Wdir source,Wdir uncert (code),Wspd (m/s),Wspd source,Wspd uncert (code),Hvis (m),Hvis source,Hvis uncert (code),CeilHgt (m),CeilHgt source,CeilHgt uncert (code),Pwat (cm),Pwat source,Pwat uncert (code),AOD (unitless),AOD source,AOD uncert (code),Alb (unitless),Alb source,Alb uncert (code),Lprecip depth (mm),Lprecip quantity (hr),Lprecip source,Lprecip uncert (code),PresWth (METAR code),PresWth source,PresWth uncert (code)' # noqa: E501
|
|
278
|
-
|
|
279
|
-
new_columns = [
|
|
280
|
-
'ETR', 'ETRN', 'GHI', 'GHISource', 'GHIUncertainty',
|
|
281
|
-
'DNI', 'DNISource', 'DNIUncertainty', 'DHI', 'DHISource',
|
|
282
|
-
'DHIUncertainty', 'GHillum', 'GHillumSource', 'GHillumUncertainty',
|
|
283
|
-
'DNillum', 'DNillumSource', 'DNillumUncertainty', 'DHillum',
|
|
284
|
-
'DHillumSource', 'DHillumUncertainty', 'Zenithlum',
|
|
285
|
-
'ZenithlumSource', 'ZenithlumUncertainty', 'TotCld', 'TotCldSource',
|
|
286
|
-
'TotCldUncertainty', 'OpqCld', 'OpqCldSource', 'OpqCldUncertainty',
|
|
287
|
-
'DryBulb', 'DryBulbSource', 'DryBulbUncertainty', 'DewPoint',
|
|
288
|
-
'DewPointSource', 'DewPointUncertainty', 'RHum', 'RHumSource',
|
|
289
|
-
'RHumUncertainty', 'Pressure', 'PressureSource',
|
|
290
|
-
'PressureUncertainty', 'Wdir', 'WdirSource', 'WdirUncertainty',
|
|
291
|
-
'Wspd', 'WspdSource', 'WspdUncertainty', 'Hvis', 'HvisSource',
|
|
292
|
-
'HvisUncertainty', 'CeilHgt', 'CeilHgtSource', 'CeilHgtUncertainty',
|
|
293
|
-
'Pwat', 'PwatSource', 'PwatUncertainty', 'AOD', 'AODSource',
|
|
294
|
-
'AODUncertainty', 'Alb', 'AlbSource', 'AlbUncertainty',
|
|
295
|
-
'Lprecipdepth', 'Lprecipquantity', 'LprecipSource',
|
|
296
|
-
'LprecipUncertainty', 'PresWth', 'PresWthSource',
|
|
297
|
-
'PresWthUncertainty']
|
|
298
|
-
|
|
299
|
-
mapping = dict(zip(raw_columns.split(','), new_columns))
|
|
300
|
-
|
|
301
|
-
return tmy3_dataframe.rename(columns=mapping)
|
|
302
|
-
|
|
303
|
-
|
|
304
238
|
def read_tmy2(filename):
|
|
305
239
|
"""
|
|
306
240
|
Read a TMY2 file into a DataFrame.
|
pvlib/irradiance.py
CHANGED
|
@@ -35,25 +35,30 @@ def get_extra_radiation(datetime_or_doy, solar_constant=1366.1,
|
|
|
35
35
|
"""
|
|
36
36
|
Determine extraterrestrial radiation from day of year.
|
|
37
37
|
|
|
38
|
+
Specific references for each method are cited in the parameter descriptions
|
|
39
|
+
below, while a more general discussion of the different models may also be
|
|
40
|
+
found in [1]_ and [2]_.
|
|
41
|
+
|
|
38
42
|
Parameters
|
|
39
43
|
----------
|
|
40
44
|
datetime_or_doy : numeric, array, date, datetime, Timestamp, DatetimeIndex
|
|
41
45
|
Day of year, array of days of year, or datetime-like object
|
|
42
46
|
|
|
43
47
|
solar_constant : float, default 1366.1
|
|
44
|
-
The solar constant.
|
|
48
|
+
The solar constant. [Wm⁻²]
|
|
45
49
|
|
|
46
|
-
method : string, default
|
|
47
|
-
The method by which the
|
|
48
|
-
Options include
|
|
50
|
+
method : string, default `spencer`
|
|
51
|
+
The method by which the extraterrestrial radiation should be
|
|
52
|
+
calculated. Options include: `pyephem`, `spencer` [3]_, `asce` [4]_,
|
|
53
|
+
'nrel' [6]_.
|
|
49
54
|
|
|
50
55
|
epoch_year : int, default 2014
|
|
51
56
|
The year in which a day of year input will be calculated. Only
|
|
52
|
-
applies to day of year input used with the pyephem or nrel
|
|
57
|
+
applies to day of year input used with the `pyephem` or `nrel`
|
|
53
58
|
methods.
|
|
54
59
|
|
|
55
60
|
kwargs :
|
|
56
|
-
Passed to solarposition.nrel_earthsun_distance
|
|
61
|
+
Passed to :py:func:`~pvlib.solarposition.nrel_earthsun_distance`.
|
|
57
62
|
|
|
58
63
|
Returns
|
|
59
64
|
-------
|
|
@@ -68,19 +73,23 @@ def get_extra_radiation(datetime_or_doy, solar_constant=1366.1,
|
|
|
68
73
|
.. [1] M. Reno, C. Hansen, and J. Stein, "Global Horizontal Irradiance
|
|
69
74
|
Clear Sky Models: Implementation and Analysis", Sandia National
|
|
70
75
|
Laboratories, SAND2012-2389, 2012.
|
|
76
|
+
:doi:`10.2172/1039404`
|
|
71
77
|
|
|
72
|
-
.. [2]
|
|
73
|
-
|
|
78
|
+
.. [2] J. A. Duffie, W. A. Beckman, N. Blair, "Solar Radiation", in Solar
|
|
79
|
+
Engineering of Thermal Processes, Photovoltaics and Wind, 5th ed,
|
|
80
|
+
New York, USA: J. Wiley and Sons, 2020, pp. 3-44.
|
|
81
|
+
:doi:`10.1002/9781119540328`
|
|
74
82
|
|
|
75
|
-
.. [3]
|
|
76
|
-
|
|
83
|
+
.. [3] J. W. Spencer, "Fourier series representation of the sun," Search,
|
|
84
|
+
vol. 2, p. 172, 1971.
|
|
77
85
|
|
|
78
|
-
.. [4]
|
|
79
|
-
|
|
86
|
+
.. [4] R. G. Allen et al., Eds. The ASCE standardized reference
|
|
87
|
+
evapotranspiration equation. Reston, Va.: American Society of Civil
|
|
88
|
+
Engineers, 2005. :doi:`10.1061/9780784408056`
|
|
80
89
|
|
|
81
|
-
.. [
|
|
82
|
-
|
|
83
|
-
|
|
90
|
+
.. [6] I. Reda, A. Andreas, "Solar position algorithm for solar
|
|
91
|
+
radiation applications" NREL Golden, USA. NREL/TP-560-34302,
|
|
92
|
+
Revised 2008. :doi:`10.2172/15003974`
|
|
84
93
|
"""
|
|
85
94
|
|
|
86
95
|
to_doy, to_datetimeindex, to_output = \
|
|
@@ -2368,6 +2377,9 @@ def gti_dirint(poa_global, aoi, solar_zenith, solar_azimuth, times,
|
|
|
2368
2377
|
irradiance, Solar Energy 122, 1037-1046.
|
|
2369
2378
|
:doi:`10.1016/j.solener.2015.10.024`
|
|
2370
2379
|
"""
|
|
2380
|
+
# check input data and raise Exceptions where data will cause the
|
|
2381
|
+
# algorithm to fail
|
|
2382
|
+
_gti_dirint_check_input(aoi)
|
|
2371
2383
|
|
|
2372
2384
|
aoi_lt_90 = aoi < 90
|
|
2373
2385
|
|
|
@@ -2399,6 +2411,17 @@ def gti_dirint(poa_global, aoi, solar_zenith, solar_azimuth, times,
|
|
|
2399
2411
|
return output
|
|
2400
2412
|
|
|
2401
2413
|
|
|
2414
|
+
def _gti_dirint_check_input(aoi):
|
|
2415
|
+
r"""
|
|
2416
|
+
Helper for gti_dirint
|
|
2417
|
+
|
|
2418
|
+
Raises Exceptions from input data that cause the algorithm to fail.
|
|
2419
|
+
"""
|
|
2420
|
+
if not (aoi < 90).any():
|
|
2421
|
+
raise ValueError("There are no times with AOI < 90. "
|
|
2422
|
+
"gti_dirint requires some data with AOI < 90.")
|
|
2423
|
+
|
|
2424
|
+
|
|
2402
2425
|
def _gti_dirint_lt_90(poa_global, aoi, aoi_lt_90, solar_zenith, solar_azimuth,
|
|
2403
2426
|
times, surface_tilt, surface_azimuth, pressure=101325.,
|
|
2404
2427
|
use_delta_kt_prime=True, temp_dew=None, albedo=.25,
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"""
|
|
2
|
+
The ``sdm`` package contains functions to fit single diode models.
|
|
3
|
+
Function names should follow the pattern "fit_" + name of model + "_" +
|
|
4
|
+
fitting method.
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
from pvlib.ivtools.sdm.cec import ( # noqa: F401
|
|
8
|
+
fit_cec_sam,
|
|
9
|
+
)
|
|
10
|
+
|
|
11
|
+
from pvlib.ivtools.sdm.desoto import ( # noqa: F401
|
|
12
|
+
fit_desoto,
|
|
13
|
+
fit_desoto_sandia
|
|
14
|
+
)
|
|
15
|
+
|
|
16
|
+
from pvlib.ivtools.sdm.pvsyst import ( # noqa: F401
|
|
17
|
+
fit_pvsyst_sandia,
|
|
18
|
+
fit_pvsyst_iec61853_sandia_2025,
|
|
19
|
+
pvsyst_temperature_coeff,
|
|
20
|
+
)
|