Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
1 change: 1 addition & 0 deletions .github/workflows/pytest-remote-data.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +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
NLR_API_KEY: ${{ secrets.NRELAPIKEY }}
NREL_API_KEY: ${{ secrets.NRELAPIKEY }}
Copy link
Copy Markdown
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

SOLARANYWHERE_API_KEY: ${{ secrets.SOLARANYWHERE_API_KEY }}
BSRN_FTP_USERNAME: ${{ secrets.BSRN_FTP_USERNAME }}
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://www.nlr.gov/docs/fy08osti/43156.pdf
# .. _NSRDB: https://www.nlr.gov/docs/fy12osti/54824.pdf
Comment thread
jason-curtis marked this conversation as resolved.
Outdated
4 changes: 2 additions & 2 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 # NLR SRRL location
Comment thread
jason-curtis marked this conversation as resolved.
Outdated
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
# https://www.nlr.gov/grid/solar-resource/spectral.html
# (Last accessed: 18/09/2024)
Comment thread
jason-curtis marked this conversation as resolved.
Outdated
6 changes: 3 additions & 3 deletions docs/examples/spectrum/plot_spectrl2_fig51A.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
Modeling Spectral Irradiance
============================

Recreating Figure 5-1A from the SPECTRL2 NREL Technical Report.
Recreating Figure 5-1A from the SPECTRL2 NLR Technical Report.
Comment thread
jason-curtis marked this conversation as resolved.
Outdated
"""

# %%
# This example shows how to model the spectral distribution of irradiance
# based on atmospheric conditions. The spectral distribution of irradiance is
# the power content at each wavelength band in the solar spectrum and is
# affected by various scattering and absorption mechanisms in the atmosphere.
# This example recreates an example figure from the SPECTRL2 NREL Technical
# This example recreates an example figure from the SPECTRL2 NLR Technical
Comment thread
jason-curtis marked this conversation as resolved.
Outdated
# Report [1]_. The figure shows modeled spectra at hourly intervals across
# a single morning.

Expand Down Expand Up @@ -95,5 +95,5 @@
# ----------
# .. [1] Bird, R, and Riordan, C., 1984, "Simple solar spectral model for
# direct and diffuse irradiance on horizontal and tilted planes at the
# earth's surface for cloudless atmospheres", NREL Technical Report
# earth's surface for cloudless atmospheres", NLR Technical Report
Comment thread
jason-curtis marked this conversation as resolved.
Outdated
# TR-215-2436 :doi:`10.2172/5986936`
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.
Comment thread
kandersolar marked this conversation as resolved.
Outdated

.. autosummary::
:toctree: generated/
Expand Down
2 changes: 1 addition & 1 deletion docs/sphinx/source/reference/solarposition.rst
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ Functions for calculating sunrise, sunset and transit times.
solarposition.sun_rise_set_transit_geometric


The spa module contains the implementation of the built-in NREL SPA
The spa module contains the implementation of the built-in NLR SPA
Comment thread
kandersolar marked this conversation as resolved.
Outdated
algorithm.

.. autosummary::
Expand Down
10 changes: 5 additions & 5 deletions docs/sphinx/source/user_guide/getting_started/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -235,22 +235,22 @@ Alternatively, users may install all optional dependencies using

.. _nrelspa:

NREL SPA algorithm
NLR SPA algorithm
Comment thread
kandersolar marked this conversation as resolved.
Outdated
------------------

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
SPA algorithm. NLR's license does not allow redistribution of the
Comment thread
kandersolar marked this conversation as resolved.
Outdated
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:
To install the NLR SPA algorithm for use with pvlib:
Comment thread
kandersolar marked this conversation as resolved.
Outdated

#. 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
4 changes: 4 additions & 0 deletions docs/sphinx/source/whatsnew/v0.15.1.rst
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,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``. Add ``NLR_API_KEY`` environment variable support with
``NREL_API_KEY`` fallback. (:issue:`2701`)
Comment thread
jason-curtis marked this conversation as resolved.
Outdated


Contributors
Expand Down
16 changes: 3 additions & 13 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\nhttp://rredc.nlr.gov/solar/old_data/nsrdb/1991-2005/tmy3/by_state_and_city.html"
Comment thread
jason-curtis marked this conversation as resolved.
Outdated
},
{
"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\nhttp://www.nlr.gov/docs/fy09osti/45376.pdf\n"
},
{
"cell_type": "code",
Expand Down Expand Up @@ -1667,4 +1657,4 @@
},
"nbformat": 4,
"nbformat_minor": 4
}
}
Comment thread
jason-curtis marked this conversation as resolved.
Outdated
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
https://www.nlr.gov/docs/fy20osti/76626.pdf
Comment thread
jason-curtis marked this conversation as resolved.
Outdated
"""
tan_phi = utils._solar_projection_tangent(
solar_zenith, solar_azimuth, surface_azimuth)
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] `NLR Bird Clear Sky Model <http://www.nlr.gov/grid/solar-resource/
Comment thread
jason-curtis marked this conversation as resolved.
Outdated
clearsky.html>`_

.. [4] `SERI/TR-642-761 <https://www.nrel.gov/docs/legosti/old/761.pdf>`_
.. [4] `SERI/TR-642-761 <https://www.nlr.gov/docs/legosti/old/761.pdf>`_
Comment thread
jason-curtis marked this conversation as resolved.
Outdated

.. [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
8 changes: 4 additions & 4 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 @@ -388,7 +388,7 @@ def pvwatts(pdc, pdc0, eta_inv_nom=0.96, eta_inv_ref=0.9637):

References
----------
.. [1] A. P. Dobos, "PVWatts Version 5 Manual", NREL, Golden, CO, USA,
.. [1] A. P. Dobos, "PVWatts Version 5 Manual", NLR, Golden, CO, USA,
Comment thread
jason-curtis marked this conversation as resolved.
Outdated
Technical Report NREL/TP-6A20-62641, 2014, :doi:`10.2172/1158421`.
"""

Expand All @@ -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