pvlib 0.12.0__py3-none-any.whl → 0.13.0__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 +40 -31
- pvlib/bifacial/infinite_sheds.py +11 -16
- pvlib/iotools/__init__.py +5 -0
- pvlib/iotools/bsrn.py +16 -10
- pvlib/iotools/epw.py +14 -11
- pvlib/iotools/psm3.py +37 -71
- pvlib/iotools/psm4.py +766 -0
- pvlib/iotools/pvgis.py +116 -101
- pvlib/iotools/sodapro.py +54 -69
- pvlib/iotools/srml.py +1 -2
- pvlib/irradiance.py +28 -19
- 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/modelchain.py +1 -1
- pvlib/pvsystem.py +130 -69
- pvlib/solarposition.py +1 -1
- pvlib/spectrum/irradiance.py +2 -1
- pvlib/temperature.py +13 -10
- pvlib/tools.py +27 -0
- {pvlib-0.12.0.dist-info → pvlib-0.13.0.dist-info}/METADATA +2 -3
- {pvlib-0.12.0.dist-info → pvlib-0.13.0.dist-info}/RECORD +28 -23
- {pvlib-0.12.0.dist-info → pvlib-0.13.0.dist-info}/WHEEL +1 -1
- pvlib/ivtools/sdm.py +0 -1379
- {pvlib-0.12.0.dist-info → pvlib-0.13.0.dist-info}/licenses/AUTHORS.md +0 -0
- {pvlib-0.12.0.dist-info → pvlib-0.13.0.dist-info}/licenses/LICENSE +0 -0
- {pvlib-0.12.0.dist-info → pvlib-0.13.0.dist-info}/top_level.txt +0 -0
pvlib/pvsystem.py
CHANGED
|
@@ -16,9 +16,7 @@ import pandas as pd
|
|
|
16
16
|
from dataclasses import dataclass
|
|
17
17
|
from abc import ABC, abstractmethod
|
|
18
18
|
from typing import Optional, Union
|
|
19
|
-
|
|
20
|
-
from pvlib._deprecation import deprecated
|
|
21
|
-
|
|
19
|
+
from pvlib._deprecation import renamed_kwarg_warning
|
|
22
20
|
import pvlib # used to avoid albedo name collision in the Array class
|
|
23
21
|
from pvlib import (atmosphere, iam, inverter, irradiance,
|
|
24
22
|
singlediode as _singlediode, spectrum, temperature)
|
|
@@ -29,10 +27,10 @@ import pvlib.tools as tools
|
|
|
29
27
|
# a dict of required parameter names for each DC power model
|
|
30
28
|
_DC_MODEL_PARAMS = {
|
|
31
29
|
'sapm': {
|
|
32
|
-
|
|
30
|
+
# i_x and i_xx params (IXO, IXXO, C4-C7) not required
|
|
31
|
+
'C0', 'C1', 'C2', 'C3',
|
|
33
32
|
'Isco', 'Impo', 'Voco', 'Vmpo', 'Aisc', 'Aimp', 'Bvoco',
|
|
34
|
-
'Mbvoc', 'Bvmpo', 'Mbvmp', 'N', 'Cells_in_Series',
|
|
35
|
-
'IXO', 'IXXO'},
|
|
33
|
+
'Mbvoc', 'Bvmpo', 'Mbvmp', 'N', 'Cells_in_Series'},
|
|
36
34
|
'desoto': {
|
|
37
35
|
'alpha_sc', 'a_ref', 'I_L_ref', 'I_o_ref',
|
|
38
36
|
'R_sh_ref', 'R_s'},
|
|
@@ -845,8 +843,10 @@ class PVSystem:
|
|
|
845
843
|
for array, data in zip(self.arrays, data)
|
|
846
844
|
)
|
|
847
845
|
|
|
846
|
+
@renamed_kwarg_warning(
|
|
847
|
+
"0.13.0", "g_poa_effective", "effective_irradiance")
|
|
848
848
|
@_unwrap_single_value
|
|
849
|
-
def pvwatts_dc(self,
|
|
849
|
+
def pvwatts_dc(self, effective_irradiance, temp_cell):
|
|
850
850
|
"""
|
|
851
851
|
Calculates DC power according to the PVWatts model using
|
|
852
852
|
:py:func:`pvlib.pvsystem.pvwatts_dc`, `self.module_parameters['pdc0']`,
|
|
@@ -854,15 +854,15 @@ class PVSystem:
|
|
|
854
854
|
|
|
855
855
|
See :py:func:`pvlib.pvsystem.pvwatts_dc` for details.
|
|
856
856
|
"""
|
|
857
|
-
|
|
857
|
+
effective_irradiance = self._validate_per_array(effective_irradiance)
|
|
858
858
|
temp_cell = self._validate_per_array(temp_cell)
|
|
859
859
|
return tuple(
|
|
860
|
-
pvwatts_dc(
|
|
860
|
+
pvwatts_dc(effective_irradiance, temp_cell,
|
|
861
861
|
array.module_parameters['pdc0'],
|
|
862
862
|
array.module_parameters['gamma_pdc'],
|
|
863
863
|
**_build_kwargs(['temp_ref'], array.module_parameters))
|
|
864
|
-
for array,
|
|
865
|
-
in zip(self.arrays,
|
|
864
|
+
for array, effective_irradiance, temp_cell
|
|
865
|
+
in zip(self.arrays, effective_irradiance, temp_cell)
|
|
866
866
|
)
|
|
867
867
|
|
|
868
868
|
def pvwatts_losses(self):
|
|
@@ -1012,6 +1012,9 @@ class Array:
|
|
|
1012
1012
|
elif 'insulated' in param_set: # after SAPM to avoid confusing keys
|
|
1013
1013
|
return temperature._temperature_model_params('pvsyst',
|
|
1014
1014
|
'insulated')
|
|
1015
|
+
elif 'semi_integrated' in param_set:
|
|
1016
|
+
return temperature._temperature_model_params('pvsyst',
|
|
1017
|
+
'semi_integrated')
|
|
1015
1018
|
else:
|
|
1016
1019
|
return {}
|
|
1017
1020
|
|
|
@@ -1396,10 +1399,11 @@ class FixedMount(AbstractMount):
|
|
|
1396
1399
|
|
|
1397
1400
|
racking_model : str, optional
|
|
1398
1401
|
Valid strings are ``'open_rack'``, ``'close_mount'``,
|
|
1399
|
-
``'insulated_back'``, ``'freestanding'
|
|
1402
|
+
``'insulated_back'``, ``'freestanding'``, ``'insulated'``, and
|
|
1403
|
+
``'semi_integrated'``.
|
|
1400
1404
|
Used to identify a parameter set for the SAPM or PVsyst cell
|
|
1401
1405
|
temperature model.
|
|
1402
|
-
See :py:func:`~pvlib.temperature.sapm_module`
|
|
1406
|
+
See :py:func:`~pvlib.temperature.sapm_module` and
|
|
1403
1407
|
:py:func:`~pvlib.temperature.pvsyst_cell` for definitions.
|
|
1404
1408
|
|
|
1405
1409
|
module_height : float, optional
|
|
@@ -1477,7 +1481,8 @@ class SingleAxisTrackerMount(AbstractMount):
|
|
|
1477
1481
|
|
|
1478
1482
|
racking_model : str, optional
|
|
1479
1483
|
Valid strings are ``'open_rack'``, ``'close_mount'``,
|
|
1480
|
-
``'insulated_back'``, ``'freestanding'
|
|
1484
|
+
``'insulated_back'``, ``'freestanding'``, ``'insulated'``, and
|
|
1485
|
+
``'semi_integrated'``.
|
|
1481
1486
|
Used to identify a parameter set for the SAPM or PVsyst cell
|
|
1482
1487
|
temperature model. ``'open_rack'`` or ``'freestanding'`` should
|
|
1483
1488
|
be used for systems with single-axis trackers.
|
|
@@ -1948,31 +1953,17 @@ def calcparams_pvsyst(effective_irradiance, temp_cell,
|
|
|
1948
1953
|
|
|
1949
1954
|
'''
|
|
1950
1955
|
|
|
1951
|
-
|
|
1952
|
-
k = constants.k
|
|
1953
|
-
|
|
1954
|
-
# elementary charge in coulomb
|
|
1955
|
-
q = constants.e
|
|
1956
|
-
|
|
1957
|
-
# reference temperature
|
|
1958
|
-
Tref_K = temp_ref + 273.15
|
|
1959
|
-
Tcell_K = temp_cell + 273.15
|
|
1960
|
-
|
|
1961
|
-
gamma = gamma_ref + mu_gamma * (Tcell_K - Tref_K)
|
|
1962
|
-
nNsVth = gamma * k / q * cells_in_series * Tcell_K
|
|
1956
|
+
gamma = _pvsyst_gamma(temp_cell, gamma_ref, mu_gamma, temp_ref)
|
|
1963
1957
|
|
|
1964
|
-
|
|
1965
|
-
(I_L_ref + alpha_sc * (Tcell_K - Tref_K))
|
|
1958
|
+
nNsVth = _pvsyst_nNsVth(temp_cell, gamma, cells_in_series)
|
|
1966
1959
|
|
|
1967
|
-
|
|
1968
|
-
|
|
1960
|
+
IL = _pvsyst_IL(effective_irradiance, temp_cell, I_L_ref, alpha_sc,
|
|
1961
|
+
irrad_ref, temp_ref)
|
|
1969
1962
|
|
|
1970
|
-
|
|
1971
|
-
(R_sh_ref - R_sh_0 * np.exp(-R_sh_exp)) / (1.0 - np.exp(-R_sh_exp))
|
|
1972
|
-
Rsh_base = np.maximum(0.0, Rsh_tmp)
|
|
1963
|
+
I0 = _pvsyst_Io(temp_cell, gamma, I_o_ref, EgRef, temp_ref)
|
|
1973
1964
|
|
|
1974
|
-
Rsh =
|
|
1975
|
-
|
|
1965
|
+
Rsh = _pvsyst_Rsh(effective_irradiance, R_sh_ref, R_sh_0, R_sh_exp,
|
|
1966
|
+
irrad_ref)
|
|
1976
1967
|
|
|
1977
1968
|
Rs = R_s
|
|
1978
1969
|
|
|
@@ -1992,6 +1983,54 @@ def calcparams_pvsyst(effective_irradiance, temp_cell,
|
|
|
1992
1983
|
return tuple(pd.Series(a, index=index).rename(None) for a in out)
|
|
1993
1984
|
|
|
1994
1985
|
|
|
1986
|
+
def _pvsyst_Rsh(effective_irradiance, R_sh_ref, R_sh_0, R_sh_exp=5.5,
|
|
1987
|
+
irrad_ref=1000):
|
|
1988
|
+
Rsh_tmp = \
|
|
1989
|
+
(R_sh_ref - R_sh_0 * np.exp(-R_sh_exp)) / (1.0 - np.exp(-R_sh_exp))
|
|
1990
|
+
Rsh_base = np.maximum(0.0, Rsh_tmp)
|
|
1991
|
+
|
|
1992
|
+
Rsh = Rsh_base + (R_sh_0 - Rsh_base) * \
|
|
1993
|
+
np.exp(-R_sh_exp * effective_irradiance / irrad_ref)
|
|
1994
|
+
|
|
1995
|
+
return Rsh
|
|
1996
|
+
|
|
1997
|
+
|
|
1998
|
+
def _pvsyst_IL(effective_irradiance, temp_cell, I_L_ref, alpha_sc,
|
|
1999
|
+
irrad_ref=1000, temp_ref=25):
|
|
2000
|
+
Tref_K = temp_ref + 273.15
|
|
2001
|
+
Tcell_K = temp_cell + 273.15
|
|
2002
|
+
IL = effective_irradiance / irrad_ref * \
|
|
2003
|
+
(I_L_ref + alpha_sc * (Tcell_K - Tref_K))
|
|
2004
|
+
return IL
|
|
2005
|
+
|
|
2006
|
+
|
|
2007
|
+
def _pvsyst_Io(temp_cell, gamma, I_o_ref, EgRef, temp_ref=25):
|
|
2008
|
+
k = constants.k # Boltzmann constant in J/K
|
|
2009
|
+
q = constants.e # elementary charge in coulomb
|
|
2010
|
+
|
|
2011
|
+
Tref_K = temp_ref + 273.15
|
|
2012
|
+
Tcell_K = temp_cell + 273.15
|
|
2013
|
+
|
|
2014
|
+
Io = I_o_ref * ((Tcell_K / Tref_K) ** 3) * \
|
|
2015
|
+
(np.exp((q * EgRef) / (k * gamma) * (1 / Tref_K - 1 / Tcell_K)))
|
|
2016
|
+
|
|
2017
|
+
return Io
|
|
2018
|
+
|
|
2019
|
+
|
|
2020
|
+
def _pvsyst_gamma(temp_cell, gamma_ref, mu_gamma, temp_ref=25):
|
|
2021
|
+
gamma = gamma_ref + mu_gamma * (temp_cell - temp_ref)
|
|
2022
|
+
return gamma
|
|
2023
|
+
|
|
2024
|
+
|
|
2025
|
+
def _pvsyst_nNsVth(temp_cell, gamma, cells_in_series):
|
|
2026
|
+
k = constants.k # Boltzmann constant in J/K
|
|
2027
|
+
q = constants.e # elementary charge in coulomb
|
|
2028
|
+
Tcell_K = temp_cell + 273.15
|
|
2029
|
+
|
|
2030
|
+
nNsVth = gamma * k / q * cells_in_series * Tcell_K
|
|
2031
|
+
return nNsVth
|
|
2032
|
+
|
|
2033
|
+
|
|
1995
2034
|
def retrieve_sam(name=None, path=None):
|
|
1996
2035
|
"""
|
|
1997
2036
|
Retrieve latest module and inverter info from a file bundled with pvlib,
|
|
@@ -2161,25 +2200,32 @@ def _parse_raw_sam_df(csvdata):
|
|
|
2161
2200
|
return df
|
|
2162
2201
|
|
|
2163
2202
|
|
|
2164
|
-
def sapm(effective_irradiance, temp_cell, module
|
|
2203
|
+
def sapm(effective_irradiance, temp_cell, module, *, temperature_ref=25,
|
|
2204
|
+
irradiance_ref=1000):
|
|
2165
2205
|
'''
|
|
2166
2206
|
The Sandia PV Array Performance Model (SAPM) generates 5 points on a
|
|
2167
2207
|
PV module's I-V curve (Voc, Isc, Ix, Ixx, Vmp/Imp) according to
|
|
2168
|
-
SAND2004-3535. Assumes a reference cell temperature of 25
|
|
2208
|
+
SAND2004-3535. Assumes a reference cell temperature of 25°C.
|
|
2169
2209
|
|
|
2170
2210
|
Parameters
|
|
2171
2211
|
----------
|
|
2172
2212
|
effective_irradiance : numeric
|
|
2173
2213
|
Irradiance reaching the module's cells, after reflections and
|
|
2174
|
-
adjustment for spectrum. [
|
|
2214
|
+
adjustment for spectrum. [Wm⁻²]
|
|
2175
2215
|
|
|
2176
2216
|
temp_cell : numeric
|
|
2177
|
-
Cell temperature [C].
|
|
2217
|
+
Cell temperature [°C].
|
|
2178
2218
|
|
|
2179
2219
|
module : dict-like
|
|
2180
2220
|
A dict or Series defining the SAPM parameters. See the notes section
|
|
2181
2221
|
for more details.
|
|
2182
2222
|
|
|
2223
|
+
temperature_ref : numeric, optional
|
|
2224
|
+
Reference temperature [°C]
|
|
2225
|
+
|
|
2226
|
+
irradiance_ref : numeric, optional
|
|
2227
|
+
Reference irradiance [Wm⁻²]
|
|
2228
|
+
|
|
2183
2229
|
Returns
|
|
2184
2230
|
-------
|
|
2185
2231
|
A DataFrame with the columns:
|
|
@@ -2190,18 +2236,33 @@ def sapm(effective_irradiance, temp_cell, module):
|
|
|
2190
2236
|
* v_mp : Voltage at maximum-power point (V)
|
|
2191
2237
|
* p_mp : Power at maximum-power point (W)
|
|
2192
2238
|
* i_x : Current at module V = 0.5Voc, defines 4th point on I-V
|
|
2193
|
-
curve for modeling curve shape
|
|
2239
|
+
curve for modeling curve shape. Omitted if ``IXO``, ``C4``, and
|
|
2240
|
+
``C5`` parameters are not supplied.
|
|
2194
2241
|
* i_xx : Current at module V = 0.5(Voc+Vmp), defines 5th point on
|
|
2195
|
-
I-V curve for modeling curve shape
|
|
2242
|
+
I-V curve for modeling curve shape. Omitted if ``IXXO``, ``C6``,
|
|
2243
|
+
and ``C7`` parameters are not supplied.
|
|
2196
2244
|
|
|
2197
2245
|
Notes
|
|
2198
2246
|
-----
|
|
2199
|
-
The SAPM parameters which are required in ``module`` are
|
|
2200
|
-
listed in the following table.
|
|
2201
|
-
|
|
2202
2247
|
The Sandia module database contains parameter values for a limited set
|
|
2203
2248
|
of modules. The CEC module database does not contain these parameters.
|
|
2204
|
-
Both databases can be accessed using :py:func:`retrieve_sam`.
|
|
2249
|
+
Both databases can be accessed using :py:func:`retrieve_sam`. The full list
|
|
2250
|
+
of SAPM parameters is presented in the table below. Those that are required
|
|
2251
|
+
in the ``module`` parameter to run this model are as follows:
|
|
2252
|
+
|
|
2253
|
+
* ``C0``, ``C1``, ``C2``, ``C3``
|
|
2254
|
+
* ``Isco``
|
|
2255
|
+
* ``Impo``
|
|
2256
|
+
* ``Voco``
|
|
2257
|
+
* ``Vmpo``
|
|
2258
|
+
* ``Aisc``
|
|
2259
|
+
* ``Aimp``
|
|
2260
|
+
* ``Bvoco``
|
|
2261
|
+
* ``Mbvoc``
|
|
2262
|
+
* ``Bvmpo``
|
|
2263
|
+
* ``Mbvmp``
|
|
2264
|
+
* ``N``
|
|
2265
|
+
* ``Cells_in_series``
|
|
2205
2266
|
|
|
2206
2267
|
================ ========================================================
|
|
2207
2268
|
Key Description
|
|
@@ -2217,19 +2278,19 @@ def sapm(effective_irradiance, temp_cell, module):
|
|
|
2217
2278
|
Voco Open circuit voltage at reference condition (amps)
|
|
2218
2279
|
Vmpo Maximum power voltage at reference condition (amps)
|
|
2219
2280
|
Aisc Short circuit current temperature coefficient at
|
|
2220
|
-
reference condition (1
|
|
2281
|
+
reference condition (1/°C)
|
|
2221
2282
|
Aimp Maximum power current temperature coefficient at
|
|
2222
|
-
reference condition (1
|
|
2283
|
+
reference condition (1/°C)
|
|
2223
2284
|
Bvoco Open circuit voltage temperature coefficient at
|
|
2224
|
-
reference condition (V
|
|
2285
|
+
reference condition (V/°C)
|
|
2225
2286
|
Mbvoc Coefficient providing the irradiance dependence for the
|
|
2226
2287
|
BetaVoc temperature coefficient at reference irradiance
|
|
2227
|
-
(V
|
|
2288
|
+
(V/°C)
|
|
2228
2289
|
Bvmpo Maximum power voltage temperature coefficient at
|
|
2229
2290
|
reference condition
|
|
2230
2291
|
Mbvmp Coefficient providing the irradiance dependence for the
|
|
2231
2292
|
BetaVmp temperature coefficient at reference irradiance
|
|
2232
|
-
(V
|
|
2293
|
+
(V/°C)
|
|
2233
2294
|
N Empirically determined "diode factor" (dimensionless)
|
|
2234
2295
|
Cells_in_Series Number of cells in series in a module's cell string(s)
|
|
2235
2296
|
IXO Ix at reference conditions
|
|
@@ -2250,16 +2311,11 @@ def sapm(effective_irradiance, temp_cell, module):
|
|
|
2250
2311
|
pvlib.temperature.sapm_module
|
|
2251
2312
|
'''
|
|
2252
2313
|
|
|
2253
|
-
# TODO: someday, change temp_ref and irrad_ref to reference_temperature and
|
|
2254
|
-
# reference_irradiance and expose
|
|
2255
|
-
temp_ref = 25
|
|
2256
|
-
irrad_ref = 1000
|
|
2257
|
-
|
|
2258
2314
|
q = constants.e # Elementary charge in units of coulombs
|
|
2259
2315
|
kb = constants.k # Boltzmann's constant in units of J/K
|
|
2260
2316
|
|
|
2261
2317
|
# avoid problem with integer input
|
|
2262
|
-
Ee = np.array(effective_irradiance, dtype='float64') /
|
|
2318
|
+
Ee = np.array(effective_irradiance, dtype='float64') / irradiance_ref
|
|
2263
2319
|
|
|
2264
2320
|
# set up masking for 0, positive, and nan inputs
|
|
2265
2321
|
Ee_gt_0 = np.full_like(Ee, False, dtype='bool')
|
|
@@ -2282,31 +2338,34 @@ def sapm(effective_irradiance, temp_cell, module):
|
|
|
2282
2338
|
out = OrderedDict()
|
|
2283
2339
|
|
|
2284
2340
|
out['i_sc'] = (
|
|
2285
|
-
module['Isco'] * Ee * (1 + module['Aisc']*(temp_cell -
|
|
2341
|
+
module['Isco'] * Ee * (1 + module['Aisc']*(temp_cell -
|
|
2342
|
+
temperature_ref)))
|
|
2286
2343
|
|
|
2287
2344
|
out['i_mp'] = (
|
|
2288
2345
|
module['Impo'] * (module['C0']*Ee + module['C1']*(Ee**2)) *
|
|
2289
|
-
(1 + module['Aimp']*(temp_cell -
|
|
2346
|
+
(1 + module['Aimp']*(temp_cell - temperature_ref)))
|
|
2290
2347
|
|
|
2291
2348
|
out['v_oc'] = np.maximum(0, (
|
|
2292
2349
|
module['Voco'] + cells_in_series * delta * logEe +
|
|
2293
|
-
Bvoco*(temp_cell -
|
|
2350
|
+
Bvoco*(temp_cell - temperature_ref)))
|
|
2294
2351
|
|
|
2295
2352
|
out['v_mp'] = np.maximum(0, (
|
|
2296
2353
|
module['Vmpo'] +
|
|
2297
2354
|
module['C2'] * cells_in_series * delta * logEe +
|
|
2298
2355
|
module['C3'] * cells_in_series * ((delta * logEe) ** 2) +
|
|
2299
|
-
Bvmpo*(temp_cell -
|
|
2356
|
+
Bvmpo*(temp_cell - temperature_ref)))
|
|
2300
2357
|
|
|
2301
2358
|
out['p_mp'] = out['i_mp'] * out['v_mp']
|
|
2302
2359
|
|
|
2303
|
-
|
|
2304
|
-
|
|
2305
|
-
|
|
2360
|
+
if 'IXO' in module and 'C4' in module and 'C5' in module:
|
|
2361
|
+
out['i_x'] = (
|
|
2362
|
+
module['IXO'] * (module['C4']*Ee + module['C5']*(Ee**2)) *
|
|
2363
|
+
(1 + module['Aisc']*(temp_cell - temperature_ref)))
|
|
2306
2364
|
|
|
2307
|
-
|
|
2308
|
-
|
|
2309
|
-
|
|
2365
|
+
if 'IXXO' in module and 'C6' in module and 'C7' in module:
|
|
2366
|
+
out['i_xx'] = (
|
|
2367
|
+
module['IXXO'] * (module['C6']*Ee + module['C7']*(Ee**2)) *
|
|
2368
|
+
(1 + module['Aimp']*(temp_cell - temperature_ref)))
|
|
2310
2369
|
|
|
2311
2370
|
if isinstance(out['i_sc'], pd.Series):
|
|
2312
2371
|
out = pd.DataFrame(out)
|
|
@@ -2799,7 +2858,9 @@ def scale_voltage_current_power(data, voltage=1, current=1):
|
|
|
2799
2858
|
return df_sorted
|
|
2800
2859
|
|
|
2801
2860
|
|
|
2802
|
-
|
|
2861
|
+
@renamed_kwarg_warning(
|
|
2862
|
+
"0.13.0", "g_poa_effective", "effective_irradiance")
|
|
2863
|
+
def pvwatts_dc(effective_irradiance, temp_cell, pdc0, gamma_pdc, temp_ref=25.):
|
|
2803
2864
|
r"""
|
|
2804
2865
|
Implements NREL's PVWatts DC power model. The PVWatts DC model [1]_ is:
|
|
2805
2866
|
|
|
@@ -2815,7 +2876,7 @@ def pvwatts_dc(g_poa_effective, temp_cell, pdc0, gamma_pdc, temp_ref=25.):
|
|
|
2815
2876
|
|
|
2816
2877
|
Parameters
|
|
2817
2878
|
----------
|
|
2818
|
-
|
|
2879
|
+
effective_irradiance: numeric
|
|
2819
2880
|
Irradiance transmitted to the PV cells. To be
|
|
2820
2881
|
fully consistent with PVWatts, the user must have already
|
|
2821
2882
|
applied angle of incidence losses, but not soiling, spectral,
|
|
@@ -2843,7 +2904,7 @@ def pvwatts_dc(g_poa_effective, temp_cell, pdc0, gamma_pdc, temp_ref=25.):
|
|
|
2843
2904
|
(2014).
|
|
2844
2905
|
""" # noqa: E501
|
|
2845
2906
|
|
|
2846
|
-
pdc = (
|
|
2907
|
+
pdc = (effective_irradiance * 0.001 * pdc0 *
|
|
2847
2908
|
(1 + gamma_pdc * (temp_cell - temp_ref)))
|
|
2848
2909
|
|
|
2849
2910
|
return pdc
|
pvlib/solarposition.py
CHANGED
|
@@ -134,7 +134,7 @@ def spa_c(time, latitude, longitude, pressure=101325., altitude=0.,
|
|
|
134
134
|
|
|
135
135
|
The source files for this code are located in './spa_c_files/', along with
|
|
136
136
|
a README file which describes how the C code is wrapped in Python.
|
|
137
|
-
Due to license restrictions, the C code must be downloaded
|
|
137
|
+
Due to license restrictions, the C code must be downloaded separately
|
|
138
138
|
and used in accordance with it's license.
|
|
139
139
|
|
|
140
140
|
This function is slower and no more accurate than :py:func:`spa_python`.
|
pvlib/spectrum/irradiance.py
CHANGED
|
@@ -138,7 +138,8 @@ def average_photon_energy(spectra):
|
|
|
138
138
|
ape : numeric or pandas.Series
|
|
139
139
|
Average Photon Energy [eV].
|
|
140
140
|
Note: returns ``np.nan`` in the case of all-zero spectral irradiance
|
|
141
|
-
input
|
|
141
|
+
input, or where one or more spectral irradiance values is
|
|
142
|
+
``np.nan``.
|
|
142
143
|
|
|
143
144
|
Notes
|
|
144
145
|
-----
|
pvlib/temperature.py
CHANGED
|
@@ -21,7 +21,8 @@ TEMPERATURE_MODEL_PARAMETERS = {
|
|
|
21
21
|
'insulated_back_glass_polymer': {'a': -2.81, 'b': -.0455, 'deltaT': 0},
|
|
22
22
|
},
|
|
23
23
|
'pvsyst': {'freestanding': {'u_c': 29.0, 'u_v': 0},
|
|
24
|
-
'insulated': {'u_c': 15.0, 'u_v': 0}
|
|
24
|
+
'insulated': {'u_c': 15.0, 'u_v': 0},
|
|
25
|
+
'semi_integrated': {'u_c': 20.0, 'u_v': 0}}
|
|
25
26
|
}
|
|
26
27
|
"""Dictionary of temperature parameters organized by model.
|
|
27
28
|
|
|
@@ -382,19 +383,21 @@ def pvsyst_cell(poa_global, temp_air, wind_speed=1.0, u_c=29.0, u_v=0.0,
|
|
|
382
383
|
air temperature :math:`T_{a}` (C) and wind speed :math:`WS` (m/s). Model
|
|
383
384
|
output is cell temperature :math:`T_{C}`. Model parameters depend both on
|
|
384
385
|
the module construction and its mounting. Parameters are provided in
|
|
385
|
-
[1]_ for open (freestanding)
|
|
386
|
-
, and are coded for convenience in
|
|
386
|
+
[1]_ for open (freestanding), close (insulated), and intermediate
|
|
387
|
+
(semi_integrated) mounting configurations, and are coded for convenience in
|
|
387
388
|
:data:`~pvlib.temperature.TEMPERATURE_MODEL_PARAMETERS`. The heat loss
|
|
388
389
|
factors provided represent the combined effect of convection, radiation and
|
|
389
390
|
conduction, and their values are experimentally determined.
|
|
390
391
|
|
|
391
|
-
|
|
392
|
-
| Mounting
|
|
393
|
-
|
|
394
|
-
| freestanding
|
|
395
|
-
|
|
396
|
-
| insulated
|
|
397
|
-
|
|
392
|
+
+-----------------+---------------+---------------+
|
|
393
|
+
| Mounting | :math:`U_{c}` | :math:`U_{v}` |
|
|
394
|
+
+=================+===============+===============+
|
|
395
|
+
| freestanding | 29.0 | 0.0 |
|
|
396
|
+
+-----------------+---------------+---------------+
|
|
397
|
+
| insulated | 15.0 | 0.0 |
|
|
398
|
+
+-----------------+---------------+---------------+
|
|
399
|
+
| semi_integrated | 20.0 | 0.0 |
|
|
400
|
+
+-----------------+---------------+---------------+
|
|
398
401
|
|
|
399
402
|
Mounting cases can be described in terms of air flow across and around the
|
|
400
403
|
rear-facing surface of the module:
|
pvlib/tools.py
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Collection of functions used in pvlib_python
|
|
3
3
|
"""
|
|
4
4
|
|
|
5
|
+
import contextlib
|
|
5
6
|
import datetime as dt
|
|
6
7
|
import warnings
|
|
7
8
|
|
|
@@ -559,3 +560,29 @@ def normalize_max2one(a):
|
|
|
559
560
|
except ValueError: # fails for pandas objects
|
|
560
561
|
res = a.div(a.abs().max(axis=0, skipna=True))
|
|
561
562
|
return res
|
|
563
|
+
|
|
564
|
+
|
|
565
|
+
def _file_context_manager(filename_or_object, mode='r'):
|
|
566
|
+
"""
|
|
567
|
+
Open a filename/path for reading, or pass a file-like object
|
|
568
|
+
through unchanged.
|
|
569
|
+
|
|
570
|
+
Parameters
|
|
571
|
+
----------
|
|
572
|
+
filename_or_object : str, path-like, or file-like object
|
|
573
|
+
The filename/path or object to convert to an object
|
|
574
|
+
|
|
575
|
+
Returns
|
|
576
|
+
-------
|
|
577
|
+
context : context manager
|
|
578
|
+
A file-like object to be used via python's "with [context] as buffer:"
|
|
579
|
+
syntax.
|
|
580
|
+
"""
|
|
581
|
+
|
|
582
|
+
if hasattr(filename_or_object, "read"):
|
|
583
|
+
# already a file-like object
|
|
584
|
+
context = contextlib.nullcontext(filename_or_object)
|
|
585
|
+
else:
|
|
586
|
+
# otherwise, assume a filename or path
|
|
587
|
+
context = open(str(filename_or_object), mode=mode)
|
|
588
|
+
return context
|
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pvlib
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.13.0
|
|
4
4
|
Summary: A set of functions and classes for simulating the performance of photovoltaic energy systems.
|
|
5
5
|
Home-page: https://github.com/pvlib/pvlib-python
|
|
6
6
|
Author-email: pvlib python Developers <pvlib-admin@googlegroups.com>
|
|
7
|
-
License: BSD-3-Clause
|
|
7
|
+
License-Expression: BSD-3-Clause
|
|
8
8
|
Project-URL: Bug Tracker, https://github.com/pvlib/pvlib-python/issues
|
|
9
9
|
Project-URL: Documentation, https://pvlib-python.readthedocs.io/
|
|
10
10
|
Project-URL: Source Code, https://github.com/pvlib/pvlib-python
|
|
11
11
|
Classifier: Development Status :: 4 - Beta
|
|
12
|
-
Classifier: License :: OSI Approved :: BSD License
|
|
13
12
|
Classifier: Operating System :: OS Independent
|
|
14
13
|
Classifier: Intended Audience :: Science/Research
|
|
15
14
|
Classifier: Programming Language :: Python
|
|
@@ -1,29 +1,29 @@
|
|
|
1
1
|
pvlib/__init__.py,sha256=vdXAcBhLHHabZq1hdGnBEoo5cif6hLIS7mCJtgnWWUA,515
|
|
2
2
|
pvlib/_deprecation.py,sha256=pBZkJGV1r3m6q6ymqbQcT__t_toUkDQgPYYCK_Yu1so,15794
|
|
3
3
|
pvlib/albedo.py,sha256=MqrkDztnF6VWaM7W28AGGEgCyAK6X13bDvPk9YEaimU,6205
|
|
4
|
-
pvlib/atmosphere.py,sha256=
|
|
4
|
+
pvlib/atmosphere.py,sha256=zG6dXIrAdCvruXXHi7OthbcVqbXfSd6laib7JPkCztA,26854
|
|
5
5
|
pvlib/clearsky.py,sha256=9ReN3IGJHlJv_3bnxWEQUVZkww-klafsqqE5A-jelBQ,38553
|
|
6
6
|
pvlib/iam.py,sha256=zL0YzOaMA2Twbl0JJ0y5nxoxjmaOb9OQGH_Z1MVGcIw,44224
|
|
7
7
|
pvlib/inverter.py,sha256=ZpSv3cjt-Qm_JundL_jkvhCUd3iGjmlKcnNJeJqA2Qw,19127
|
|
8
|
-
pvlib/irradiance.py,sha256=
|
|
8
|
+
pvlib/irradiance.py,sha256=DJm0xN8c9Q6RdpZY58TEuXY26IE65BdF305BkYY60Q0,147940
|
|
9
9
|
pvlib/location.py,sha256=G31Iabv1KcYzMFr5sd0JhcJr9IpZx2rLv25h1K2XaAE,17509
|
|
10
|
-
pvlib/modelchain.py,sha256=
|
|
10
|
+
pvlib/modelchain.py,sha256=G7FysXI-3hcedpFeFstL_PonWzkRwjl3wGZgPy6OL00,72788
|
|
11
11
|
pvlib/pvarray.py,sha256=r60sGTxFNlPiFQndusCJmlEIPX0dv9_7ozKw8zxh7IM,12677
|
|
12
|
-
pvlib/pvsystem.py,sha256=
|
|
12
|
+
pvlib/pvsystem.py,sha256=nrwLmLZ44QUxhPZCgkE53Iwe6TQLhq7aBz8cESR4SQw,112435
|
|
13
13
|
pvlib/scaling.py,sha256=SsQEmM4f4O1wC7e0amEV4SgaRTBX8nG5IiSV9Xs0i5o,10983
|
|
14
14
|
pvlib/shading.py,sha256=S1Av-oskqxQTyLKkmaVr854bve3StfbP_yF5isHF5zI,26172
|
|
15
15
|
pvlib/singlediode.py,sha256=wcq7QE68CNy04gOHzP-vrdYfZh_QHJcIzkDZXSkZsWQ,35399
|
|
16
16
|
pvlib/snow.py,sha256=1jbfCvyi8ClE15U_stwdnxdaMnXOw8igN3BIYEjFrko,14755
|
|
17
17
|
pvlib/soiling.py,sha256=zDJ3N0uyeS1CoO0mxSdG16q2FCBLZSHbujJHgish54U,8799
|
|
18
|
-
pvlib/solarposition.py,sha256=
|
|
18
|
+
pvlib/solarposition.py,sha256=BG7MjbGDtRdQfH68loJXimvgjxn13gsp3KVtctOlGcI,51200
|
|
19
19
|
pvlib/spa.py,sha256=rXdizMpf2WEe-eKpseN_lf5MWzFihhayrT6E6h5fkgI,44847
|
|
20
|
-
pvlib/temperature.py,sha256=
|
|
21
|
-
pvlib/tools.py,sha256=
|
|
20
|
+
pvlib/temperature.py,sha256=sVGaSHY4EjoUZYCN5O8VuJoGDeYS5bEFTXFVBaQY91s,58109
|
|
21
|
+
pvlib/tools.py,sha256=MqhC3Y1VD44wb5-g9_Hn-IxaW4tS5fALHg14nATgWjA,14718
|
|
22
22
|
pvlib/tracking.py,sha256=YAgTSpT21GxOeTpow_cvD5njqJalwl-nHIr9KxuBHsQ,16152
|
|
23
23
|
pvlib/transformer.py,sha256=FXyYaPPooFXAvAP3Ib5vENDVJocbo6kUuBAPzQdimHo,3437
|
|
24
24
|
pvlib/version.py,sha256=0CONzyOSN34Jgbaj9JzemFuaEnbRON_yxp-ah6_KxxQ,165
|
|
25
25
|
pvlib/bifacial/__init__.py,sha256=64cyMvdne1gJJ-tSEetheorxEeMm-TOIad1u-0DSucA,460
|
|
26
|
-
pvlib/bifacial/infinite_sheds.py,sha256=
|
|
26
|
+
pvlib/bifacial/infinite_sheds.py,sha256=n5RN3vHpUge67-jp0ChwBxgd8ydKLS77MFuFzdMhqTk,22970
|
|
27
27
|
pvlib/bifacial/loss_models.py,sha256=RDl9TcKqFoYXnE3P88DjLVFODh2mHdKEFUUH-BnvH7E,5944
|
|
28
28
|
pvlib/bifacial/pvfactors.py,sha256=QJXqjok4UcaUToNs6eR5ZDMsVf3HHT2AqW2u36hOOSI,5437
|
|
29
29
|
pvlib/bifacial/utils.py,sha256=98D7buxlcE8oilC3BqHqqDT7pCjrM-dAGhYvpYjqalU,14558
|
|
@@ -38,38 +38,43 @@ pvlib/data/sam-library-cec-inverters-2019-03-05.csv,sha256=wZIlLw1hIE31j7DflVFKK
|
|
|
38
38
|
pvlib/data/sam-library-cec-modules-2019-03-05.csv,sha256=p8OxrT2rtUJTaGFcFjIvLjUYX8QWOAtHHE5I3VRbGSA,5446588
|
|
39
39
|
pvlib/data/sam-library-sandia-modules-2015-6-30.csv,sha256=fhC-Oi0IaYVViKEjyDyDWDCIFfD52rU2gL7w2FBAhPM,195253
|
|
40
40
|
pvlib/data/soiling_hsu_example_inputs.csv,sha256=Dkr0Sc5GA2s6I2hBSeAGIEI5J4KKBNgf-LTtzKS0qEE,319716
|
|
41
|
-
pvlib/iotools/__init__.py,sha256=
|
|
41
|
+
pvlib/iotools/__init__.py,sha256=jKkqzytQ7n9S9RMHImUT5uvV4hyXsMoluLSNMx1sHxY,2551
|
|
42
42
|
pvlib/iotools/acis.py,sha256=nzuH3SZBhMNoSk0fBr35O4YADDah6D02Acyj5RNUYeI,18449
|
|
43
|
-
pvlib/iotools/bsrn.py,sha256=
|
|
43
|
+
pvlib/iotools/bsrn.py,sha256=N1bkRukFfHzV95jjEZIKRDdxizddV7cXQUKo--bElw8,22013
|
|
44
44
|
pvlib/iotools/crn.py,sha256=PLugc4RF_0LzesWHnyCOtx9KmqeECZH9kxcXgzgjGrQ,5336
|
|
45
|
-
pvlib/iotools/epw.py,sha256=
|
|
45
|
+
pvlib/iotools/epw.py,sha256=Y9R9Od3AQqyHMxCRAUuOzFpZkzaAUXeERAZ44RyQjXU,17470
|
|
46
46
|
pvlib/iotools/midc.py,sha256=T2kskGsBzeHY-9HHc8096mbOaifKvFturCTcZq1pIzY,9568
|
|
47
47
|
pvlib/iotools/panond.py,sha256=okK6zNh5r-H1gDPbZRmWEcYYaBmifPhp1ESR-P2YM9s,5262
|
|
48
|
-
pvlib/iotools/psm3.py,sha256=
|
|
49
|
-
pvlib/iotools/
|
|
50
|
-
pvlib/iotools/
|
|
48
|
+
pvlib/iotools/psm3.py,sha256=MO0l-YPvgAcXqaRFh9u79e1aMl8CU9OFvtjc_h957-Y,13661
|
|
49
|
+
pvlib/iotools/psm4.py,sha256=TVU_uZmShnJdsCL7DABnluvYENshpIcYJbJCg864rRw,30112
|
|
50
|
+
pvlib/iotools/pvgis.py,sha256=o9kjgYMMVi8PzlcE-Q9V1wayph4gQG5FEcMxUyJQxPE,32186
|
|
51
|
+
pvlib/iotools/sodapro.py,sha256=3oBnN3GhDrB1tHmjgpSiYehitv7POFhs1yBzGDNOxOQ,15234
|
|
51
52
|
pvlib/iotools/solaranywhere.py,sha256=_kDetQ0R8rQgcfTZjeQArq9nmCtVa4upF_KGrcipovQ,12535
|
|
52
53
|
pvlib/iotools/solargis.py,sha256=6FeIsqs_bs2oNrUGvkv7Dc4AlIsDiwpCs5oFVcBheO8,8274
|
|
53
54
|
pvlib/iotools/solcast.py,sha256=d-2LAC-Tlazmih_QZKYbOKCyZaP7U08pIwoKTfciTCk,15332
|
|
54
55
|
pvlib/iotools/solrad.py,sha256=M8Xwasro6_hFiZP7hcsYSeEze3q5kNmnV0kAdNHqgBI,7177
|
|
55
|
-
pvlib/iotools/srml.py,sha256=
|
|
56
|
+
pvlib/iotools/srml.py,sha256=5e9lQTxGR1VSLm3uQFm0dIHzzzkHTaFl9L3wN4oxMs4,8752
|
|
56
57
|
pvlib/iotools/surfrad.py,sha256=WFh2__FGlOwHg6RTxIkcMmdMucX0vbQfHEz9q_HLGjY,7349
|
|
57
58
|
pvlib/iotools/tmy.py,sha256=zfkxn88qSKBR0GOHWxgrQ6r-BOC-ueoDfppjOS18VBI,26603
|
|
58
59
|
pvlib/ivtools/__init__.py,sha256=bnUDPqkzCP96CaFFK3Gw4HNczJoHtO-cI9GBGAtZVGI,159
|
|
59
60
|
pvlib/ivtools/sde.py,sha256=HL2oE70Ls7xccikyaUSi6SQKx3cWES5XoaMAGuMjPIw,17008
|
|
60
|
-
pvlib/ivtools/sdm.py,sha256=Q5d-codgQNo_aPkmEHkEI9L5RDEshdiGQQrwjS80tWU,52105
|
|
61
61
|
pvlib/ivtools/utils.py,sha256=xL88J-RuYLXFZyy1za8tvoWei0hcwWb_2ktXara2m_M,19423
|
|
62
|
+
pvlib/ivtools/sdm/__init__.py,sha256=P9akg2O7mFkAXoC8Kh2HcaZhbT96K4tTKnYr3b1dt2g,474
|
|
63
|
+
pvlib/ivtools/sdm/_fit_desoto_pvsyst_sandia.py,sha256=xUSE-6jiWOyIyhXTNX0EWjKu_f1H3vwqbO316b9KbyU,22523
|
|
64
|
+
pvlib/ivtools/sdm/cec.py,sha256=StIQ92RPaU--pp_2QQjFa1SFl5JSntjbEL5GItiOlNU,3434
|
|
65
|
+
pvlib/ivtools/sdm/desoto.py,sha256=saB71F9sXBRAbWB--gHt-QFnAPRYrg_eDEkNK777x38,15107
|
|
66
|
+
pvlib/ivtools/sdm/pvsyst.py,sha256=ur2LVbm_6S941BHNMKOtA-y5OaaT8LfwIctztSO1FbE,23246
|
|
62
67
|
pvlib/spa_c_files/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
63
68
|
pvlib/spa_c_files/setup.py,sha256=RcMEf0R2wKHJjvpUH5y6h22m86y6UrdXwkPkHKNme48,1102
|
|
64
69
|
pvlib/spa_c_files/spa_py_example.py,sha256=p3ms0mhLycAuZJyaE3Wageqnd_56zh2EKxXK-jlTJfg,1179
|
|
65
70
|
pvlib/spectrum/__init__.py,sha256=8lK8ZJRh5nl4A6eK0OlbiHdViorCHiJkANrK7QkjQIw,516
|
|
66
|
-
pvlib/spectrum/irradiance.py,sha256=
|
|
71
|
+
pvlib/spectrum/irradiance.py,sha256=VY0-FTUv2WWHTZRyy4lo8lQGrAjIREf4nQMVYrv0mXM,7827
|
|
67
72
|
pvlib/spectrum/mismatch.py,sha256=Vhp1WeyP4vle6hXLsAhDZYwPwyEdPjBhfDL2B1yi0BU,30497
|
|
68
73
|
pvlib/spectrum/response.py,sha256=k3FCoPPR_2yGrfXPGsZljJcgrQ7sckQn0CwiqERNntY,9413
|
|
69
74
|
pvlib/spectrum/spectrl2.py,sha256=sPOZe5lXgkwMem3JbEi19uW7OQq4FzxcZyCnxzXFjWs,19022
|
|
70
|
-
pvlib-0.
|
|
71
|
-
pvlib-0.
|
|
72
|
-
pvlib-0.
|
|
73
|
-
pvlib-0.
|
|
74
|
-
pvlib-0.
|
|
75
|
-
pvlib-0.
|
|
75
|
+
pvlib-0.13.0.dist-info/licenses/AUTHORS.md,sha256=Fxk4p_lXlMeQ6g2A1-7oPrgpULDxuJuC9Ebc-3yyj_o,1474
|
|
76
|
+
pvlib-0.13.0.dist-info/licenses/LICENSE,sha256=oC4S3araPPDV292K_91XfC7sZAdYqVhCowT3UTuMC-Q,1622
|
|
77
|
+
pvlib-0.13.0.dist-info/METADATA,sha256=VgBtq2X385ptZ7jD1a0f2jDJ-hpsV7gMEqPAhTjV7D4,2897
|
|
78
|
+
pvlib-0.13.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
79
|
+
pvlib-0.13.0.dist-info/top_level.txt,sha256=eq9CH6YXUc3Fh3dyQ5hQXoGYfSm1SYEAlMygyR22MgE,6
|
|
80
|
+
pvlib-0.13.0.dist-info/RECORD,,
|