Skip to content

Commit 4902b20

Browse files
jason-curtisclaude
andcommitted
Migrate NREL references to NLR (National Laboratory of the Rockies)
Update all nrel.gov URLs to nlr.gov equivalents following the NREL→NLR rename (Dec 2025). The nrel.gov domain stops resolving May 29, 2026. - Update API base URLs in psm4.py and midc.py (critical runtime paths) - Add NLR_API_KEY env var support with NREL_API_KEY deprecation fallback - Update all documentation URLs, prose references, and test comments - Preserve report IDs (NREL/TP-xxx), GitHub URLs, and citation publishers Closes #2701 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent dce21b5 commit 4902b20

35 files changed

Lines changed: 187 additions & 185 deletions

.github/workflows/pytest-remote-data.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ jobs:
9696
shell: bash -l {0} # necessary for conda env to be active
9797
env:
9898
# copy GitHub Secrets into environment variables for the tests to access
99+
NLR_API_KEY: ${{ secrets.NRELAPIKEY }}
99100
NREL_API_KEY: ${{ secrets.NRELAPIKEY }}
100101
SOLARANYWHERE_API_KEY: ${{ secrets.SOLARANYWHERE_API_KEY }}
101102
BSRN_FTP_USERNAME: ${{ secrets.BSRN_FTP_USERNAME }}

docs/examples/irradiance-decomposition/plot_diffuse_fraction.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
# ----
5353
#
5454
# DISC :py:func:`~pvlib.irradiance.disc` is an empirical correlation developed
55-
# at SERI (now NREL) in 1987. The direct normal irradiance (DNI) is related to
55+
# at SERI (now NLR) in 1987. The direct normal irradiance (DNI) is related to
5656
# clearness index (kt) by two polynomials split at kt = 0.6, then combined with
5757
# an exponential relation with airmass.
5858

@@ -216,5 +216,5 @@
216216
# correlations, which include additional variables such as airmass. These
217217
# methods seem to reduce DNI spikes over 1000 [W/m^2].
218218
#
219-
# .. _TMY3: https://www.nrel.gov/docs/fy08osti/43156.pdf
220-
# .. _NSRDB: https://www.nrel.gov/docs/fy12osti/54824.pdf
219+
# .. _TMY3: https://www.nlr.gov/docs/fy08osti/43156.pdf
220+
# .. _NSRDB: https://www.nlr.gov/docs/fy12osti/54824.pdf

docs/examples/spectrum/average_photon_energy.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
from scipy.integrate import trapezoid
3535
from pvlib import spectrum, solarposition, irradiance, atmosphere
3636

37-
lat, lon = 39.742, -105.18 # NREL SRRL location
37+
lat, lon = 39.742, -105.18 # NLR SRRL location
3838
surface_tilt = 25
3939
surface_azimuth = 180 # south-facing system
4040
pressure = 81190 # at 1828 metres AMSL, roughly
@@ -194,5 +194,5 @@
194194
# for the solar spectral influence on photovoltaic device performance."
195195
# Energy 286 :doi:`10.1016/j.energy.2023.129461`
196196
# .. [4] Bird Simple Spectral Model: spectrl2_2.c
197-
# https://www.nrel.gov/grid/solar-resource/spectral.html
197+
# https://www.nlr.gov/grid/solar-resource/spectral.html
198198
# (Last accessed: 18/09/2024)

docs/examples/spectrum/plot_spectrl2_fig51A.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22
Modeling Spectral Irradiance
33
============================
44
5-
Recreating Figure 5-1A from the SPECTRL2 NREL Technical Report.
5+
Recreating Figure 5-1A from the SPECTRL2 NLR Technical Report.
66
"""
77

88
# %%
99
# This example shows how to model the spectral distribution of irradiance
1010
# based on atmospheric conditions. The spectral distribution of irradiance is
1111
# the power content at each wavelength band in the solar spectrum and is
1212
# affected by various scattering and absorption mechanisms in the atmosphere.
13-
# This example recreates an example figure from the SPECTRL2 NREL Technical
13+
# This example recreates an example figure from the SPECTRL2 NLR Technical
1414
# Report [1]_. The figure shows modeled spectra at hourly intervals across
1515
# a single morning.
1616

@@ -95,5 +95,5 @@
9595
# ----------
9696
# .. [1] Bird, R, and Riordan, C., 1984, "Simple solar spectral model for
9797
# direct and diffuse irradiance on horizontal and tilted planes at the
98-
# earth's surface for cloudless atmospheres", NREL Technical Report
98+
# earth's surface for cloudless atmospheres", NLR Technical Report
9999
# TR-215-2436 :doi:`10.2172/5986936`

docs/sphinx/source/reference/iotools.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ A solar radiation network in the USA, run by NOAA.
179179
MIDC
180180
^^^^
181181

182-
A solar radiation network in the USA, run by NREL.
182+
A solar radiation network in the USA, run by NLR.
183183

184184
.. autosummary::
185185
:toctree: generated/

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 NREL SPA
46+
The spa module contains the implementation of the built-in NLR SPA
4747
algorithm.
4848

4949
.. autosummary::

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

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

236236
.. _nrelspa:
237237

238-
NREL SPA algorithm
238+
NLR 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

245-
pvlib-python also includes unsupported wrappers for the official NREL
246-
SPA algorithm. NREL's license does not allow redistribution of the
245+
pvlib-python also includes unsupported wrappers for the official NLR
246+
SPA algorithm. 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 NREL SPA algorithm for use with pvlib:
250+
To install the NLR SPA algorithm for use with pvlib:
251251

252252
#. Download the pvlib repository (as described in :ref:`obtainsource`)
253-
#. Download the `SPA files from NREL <http://www.nrel.gov/midc/spa/>`_
253+
#. Download the `SPA files from NLR <http://www.nlr.gov/midc/spa/>`_
254254
#. Copy the SPA files into ``pvlib-python/pvlib/spa_c_files``
255255
#. From the ``pvlib-python`` directory, run ``pip uninstall pvlib``
256256
followed by ``pip install .``

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,10 @@ Requirements
5656

5757
Maintenance
5858
~~~~~~~~~~~
59+
* Update all NREL references to NLR (National Laboratory of the Rockies)
60+
following the laboratory rename and domain migration from ``nrel.gov``
61+
to ``nlr.gov``. Add ``NLR_API_KEY`` environment variable support with
62+
``NREL_API_KEY`` fallback. (:issue:`2701`)
5963

6064

6165
Contributors

docs/tutorials/tmy_to_power.ipynb

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -70,11 +70,7 @@
7070
{
7171
"cell_type": "markdown",
7272
"metadata": {},
73-
"source": [
74-
"pvlib comes with a couple of TMY files, and we'll use one of them for simplicity. You could also load a file from disk, or specify a url. See this NREL website for a list of TMY files:\n",
75-
"\n",
76-
"http://rredc.nrel.gov/solar/old_data/nsrdb/1991-2005/tmy3/by_state_and_city.html"
77-
]
73+
"source": "pvlib comes with a couple of TMY files, and we'll use one of them for simplicity. You could also load a file from disk, or specify a url. See this NLR website for a list of TMY files:\n\nhttp://rredc.nlr.gov/solar/old_data/nsrdb/1991-2005/tmy3/by_state_and_city.html"
7874
},
7975
{
8076
"cell_type": "code",
@@ -1515,13 +1511,7 @@
15151511
{
15161512
"cell_type": "markdown",
15171513
"metadata": {},
1518-
"source": [
1519-
"Next, we will assume that the SAPM model is representative of the real world performance so that we can use scipy's optimization routine to derive simulated PVUSA coefficients. You will need to install scipy to run these functions.\n",
1520-
"\n",
1521-
"Here's one PVUSA reference:\n",
1522-
"\n",
1523-
"http://www.nrel.gov/docs/fy09osti/45376.pdf\n"
1524-
]
1514+
"source": "Next, we will assume that the SAPM model is representative of the real world performance so that we can use scipy's optimization routine to derive simulated PVUSA coefficients. You will need to install scipy to run these functions.\n\nHere's one PVUSA reference:\n\nhttp://www.nlr.gov/docs/fy09osti/45376.pdf\n"
15251515
},
15261516
{
15271517
"cell_type": "code",
@@ -1667,4 +1657,4 @@
16671657
},
16681658
"nbformat": 4,
16691659
"nbformat_minor": 4
1670-
}
1660+
}

pvlib/atmosphere.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -448,7 +448,7 @@ def bird_hulstrom80_aod_bb(aod380, aod500):
448448
References
449449
----------
450450
.. [1] Bird and Hulstrom, "Direct Insolation Models" (1980)
451-
`SERI/TR-335-344 <http://www.nrel.gov/docs/legosti/old/344.pdf>`_
451+
`SERI/TR-335-344 <http://www.nlr.gov/docs/legosti/old/344.pdf>`_
452452
453453
.. [2] R. E. Bird and R. L. Hulstrom, "Review, Evaluation, and Improvement
454454
of Direct Irradiance Models", Journal of Solar Energy Engineering

0 commit comments

Comments
 (0)