Skip to content

Commit 0f8a88d

Browse files
committed
Merge branch 'main' into darkmode4myeyes
2 parents 10aa08b + 171f10c commit 0f8a88d

File tree

14 files changed

+96
-29
lines changed

14 files changed

+96
-29
lines changed

.github/workflows/asv_check.yml

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -26,19 +26,7 @@ jobs:
2626
python-version: '3.9'
2727

2828
- name: Install asv
29-
run: pip install asv==0.4.2
30-
31-
# asv 0.4.2 (and more recent versions as well) creates conda envs
32-
# using the --force option, which was removed in conda 24.3.
33-
# Since ubuntu-latest now comes with conda 24.3 pre-installed,
34-
# using the system's conda will result in error.
35-
# To prevent that, we install an older version.
36-
# TODO: remove this when we eventually upgrade our asv version.
37-
# https://github.com/airspeed-velocity/asv/issues/1396
38-
- name: Install Conda
39-
uses: conda-incubator/setup-miniconda@v3
40-
with:
41-
conda-version: 24.1.2
29+
run: pip install asv==0.6.4
4230

4331
- name: Run asv benchmarks
4432
run: |

ci/requirements-py3.12.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,4 @@ dependencies:
2525
- statsmodels
2626
- pip:
2727
- nrel-pysam>=2.0
28-
# - solarfactors # required shapely<2 isn't available for 3.12
28+
- solarfactors
Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,34 @@
1+
.. _user_guide:
2+
13
==========
24
User Guide
35
==========
46

7+
This user guide is an overview and explains some of the key features of pvlib.
58

69
.. toctree::
10+
:caption: Getting started
711
:maxdepth: 2
8-
12+
913
package_overview
1014
installation
1115
introtutorial
16+
17+
.. toctree::
18+
:caption: Modeling topics
19+
:maxdepth: 2
20+
1221
pvsystem
1322
modelchain
1423
timetimezones
15-
clearsky
1624
bifacial
25+
clearsky
1726
weather_data
1827
singlediode
28+
29+
.. toctree::
30+
:caption: Extras
31+
:maxdepth: 2
32+
1933
nomenclature
2034
faq

docs/sphinx/source/user_guide/introtutorial.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ to accomplish our system modeling goal:
8787
longitude=longitude,
8888
altitude=altitude,
8989
temperature=weather["temp_air"],
90-
pressure=pvlib.atmosphere.alt2pres(altitude),
90+
pressure=weather["pressure"],
9191
)
9292
dni_extra = pvlib.irradiance.get_extra_radiation(weather.index)
9393
airmass = pvlib.atmosphere.get_relative_airmass(solpos['apparent_zenith'])

docs/sphinx/source/whatsnew/v0.11.3.rst

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,18 @@ Deprecations
1010

1111
Enhancements
1212
~~~~~~~~~~~~
13-
13+
* :py:func:`~pvlib.irradiance.gti_dirint` now raises an informative message
14+
when input data don't include values with AOI<90 (:issue:`1342`, :pull:`2347`)
15+
* Fix a bug in :py:func:`pvlib.bifacial.get_irradiance_poa` which may have yielded non-zero
16+
ground irradiance when the sun was below the horizon. (:issue:`2245`, :pull:`2359`)
17+
* Fix a bug where :py:func:`pvlib.transformer.simple_efficiency` could only be imported
18+
using the `from pvlib.transformer` syntax (:pull:`2388`)
1419

1520
Documentation
1621
~~~~~~~~~~~~~
17-
22+
* Fix Procedural and Object Oriented simulation examples having slightly different results, in :ref:`introtutorial`. (:issue:`2366`, :pull:`2367`)
23+
* Restructure the user guide with subsections (:issue:`2302`, :pull:`2310`)
24+
* Add references for :py:func:`pvlib.snow.loss_townsend`. (:issue:`2383`, :pull:`2384`)
1825

1926
Testing
2027
~~~~~~~
@@ -24,7 +31,20 @@ Requirements
2431
~~~~~~~~~~~~
2532

2633

27-
Contributors
28-
~~~~~~~~~~~~
34+
Maintenance
35+
~~~~~~~~~~~
36+
* Fix ReadTheDocs builds by upgrading `readthedocs.yml` configuration
37+
(:issue:`2357`, :pull:`2358`)
38+
* asv 0.4.2 upgraded to asv 0.6.4 to fix CI failure due to pinned older conda.
39+
(:pull:`2352`)
2940

3041

42+
Contributors
43+
~~~~~~~~~~~~
44+
* Rajiv Daxini (:ghuser:`RDaxini`)
45+
* Mark Campanelli (:ghuser:`markcampanelli`)
46+
* Cliff Hansen (:ghuser:`cwhanse`)
47+
* Jason Lun Leung (:ghuser:`jason-rpkt`)
48+
* Manoj K S (:ghuser:`manojks1999`)
49+
* Kurt Rhee (:ghuser:`kurt-rhee`)
50+
* Ayush jariyal (:ghuser:`ayushjariyal`)

pvlib/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,5 @@
2727
temperature,
2828
tools,
2929
tracking,
30+
transformer,
3031
)

pvlib/bifacial/infinite_sheds.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -260,8 +260,9 @@ def get_irradiance_poa(surface_tilt, surface_azimuth, solar_zenith,
260260
Returns
261261
-------
262262
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.
265266
266267
Notes
267268
-----
@@ -372,7 +373,7 @@ def get_irradiance_poa(surface_tilt, surface_azimuth, solar_zenith,
372373
'poa_global': poa_global, 'poa_direct': poa_direct,
373374
'poa_diffuse': poa_diffuse, 'poa_ground_diffuse': poa_gnd_pv,
374375
'poa_sky_diffuse': poa_sky_pv, 'shaded_fraction': f_x}
375-
if isinstance(poa_global, pd.Series):
376+
if isinstance(ghi, pd.Series):
376377
output = pd.DataFrame(output)
377378
return output
378379

pvlib/bifacial/utils.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,8 @@ def _unshaded_ground_fraction(surface_tilt, surface_azimuth, solar_zenith,
8787
surface_azimuth)
8888
f_gnd_beam = 1.0 - np.minimum(
8989
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)
9192
return f_gnd_beam # 1 - min(1, abs()) < 1 always
9293

9394

pvlib/iotools/psm3.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
'ghi_clear': 'clearsky_ghi',
5050
'dhi_clear': 'clearsky_dhi',
5151
'dni_clear': 'clearsky_dni',
52-
'zenith': 'solar_zenith_angle',
52+
'solar_zenith': 'solar_zenith_angle',
5353
'temp_air': 'air_temperature',
5454
'temp_dew': 'dew_point',
5555
'relative_humidity': 'relative_humidity',

pvlib/irradiance.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2368,6 +2368,9 @@ def gti_dirint(poa_global, aoi, solar_zenith, solar_azimuth, times,
23682368
irradiance, Solar Energy 122, 1037-1046.
23692369
:doi:`10.1016/j.solener.2015.10.024`
23702370
"""
2371+
# check input data and raise Exceptions where data will cause the
2372+
# algorithm to fail
2373+
_gti_dirint_check_input(aoi)
23712374

23722375
aoi_lt_90 = aoi < 90
23732376

@@ -2399,6 +2402,17 @@ def gti_dirint(poa_global, aoi, solar_zenith, solar_azimuth, times,
23992402
return output
24002403

24012404

2405+
def _gti_dirint_check_input(aoi):
2406+
r"""
2407+
Helper for gti_dirint
2408+
2409+
Raises Exceptions from input data that cause the algorithm to fail.
2410+
"""
2411+
if not (aoi < 90).any():
2412+
raise ValueError("There are no times with AOI < 90. "
2413+
"gti_dirint requires some data with AOI < 90.")
2414+
2415+
24022416
def _gti_dirint_lt_90(poa_global, aoi, aoi_lt_90, solar_zenith, solar_azimuth,
24032417
times, surface_tilt, surface_azimuth, pressure=101325.,
24042418
use_delta_kt_prime=True, temp_dew=None, albedo=.25,

0 commit comments

Comments
 (0)