Skip to content

Migrate NREL references to NLR (National Laboratory of the Rockies)#2705

Open
jason-curtis wants to merge 10 commits intopvlib:mainfrom
jason-curtis:nlr-migration
Open

Migrate NREL references to NLR (National Laboratory of the Rockies)#2705
jason-curtis wants to merge 10 commits intopvlib:mainfrom
jason-curtis:nlr-migration

Conversation

@jason-curtis
Copy link

@jason-curtis jason-curtis commented Mar 3, 2026

Summary

  • Update all nrel.gov URLs to nlr.gov equivalents following the NREL → NLR rename (December 2025). The nrel.gov domain stops resolving May 29, 2026.
  • Update critical API base URLs in psm4.py and midc.py (runtime paths)
  • Add NLR_API_KEY environment variable support with NREL_API_KEY deprecation fallback
  • Update all documentation, docstrings, comments, and test references

Closes #2701

Verified Domain Mapping

Old domain New domain Status
developer.nrel.gov developer.nlr.gov 301 redirect, API works
www.nrel.gov www.nlr.gov 301 redirect, pages + PDFs work
sam.nrel.gov sam.nlr.gov 301 redirect
midcdmz.nrel.gov midcdmz.nlr.gov Both serve (no redirect yet)

What was NOT changed (intentionally)

  • github.com/NREL/* URLs (org not renamed)
  • raw.githubusercontent.com/NREL/* URLs
  • web.archive.org URLs (archived snapshots)
  • Bibliographic report IDs (NREL/TP-5K00-76626 etc.)
  • Historical whatsnew entries (v0.14.x and earlier)
  • Publisher names in bibliographic citations (cited as published)
  • NREL-PySAM package references (PyPI package not renamed)
  • The nrel_api_key fixture name (kept for backwards compat; nlr_api_key added as alias)

CI Note for Maintainers

The CI workflow now sets both NLR_API_KEY and NREL_API_KEY from the existing NRELAPIKEY secret. No action needed unless you want to rename the secret.

PR template checklist

  • Closes Transition timing from nrel.gov to nlr.gov #2701
  • I am familiar with the contributing guidelines
  • I attest that all AI-generated material has been vetted for accuracy and is in compliance with the pvlib license
  • (N/A) Tests added
  • Updates entries in docs/sphinx/source/reference for API changes. (see note later about adding a docs page about NREL vs NLR)
  • Adds description and name entries in the appropriate "what's new" file in docs/sphinx/source/whatsnew for all changes. Includes link to the GitHub Issue with :issue:`num` or this Pull Request with :pull:`num`. Includes contributor name and/or GitHub username (link with :ghuser:`user`).
  • (N/A) New code is fully documented. Includes numpydoc compliant docstrings, examples, and comments where necessary.
  • Pull request is nearly complete and ready for detailed review.
  • Maintainer: Appropriate GitHub Labels (including remote-data) and Milestone are assigned to the Pull Request and linked Issue.

Followups checklist

  • integrate PR template checklist
  • https://github.com/NREL -> https://github.com/NatLabRockies (verify subrepo names etc)
  • consider adding a docs page about NREL vs NLR explaining the name change and when we use which names
  • revert changes in scholarly-style citations to docs that were published under NREL name (@cwhanse this is your intent, correct? ). I'd suggest that we can refer to NREL in actual citations, but then elsewhere ("# data from NREL 'Slope-Aware Backtracking for Single-Axis Trackers'" we use either NLR or "NLR (NREL at time of publishing)".
  • fix spacing typos identified by @cwhanse

Test plan

  • grep -rn 'nrel\.gov' pvlib/ docs/ tests/ confirms only excluded items remain
  • pytest tests/ — 1345 passed (8 pre-existing failures unrelated to this PR)
  • Spot-checked new URLs with curl -sI — confirmed 200/301 responses

AI Attestation

This PR was generated with assistance from Claude (Anthropic). All changes were reviewed for correctness.

🤖 Generated with Claude Code

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>
@github-actions
Copy link

github-actions bot commented Mar 3, 2026

Hey @jason-curtis! 🎉

Thanks for opening your first pull request! We appreciate your
contribution. Please ensure you have reviewed and understood the
contributing guidelines.

If AI is used for any portion of this PR, you must vet the content
for technical accuracy.

@williamhobbs
Copy link
Contributor

Looks like https://github.com/NREL has moved to https://github.com/NatLabRockies.

For reference descriptions, like “the NREL SPA”, would it be helpful to add some sort of “formerly known as NREL…”? I could see this causing some confusion, especially to people newer to solar modeling.

@cwhanse
Copy link
Member

cwhanse commented Mar 3, 2026

@jason-curtis does Claude strip out pvlib's PR template?

Copy link
Member

@cwhanse cwhanse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When referring to the publisher, I think it should stay NREL.

I'm on the fence about NLR SPA vs. NREL SPA. NLR continues to distribute and support code, so that's NLR SPA. The report is NREL SPA. Even NLR's webpage has both: "...the following NLR technical report:"..."Reda, I., ..., NREL Report No...."

So either NLR SPA or NREL SPA is OK with me.

Thanks so much @jason-curtis for taking the initiative here.

@jason-curtis
Copy link
Author

jason-curtis commented Mar 3, 2026

does Claude strip out pvlib's PR template? - @cwhanse

Oops, sorry. Claude likes to create things directly with gh pr create --body [...] so it bypasses the template. I'll think to check for templates in the future.

@williamhobbs
Copy link
Contributor

Does this look like the right checklist

I think it's best to edit the original comment and put the checklist there.

@RDaxini RDaxini added this to the v0.15.1 milestone Mar 3, 2026
@cwhanse
Copy link
Member

cwhanse commented Mar 3, 2026

Claude likes to create things directly with gh pr create --body [...] so it bypasses the template.

good to know, that helps as we maintainers learn to work with AI in this process.

revert changes in scholarly-style citations to docs that were published under NREL name

My intent is to preserve NREL when identifying the publisher of a document. Use NLR when identifying where one can find the document now. Use NLR when describing "ownership" of data or a model, e.g., NLR PVWatts, NLR PSM4, etc.

@AdamRJensen
Copy link
Member

The SPA should still be called NREL as that's who published it. We do not use the source code distributed by NLR.

@jason-curtis
Copy link
Author

jason-curtis commented Mar 3, 2026 via email

@cwhanse
Copy link
Member

cwhanse commented Mar 3, 2026

NREL if the reference is to an NREL publication. It's NLR's SPA model now when we are referring to where one can find more information about the algorithm or NLR's implementation.

jason-curtis and others added 5 commits March 3, 2026 15:04
* 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>
- 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>
- 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>
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>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@jason-curtis
Copy link
Author

thanks for the feedback, folks. I believe I got it all. Also added a docs page about the migration.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy link
Member

@wholmgren wholmgren left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks @jason-curtis!



@pytest.fixture(scope="module")
def nlr_api_key(nrel_api_key):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what's the point of the alias? I say just rename the existing function.

demo_key = os.environ["NLR_API_KEY"]
except KeyError:
warnings.warn(
"WARNING: NREL API KEY environment variable not set! "
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd keep the existing pattern but change the text to "WARNING: NLR_API_KEY (formerly NREL_API_KEY) environment variable....". Don't bother with the deprecation that we have to go back and clean up in a few months.

* Update all NREL references to NLR (National Laboratory of the Rockies)
following the laboratory rename and domain migration from ``nrel.gov``
to ``nlr.gov``. Add ``NLR_API_KEY`` environment variable support with
``NREL_API_KEY`` fallback. (:issue:`2701`, :pull:`2705`)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

update this pending resolution of need for fallback (see comment on the test fixture).

:caption: Extras

extras/nomenclature
extras/nrel_nlr
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if we're adding a whole new doc page to explain our stance then we should probably link to it in the whats new

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see no reason for adding a page on this. That just seems like it'll be outdated soon and is a maintainance burden.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As evidenced by the 4 rounds of feedback on this PR, I think it's worth having something that explains why we're using NREL in some places and NLR in others but happy to defer to y'all.



@pytest.fixture(scope="module")
def nlr_api_key(nrel_api_key):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

test_psm4.py should point to this fixture

env:
# copy GitHub Secrets into environment variables for the tests to access
NLR_API_KEY: ${{ secrets.NRELAPIKEY }}
NREL_API_KEY: ${{ secrets.NRELAPIKEY }}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggest we go ahead and remove this line. no need to update the secret name though

Copy link
Member

@AdamRJensen AdamRJensen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reports that were published by NREL, should not be changed to NRL.

Osti.gov has been getting a lot better at giving DOIs, so most links can be updated. This avoids us having to change them again in the future.

:caption: Extras

extras/nomenclature
extras/nrel_nlr
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see no reason for adding a page on this. That just seems like it'll be outdated soon and is a maintainance burden.

def test_solaranywhere_tmy3(solaranywhere_index):
# The SolarAnywhere TMY3 format specifies midnight as 00:00 whereas the
# NREL TMY3 format utilizes 24:00. The SolarAnywhere file is therefore
# NLR TMY3 format utilizes 24:00. The SolarAnywhere file is therefore
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change depending on decision of naming of TMY3 format.

Co-authored-by: Adam R. Jensen <39184289+AdamRJensen@users.noreply.github.com>
@AdamRJensen
Copy link
Member

NREL if the reference is to an NREL publication. It's NLR's SPA model now, when we are referring to where one can find more information about the algorithm or NLR's implementation.

The downloadable C code should be referenced as NRL's. However, our implementations do not match the C-code and should reference the paper; and therefore should still be called NREL SPA.

- 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
@cwhanse
Copy link
Member

cwhanse commented Mar 4, 2026

NREL if the reference is to an NREL publication. It's NLR's SPA model now, when we are referring to where one can find more information about the algorithm or NLR's implementation.

The downloadable C code should be referenced as NRL's. However, our implementations do not match the C-code and should reference the paper; and therefore should still be called NREL SPA.

pvlib's implementation doesn't match the NREL SPA code either, so I'm not understanding the concern, can you elaborate?

@cwhanse
Copy link
Member

cwhanse commented Mar 4, 2026

I think we (maintainers) need to agree on some rules to avoid giving @jason-curtis conflicting guidance. @pvlib/pvlib-maintainer do you agree with the following rules?

  1. Citations to reports that were published by NREL, should not change the publisher to NRL.
  2. URLs change to NLR, since NREL.gov will go away.
  3. Replace URLs with DOIs where we can, to reduce future maintenance.

Open questions:
4. Is it NREL SPA / NREL TMY3, or is it NLR SPA / NLR TMY3? I think we'll use both, depending on the context. NLR is the entity that now has copyright of SPA C code and is the source for information to learn more. NREL is the entity that published (past tense) the technical report on which pvlib code is based. I think similar distinctions are important for SPA.

@RDaxini
Copy link
Member

RDaxini commented Mar 4, 2026

Would it help if I enquired internally at NREL to find out if there is any official guidance on this from NREL's perspective...? Or, is this wholly a pvlib decision?

disclaimer: there might not even be any official guidance, most of us are also still trying to figure these things out

@cwhanse
Copy link
Member

cwhanse commented Mar 4, 2026

Would it help if I enquired internally at NREL to find out if there is any official guidance on this from NREL's perspective...? Or, is this wholly a pvlib decision?

disclaimer: there might not even be any official guidance, most of us are also still trying to figure these things out

Yes, please do.

@adriesse
Copy link
Member

adriesse commented Mar 4, 2026

I think we (maintainers) need to agree on some rules to avoid giving @jason-curtis conflicting guidance. @pvlib/pvlib-maintainer do you agree with the following rules?

1. Citations to reports that were published by NREL, should not change the publisher to NRL.

2. URLs change to NLR, since NREL.gov will go away.

3. Replace URLs with DOIs where we can, to reduce future maintenance.

Open questions: 4. Is it NREL SPA / NREL TMY3, or is it NLR SPA / NLR TMY3? I think we'll use both, depending on the context. NLR is the entity that now has copyright of SPA C code and is the source for information to learn more. NREL is the entity that published (past tense) the technical report on which pvlib code is based. I think similar distinctions are important for SPA.

I'm in favor of keeping the memory and legacy of NREL alive where possible and reasonable. I would also err on the side of caution by not changing something now, because we can always do it later. It doesn't have to be done with a single stroke of a felt-tipped pen.

There was an earlier name change from SERI to NREL, and I think folks in Golden have happily continued to improve the QC software named after it without changing the name. So for the open question, I vote for keeping NREL, at least for now.

@RDaxini
Copy link
Member

RDaxini commented Mar 4, 2026

Not sure what's up with the 👎, I was asking whether I should reach out to the NREL comms team or whether it's a pvlib decision for us to make alone—that's two options, so... 👎= ?

Anyway, I enquired already following @cwhanse's earlier response and was advised that anything published under the NREL brand should be cited and referenced to using the NREL brand. Only more recent work is branded as NLR and should be referenced as such. Recent works includes old software being updated by the now-NLR, if we are using the new version.
I think this is in line with the trend of our discussion anyway (#2705 (comment)) and I am on board with that. For 4. I think also think the answer is both as described in #2705 (comment).

I see no harm in having sought the lab comms team's input here.

@AdamRJensen
Copy link
Member

AdamRJensen commented Mar 4, 2026

Not sure what's up with the 👎, I was asking whether I should reach out to the NREL comms team or whether it's a pvlib decision for us to make alone—that's two options, so... 👎= ?

Certainly no harm. The thumbs down was just my way of saying "not worth it, don't waste your time". I admit that the thumbs down can be seen as a bit aggressive. But thanks for doing it 👍

@adriesse
Copy link
Member

adriesse commented Mar 5, 2026

Not sure what's up with the 👎, I was asking whether I should reach out to the NREL comms team or whether it's a pvlib decision for us to make alone—that's two options, so... 👎= ?

My thumbs down was to the first question. If they told us something we didn't want to do, it could make it more awkward to do something different.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Transition timing from nrel.gov to nlr.gov

7 participants