Skip to content

Commit e576892

Browse files
OmarBahamidaRDaxinicwhanse
authored
Update zenith and azimuth angle documentation (#2485)
* docs: update solar angle definitions in nomenclature - Add detailed definitions for solar angles with range constraints - Clarify pvlib's east-of-north convention for azimuth angles - Add cross-references between related terms using :term: directive - Add coordinate system conventions for latitude/longitude - Enhance existing angle definitions with usage notes and examples This commit addresses issue #2448 by migrating angle definitions and conventions from parameter descriptions to the nomenclature page. (cherry picked from commit 16435c7) * Add test script for solar angle calculations (Issue #2448) - Created test_solar_angles.py to verify solar angle calculations - Tests zenith, azimuth, and elevation angles for different times of day - Uses New York City as example location on spring equinox - Verifies angles are within expected ranges and follow correct patterns (cherry picked from commit f202c5d) * Remove test_solar_angles.py and integrate its functionality into tests/test_solarposition.py - Deleted the standalone test_solar_angles.py file. - Added a new test function, test_solar_angles_spring_equinox, to tests/test_solarposition.py. - The new test verifies solar angles for New York City on the spring equinox, ensuring angles are within expected ranges and follow correct patterns. (cherry picked from commit 9963629) * remove aoi range statement * add units * rephrase pvlib azimuth angle convention * remove "for example" from azimuth defintion See #2448 (comment) * remove zenith/azimuth range constraints * remove "for example" again * remove tests for angle range * delete example.py * remove blank line * nomenclature revision * so that -> so * Update v0.13.1.rst * add general technical descriptions/definitions * Apply suggestions from code review Co-authored-by: Cliff Hansen <[email protected]> * vector pointed up and a vector... Co-Authored-By: Cliff Hansen <[email protected]> * surface_azimuth definition * remove solar_elevation link --------- Co-authored-by: RDaxini <[email protected]> Co-authored-by: RDaxini <[email protected]> Co-authored-by: Cliff Hansen <[email protected]> Co-authored-by: Cliff Hansen <[email protected]>
1 parent 908d3da commit e576892

File tree

2 files changed

+32
-10
lines changed

2 files changed

+32
-10
lines changed

docs/sphinx/source/user_guide/extras/nomenclature.rst

Lines changed: 28 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,24 @@ There is a convention on consistent variable names throughout the library:
2222

2323
aoi
2424
Angle of incidence. Angle between the surface normal vector and the
25-
vector pointing towards the suns center
25+
vector pointing towards the sun's center. [°]
2626

2727
aoi_projection
28-
cos(aoi)
28+
cos(aoi). When the sun is behind the surface, the value is negative.
29+
For many uses, negative values must be set to zero.
2930

3031
ape
3132
Average photon energy
3233

3334
apparent_zenith
34-
Refraction-corrected solar zenith angle in degrees
35+
Refraction-corrected solar zenith angle. The solar
36+
zenith angle describes the position of the sun relative to the vertical and is
37+
defined as the angle between a vector pointed straight up and a vector pointed
38+
at the sun, from the observer. [°]
39+
40+
apparent_elevation
41+
Refraction-corrected solar elevation angle. This is the complement of
42+
:term:`apparent_zenith` (90 - apparent_zenith). [°]
3543

3644
bhi
3745
Beam/direct horizontal irradiance
@@ -87,10 +95,10 @@ There is a convention on consistent variable names throughout the library:
8795
Sandia Array Performance Model IV curve parameters
8896

8997
latitude
90-
Latitude
98+
Latitude in decimal degrees. Positive north of equator, negative to south.
9199

92100
longitude
93-
Longitude
101+
Longitude in decimal degrees. Positive east of prime meridian, negative to west.
94102

95103
pac, ac
96104
AC power
@@ -141,10 +149,15 @@ There is a convention on consistent variable names throughout the library:
141149
Diode saturation current
142150

143151
solar_azimuth
144-
Azimuth angle of the sun in degrees East of North
152+
Azimuth angle of the sun in degrees East of North. The solar azimuth angle
153+
describes the sun’s position along the horizon relative to the observer.
154+
The pvlib-python convention is defined as degrees East of North, so
155+
North = 0°, East = 90°, South = 180°, West = 270°.
145156

146157
solar_zenith
147-
Zenith angle of the sun in degrees
158+
Zenith angle of the sun in degrees. This is the angle between is between a
159+
vector pointed straight up and a vector pointed at the sun, from the observer.
160+
This is the complement of solar elevation (90 - elevation). [°]
148161

149162
spectra
150163
spectra_components
@@ -154,11 +167,16 @@ There is a convention on consistent variable names throughout the library:
154167
is composed of direct and diffuse components.
155168

156169
surface_azimuth
157-
Azimuth angle of the surface
170+
Azimuth angle of the surface in degrees East of North. This angle describes the
171+
horizontal projection of the normal vector from the surface. The pvlib-python
172+
convention is defined as degrees East (clockwise) of North, so North = 0°,
173+
East = 90°, South = 180°, West = 270°.
158174

159175
surface_tilt
160-
Panel tilt from horizontal [°]. For example, a surface facing up = 0°,
161-
surface facing horizon = 90°.
176+
Tilt from horizontal [°]. The surface tilt angle
177+
is defined as degrees from the horizontal
178+
such that a surface facing up would have a surface tilt of 0°, and one facing
179+
the horizon would be 90°. [°]
162180

163181
temp_air
164182
Temperature of the air

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ Enhancements
2323

2424
Documentation
2525
~~~~~~~~~~~~~
26+
* Substantiate definitions of solar/surface azimuth/zenith and aoi on the
27+
:ref:`nomenclature` page. (:issue:`2448`, :pull:`2503`)
2628

2729

2830
Testing
@@ -45,3 +47,5 @@ Maintenance
4547
Contributors
4648
~~~~~~~~~~~~
4749
* Elijah Passmore (:ghuser:`eljpsm`)
50+
* Rajiv Daxini (:ghuser:`RDaxini`)
51+
* Omar Bahamida (:ghuser:`OmarBahamida`)

0 commit comments

Comments
 (0)