pvlib 0.12.1a1__py3-none-any.whl → 0.13.0a1__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/bifacial/infinite_sheds.py +11 -16
- pvlib/iotools/__init__.py +0 -1
- pvlib/iotools/bsrn.py +16 -10
- pvlib/iotools/epw.py +14 -11
- pvlib/iotools/psm3.py +37 -71
- pvlib/iotools/psm4.py +62 -115
- pvlib/iotools/pvgis.py +116 -101
- pvlib/iotools/sodapro.py +54 -69
- pvlib/iotools/srml.py +1 -2
- pvlib/ivtools/sdm/_fit_desoto_pvsyst_sandia.py +1 -1
- pvlib/pvsystem.py +21 -12
- pvlib/solarposition.py +1 -1
- pvlib/temperature.py +13 -10
- pvlib/tools.py +27 -0
- {pvlib-0.12.1a1.dist-info → pvlib-0.13.0a1.dist-info}/METADATA +1 -1
- {pvlib-0.12.1a1.dist-info → pvlib-0.13.0a1.dist-info}/RECORD +20 -20
- {pvlib-0.12.1a1.dist-info → pvlib-0.13.0a1.dist-info}/WHEEL +1 -1
- {pvlib-0.12.1a1.dist-info → pvlib-0.13.0a1.dist-info}/licenses/AUTHORS.md +0 -0
- {pvlib-0.12.1a1.dist-info → pvlib-0.13.0a1.dist-info}/licenses/LICENSE +0 -0
- {pvlib-0.12.1a1.dist-info → pvlib-0.13.0a1.dist-info}/top_level.txt +0 -0
pvlib/iotools/sodapro.py
CHANGED
|
@@ -7,7 +7,9 @@ import pandas as pd
|
|
|
7
7
|
import requests
|
|
8
8
|
import io
|
|
9
9
|
import warnings
|
|
10
|
+
from pvlib import tools
|
|
10
11
|
|
|
12
|
+
from pvlib._deprecation import deprecated, renamed_kwarg_warning
|
|
11
13
|
|
|
12
14
|
URL = 'api.soda-solardata.com'
|
|
13
15
|
|
|
@@ -43,10 +45,15 @@ SUMMATION_PERIOD_TO_TIME_STEP = {'0 year 0 month 0 day 0 h 1 min 0 s': '1min',
|
|
|
43
45
|
'0 year 1 month 0 day 0 h 0 min 0 s': '1M'}
|
|
44
46
|
|
|
45
47
|
|
|
48
|
+
@renamed_kwarg_warning(
|
|
49
|
+
since='0.13.0',
|
|
50
|
+
old_param_name='server',
|
|
51
|
+
new_param_name='url',
|
|
52
|
+
removal="0.14.0")
|
|
46
53
|
def get_cams(latitude, longitude, start, end, email, identifier='mcclear',
|
|
47
54
|
altitude=None, time_step='1h', time_ref='UT', verbose=False,
|
|
48
55
|
integrated=False, label=None, map_variables=True,
|
|
49
|
-
|
|
56
|
+
url=URL, timeout=30):
|
|
50
57
|
"""Retrieve irradiance and clear-sky time series from CAMS.
|
|
51
58
|
|
|
52
59
|
Time-series of radiation and/or clear-sky global, beam, and
|
|
@@ -96,7 +103,7 @@ def get_cams(latitude, longitude, start, end, email, identifier='mcclear',
|
|
|
96
103
|
map_variables: bool, default: True
|
|
97
104
|
When true, renames columns of the DataFrame to pvlib variable names
|
|
98
105
|
where applicable. See variable :const:`VARIABLE_MAP`.
|
|
99
|
-
|
|
106
|
+
url: str, default: :const:`pvlib.iotools.sodapro.URL`
|
|
100
107
|
Base url of the SoDa Pro CAMS Radiation API.
|
|
101
108
|
timeout : int, default: 30
|
|
102
109
|
Time in seconds to wait for server response before timeout
|
|
@@ -143,9 +150,15 @@ def get_cams(latitude, longitude, start, end, email, identifier='mcclear',
|
|
|
143
150
|
e.g. `sza` becomes `solar_zenith`. See variable :const:`VARIABLE_MAP` for
|
|
144
151
|
the complete mapping.
|
|
145
152
|
|
|
153
|
+
For large geospatial areas, CAMS offers a pre-calculated
|
|
154
|
+
gridded dataset [4]_ over land and coastal areas. This dataset
|
|
155
|
+
may not include the most recent data coverage and may not be
|
|
156
|
+
based on the most recent CAMS version. This dataset is not available
|
|
157
|
+
through pvlib.
|
|
158
|
+
|
|
146
159
|
See Also
|
|
147
160
|
--------
|
|
148
|
-
pvlib.iotools.read_cams
|
|
161
|
+
pvlib.iotools.read_cams
|
|
149
162
|
|
|
150
163
|
Raises
|
|
151
164
|
------
|
|
@@ -155,13 +168,15 @@ def get_cams(latitude, longitude, start, end, email, identifier='mcclear',
|
|
|
155
168
|
|
|
156
169
|
References
|
|
157
170
|
----------
|
|
158
|
-
.. [1] `CAMS solar radiation documentation
|
|
159
|
-
<https://atmosphere.copernicus.eu/solar-radiation>`_
|
|
171
|
+
.. [1] `CAMS solar radiation time-series documentation. Climate Data Store.
|
|
172
|
+
<https://ads.atmosphere.copernicus.eu/datasets/cams-solar-radiation-timeseries>`_
|
|
160
173
|
.. [2] `CAMS Radiation Automatic Access (SoDa)
|
|
161
174
|
<https://www.soda-pro.com/help/cams-services/cams-radiation-service/automatic-access>`_
|
|
162
175
|
.. [3] A. R. Jensen et al., pvlib iotools — Open-source Python functions
|
|
163
176
|
for seamless access to solar irradiance data. Solar Energy. 2023. Vol
|
|
164
177
|
266, pp. 112092. :doi:`10.1016/j.solener.2023.112092`
|
|
178
|
+
.. [4] `CAMS gridded solar radiation documentation.
|
|
179
|
+
<https://ads.atmosphere.copernicus.eu/datasets/cams-gridded-solar-radiation>`_
|
|
165
180
|
"""
|
|
166
181
|
try:
|
|
167
182
|
time_step_str = TIME_STEPS_MAP[time_step]
|
|
@@ -189,7 +204,7 @@ def get_cams(latitude, longitude, start, end, email, identifier='mcclear',
|
|
|
189
204
|
email = email.replace('@', '%2540') # Format email address
|
|
190
205
|
identifier = 'get_{}'.format(identifier.lower()) # Format identifier str
|
|
191
206
|
|
|
192
|
-
base_url = f"https://{
|
|
207
|
+
base_url = f"https://{url}/service/wps"
|
|
193
208
|
|
|
194
209
|
data_inputs_dict = {
|
|
195
210
|
'latitude': latitude,
|
|
@@ -202,7 +217,7 @@ def get_cams(latitude, longitude, start, end, email, identifier='mcclear',
|
|
|
202
217
|
'username': email,
|
|
203
218
|
'verbose': verbose}
|
|
204
219
|
|
|
205
|
-
# Manual formatting of the input parameters
|
|
220
|
+
# Manual formatting of the input parameters separating each by a semicolon
|
|
206
221
|
data_inputs = ";".join([f"{key}={value}" for key, value in
|
|
207
222
|
data_inputs_dict.items()])
|
|
208
223
|
|
|
@@ -214,7 +229,7 @@ def get_cams(latitude, longitude, start, end, email, identifier='mcclear',
|
|
|
214
229
|
}
|
|
215
230
|
|
|
216
231
|
# The DataInputs parameter of the URL has to be manually formatted and
|
|
217
|
-
# added to the base URL as it contains sub-parameters
|
|
232
|
+
# added to the base URL as it contains sub-parameters separated by
|
|
218
233
|
# semi-colons, which gets incorrectly formatted by the requests function
|
|
219
234
|
# if passed using the params argument.
|
|
220
235
|
res = requests.get(base_url + '?DataInputs=' + data_inputs, params=params,
|
|
@@ -231,20 +246,22 @@ def get_cams(latitude, longitude, start, end, email, identifier='mcclear',
|
|
|
231
246
|
# Successful requests returns a csv data file
|
|
232
247
|
else:
|
|
233
248
|
fbuf = io.StringIO(res.content.decode('utf-8'))
|
|
234
|
-
data, metadata =
|
|
235
|
-
|
|
249
|
+
data, metadata = read_cams(fbuf, integrated=integrated, label=label,
|
|
250
|
+
map_variables=map_variables)
|
|
236
251
|
return data, metadata
|
|
237
252
|
|
|
238
253
|
|
|
239
|
-
def
|
|
254
|
+
def read_cams(filename, integrated=False, label=None, map_variables=True):
|
|
240
255
|
"""
|
|
241
|
-
|
|
242
|
-
McClear file.
|
|
256
|
+
Read a file or file-like buffer with data in the format of a CAMS
|
|
257
|
+
Radiation or McClear file.
|
|
258
|
+
|
|
259
|
+
The CAMS solar radiation services are described in [1]_.
|
|
243
260
|
|
|
244
261
|
Parameters
|
|
245
262
|
----------
|
|
246
|
-
|
|
247
|
-
|
|
263
|
+
filename: str, path-like, or buffer
|
|
264
|
+
Filename or in-memory buffer of a file containing data to read.
|
|
248
265
|
integrated: boolean, default False
|
|
249
266
|
Whether to return radiation parameters as integrated values (Wh/m^2)
|
|
250
267
|
or as average irradiance values (W/m^2) (pvlib preferred units)
|
|
@@ -264,23 +281,31 @@ def parse_cams(fbuf, integrated=False, label=None, map_variables=True):
|
|
|
264
281
|
|
|
265
282
|
See Also
|
|
266
283
|
--------
|
|
267
|
-
pvlib.iotools.
|
|
284
|
+
pvlib.iotools.get_cams
|
|
268
285
|
|
|
269
286
|
References
|
|
270
287
|
----------
|
|
271
|
-
.. [1] `CAMS solar radiation documentation
|
|
272
|
-
<https://atmosphere.copernicus.eu/solar-radiation>`_
|
|
288
|
+
.. [1] `CAMS solar radiation time-series documentation. Climate Data Store.
|
|
289
|
+
<https://ads.atmosphere.copernicus.eu/datasets/cams-solar-radiation-timeseries>`_
|
|
273
290
|
"""
|
|
274
291
|
metadata = {}
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
292
|
+
|
|
293
|
+
with tools._file_context_manager(filename) as fbuf:
|
|
294
|
+
|
|
295
|
+
# Initial lines starting with # contain metadata
|
|
296
|
+
while True:
|
|
297
|
+
line = fbuf.readline().rstrip('\n')
|
|
298
|
+
if line.startswith('# Observation period'):
|
|
299
|
+
# The last line of the metadata section has the column names
|
|
300
|
+
names = line.lstrip('# ').split(';')
|
|
301
|
+
break # End of metadata section has been reached
|
|
302
|
+
elif ': ' in line:
|
|
303
|
+
key = line.split(': ')[0].lstrip('# ')
|
|
304
|
+
value = line.split(': ')[1]
|
|
305
|
+
metadata[key] = value
|
|
306
|
+
|
|
307
|
+
data = pd.read_csv(fbuf, sep=';', comment='#', header=None,
|
|
308
|
+
names=names)
|
|
284
309
|
|
|
285
310
|
# Convert latitude, longitude, and altitude values from strings to floats
|
|
286
311
|
for k_old in list(metadata.keys()):
|
|
@@ -296,8 +321,6 @@ def parse_cams(fbuf, integrated=False, label=None, map_variables=True):
|
|
|
296
321
|
metadata['Summarization (integration) period']]
|
|
297
322
|
metadata['time_step'] = time_step
|
|
298
323
|
|
|
299
|
-
data = pd.read_csv(fbuf, sep=';', comment='#', header=None, names=names)
|
|
300
|
-
|
|
301
324
|
obs_period = data['Observation period'].str.split('/')
|
|
302
325
|
|
|
303
326
|
# Set index as the start observation time (left) and localize to UTC
|
|
@@ -336,43 +359,5 @@ def parse_cams(fbuf, integrated=False, label=None, map_variables=True):
|
|
|
336
359
|
return data, metadata
|
|
337
360
|
|
|
338
361
|
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
Read a CAMS Radiation or McClear file into a pandas DataFrame.
|
|
342
|
-
|
|
343
|
-
CAMS Radiation and McClear are described in [1]_.
|
|
344
|
-
|
|
345
|
-
Parameters
|
|
346
|
-
----------
|
|
347
|
-
filename: str
|
|
348
|
-
Filename of a file containing data to read.
|
|
349
|
-
integrated: boolean, default False
|
|
350
|
-
Whether to return radiation parameters as integrated values (Wh/m^2)
|
|
351
|
-
or as average irradiance values (W/m^2) (pvlib preferred units)
|
|
352
|
-
label : {'right', 'left}, optional
|
|
353
|
-
Which bin edge label to label time-step with. The default is 'left' for
|
|
354
|
-
all time steps except for '1M' which has a default of 'right'.
|
|
355
|
-
map_variables: bool, default: True
|
|
356
|
-
When true, renames columns of the Dataframe to pvlib variable names
|
|
357
|
-
where applicable. See variable :const:`VARIABLE_MAP`.
|
|
358
|
-
|
|
359
|
-
Returns
|
|
360
|
-
-------
|
|
361
|
-
data: pandas.DataFrame
|
|
362
|
-
Timeseries data from CAMS Radiation or McClear.
|
|
363
|
-
See :func:`pvlib.iotools.get_cams` for fields.
|
|
364
|
-
metadata: dict
|
|
365
|
-
Metadata available in the file.
|
|
366
|
-
|
|
367
|
-
See Also
|
|
368
|
-
--------
|
|
369
|
-
pvlib.iotools.parse_cams, pvlib.iotools.get_cams
|
|
370
|
-
|
|
371
|
-
References
|
|
372
|
-
----------
|
|
373
|
-
.. [1] `CAMS solar radiation documentation
|
|
374
|
-
<https://atmosphere.copernicus.eu/solar-radiation>`_
|
|
375
|
-
"""
|
|
376
|
-
with open(str(filename), 'r') as fbuf:
|
|
377
|
-
content = parse_cams(fbuf, integrated, label, map_variables)
|
|
378
|
-
return content
|
|
362
|
+
parse_cams = deprecated(since="0.12.1", name="parse_cams",
|
|
363
|
+
alternative="read_cams")(read_cams)
|
pvlib/iotools/srml.py
CHANGED
|
@@ -236,8 +236,7 @@ def get_srml(station, start, end, filetype='PO', map_variables=True,
|
|
|
236
236
|
end = pd.to_datetime(end)
|
|
237
237
|
|
|
238
238
|
# Generate list of months
|
|
239
|
-
months = pd.date_range(
|
|
240
|
-
start, end.replace(day=1) + pd.DateOffset(months=1), freq='1M')
|
|
239
|
+
months = pd.date_range(start.date().replace(day=1), end, freq='1MS')
|
|
241
240
|
months_str = months.strftime('%y%m')
|
|
242
241
|
|
|
243
242
|
# Generate list of filenames
|
|
@@ -335,7 +335,7 @@ def _check_converge(prevparams, result, vmp, imp, i):
|
|
|
335
335
|
----------
|
|
336
336
|
prevparams: Convergence Parameters from the previous Iteration (used to
|
|
337
337
|
determine Percent Change in values between iterations)
|
|
338
|
-
result: performacne
|
|
338
|
+
result: performacne parameters of the (predicted) single diode fitting,
|
|
339
339
|
which includes Voc, Vmp, Imp, Pmp and Isc
|
|
340
340
|
vmp: measured values for each IV curve
|
|
341
341
|
imp: measured values for each IV curve
|
pvlib/pvsystem.py
CHANGED
|
@@ -16,7 +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
|
-
|
|
19
|
+
from pvlib._deprecation import renamed_kwarg_warning
|
|
20
20
|
import pvlib # used to avoid albedo name collision in the Array class
|
|
21
21
|
from pvlib import (atmosphere, iam, inverter, irradiance,
|
|
22
22
|
singlediode as _singlediode, spectrum, temperature)
|
|
@@ -843,8 +843,10 @@ class PVSystem:
|
|
|
843
843
|
for array, data in zip(self.arrays, data)
|
|
844
844
|
)
|
|
845
845
|
|
|
846
|
+
@renamed_kwarg_warning(
|
|
847
|
+
"0.13.0", "g_poa_effective", "effective_irradiance")
|
|
846
848
|
@_unwrap_single_value
|
|
847
|
-
def pvwatts_dc(self,
|
|
849
|
+
def pvwatts_dc(self, effective_irradiance, temp_cell):
|
|
848
850
|
"""
|
|
849
851
|
Calculates DC power according to the PVWatts model using
|
|
850
852
|
:py:func:`pvlib.pvsystem.pvwatts_dc`, `self.module_parameters['pdc0']`,
|
|
@@ -852,15 +854,15 @@ class PVSystem:
|
|
|
852
854
|
|
|
853
855
|
See :py:func:`pvlib.pvsystem.pvwatts_dc` for details.
|
|
854
856
|
"""
|
|
855
|
-
|
|
857
|
+
effective_irradiance = self._validate_per_array(effective_irradiance)
|
|
856
858
|
temp_cell = self._validate_per_array(temp_cell)
|
|
857
859
|
return tuple(
|
|
858
|
-
pvwatts_dc(
|
|
860
|
+
pvwatts_dc(effective_irradiance, temp_cell,
|
|
859
861
|
array.module_parameters['pdc0'],
|
|
860
862
|
array.module_parameters['gamma_pdc'],
|
|
861
863
|
**_build_kwargs(['temp_ref'], array.module_parameters))
|
|
862
|
-
for array,
|
|
863
|
-
in zip(self.arrays,
|
|
864
|
+
for array, effective_irradiance, temp_cell
|
|
865
|
+
in zip(self.arrays, effective_irradiance, temp_cell)
|
|
864
866
|
)
|
|
865
867
|
|
|
866
868
|
def pvwatts_losses(self):
|
|
@@ -1010,6 +1012,9 @@ class Array:
|
|
|
1010
1012
|
elif 'insulated' in param_set: # after SAPM to avoid confusing keys
|
|
1011
1013
|
return temperature._temperature_model_params('pvsyst',
|
|
1012
1014
|
'insulated')
|
|
1015
|
+
elif 'semi_integrated' in param_set:
|
|
1016
|
+
return temperature._temperature_model_params('pvsyst',
|
|
1017
|
+
'semi_integrated')
|
|
1013
1018
|
else:
|
|
1014
1019
|
return {}
|
|
1015
1020
|
|
|
@@ -1394,10 +1399,11 @@ class FixedMount(AbstractMount):
|
|
|
1394
1399
|
|
|
1395
1400
|
racking_model : str, optional
|
|
1396
1401
|
Valid strings are ``'open_rack'``, ``'close_mount'``,
|
|
1397
|
-
``'insulated_back'``, ``'freestanding'
|
|
1402
|
+
``'insulated_back'``, ``'freestanding'``, ``'insulated'``, and
|
|
1403
|
+
``'semi_integrated'``.
|
|
1398
1404
|
Used to identify a parameter set for the SAPM or PVsyst cell
|
|
1399
1405
|
temperature model.
|
|
1400
|
-
See :py:func:`~pvlib.temperature.sapm_module`
|
|
1406
|
+
See :py:func:`~pvlib.temperature.sapm_module` and
|
|
1401
1407
|
:py:func:`~pvlib.temperature.pvsyst_cell` for definitions.
|
|
1402
1408
|
|
|
1403
1409
|
module_height : float, optional
|
|
@@ -1475,7 +1481,8 @@ class SingleAxisTrackerMount(AbstractMount):
|
|
|
1475
1481
|
|
|
1476
1482
|
racking_model : str, optional
|
|
1477
1483
|
Valid strings are ``'open_rack'``, ``'close_mount'``,
|
|
1478
|
-
``'insulated_back'``, ``'freestanding'
|
|
1484
|
+
``'insulated_back'``, ``'freestanding'``, ``'insulated'``, and
|
|
1485
|
+
``'semi_integrated'``.
|
|
1479
1486
|
Used to identify a parameter set for the SAPM or PVsyst cell
|
|
1480
1487
|
temperature model. ``'open_rack'`` or ``'freestanding'`` should
|
|
1481
1488
|
be used for systems with single-axis trackers.
|
|
@@ -2851,7 +2858,9 @@ def scale_voltage_current_power(data, voltage=1, current=1):
|
|
|
2851
2858
|
return df_sorted
|
|
2852
2859
|
|
|
2853
2860
|
|
|
2854
|
-
|
|
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.):
|
|
2855
2864
|
r"""
|
|
2856
2865
|
Implements NREL's PVWatts DC power model. The PVWatts DC model [1]_ is:
|
|
2857
2866
|
|
|
@@ -2867,7 +2876,7 @@ def pvwatts_dc(g_poa_effective, temp_cell, pdc0, gamma_pdc, temp_ref=25.):
|
|
|
2867
2876
|
|
|
2868
2877
|
Parameters
|
|
2869
2878
|
----------
|
|
2870
|
-
|
|
2879
|
+
effective_irradiance: numeric
|
|
2871
2880
|
Irradiance transmitted to the PV cells. To be
|
|
2872
2881
|
fully consistent with PVWatts, the user must have already
|
|
2873
2882
|
applied angle of incidence losses, but not soiling, spectral,
|
|
@@ -2895,7 +2904,7 @@ def pvwatts_dc(g_poa_effective, temp_cell, pdc0, gamma_pdc, temp_ref=25.):
|
|
|
2895
2904
|
(2014).
|
|
2896
2905
|
""" # noqa: E501
|
|
2897
2906
|
|
|
2898
|
-
pdc = (
|
|
2907
|
+
pdc = (effective_irradiance * 0.001 * pdc0 *
|
|
2899
2908
|
(1 + gamma_pdc * (temp_cell - temp_ref)))
|
|
2900
2909
|
|
|
2901
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/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,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pvlib
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.13.0a1
|
|
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>
|
|
@@ -9,21 +9,21 @@ pvlib/irradiance.py,sha256=PTVInBAqcHeQzmJaxhIn8eQbCXjeRBlK1jo9S4FaXjs,147940
|
|
|
9
9
|
pvlib/location.py,sha256=G31Iabv1KcYzMFr5sd0JhcJr9IpZx2rLv25h1K2XaAE,17509
|
|
10
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,29 +38,29 @@ 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/psm4.py,sha256=
|
|
50
|
-
pvlib/iotools/pvgis.py,sha256=
|
|
51
|
-
pvlib/iotools/sodapro.py,sha256=
|
|
48
|
+
pvlib/iotools/psm3.py,sha256=9KpYmxeOKVW3Ve_7simKSPYSeMXEmFlIYXcNXTib_QQ,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=CFnfkoVq6wG4tythD3VDXkK4bZww0Ir1AGSrOnj0gJs,15234
|
|
52
52
|
pvlib/iotools/solaranywhere.py,sha256=_kDetQ0R8rQgcfTZjeQArq9nmCtVa4upF_KGrcipovQ,12535
|
|
53
53
|
pvlib/iotools/solargis.py,sha256=6FeIsqs_bs2oNrUGvkv7Dc4AlIsDiwpCs5oFVcBheO8,8274
|
|
54
54
|
pvlib/iotools/solcast.py,sha256=d-2LAC-Tlazmih_QZKYbOKCyZaP7U08pIwoKTfciTCk,15332
|
|
55
55
|
pvlib/iotools/solrad.py,sha256=M8Xwasro6_hFiZP7hcsYSeEze3q5kNmnV0kAdNHqgBI,7177
|
|
56
|
-
pvlib/iotools/srml.py,sha256=
|
|
56
|
+
pvlib/iotools/srml.py,sha256=5e9lQTxGR1VSLm3uQFm0dIHzzzkHTaFl9L3wN4oxMs4,8752
|
|
57
57
|
pvlib/iotools/surfrad.py,sha256=WFh2__FGlOwHg6RTxIkcMmdMucX0vbQfHEz9q_HLGjY,7349
|
|
58
58
|
pvlib/iotools/tmy.py,sha256=zfkxn88qSKBR0GOHWxgrQ6r-BOC-ueoDfppjOS18VBI,26603
|
|
59
59
|
pvlib/ivtools/__init__.py,sha256=bnUDPqkzCP96CaFFK3Gw4HNczJoHtO-cI9GBGAtZVGI,159
|
|
60
60
|
pvlib/ivtools/sde.py,sha256=HL2oE70Ls7xccikyaUSi6SQKx3cWES5XoaMAGuMjPIw,17008
|
|
61
61
|
pvlib/ivtools/utils.py,sha256=xL88J-RuYLXFZyy1za8tvoWei0hcwWb_2ktXara2m_M,19423
|
|
62
62
|
pvlib/ivtools/sdm/__init__.py,sha256=P9akg2O7mFkAXoC8Kh2HcaZhbT96K4tTKnYr3b1dt2g,474
|
|
63
|
-
pvlib/ivtools/sdm/_fit_desoto_pvsyst_sandia.py,sha256=
|
|
63
|
+
pvlib/ivtools/sdm/_fit_desoto_pvsyst_sandia.py,sha256=xUSE-6jiWOyIyhXTNX0EWjKu_f1H3vwqbO316b9KbyU,22523
|
|
64
64
|
pvlib/ivtools/sdm/cec.py,sha256=StIQ92RPaU--pp_2QQjFa1SFl5JSntjbEL5GItiOlNU,3434
|
|
65
65
|
pvlib/ivtools/sdm/desoto.py,sha256=saB71F9sXBRAbWB--gHt-QFnAPRYrg_eDEkNK777x38,15107
|
|
66
66
|
pvlib/ivtools/sdm/pvsyst.py,sha256=ur2LVbm_6S941BHNMKOtA-y5OaaT8LfwIctztSO1FbE,23246
|
|
@@ -72,9 +72,9 @@ pvlib/spectrum/irradiance.py,sha256=VY0-FTUv2WWHTZRyy4lo8lQGrAjIREf4nQMVYrv0mXM,
|
|
|
72
72
|
pvlib/spectrum/mismatch.py,sha256=Vhp1WeyP4vle6hXLsAhDZYwPwyEdPjBhfDL2B1yi0BU,30497
|
|
73
73
|
pvlib/spectrum/response.py,sha256=k3FCoPPR_2yGrfXPGsZljJcgrQ7sckQn0CwiqERNntY,9413
|
|
74
74
|
pvlib/spectrum/spectrl2.py,sha256=sPOZe5lXgkwMem3JbEi19uW7OQq4FzxcZyCnxzXFjWs,19022
|
|
75
|
-
pvlib-0.
|
|
76
|
-
pvlib-0.
|
|
77
|
-
pvlib-0.
|
|
78
|
-
pvlib-0.
|
|
79
|
-
pvlib-0.
|
|
80
|
-
pvlib-0.
|
|
75
|
+
pvlib-0.13.0a1.dist-info/licenses/AUTHORS.md,sha256=Fxk4p_lXlMeQ6g2A1-7oPrgpULDxuJuC9Ebc-3yyj_o,1474
|
|
76
|
+
pvlib-0.13.0a1.dist-info/licenses/LICENSE,sha256=oC4S3araPPDV292K_91XfC7sZAdYqVhCowT3UTuMC-Q,1622
|
|
77
|
+
pvlib-0.13.0a1.dist-info/METADATA,sha256=YMog72pX7M4sGGYnDjhgw04YBvjGvbi609BNWOnGJ4I,2899
|
|
78
|
+
pvlib-0.13.0a1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
79
|
+
pvlib-0.13.0a1.dist-info/top_level.txt,sha256=eq9CH6YXUc3Fh3dyQ5hQXoGYfSm1SYEAlMygyR22MgE,6
|
|
80
|
+
pvlib-0.13.0a1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|