Skip to content

Commit 131d697

Browse files
authored
Apply suggestions from code review
Co-authored-by: Kevin Anderson <kevin.anderso@gmail.com>
1 parent 01ad3d8 commit 131d697

9 files changed

Lines changed: 23 additions & 23 deletions

File tree

docs/sphinx/source/reference/solarposition.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ Functions for calculating sunrise, sunset and transit times.
4343
solarposition.sun_rise_set_transit_geometric
4444

4545

46-
The spa module contains the implementation of the built-in NLR SPA
46+
The spa module contains the implementation of the built-in NREL SPA
4747
algorithm.
4848

4949
.. autosummary::

docs/sphinx/source/user_guide/getting_started/installation.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -235,19 +235,19 @@ Alternatively, users may install all optional dependencies using
235235

236236
.. _nrelspa:
237237

238-
NLR SPA algorithm
238+
NREL SPA algorithm
239239
------------------
240240

241241
pvlib-python is distributed with several validated, high-precision, and
242242
high-performance solar position calculators. We strongly recommend using
243243
the built-in solar position calculators.
244244

245245
pvlib-python also includes unsupported wrappers for the official NLR
246-
SPA algorithm. NLR's license does not allow redistribution of the
246+
implementation of NREL SPA. NLR's license does not allow redistribution of the
247247
source code, so you must jump through some hoops to use it with pvlib.
248248
You will need a C compiler to use this code.
249249

250-
To install the NLR SPA algorithm for use with pvlib:
250+
To install the NREL SPA algorithm for use with pvlib:
251251

252252
#. Download the pvlib repository (as described in :ref:`obtainsource`)
253253
#. Download the `SPA files from NLR <http://www.nlr.gov/midc/spa/>`_

pvlib/iotools/tmy.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ def read_tmy3(filename, coerce_year=None, map_variables=True, encoding=None):
161161
162162
.. admonition:: Midnight representation
163163
164-
The function is able to handle midnight represented as 24:00 (NLR TMY3
164+
The function is able to handle midnight represented as 24:00 (NREL TMY3
165165
format, see [1]_) and as 00:00 (SolarAnywhere TMY3 format, see [3]_).
166166
167167
.. warning:: TMY3 irradiance data corresponds to the *previous* hour, so

pvlib/snow.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ def loss_townsend(snow_total, snow_events, surface_tilt, relative_humidity,
320320
Uses of the Townsend Snow Model. In "Photovoltaic Reliability
321321
Workshop (PVRW) 2023 Proceedings: Posters.", ed. Silverman,
322322
T. J. Dec. 2023. NREL/CP-5900-87918.
323-
:doi:`10.2172/1429291`
323+
Available at: https://www.osti.gov/biblio/2229734
324324
.. [3] Townsend, T. (2013). Predicting PV Energy Loss Caused by Snow.
325325
Solar Power International, Chicago IL.
326326
:doi:`10.13140/RG.2.2.14299.68647`

pvlib/solarposition.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,10 @@ def get_solarposition(time, latitude, longitude,
5656
if ``altitude`` is not supplied.
5757
5858
method : string, default 'nrel_numpy'
59-
'nrel_numpy' uses an implementation of the NLR SPA algorithm
59+
'nrel_numpy' uses an implementation of the NREL SPA algorithm
6060
described in [1] (default, recommended): :py:func:`spa_python`
6161
62-
'nrel_numba' uses an implementation of the NLR SPA algorithm
62+
'nrel_numba' uses an implementation of the NREL SPA algorithm
6363
described in [1], but also compiles the code first:
6464
:py:func:`spa_python`
6565
@@ -129,8 +129,8 @@ def spa_c(time, latitude, longitude, pressure=101325., altitude=0.,
129129
temperature=12., delta_t=67.0,
130130
raw_spa_output=False):
131131
r"""
132-
Calculate the solar position using the C implementation of the NLR
133-
SPA code.
132+
Calculate the solar position using the NLR C implementation of the
133+
NREL SPA.
134134
135135
The source files for this code are located in './spa_c_files/', along with
136136
a README file which describes how the C code is wrapped in Python.
@@ -283,9 +283,9 @@ def spa_python(time, latitude, longitude,
283283
atmos_refract=None, how='numpy', numthreads=4):
284284
"""
285285
Calculate the solar position using a python implementation of the
286-
NLR SPA algorithm.
286+
NREL SPA algorithm.
287287
288-
The details of the NLR SPA algorithm are described in [1]_, [2]_.
288+
The details of the NREL SPA algorithm are described in [1]_, [2]_.
289289
290290
If numba is installed, the functions can be compiled to
291291
machine code and the function can be multithreaded.
@@ -394,9 +394,9 @@ def sun_rise_set_transit_spa(times, latitude, longitude, how='numpy',
394394
delta_t=67.0, numthreads=4):
395395
"""
396396
Calculate the sunrise, sunset, and sun transit times using the
397-
NLR SPA algorithm.
397+
NREL SPA algorithm.
398398
399-
The details of the NLR SPA algorithm are described in [1]_.
399+
The details of the NREL SPA algorithm are described in [1]_.
400400
401401
If numba is installed, the functions can be compiled to
402402
machine code and the function can be multithreaded.
@@ -956,9 +956,9 @@ def pyephem_earthsun_distance(time):
956956
def nrel_earthsun_distance(time, how='numpy', delta_t=67.0, numthreads=4):
957957
"""
958958
Calculates the distance from the earth to the sun using the
959-
NLR SPA algorithm.
959+
NREL SPA algorithm.
960960
961-
The details of the NLR SPA algorithm are described in [1]_.
961+
The details of the NREL SPA algorithm are described in [1]_.
962962
963963
Parameters
964964
----------

pvlib/spa.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
"""
2-
Calculate the solar position using the NLR SPA algorithm either using
2+
Calculate the solar position using the NREL SPA algorithm either using
33
numpy arrays or compiling the code to machine language with numba.
44
"""
55

@@ -402,7 +402,7 @@ def nocompile(*args, **kwargs):
402402
@jcompile('float64(int64, int64, int64, int64, int64, int64, int64)',
403403
nopython=True)
404404
def julian_day_dt(year, month, day, hour, minute, second, microsecond):
405-
"""This is the original way to calculate the julian day from the NLR paper.
405+
"""This is the original way to calculate the julian day from the NREL paper.
406406
However, it is much faster to convert to unix/epoch time and then convert
407407
to julian day. Note that the date must be UTC."""
408408
if month <= 2:
@@ -1031,7 +1031,7 @@ def solar_position(unixtime, lat, lon, elev, pressure, temp, delta_t,
10311031

10321032
"""
10331033
Calculate the solar position using the
1034-
NLR SPA algorithm described in [1].
1034+
NREL SPA algorithm described in [1].
10351035
10361036
If numba is installed, the functions can be compiled
10371037
and the code runs quickly. If not, the functions
@@ -1214,7 +1214,7 @@ def transit_sunrise_sunset(dates, lat, lon, delta_t, numthreads):
12141214
def earthsun_distance(unixtime, delta_t, numthreads):
12151215
"""
12161216
Calculates the distance from the earth to the sun using the
1217-
NLR SPA algorithm described in [1].
1217+
NREL SPA algorithm described in [1].
12181218
12191219
Parameters
12201220
----------

pvlib/spectrum/spectrl2.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ def spectrl2(apparent_zenith, aoi, surface_tilt, ground_albedo,
203203
Surface pressure. [Pa]
204204
relative_airmass : numeric
205205
Relative airmass. The airmass model used in [1]_ is the `'kasten1966'`
206-
model, while a later implementation by NLR uses the
206+
model, while a later implementation by NREL used the
207207
`'kastenyoung1989'` model. [unitless]
208208
precipitable_water : numeric
209209
Atmospheric water vapor content. [cm]

tests/iotools/test_tmy.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ def solaranywhere_index():
107107

108108
def test_solaranywhere_tmy3(solaranywhere_index):
109109
# The SolarAnywhere TMY3 format specifies midnight as 00:00 whereas the
110-
# NLR TMY3 format utilizes 24:00. The SolarAnywhere file is therefore
110+
# NREL TMY3 format utilizes 24:00. The SolarAnywhere file is therefore
111111
# included to test files with 00:00 timestamps are parsed correctly
112112
data, meta = tmy.read_tmy3(TMY3_SOLARANYWHERE, encoding='iso-8859-1',
113113
map_variables=False)

tests/test_shading.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ def test_projected_solar_zenith_angle_numeric(
170170
):
171171
psza_func = shading.projected_solar_zenith_angle
172172
axis_tilt, axis_azimuth, timedata = true_tracking_angle_and_inputs_NREL
173-
# test against data provided by NLR
173+
# test against data provided by NREL
174174
psz = psza_func(
175175
timedata["Apparent Zenith"],
176176
timedata["Solar Azimuth"],

0 commit comments

Comments
 (0)