Skip to content

Commit 92bb1e5

Browse files
jason-curtisclaudeRDaxinicwhanseAdamRJensen
authored
Migrate NREL references to NLR (National Laboratory of the Rockies) (pvlib#2705)
* 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 pvlib#2701 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Apply suggestions from code review * update links for redirects * roll back some NLR -> NREL for publisher reference * fix various typos and EOF removal Co-authored-by: Rajiv Daxini <143435106+RDaxini@users.noreply.github.com> Co-authored-by: Cliff Hansen <cwhanse@sandia.gov> * Fix broken links in tmy_to_power tutorial - Replace broken rredc.nlr.gov TMY3 link with nsrdb.nlr.gov archive - Use canonical https://docs.nlr.gov URL for PVUSA reference PDF - Add trailing newline Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Fix reference formatting in irradiance.py and pvsystem.py - Remove non-standard double URL in AM1.5 spectra reference - Remove "Pre-print:" prefix from Marion 2008 reference URL Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Migrate github.com/NREL URLs to github.com/NatLabRockies NREL GitHub org has moved to NatLabRockies. Update all references in code and docs (excluding historical whatsnew entries). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Add docs page explaining NREL to NLR rename Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Fix line too long in conftest.py docstring Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Apply suggestions from @AdamRJensen CR Co-authored-by: Adam R. Jensen <39184289+AdamRJensen@users.noreply.github.com> * Address wholmgren's review on PR pvlib#2705 - Rename nrel_api_key fixture to nlr_api_key directly (no alias) - Simplify fixture: check NLR_API_KEY, warn with DEMO_KEY fallback (no NREL_API_KEY deprecation logic) - Update test_psm4.py to use nlr_api_key fixture - Remove NREL_API_KEY from CI workflow - Update whatsnew: remove fallback mention, link nrel_nlr doc page * chore: add runtime dirs to .gitignore * Apply suggestions from code review Co-authored-by: Kevin Anderson <kevin.anderso@gmail.com> * remove nrel_nlr.rst * call out the PSM4 URLs as a bugfix * Update docs/sphinx/source/reference/iotools.rst Co-authored-by: Anton Driesse <anton.driesse@pvperformancelabs.com> --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> Co-authored-by: Rajiv Daxini <143435106+RDaxini@users.noreply.github.com> Co-authored-by: Cliff Hansen <cwhanse@sandia.gov> Co-authored-by: Adam R. Jensen <39184289+AdamRJensen@users.noreply.github.com> Co-authored-by: Kevin Anderson <kevin.anderso@gmail.com> Co-authored-by: Anton Driesse <anton.driesse@pvperformancelabs.com>
1 parent 7198fe6 commit 92bb1e5

36 files changed

Lines changed: 186 additions & 181 deletions

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +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-
NREL_API_KEY: ${{ secrets.NRELAPIKEY }}
99+
NLR_API_KEY: ${{ secrets.NRELAPIKEY }}
100100
SOLARANYWHERE_API_KEY: ${{ secrets.SOLARANYWHERE_API_KEY }}
101101
BSRN_FTP_USERNAME: ${{ secrets.BSRN_FTP_USERNAME }}
102102
BSRN_FTP_PASSWORD: ${{ secrets.BSRN_FTP_PASSWORD }}

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,3 +99,8 @@ coverage.xml
9999
env
100100
results
101101

102+
103+
# Gas Town runtime
104+
.beads/
105+
.claude/
106+
.runtime/

docs/examples/bifacial/plot_irradiance_nonuniformity_loss.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
# described in Figure 1 (A), [1]_. We will cover this case for educational
4848
# purposes, although it can be achieved with the packages
4949
# `solarfactors <https://github.com/pvlib/solarfactors/>`_ and
50-
# `bifacial_radiance <https://github.com/NREL/bifacial_radiance>`_.
50+
# `bifacial_radiance <https://github.com/NatLabRockies/bifacial_radiance>`_.
5151
#
5252
# Here we set and plot the global irradiance level of each cell.
5353

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://doi.org/10.2172/928611
220+
# .. _NSRDB: https://doi.org/10.2172/1054832

docs/examples/spectrum/average_photon_energy.py

Lines changed: 3 additions & 3 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 # 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
198-
# (Last accessed: 18/09/2024)
197+
# https://www.nlr.gov/grid/solar-resource/spectral
198+
# (Last accessed: 03/03/2026)

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 (known as NREL prior to December 2025).
183183

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

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ The CEC table doesn't include my module or inverter, what should I do?
126126
----------------------------------------------------------------------
127127

128128
The CEC tables for module and inverter parameters included in pvlib are periodically
129-
copied from `SAM <https://github.com/NREL/SAM/tree/develop/deploy/libraries>`_,
129+
copied from `SAM <https://github.com/NatLabRockies/SAM/tree/develop/deploy/libraries>`_,
130130
so you can check the tables there for more up-to-date tables.
131131

132132
For modules, if even the SAM files don't include the module you're looking for

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -242,15 +242,15 @@ 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+
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

250250
To install the NREL 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: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,14 @@ Bug fixes
2020
* Fix a division-by-zero condition in
2121
:py:func:`pvlib.transformer.simple_efficiency` when ``load_loss = 0``.
2222
(:issue:`2645`, :pull:`2646`)
23+
* Update URLs in :py:mod:`pvlib.iotools.psm4` to use nlr.gov instead of
24+
nrel.gov. (:issue:`2701`, :pull:`2705`)
2325
* Fix a bug in :py:func:`pvlib.iotools.era5._m_to_cm` where meters were
2426
incorrectly divided by 100 instead of multiplied, causing precipitations to be
2527
underestimated by a factor of 10,000 when ``map_variables=True``.
2628
(:issue:`2724`, :pull:`2725`)
2729

30+
2831
Enhancements
2932
~~~~~~~~~~~~
3033
* Use ``k`` and ``cap_adjustment`` from :py:func:`pvlib.pvsystem.Array.module_parameters` in :py:func:`pvlib.pvsystem.PVSystem.pvwatts_dc`
@@ -73,6 +76,10 @@ Requirements
7376

7477
Maintenance
7578
~~~~~~~~~~~
79+
* Update all NREL references to NLR (National Laboratory of the Rockies)
80+
following the laboratory rename and domain migration from ``nrel.gov``
81+
to ``nlr.gov``. Rename ``NREL_API_KEY`` environment variable to
82+
``NLR_API_KEY``. (:issue:`2701`, :pull:`2705`)
7683

7784

7885
Contributors
@@ -83,6 +90,7 @@ Contributors
8390
* Cliff Hansen (:ghuser:`cwhanse`)
8491
* Anton Driesse (:ghuser:`adriesse`)
8592
* Kevin Anderson (:ghuser:`kandersolar`)
93+
* Jason Curtis (:ghuser:`jason-curtis`)
8694
* Rohan Saxena (:ghuser:`r0hansaxena`)
8795
* Marco Fumagalli (:ghuser:`fuma900`)
8896
* Jean-Baptiste Pasquier (:ghuser:`pasquierjb`)

docs/tutorials/tmy_to_power.ipynb

Lines changed: 2 additions & 12 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\nhttps://nsrdb.nlr.gov/data-sets/archives"
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\nhttps://www.osti.gov/biblio/951223\n"
15251515
},
15261516
{
15271517
"cell_type": "code",

0 commit comments

Comments
 (0)