Skip to content

Commit

Permalink
Fix examples of shaded_fraction1d (#2215)
Browse files Browse the repository at this point in the history
* Update example of shaded_fraction1d

* Update v0.11.1.rst
  • Loading branch information
echedey-ls authored Sep 23, 2024
1 parent d6baf97 commit d8ea82b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
1 change: 1 addition & 0 deletions docs/sphinx/source/whatsnew/v0.11.1.rst
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ Documentation
* Added gallery example demonstrating how to use
different Perez coefficients in a ModelChain.
(:issue:`2127`, :pull:`2148`)
* Fixed examples in :py:func:`pvlib.shading.shaded_fraction1d`. (:pull:`#2215`)

* Removed unused "times" input from dni_et() function (:issue:`2105`)

Expand Down
16 changes: 8 additions & 8 deletions pvlib/shading.py
Original file line number Diff line number Diff line change
Expand Up @@ -449,11 +449,11 @@ def shaded_fraction1d(
Tilted row with a pitch of 3 m, a collector width of
2 m, and row rotations of 30°. In the morning.
>>> shaded_fraction1d(solar_zenith=80, solar_azimuth=104.5,
>>> shaded_fraction1d(solar_zenith=80, solar_azimuth=135,
... axis_azimuth=90, shaded_row_rotation=30, shading_row_rotation=30,
... collector_width=2, pitch=3, axis_tilt=0,
... surface_to_axis_offset=0.05, cross_axis_slope=0)
0.6827437712114521
0.47755694708090535
**Fixed-tilt north-facing array on sloped terrain**
Expand All @@ -463,11 +463,11 @@ def shaded_fraction1d(
10° slope, where their axis is on the most inclined
direction (zero cross-axis slope). Shaded in the morning.
>>> shaded_fraction1d(solar_zenith=65, solar_azimuth=75.5,
>>> shaded_fraction1d(solar_zenith=80, solar_azimuth=75.5,
... axis_azimuth=270, shaded_row_rotation=50, shading_row_rotation=30,
... collector_width=2.5, pitch=4, axis_tilt=10,
... surface_to_axis_offset=0.05, cross_axis_slope=0)
0.6975923460352351
0.793244836197256
**N-S single-axis tracker on sloped terrain**
Expand All @@ -476,10 +476,10 @@ def shaded_fraction1d(
in the morning. Terrain slope is 7° west-east (east-most
tracker is higher than the west-most tracker).
>>> shaded_fraction1d(solar_zenith=50, solar_azimuth=90, axis_azimuth=180,
>>> shaded_fraction1d(solar_zenith=80, solar_azimuth=90, axis_azimuth=180,
... shaded_row_rotation=-30, collector_width=1.4, pitch=3, axis_tilt=0,
... surface_to_axis_offset=0.10, cross_axis_slope=7)
0.5828961460616938
0.8242176864434579
Note the previous example only is valid for the shaded fraction of the
west-most tracker in the morning, and assuming it is the
Expand All @@ -491,10 +491,10 @@ def shaded_fraction1d(
tracker, you must input the corresponding ``shaded_row_rotation``
in the afternoon.
>>> shaded_fraction1d(solar_zenith=50, solar_azimuth=270, axis_azimuth=180,
>>> shaded_fraction1d(solar_zenith=80, solar_azimuth=270, axis_azimuth=180,
... shaded_row_rotation=30, collector_width=1.4, pitch=3, axis_tilt=0,
... surface_to_axis_offset=0.10, cross_axis_slope=7)
0.4399034444363955
0.018002567182254348
You must switch the input/output depending on the
sign of the projected solar zenith angle. See
Expand Down

0 comments on commit d8ea82b

Please sign in to comment.