Skip to content

Commit 1bab88a

Browse files
committed
add altitude
1 parent 4d0daf2 commit 1bab88a

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

pvlib/location.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,7 @@ def get_solarposition(self, times, **kwargs):
144144
"""
145145
return solarposition.get_solarposition(times, latitude=self.latitude,
146146
longitude=self.longitude,
147+
altitude=self.altitude,
147148
**kwargs)
148149

149150

@@ -165,6 +166,7 @@ def get_clearsky(self, times, **kwargs):
165166
"""
166167
return clearsky.ineichen(times, latitude=self.latitude,
167168
longitude=self.longitude,
169+
altitude=self.altitude,
168170
**kwargs)
169171

170172

pvlib/pvsystem.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,10 @@ class PVSystem(Location):
3737
methods accept arguments for things that do change, such as
3838
irradiance and temperature.
3939
40-
Inherits the ``from_tmy`` constructor from Location.
40+
Inherits the ``from_tmy`` constructor from ``Location``.
4141
42-
Inherits the ``get_solarposition`` method from Location.
42+
Inherits the ``get_solarposition`` and ``get_clearsky``
43+
method from ``Location``. Defines ``get_irradiance``.
4344
4445
Parameters
4546
----------

pvlib/solarposition.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030

3131

3232
def get_solarposition(time, location=None, latitude=None, longitude=None,
33+
altitude=None,
3334
method='nrel_numpy', pressure=101325,
3435
temperature=12, **kwargs):
3536
"""
@@ -41,6 +42,7 @@ def get_solarposition(time, location=None, latitude=None, longitude=None,
4142
location : None or pvlib.Location object
4243
latitude : None or float
4344
longitude : None or float
45+
altitude : None or float
4446
method : string
4547
'pyephem' uses the PyEphem package: :func:`pyephem`
4648
@@ -87,7 +89,8 @@ def get_solarposition(time, location=None, latitude=None, longitude=None,
8789
ephem_df = spa_python(time, latitude, longitude, pressure, temperature,
8890
how='numba', **kwargs)
8991
elif method == 'nrel_numpy':
90-
ephem_df = spa_python(time, latitude, longitude, pressure, temperature,
92+
ephem_df = spa_python(time, latitude, longitude, altitude,
93+
pressure, temperature,
9194
how='numpy', **kwargs)
9295
elif method == 'pyephem':
9396
ephem_df = pyephem(time, latitude, longitude, pressure, temperature,

0 commit comments

Comments
 (0)