@@ -38,26 +38,33 @@ def get_solarposition(time, latitude, longitude,
38
38
Parameters
39
39
----------
40
40
time : pandas.DatetimeIndex
41
+
41
42
latitude : float
43
+
42
44
longitude : float
45
+
43
46
altitude : None or float
44
47
If None, computed from pressure. Assumed to be 0 m
45
48
if pressure is also None.
49
+
46
50
pressure : None or float
47
51
If None, computed from altitude. Assumed to be 101325 Pa
48
52
if altitude is also None.
49
- method : string
50
- 'pyephem' uses the PyEphem package: :func:`pyephem`
51
-
52
- 'nrel_c' uses the NREL SPA C code [3]: :func:`spa_c`
53
53
54
+ method : string
54
55
'nrel_numpy' uses an implementation of the NREL SPA algorithm
55
- described in [1] (default): :func:`spa_python`
56
+ described in [1] (default, recommended ): :py :func:`spa_python`
56
57
57
58
'nrel_numba' uses an implementation of the NREL SPA algorithm
58
- described in [1], but also compiles the code first: :func:`spa_python`
59
+ described in [1], but also compiles the code first:
60
+ :py:func:`spa_python`
61
+
62
+ 'pyephem' uses the PyEphem package: :py:func:`pyephem`
63
+
64
+ 'ephemeris' uses the pvlib ephemeris code: :py:func:`ephemeris`
65
+
66
+ 'nrel_c' uses the NREL SPA C code [3]: :py:func:`spa_c`
59
67
60
- 'ephemeris' uses the pvlib ephemeris code: :func:`ephemeris`
61
68
temperature : float
62
69
Degrees C.
63
70
@@ -114,13 +121,15 @@ def spa_c(time, latitude, longitude, pressure=101325, altitude=0,
114
121
raw_spa_output = False ):
115
122
"""
116
123
Calculate the solar position using the C implementation of the NREL
117
- SPA code
124
+ SPA code.
118
125
119
126
The source files for this code are located in './spa_c_files/', along with
120
127
a README file which describes how the C code is wrapped in Python.
121
128
Due to license restrictions, the C code must be downloaded seperately
122
129
and used in accordance with it's license.
123
130
131
+ This function is slower and no more accurate than :py:func:`spa_python`.
132
+
124
133
Parameters
125
134
----------
126
135
time : pandas.DatetimeIndex
@@ -266,7 +275,7 @@ def spa_python(time, latitude, longitude,
266
275
For most simulations specifing delta_t is sufficient.
267
276
Difference between terrestrial time and UT1.
268
277
*Note: delta_t = None will break code using nrel_numba,
269
- this will be fixed in a future version.
278
+ this will be fixed in a future version.*
270
279
The USNO has historical and forecasted delta_t [3].
271
280
atmos_refrac : float, optional
272
281
The approximate atmospheric refraction (in degrees)
@@ -807,7 +816,7 @@ def nrel_earthsun_distance(time, how='numpy', delta_t=67.0, numthreads=4):
807
816
For most simulations specifing delta_t is sufficient.
808
817
Difference between terrestrial time and UT1.
809
818
*Note: delta_t = None will break code using nrel_numba,
810
- this will be fixed in a future version.
819
+ this will be fixed in a future version.*
811
820
By default, use USNO historical data and predictions
812
821
813
822
numthreads : int, optional
0 commit comments