Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/pytest-remote-data.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ jobs:
shell: bash -l {0} # necessary for conda env to be active
env:
# copy GitHub Secrets into environment variables for the tests to access
NREL_API_KEY: ${{ secrets.NRELAPIKEY }}
NLR_API_KEY: ${{ secrets.NRELAPIKEY }}
SOLARANYWHERE_API_KEY: ${{ secrets.SOLARANYWHERE_API_KEY }}
BSRN_FTP_USERNAME: ${{ secrets.BSRN_FTP_USERNAME }}
BSRN_FTP_PASSWORD: ${{ secrets.BSRN_FTP_PASSWORD }}
Expand Down
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -99,3 +99,8 @@ coverage.xml
env
results


# Gas Town runtime
.beads/
.claude/
.runtime/
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
# described in Figure 1 (A), [1]_. We will cover this case for educational
# purposes, although it can be achieved with the packages
# `solarfactors <https://github.com/pvlib/solarfactors/>`_ and
# `bifacial_radiance <https://github.com/NREL/bifacial_radiance>`_.
# `bifacial_radiance <https://github.com/NatLabRockies/bifacial_radiance>`_.
#
# Here we set and plot the global irradiance level of each cell.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
# ----
#
# DISC :py:func:`~pvlib.irradiance.disc` is an empirical correlation developed
# at SERI (now NREL) in 1987. The direct normal irradiance (DNI) is related to
# at SERI (now NLR) in 1987. The direct normal irradiance (DNI) is related to
# clearness index (kt) by two polynomials split at kt = 0.6, then combined with
# an exponential relation with airmass.

Expand Down Expand Up @@ -216,5 +216,5 @@
# correlations, which include additional variables such as airmass. These
# methods seem to reduce DNI spikes over 1000 [W/m^2].
#
# .. _TMY3: https://www.nrel.gov/docs/fy08osti/43156.pdf
# .. _NSRDB: https://www.nrel.gov/docs/fy12osti/54824.pdf
# .. _TMY3: https://doi.org/10.2172/928611
# .. _NSRDB: https://doi.org/10.2172/1054832
6 changes: 3 additions & 3 deletions docs/examples/spectrum/average_photon_energy.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
from scipy.integrate import trapezoid
from pvlib import spectrum, solarposition, irradiance, atmosphere

lat, lon = 39.742, -105.18 # NREL SRRL location
lat, lon = 39.742, -105.18 # SRRL location
surface_tilt = 25
surface_azimuth = 180 # south-facing system
pressure = 81190 # at 1828 metres AMSL, roughly
Expand Down Expand Up @@ -194,5 +194,5 @@
# for the solar spectral influence on photovoltaic device performance."
# Energy 286 :doi:`10.1016/j.energy.2023.129461`
# .. [4] Bird Simple Spectral Model: spectrl2_2.c
# https://www.nrel.gov/grid/solar-resource/spectral.html
# (Last accessed: 18/09/2024)
# https://www.nlr.gov/grid/solar-resource/spectral
# (Last accessed: 03/03/2026)
2 changes: 1 addition & 1 deletion docs/sphinx/source/reference/iotools.rst
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ A solar radiation network in the USA, run by NOAA.
MIDC
^^^^

A solar radiation network in the USA, run by NREL.
A solar radiation network in the USA, run by NLR (known as NREL prior to December 2025).

.. autosummary::
:toctree: generated/
Expand Down
2 changes: 1 addition & 1 deletion docs/sphinx/source/user_guide/extras/faq.rst
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ The CEC table doesn't include my module or inverter, what should I do?
----------------------------------------------------------------------

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

For modules, if even the SAM files don't include the module you're looking for
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -242,15 +242,15 @@ pvlib-python is distributed with several validated, high-precision, and
high-performance solar position calculators. We strongly recommend using
the built-in solar position calculators.

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

To install the NREL SPA algorithm for use with pvlib:

#. Download the pvlib repository (as described in :ref:`obtainsource`)
#. Download the `SPA files from NREL <http://www.nrel.gov/midc/spa/>`_
#. Download the `SPA files from NLR <http://www.nlr.gov/midc/spa/>`_
#. Copy the SPA files into ``pvlib-python/pvlib/spa_c_files``
#. From the ``pvlib-python`` directory, run ``pip uninstall pvlib``
followed by ``pip install .``
Expand Down
8 changes: 8 additions & 0 deletions docs/sphinx/source/whatsnew/v0.15.1.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,14 @@ Bug fixes
* Fix a division-by-zero condition in
:py:func:`pvlib.transformer.simple_efficiency` when ``load_loss = 0``.
(:issue:`2645`, :pull:`2646`)
* Update URLs in :py:mod:`pvlib.iotools.psm4` to use nlr.gov instead of
nrel.gov. (:issue:`2701`, :pull:`2705`)
* Fix a bug in :py:func:`pvlib.iotools.era5._m_to_cm` where meters were
incorrectly divided by 100 instead of multiplied, causing precipitations to be
underestimated by a factor of 10,000 when ``map_variables=True``.
(:issue:`2724`, :pull:`2725`)


Enhancements
~~~~~~~~~~~~
* Use ``k`` and ``cap_adjustment`` from :py:func:`pvlib.pvsystem.Array.module_parameters` in :py:func:`pvlib.pvsystem.PVSystem.pvwatts_dc`
Expand Down Expand Up @@ -71,6 +74,10 @@ Requirements

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


Contributors
Expand All @@ -81,6 +88,7 @@ Contributors
* Cliff Hansen (:ghuser:`cwhanse`)
* Anton Driesse (:ghuser:`adriesse`)
* Kevin Anderson (:ghuser:`kandersolar`)
* Jason Curtis (:ghuser:`jason-curtis`)
* Rohan Saxena (:ghuser:`r0hansaxena`)
* Marco Fumagalli (:ghuser:`fuma900`)
* Jean-Baptiste Pasquier (:ghuser:`pasquierjb`)
Expand Down
14 changes: 2 additions & 12 deletions docs/tutorials/tmy_to_power.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,7 @@
{
"cell_type": "markdown",
"metadata": {},
"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 NREL website for a list of TMY files:\n",
"\n",
"http://rredc.nrel.gov/solar/old_data/nsrdb/1991-2005/tmy3/by_state_and_city.html"
]
"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"
},
{
"cell_type": "code",
Expand Down Expand Up @@ -1515,13 +1511,7 @@
{
"cell_type": "markdown",
"metadata": {},
"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",
"\n",
"Here's one PVUSA reference:\n",
"\n",
"http://www.nrel.gov/docs/fy09osti/45376.pdf\n"
]
"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"
},
{
"cell_type": "code",
Expand Down
2 changes: 1 addition & 1 deletion pvlib/atmosphere.py
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,7 @@ def bird_hulstrom80_aod_bb(aod380, aod500):
References
----------
.. [1] Bird and Hulstrom, "Direct Insolation Models" (1980)
`SERI/TR-335-344 <http://www.nrel.gov/docs/legosti/old/344.pdf>`_
`SERI/TR-335-344 <http://www.nlr.gov/docs/legosti/old/344.pdf>`_
.. [2] R. E. Bird and R. L. Hulstrom, "Review, Evaluation, and Improvement
of Direct Irradiance Models", Journal of Solar Energy Engineering
Expand Down
2 changes: 1 addition & 1 deletion pvlib/bifacial/infinite_sheds.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ def _shaded_fraction(solar_zenith, solar_azimuth, surface_tilt,
:doi:`10.1109/PVSC40753.2019.8980572`.
.. [2] Kevin Anderson and Mark Mikofski, "Slope-Aware Backtracking for
Single-Axis Trackers", Technical Report NREL/TP-5K00-76626, July 2020.
https://www.nrel.gov/docs/fy20osti/76626.pdf
:doi:`10.2172/1660126`
"""
tan_phi = utils._solar_projection_tangent(
solar_zenith, solar_azimuth, surface_azimuth)
Expand Down
2 changes: 1 addition & 1 deletion pvlib/bifacial/loss_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ def power_mismatch_deline(
--------
`solarfactors <https://github.com/pvlib/solarfactors/>`_
Calculate the irradiance at different points of the module.
`bifacial_radiance <https://github.com/NREL/bifacial_radiance>`_
`bifacial_radiance <https://github.com/NatLabRockies/bifacial_radiance>`_
Calculate the irradiance at different points of the module.
References
Expand Down
14 changes: 7 additions & 7 deletions pvlib/clearsky.py
Original file line number Diff line number Diff line change
Expand Up @@ -942,7 +942,7 @@ def bird(zenith, airmass_relative, aod380, aod500, precipitable_water,
"""
Bird Simple Clear Sky Broadband Solar Radiation Model

Based on NREL Excel implementation by Daryl R. Myers [1, 2].
Based on NLR Excel implementation by Daryl R. Myers [1, 2].

Bird and Hulstrom define the zenith as the "angle between a line to
the sun and the local zenith". There is no distinction in the paper
Expand All @@ -953,7 +953,7 @@ def bird(zenith, airmass_relative, aod380, aod500, precipitable_water,
was to compare existing clear sky models with "rigorous radiative
transfer models" (RTM) it is possible that apparent zenith was
obtained as output from the RTM. However, the implementation presented
in PVLIB is tested against the NREL Excel implementation by Daryl
in PVLIB is tested against the NLR Excel implementation by Daryl
Myers which uses an analytical expression for solar zenith instead
of apparent zenith.

Expand Down Expand Up @@ -1001,13 +1001,13 @@ def bird(zenith, airmass_relative, aod380, aod500, precipitable_water,
.. [2] Daryl R. Myers, "Solar Radiation: Practical Modeling for Renewable
Energy Applications", pp. 46-51 CRC Press (2013)

.. [3] `NREL Bird Clear Sky Model <http://rredc.nrel.gov/solar/models/
clearsky/>`_
.. [3] `Bird Clear Sky Model <http://www.nlr.gov/grid/solar-resource/
clearsky.html>`_

.. [4] `SERI/TR-642-761 <https://www.nrel.gov/docs/legosti/old/761.pdf>`_
.. [4] SERI/TR-642-761 :doi:`10.2172/6510849`

.. [5] `Error Reports <http://rredc.nrel.gov/solar/models/clearsky/
error_reports.html>`_
.. [5] `Error Reports <http://www.nlr.gov/grid/solar-resource/
clearsky-error-reports.html>`_
"""
etr = dni_extra # extraradiation
ze_rad = np.deg2rad(zenith) # zenith in radians
Expand Down
6 changes: 3 additions & 3 deletions pvlib/inverter.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ def sandia(v_dc, p_dc, inverter):
for Grid-Connected Photovoltaic Inverters", Sandia National
Laboratories, Albuquerque, N.M., USA, SAND2007-5036, Sept. 2007.
:doi:`10.2172/920449`
.. [2] System Advisor Model web page. https://sam.nrel.gov.
.. [2] System Advisor Model web page. https://sam.nlr.gov.

See also
--------
Expand Down Expand Up @@ -335,7 +335,7 @@ def adr(v_dc, p_dc, inverter, vtol=0.10):

def pvwatts(pdc, pdc0, eta_inv_nom=0.96, eta_inv_ref=0.9637):
r"""
NREL's PVWatts inverter model.
NLR's PVWatts inverter model.

The PVWatts inverter model [1]_ calculates inverter efficiency :math:`\eta`
as a function of input DC power :math:`P_{dc}`
Expand Down Expand Up @@ -414,7 +414,7 @@ def pvwatts(pdc, pdc0, eta_inv_nom=0.96, eta_inv_ref=0.9637):

def pvwatts_multi(pdc, pdc0, eta_inv_nom=0.96, eta_inv_ref=0.9637):
r"""
Extend NREL's PVWatts inverter model for multiple MPP inputs.
Extend NLR's PVWatts inverter model for multiple MPP inputs.

DC input power is summed over MPP inputs to obtain the DC power
input to the PVWatts inverter model. See :py:func:`pvlib.inverter.pvwatts`
Expand Down
16 changes: 8 additions & 8 deletions pvlib/iotools/midc.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""Functions to read NREL MIDC data.
"""Functions to read NLR MIDC data.
"""
import io

Expand All @@ -15,7 +15,7 @@
#
# In particular, these mappings coincide with the raw ddata files.
# All site's field list can be found at:
# https://midcdmz.nrel.gov/apps/daily.pl?site=<SITE ID>&live=1
# https://midcdmz.nlr.gov/apps/daily.pl?site=<SITE ID>&live=1
# Where id is the key found in this dictionary
MIDC_VARIABLE_MAP = {
'BMS': {
Expand Down Expand Up @@ -158,7 +158,7 @@ def _format_index_raw(data):


def read_midc(filename, variable_map={}, raw_data=False, **kwargs):
"""Read in National Renewable Energy Laboratory Measurement and
"""Read in National Laboratory of the Rockies Measurement and
Instrumentation Data Center weather data. The MIDC is described in [1]_.

Parameters
Expand Down Expand Up @@ -196,12 +196,12 @@ def read_midc(filename, variable_map={}, raw_data=False, **kwargs):
:ref:`nomenclature`.

Be sure to check the units for the variables you will use on the
`MIDC site <https://midcdmz.nrel.gov/>`_.
`MIDC site <https://midcdmz.nlr.gov/>`_.

References
----------
.. [1] NREL: Measurement and Instrumentation Data Center
`https://midcdmz.nrel.gov/ <https://midcdmz.nrel.gov/>`_
.. [1] NLR: Measurement and Instrumentation Data Center
`https://midcdmz.nlr.gov/ <https://midcdmz.nlr.gov/>`_
"""
data = pd.read_csv(filename, **kwargs)
if raw_data:
Expand Down Expand Up @@ -248,13 +248,13 @@ def read_midc_raw_data_from_nrel(site, start, end, variable_map={},
-----
Requests spanning an instrumentation change will yield an error. See the
MIDC raw data api page
`here <https://midcdmz.nrel.gov/apps/data_api_doc.pl?_idtextlist>`_
`here <https://midcdmz.nlr.gov/apps/data_api_doc.pl?_idtextlist>`_
for more details and considerations.
"""
args = {'site': site,
'begin': pd.to_datetime(start).strftime('%Y%m%d'),
'end': pd.to_datetime(end).strftime('%Y%m%d')}
url = 'https://midcdmz.nrel.gov/apps/data_api.pl'
url = 'https://midcdmz.nlr.gov/apps/data_api.pl'
# NOTE: just use requests.get(url, params=args) to build querystring
# number of header columns and data columns do not always match,
# so first parse the header to determine the number of data columns
Expand Down
Loading
Loading