From 08cfd3dfbc0f0e827a73091234dc97e2aba49a52 Mon Sep 17 00:00:00 2001 From: Cliff Hansen Date: Thu, 1 Feb 2024 08:40:18 -0700 Subject: [PATCH 01/11] remove outdated links --- docs/sphinx/source/user_guide/clearsky.rst | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) 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 From ce584ee72afee1da4f87c7a9e3510b0f77a9909a Mon Sep 17 00:00:00 2001 From: Cliff Hansen Date: Thu, 1 Feb 2024 08:54:46 -0700 Subject: [PATCH 02/11] remake USN link --- docs/sphinx/source/user_guide/timetimezones.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/sphinx/source/user_guide/timetimezones.rst b/docs/sphinx/source/user_guide/timetimezones.rst index f5b71d1759..0a4de78eca 100644 --- a/docs/sphinx/source/user_guide/timetimezones.rst +++ b/docs/sphinx/source/user_guide/timetimezones.rst @@ -315,9 +315,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) From 614b2abfef77db8c10120a3c837459e5e7aab5d7 Mon Sep 17 00:00:00 2001 From: Cliff Hansen Date: Thu, 1 Feb 2024 08:55:18 -0700 Subject: [PATCH 03/11] repair reference to 2014 paper --- docs/sphinx/source/index.rst | 10 +++++----- 1 file changed, 5 insertions(+), 5 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 From 7cb58b663ef034e31d0c3f8770cb18370a353662 Mon Sep 17 00:00:00 2001 From: Cliff Hansen Date: Thu, 1 Feb 2024 08:59:57 -0700 Subject: [PATCH 04/11] remove old links --- docs/sphinx/source/user_guide/variables_style_rules.rst | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/docs/sphinx/source/user_guide/variables_style_rules.rst b/docs/sphinx/source/user_guide/variables_style_rules.rst index dc826b77bd..3a96a06f71 100644 --- a/docs/sphinx/source/user_guide/variables_style_rules.rst +++ b/docs/sphinx/source/user_guide/variables_style_rules.rst @@ -19,11 +19,8 @@ For a definition and further explanation on the variables, common symbols and un * `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. From 95062b895d5cac1bc8f9a1e60ce3011d0ba2dce9 Mon Sep 17 00:00:00 2001 From: Cliff Hansen Date: Thu, 1 Feb 2024 15:36:28 -0700 Subject: [PATCH 05/11] remove extinct links --- docs/sphinx/source/user_guide/installation.rst | 4 ---- docs/sphinx/source/user_guide/variables_style_rules.rst | 1 - 2 files changed, 5 deletions(-) diff --git a/docs/sphinx/source/user_guide/installation.rst b/docs/sphinx/source/user_guide/installation.rst index 17810f2ed3..8276d7766f 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. diff --git a/docs/sphinx/source/user_guide/variables_style_rules.rst b/docs/sphinx/source/user_guide/variables_style_rules.rst index 3a96a06f71..4d3574ab4b 100644 --- a/docs/sphinx/source/user_guide/variables_style_rules.rst +++ b/docs/sphinx/source/user_guide/variables_style_rules.rst @@ -15,7 +15,6 @@ 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 `_ From d8dca7c60dc99ed3ac8a9fb52a7431739b701b0c Mon Sep 17 00:00:00 2001 From: Cliff Hansen Date: Thu, 1 Feb 2024 15:38:57 -0700 Subject: [PATCH 06/11] fix NREL link --- pvlib/clearsky.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pvlib/clearsky.py b/pvlib/clearsky.py index ad779182eb..efed731e52 100644 --- a/pvlib/clearsky.py +++ b/pvlib/clearsky.py @@ -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 `_ From 704143a8bbb810e2ea37aaf1c33e83e7bb698535 Mon Sep 17 00:00:00 2001 From: Cliff Hansen Date: Thu, 1 Feb 2024 15:59:34 -0700 Subject: [PATCH 07/11] remove v0.2 note --- docs/sphinx/source/user_guide/timetimezones.rst | 7 ------- 1 file changed, 7 deletions(-) diff --git a/docs/sphinx/source/user_guide/timetimezones.rst b/docs/sphinx/source/user_guide/timetimezones.rst index 0a4de78eca..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 From bbc8a139a030ec401d4c83235f573f065048c96d Mon Sep 17 00:00:00 2001 From: Cliff Hansen Date: Thu, 1 Feb 2024 16:00:32 -0700 Subject: [PATCH 08/11] whatsnew --- docs/sphinx/source/whatsnew/v0.10.4.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/sphinx/source/whatsnew/v0.10.4.rst b/docs/sphinx/source/whatsnew/v0.10.4.rst index 4d7b158552..5d38af047a 100644 --- a/docs/sphinx/source/whatsnew/v0.10.4.rst +++ b/docs/sphinx/source/whatsnew/v0.10.4.rst @@ -20,7 +20,7 @@ Testing Documentation ~~~~~~~~~~~~~ -* Fixed broken URLs in various docstrings. (:pull:`1957`) +* Fixed broken URLs in various places. (:pull:`1957`, :pull:`1960`) Requirements ~~~~~~~~~~~~ From 808ea39f30d2d89285d1336ecf6baf7fb94624e8 Mon Sep 17 00:00:00 2001 From: Cliff Hansen Date: Fri, 2 Feb 2024 10:07:05 -0700 Subject: [PATCH 09/11] fix links --- pvlib/clearsky.py | 10 +++++----- pvlib/irradiance.py | 2 +- pvlib/solarposition.py | 15 +++++++-------- 3 files changed, 13 insertions(+), 14 deletions(-) diff --git a/pvlib/clearsky.py b/pvlib/clearsky.py index efed731e52..1ba9d7eb04 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,8 +80,8 @@ 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. 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 -------- From 6e7c1a6464ebf9a387cb366a503e4732ca76c75f Mon Sep 17 00:00:00 2001 From: Cliff Hansen Date: Fri, 2 Feb 2024 10:07:40 -0700 Subject: [PATCH 10/11] fix link to Anaconda --- docs/sphinx/source/user_guide/installation.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/sphinx/source/user_guide/installation.rst b/docs/sphinx/source/user_guide/installation.rst index 8276d7766f..219a4b3bf5 100644 --- a/docs/sphinx/source/user_guide/installation.rst +++ b/docs/sphinx/source/user_guide/installation.rst @@ -52,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:: From 9aea033c243166edb49c4f3f91ba6075748de3de Mon Sep 17 00:00:00 2001 From: Kevin Anderson Date: Thu, 8 Feb 2024 15:26:28 -0500 Subject: [PATCH 11/11] use `noqa` for docstring with long url --- pvlib/clearsky.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pvlib/clearsky.py b/pvlib/clearsky.py index 1ba9d7eb04..8e4db0fed4 100644 --- a/pvlib/clearsky.py +++ b/pvlib/clearsky.py @@ -85,7 +85,7 @@ def ineichen(apparent_zenith, airmass_absolute, linke_turbidity, .. [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