Skip to content

Commit

Permalink
Merge branch 'main' into ref_ground_diffuse
Browse files Browse the repository at this point in the history
  • Loading branch information
cwhanse authored Feb 1, 2024
2 parents 3e4d8f7 + ffb86bb commit 2e4f2f2
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 22 deletions.
2 changes: 2 additions & 0 deletions docs/sphinx/source/whatsnew/v0.10.4.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ Testing
Documentation
~~~~~~~~~~~~~
* Improved references and description for :py:func:`~pvlib.irradiance.get_ground_diffuse`. (:pull:`1953`)
* Fixed broken URLs in various docstrings. (:pull:`1957`)


Requirements
~~~~~~~~~~~~
Expand Down
6 changes: 3 additions & 3 deletions pvlib/iam.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,9 @@ def ashrae(aoi, b=0.05):
.. [2] ASHRAE standard 93-77
.. [3] PVsyst Contextual Help.
https://files.pvsyst.com/help/index.html?iam_loss.htm retrieved on
October 14, 2019
.. [3] PVsyst 7 Help.
https://www.pvsyst.com/help/index.html?iam_loss.htm retrieved on
January 30, 2024
See Also
--------
Expand Down
19 changes: 9 additions & 10 deletions pvlib/iotools/srml.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# pvlib names. For most variables, only the first three digits are used,
# the fourth indicating the instrument. Spectral data (7xxx) uses all
# four digits to indicate the variable. See a full list of data element
# numbers `here. <http://solardat.uoregon.edu/DataElementNumbers.html>`_
# numbers `here. <http://solardata.uoregon.edu/DataElementNumbers.html>`_

VARIABLE_MAP = {
'100': 'ghi',
Expand Down Expand Up @@ -60,9 +60,9 @@ def read_srml(filename, map_variables=True):
References
----------
.. [1] University of Oregon Solar Radiation Monitoring Laboratory
`http://solardat.uoregon.edu/ <http://solardat.uoregon.edu/>`_
http://solardata.uoregon.edu/
.. [2] `Archival (short interval) data files
<http://solardat.uoregon.edu/ArchivalFiles.html>`_
<http://solardata.uoregon.edu/ArchivalFiles.html>`_
"""
tsv_data = pd.read_csv(filename, delimiter='\t')
data = _format_index(tsv_data)
Expand Down Expand Up @@ -218,20 +218,20 @@ def read_srml_month_from_solardat(station, year, month, filetype='PO',
References
----------
.. [1] University of Oregon Solar Radiation Measurement Laboratory
`http://solardat.uoregon.edu/ <http://solardat.uoregon.edu/>`_
http://solardata.uoregon.edu/
"""
file_name = "{station}{filetype}{year:02d}{month:02d}.txt".format(
station=station,
filetype=filetype,
year=year % 100,
month=month)
url = "http://solardat.uoregon.edu/download/Archive/"
url = "http://solardata.uoregon.edu/download/Archive/"
data = read_srml(url + file_name, map_variables=map_variables)
return data


def get_srml(station, start, end, filetype='PO', map_variables=True,
url="http://solardat.uoregon.edu/download/Archive/"):
url="http://solardata.uoregon.edu/download/Archive/"):
"""Request data from UoO SRML and read it into a Dataframe.
The University of Oregon Solar Radiation Monitoring Laboratory (SRML) is
Expand All @@ -252,7 +252,7 @@ def get_srml(station, start, end, filetype='PO', map_variables=True,
map_variables : bool, default: True
When true, renames columns of the DataFrame to pvlib variable names
where applicable. See variable :const:`VARIABLE_MAP`.
url : str, default: 'http://solardat.uoregon.edu/download/Archive/'
url : str, default: 'http://solardata.uoregon.edu/download/Archive/'
API endpoint URL
Returns
Expand Down Expand Up @@ -287,10 +287,9 @@ def get_srml(station, start, end, filetype='PO', map_variables=True,
References
----------
.. [1] University of Oregon Solar Radiation Measurement Laboratory
`http://solardat.uoregon.edu/ <http://solardat.uoregon.edu/>`_
http://solardata.uoregon.edu/
.. [2] Station ID codes - Solar Radiation Measurement Laboratory
`http://solardat.uoregon.edu/StationIDCodes.html
<http://solardat.uoregon.edu/StationIDCodes.html>`_
http://solardata.uoregon.edu/StationIDCodes.html
"""
# Use pd.to_datetime so that strings (e.g. '2021-01-01') are accepted
start = pd.to_datetime(start)
Expand Down
2 changes: 1 addition & 1 deletion pvlib/irradiance.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def get_extra_radiation(datetime_or_doy, solar_constant=1366.1,
Clear Sky Models: Implementation and Analysis", Sandia National
Laboratories, SAND2012-2389, 2012.
.. [2] <http://solardat.uoregon.edu/SolarRadiationBasics.html>, Eqs.
.. [2] http://solardata.uoregon.edu/SolarRadiationBasics.html, Eqs.
SR1 and SR2
.. [3] Partridge, G. W. and Platt, C. M. R. 1976. Radiative Processes
Expand Down
12 changes: 6 additions & 6 deletions pvlib/solarposition.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ def get_solarposition(time, latitude, longitude,
solar radiation applications. Solar Energy, vol. 81, no. 6, p. 838,
2007.
.. [3] NREL SPA code: http://rredc.nrel.gov/solar/codesandalgorithms/spa/
.. [3] NREL SPA code: https://midcdmz.nrel.gov/spa/
"""

if altitude is None and pressure is None:
Expand Down Expand Up @@ -186,8 +186,8 @@ def spa_c(time, latitude, longitude, pressure=101325, altitude=0,
redefined by Python>=3.5. This issue is
`Python bug 24643 <https://bugs.python.org/issue24643>`_.
.. [2] USNO delta T:
http://www.usno.navy.mil/USNO/earth-orientation/eo-products/long-term
.. [2] Delta T:
https://en.wikipedia.org/wiki/%CE%94T_(timekeeping)
See also
--------
Expand Down Expand Up @@ -1327,9 +1327,9 @@ def solar_zenith_analytical(latitude, hourangle, declination):
.. [4] `Wikipedia: Solar Zenith Angle
<https://en.wikipedia.org/wiki/Solar_zenith_angle>`_
.. [5] `PVCDROM: Sun's Position
<http://www.pveducation.org/pvcdrom/2-properties-sunlight/
suns-position>`_
.. [5] `PVCDROM: Elevation Angle
<https://www.pveducation.org/pvcdrom/properties-of-sunlight/
elevation-angle>`_
See Also
--------
Expand Down
5 changes: 3 additions & 2 deletions pvlib/temperature.py
Original file line number Diff line number Diff line change
Expand Up @@ -362,8 +362,9 @@ def pvsyst_cell(poa_global, temp_air, wind_speed=1.0, u_c=29.0, u_v=0.0,
References
----------
.. [1] "PVsyst 6 Help", Files.pvsyst.com, 2018. [Online]. Available:
http://files.pvsyst.com/help/index.html. [Accessed: 10- Dec- 2018].
.. [1] "PVsyst 7 Help", [Online]. Available:
https://www.pvsyst.com/help/index.html?thermal_loss.htm.
[Accessed: 30-Jan-2024].
.. [2] Faiman, D. (2008). "Assessing the outdoor operating temperature of
photovoltaic modules." Progress in Photovoltaics 16(4): 307-315.
Expand Down

0 comments on commit 2e4f2f2

Please sign in to comment.