From 26acf8ae894fb54ad9ef6836757ef4406d4bffae Mon Sep 17 00:00:00 2001 From: Cliff Hansen Date: Thu, 8 Feb 2024 13:34:37 -0700 Subject: [PATCH] Fix more broken links (#1960) * remove outdated links * remake USN link * repair reference to 2014 paper * remove old links * remove extinct links * fix NREL link * remove v0.2 note * whatsnew * fix links * fix link to Anaconda * use `noqa` for docstring with long url --------- Co-authored-by: Kevin Anderson --- docs/sphinx/source/index.rst | 10 +++++----- docs/sphinx/source/user_guide/clearsky.rst | 16 +--------------- docs/sphinx/source/user_guide/installation.rst | 6 +----- docs/sphinx/source/user_guide/timetimezones.rst | 13 +++---------- .../source/user_guide/variables_style_rules.rst | 10 +++------- docs/sphinx/source/whatsnew/v0.10.4.rst | 2 +- pvlib/clearsky.py | 15 +++++++-------- pvlib/irradiance.py | 2 +- pvlib/solarposition.py | 15 +++++++-------- 9 files changed, 29 insertions(+), 60 deletions(-) diff --git a/docs/sphinx/source/index.rst b/docs/sphinx/source/index.rst index 8e5773d639..e91387c788 100644 --- a/docs/sphinx/source/index.rst +++ b/docs/sphinx/source/index.rst @@ -84,12 +84,12 @@ Additional pvlib python publications include: * J. S. Stein, “The photovoltaic performance modeling collaborative (PVPMC),” in Photovoltaic Specialists Conference, 2012. -* R.W. Andrews, J.S. Stein, C. Hansen, and D. Riley, “Introduction - to the open source pvlib for python photovoltaic system - modelling package,” in 40th IEEE Photovoltaic Specialist - Conference, 2014. +* R. W. Andrews, J. S. Stein, C. Hansen and D. Riley, "Introduction to the open + source PV LIB for python Photovoltaic system modelling package," + 2014 IEEE 40th Photovoltaic Specialist Conference (PVSC), Denver, CO, USA, + 2014, pp. 0170-0174, https://doi.org/10.1109/PVSC.2014.6925501 (`paper - `__) + `__) * W.F. Holmgren, R.W. Andrews, A.T. Lorenzo, and J.S. Stein, “PVLIB Python 2015,” in 42nd Photovoltaic Specialists Conference, 2015. (`paper diff --git a/docs/sphinx/source/user_guide/clearsky.rst b/docs/sphinx/source/user_guide/clearsky.rst index 9af40d8f12..f074f21c99 100644 --- a/docs/sphinx/source/user_guide/clearsky.rst +++ b/docs/sphinx/source/user_guide/clearsky.rst @@ -344,15 +344,6 @@ Validation See [Ine02]_, [Ren12]_. -Will Holmgren compared pvlib's Ineichen model and climatological -turbidity to `SoDa's McClear service -`_ in -Arizona. Here are links to an -`ipynb notebook -`_ -and its `html rendering -`_. - .. _simplified_solis: @@ -370,9 +361,7 @@ Aerosol and precipitable water data There are a number of sources for aerosol and precipitable water data of varying accuracy, global coverage, and temporal resolution. Ground based aerosol data can be obtained from -`Aeronet `_. Precipitable water can be obtained -from `radiosondes `_, -`ESRL GPS-MET `_, or +`Aeronet `_. Precipitable water can be derived from surface relative humidity using functions such as :py:func:`pvlib.atmosphere.gueymard94_pw`. Numerous gridded products from satellites, weather models, and climate models @@ -577,9 +566,6 @@ Validation See [Ine16]_. -We encourage users to compare the pvlib implementation to Ineichen's -`Excel tool `_. - .. _detect_clearsky: Detect Clearsky diff --git a/docs/sphinx/source/user_guide/installation.rst b/docs/sphinx/source/user_guide/installation.rst index 17810f2ed3..219a4b3bf5 100644 --- a/docs/sphinx/source/user_guide/installation.rst +++ b/docs/sphinx/source/user_guide/installation.rst @@ -40,10 +40,6 @@ for pvlib, including Pandas, NumPy, and SciPy. #. **Install** the Anaconda Python distribution available at `Anaconda.com `_. -See `What is Anaconda? `_ -and the `Anaconda Documentation `_ -for more information. - You can now install pvlib-python by one of the methods below. @@ -56,7 +52,7 @@ Users may install pvlib-python using either the `conda `_ or `pip `_ package manager. We recommend that most users install pvlib-python using the conda package manager in the -`Anaconda Python distribution `_. +Anaconda python distribution. To install the most recent stable release of pvlib-python in a non-editable way, use one of the following commands to install pvlib-python:: diff --git a/docs/sphinx/source/user_guide/timetimezones.rst b/docs/sphinx/source/user_guide/timetimezones.rst index f5b71d1759..cb19dd764e 100644 --- a/docs/sphinx/source/user_guide/timetimezones.rst +++ b/docs/sphinx/source/user_guide/timetimezones.rst @@ -246,13 +246,6 @@ You cannot localize a native Python date object. pvlib-specific functionality ---------------------------- -.. note:: - - This section applies to pvlib >= 0.3. Version 0.2 of pvlib used a - ``Location`` object's ``tz`` attribute to auto-magically correct for - some time zone issues. This behavior was counter-intuitive to many - users and was removed in version 0.3. - How does this general functionality interact with pvlib? Perhaps the two most common places to get tripped up with time and time zone issues in solar power analysis occur during data import and solar position @@ -315,9 +308,9 @@ DataFrame's index since the index has been localized. ax.set_ylabel('(degrees)'); `According to the US Navy -`_, -on January 1, 1997 at Sand Point, Alaska, sunrise was at 10:09 am, solar -noon was at 1:46 pm, and sunset was at 5:23 pm. This is consistent with +`_, +on January 1, 2024 at Sand Point, Alaska (55.34N, -160.5W), sunrise was at 10:09 am, solar +noon was at 1:46 pm, and sunset was at 5:22 pm. This is consistent with the data plotted above (and depressing). Solar position (assumed UTC) diff --git a/docs/sphinx/source/user_guide/variables_style_rules.rst b/docs/sphinx/source/user_guide/variables_style_rules.rst index dc826b77bd..4d3574ab4b 100644 --- a/docs/sphinx/source/user_guide/variables_style_rules.rst +++ b/docs/sphinx/source/user_guide/variables_style_rules.rst @@ -15,15 +15,11 @@ There is a convention on consistent variable names throughout the library: For a definition and further explanation on the variables, common symbols and units refer to the following sources: -* `Reference Variable List by PVPMC `_ * `IEC 61724-1:2017 -- Photovoltaic system performance - Part 1: Monitoring `_ section: 3 -- Terms and definitions; the Indian Standard referencing the withdrawn earlier global IEC standard IEC 61724:1998 is available online: `IS/IEC 61724 (1998) `_ and can provide relevant contents. * Explanation of Solar irradiation and solar geometry by `SoDa Service `_ - * `Acronyms, Terminology and Units `_ - * `Plane orientations and radiation components `_ - * `Time references `_ - * `Units and conversion tool `_ - * `Terminology: definitions of the main quantities. `_ - * `Acronyms in solar radiation `_ (more extensive list) + * `Acronyms, Terminology and Units `_ + * `Plane orientations and radiation components `_ + * `Time references `_ .. note:: These further references might not use the same terminology as *pvlib*. But the physical process referred to is the same. diff --git a/docs/sphinx/source/whatsnew/v0.10.4.rst b/docs/sphinx/source/whatsnew/v0.10.4.rst index 7cbac1c465..3cab3fc8ad 100644 --- a/docs/sphinx/source/whatsnew/v0.10.4.rst +++ b/docs/sphinx/source/whatsnew/v0.10.4.rst @@ -21,7 +21,7 @@ Testing Documentation ~~~~~~~~~~~~~ -* Fixed broken URLs in various docstrings. (:pull:`1957`) +* Fixed broken URLs in various places. (:pull:`1957`, :pull:`1960`) * Clarified documentation for :py:func:`~pvlib.irradiance.get_ground_diffuse`. (:pull:`1883`) Requirements diff --git a/pvlib/clearsky.py b/pvlib/clearsky.py index ad779182eb..8e4db0fed4 100644 --- a/pvlib/clearsky.py +++ b/pvlib/clearsky.py @@ -25,11 +25,11 @@ def ineichen(apparent_zenith, airmass_absolute, linke_turbidity, Implements the Ineichen and Perez clear sky model for global horizontal irradiance (GHI), direct normal irradiance (DNI), and calculates the clear-sky diffuse horizontal (DHI) component as the - difference between GHI and DNI*cos(zenith) as presented in [1, 2]. A + difference between GHI and DNI*cos(zenith) as presented in [1]_ [2]_. A report on clear sky models found the Ineichen/Perez model to have - excellent performance with a minimal input data set [3]. + excellent performance with a minimal input data set [3]_. - Default values for monthly Linke turbidity provided by SoDa [4, 5]. + Default values for monthly Linke turbidity provided by SoDa [4]_, [5]_. Parameters ----------- @@ -80,12 +80,12 @@ def ineichen(apparent_zenith, airmass_absolute, linke_turbidity, Clear Sky Models: Implementation and Analysis", Sandia National Laboratories, SAND2012-2389, 2012. - .. [4] http://www.soda-is.com/eng/services/climat_free_eng.php#c5 (obtained - July 17, 2012). + .. [4] https://www.soda-pro.com/help/general-knowledge/linke-turbidity-factor + (accessed February 2, 2024). .. [5] J. Remund, et. al., "Worldwide Linke Turbidity Information", Proc. ISES Solar World Congress, June 2003. Goteborg, Sweden. - ''' + ''' # noqa: E501 # ghi is calculated using either the equations in [1] by setting # perez_enhancement=False (default behavior) or using the model @@ -993,8 +993,7 @@ def bird(zenith, airmass_relative, aod380, aod500, precipitable_water, .. [3] `NREL Bird Clear Sky Model `_ - .. [4] `SERI/TR-642-761 `_ + .. [4] `SERI/TR-642-761 `_ .. [5] `Error Reports `_ diff --git a/pvlib/irradiance.py b/pvlib/irradiance.py index 3bec66b668..34098147ef 100644 --- a/pvlib/irradiance.py +++ b/pvlib/irradiance.py @@ -602,7 +602,7 @@ def get_ground_diffuse(surface_tilt, ghi, albedo=.25, surface_type=None): and http://en.wikipedia.org/wiki/Albedo and - https://doi.org/10.1175/1520-0469(1972)029<0959:AOTSS>2.0.CO;2 + :doi:`10.1175/1520-0469(1972)029<0959:AOTSS>2.0.CO;2` ''' if surface_type is not None: diff --git a/pvlib/solarposition.py b/pvlib/solarposition.py index d1e8c016bd..08023daf91 100644 --- a/pvlib/solarposition.py +++ b/pvlib/solarposition.py @@ -132,7 +132,7 @@ def get_solarposition(time, latitude, longitude, def spa_c(time, latitude, longitude, pressure=101325, altitude=0, temperature=12, delta_t=67.0, raw_spa_output=False): - """ + r""" Calculate the solar position using the C implementation of the NREL SPA code. @@ -161,7 +161,7 @@ def spa_c(time, latitude, longitude, pressure=101325, altitude=0, Temperature in C delta_t : float, default 67.0 Difference between terrestrial time and UT1. - USNO has previous values and predictions. + USNO has previous values and predictions [3]_. raw_spa_output : bool, default False If true, returns the raw SPA output. @@ -177,17 +177,16 @@ def spa_c(time, latitude, longitude, pressure=101325, altitude=0, References ---------- - .. [1] NREL SPA reference: - http://rredc.nrel.gov/solar/codesandalgorithms/spa/ - NREL SPA C files: https://midcdmz.nrel.gov/spa/ + .. [1] NREL SPA reference: https://midcdmz.nrel.gov/spa/ Note: The ``timezone`` field in the SPA C files is replaced with ``time_zone`` to avoid a nameclash with the function ``__timezone`` that is redefined by Python>=3.5. This issue is `Python bug 24643 `_. - .. [2] Delta T: - https://en.wikipedia.org/wiki/%CE%94T_(timekeeping) + .. [2] Delta T: https://en.wikipedia.org/wiki/%CE%94T_(timekeeping) + + .. [3] USNO delta T: https://maia.usno.navy.mil/products/deltaT See also -------- @@ -344,7 +343,7 @@ def spa_python(time, latitude, longitude, 2007. .. [3] USNO delta T: - http://www.usno.navy.mil/USNO/earth-orientation/eo-products/long-term + https://maia.usno.navy.mil/products/deltaT See also --------