Skip to content

Commit 0edb2f3

Browse files
committed
Merge remote-tracking branch 'upstream/main' into irradiance_updates
2 parents 91d4a01 + 9fb2eb3 commit 0edb2f3

35 files changed

+35753
-35267
lines changed

docs/examples/shading/plot_martinez_shade_loss.py

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
import pandas as pd
4848
import numpy as np
4949
import matplotlib.pyplot as plt
50-
from matplotlib.dates import ConciseDateFormatter
50+
from matplotlib.dates import DateFormatter
5151

5252
pitch = 4 # meters
5353
width = 1.5 # meters
@@ -235,10 +235,6 @@
235235
ax1.plot(times, shade_losses, label=k, linestyle=linestyle)
236236
ax1.legend(loc="upper center")
237237
ax1.grid()
238-
ax1.set_xlabel("Time")
239-
ax1.xaxis.set_major_formatter(
240-
ConciseDateFormatter("%H:%M", tz="Europe/Madrid")
241-
)
242238
ax1.set_ylabel(r"$P_{out}$ losses")
243239
ax1.set_title("Per module")
244240

@@ -248,9 +244,7 @@
248244
ax2.legend(loc="upper center")
249245
ax2.grid()
250246
ax2.set_xlabel("Time")
251-
ax2.xaxis.set_major_formatter(
252-
ConciseDateFormatter("%H:%M", tz="Europe/Madrid")
253-
)
247+
ax2.xaxis.set_major_formatter(DateFormatter("%H:%M", tz="Europe/Madrid"))
254248
ax2.set_ylabel(r"$P_{out}$ losses")
255249
ax2.set_title("Per row")
256250
fig.tight_layout()

docs/sphinx/source/conf.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,9 @@
7373

7474
# Enable hover tooltips
7575
hoverxref_auto_ref = True
76-
hoverxref_roles = ["class", "meth", "func", "ref", "term"]
76+
hoverxref_roles = [
77+
"class", "meth", "func", "ref", "term", "obj", "mod", "data"
78+
]
7779
hoverxref_role_types = dict.fromkeys(hoverxref_roles, "tooltip")
7880
hoverxref_domains = ["py"]
7981
hoverxref_intersphinx = list(intersphinx_mapping.keys())

docs/sphinx/source/contributing/how_to_contribute_new_code.rst

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -153,8 +153,7 @@ We strongly recommend using virtual environments for development.
153153
Virtual environments make it easier to switch between different
154154
versions of software. This `scientific-python.org guide
155155
<https://learn.scientific-python.org/development/tutorials/dev-environment/>`_
156-
is a good reference for virtual environments. The pvlib-python `installation
157-
user guide <https://pvlib-python.readthedocs.io/en/stable/user_guide/
158-
installation.html#set-up-a-virtual-environment>`_ also provides instructions on
156+
is a good reference for virtual environments. The pvlib-python
157+
:ref:`installation guide <setupenvironment>` also provides instructions on
159158
setting up a virtual environment. If this is your first pull request, don't
160159
worry about using a virtual environment.

docs/sphinx/source/contributing/style_guide.rst

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,29 @@ the ``docs/readthedocs.org:pvlib-python`` link within the checks
7070
status box at the bottom of the pull request.
7171

7272

73+
.. _documentation-units:
74+
75+
Parameter names and units
76+
-------------------------
77+
78+
When specifying parameters and their units, please follow these guidelines:
79+
80+
- Use the recommended parameter name and units listed in the :ref:`nomenclature` where applicable.
81+
- Enclose units in square brackets after the parameter description, e.g., ``Air temperature. [°C]``.
82+
- Use unicode superscripts symbols for exponents, e.g. ``m⁻²``.
83+
84+
- Numbers: ````, ``¹``, ``²``, ``³``, ````, ````, ````, ````, ````, ````
85+
- Negative exponent: ````
86+
- Degree symbol: ``°``
87+
88+
- Link to a brief description in the :ref:`nomenclature` section if it exists, via the sphinx role ``:term:`glossary_term```. For example, to document ``dni`` use:
89+
90+
.. code-block:: rst
91+
92+
dni : numeric
93+
Direct normal irradiance, see :term:`dni`. [Wm⁻²]
94+
95+
7396
.. _reference_style:
7497

7598
References

docs/sphinx/source/reference/airmass_atmospheric.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ Airmass and atmospheric models
1111
atmosphere.get_relative_airmass
1212
atmosphere.pres2alt
1313
atmosphere.alt2pres
14+
atmosphere.tdew_from_rh
15+
atmosphere.rh_from_tdew
1416
atmosphere.gueymard94_pw
1517
atmosphere.first_solar_spectral_correction
1618
atmosphere.bird_hulstrom80_aod_bb

docs/sphinx/source/reference/tracking.rst

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@
33
Tracking
44
========
55

6-
Functions
7-
---------
8-
96
.. autosummary::
107
:toctree: generated/
118

docs/sphinx/source/reference/transformer.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
Transformer losses
44
==================
55

6-
Methods to account for losses in transformers
6+
Functions to account for losses in transformers
77

88
.. autosummary::
99
:toctree: generated/

docs/sphinx/source/user_guide/nomenclature.rst

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -102,20 +102,21 @@ There is a convention on consistent variable names throughout the library:
102102
Photocurrent
103103

104104
poa_diffuse
105-
Total diffuse irradiation in plane. Sum of ground and sky diffuse.
105+
Total diffuse irradiance in plane [Wm⁻²]. Sum of ground and sky diffuse
106+
components of global irradiance.
106107

107108
poa_direct
108-
Direct/beam irradiation in plane
109+
Direct/beam irradiance in plane [Wm⁻²].
109110

110111
poa_global
111-
Global irradiation in plane. sum of diffuse and beam projection.
112+
Global irradiance in plane. Sum of diffuse and beam projection [Wm⁻²].
112113

113114
poa_ground_diffuse
114-
In plane ground reflected irradiation
115+
In plane ground reflected irradiance [Wm⁻²].
115116

116117
poa_sky_diffuse
117-
Diffuse irradiation in plane from scattered light in the atmosphere
118-
(without ground reflected irradiation)
118+
Diffuse irradiance in plane from scattered light in the atmosphere
119+
(without ground reflected irradiance) [Wm⁻²].
119120

120121
precipitable_water
121122
Total precipitable water contained in a column of unit cross section
@@ -168,10 +169,6 @@ There is a convention on consistent variable names throughout the library:
168169
temp_module
169170
Temperature of the module
170171

171-
transposition_factor
172-
The gain ratio of the radiation on inclined plane to global horizontal
173-
irradiation: :math:`\frac{poa\_global}{ghi}`
174-
175172
tz
176173
Timezone
177174

docs/sphinx/source/whatsnew.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ What's New
66

77
These are new features and improvements of note in each release.
88

9+
.. include:: whatsnew/v0.11.3.rst
910
.. include:: whatsnew/v0.11.2.rst
1011
.. include:: whatsnew/v0.11.1.rst
1112
.. include:: whatsnew/v0.11.0.rst
Lines changed: 51 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,63 +1,73 @@
11
.. _whatsnew_01120:
22

33

4-
v0.11.2 (Anticipated December, 2024)
5-
------------------------------------
4+
v0.11.2 (December 16, 2024)
5+
---------------------------
66

77
Deprecations
88
~~~~~~~~~~~~
9-
9+
* Deprecate terms ``dni_clearsky`` and ``clearsky_dni``, replace with ``dni_clear`` and ``ghi_clear``.
10+
Affected functions are :py:func:`~pvlib.irradiance.dirindex`, :py:func:`~pvlib.irradiance.dni`
11+
and :py:func:`~pvlib.irradiance.clearsky_index`.
1012

1113
Enhancements
1214
~~~~~~~~~~~~
15+
* Add :py:func:`~pvlib.atmosphere.rh_from_tdew` and :py:func:`~pvlib.atmosphere.tdew_from_rh`.
16+
(:issue:`1744`, :pull:`2286`)
1317
* :py:func:`~pvlib.ivtools.sdm.fit_desoto` now allows input of initial
1418
parameter guesses. (:issue:`1014`, :pull:`2291`)
1519

1620
Bug Fixes
1721
~~~~~~~~~
1822
* :py:meth:`~pvlib.pvsystem.PVSystem.get_irradiance` accepts float inputs.
1923
(:issue:`1338`, :pull:`2227`)
20-
21-
Bug fixes
22-
~~~~~~~~~
24+
* Handle DST transitions that happen at midnight in :py:func:`pvlib.solarposition.hour_angle`
25+
(:issue:`2132` :pull:`2133`)
26+
* Change ``dni_extra`` to a required parameter in :py:func:`pvlib.irradiance.ghi_from_poa_driesse_2023`
27+
(:issue:`2279` :pull:`2331`)
2328
* :py:func:`~pvlib.spa.julian_day_dt` now accounts for the 10 day difference
2429
between Julian and Gregorian calendars prior to the year 1582. (:issue:`2077`, :pull:`2249`)
30+
* Correct sign of temperature coefficient ``dEgdT`` in :py:func:`~pvlib.ivtools.sdm.fit_desoto_sandia`.
31+
Results may differ slightly from previous versions. (:issue:`2311`, :pull:`2322`)
2532

2633
Documentation
2734
~~~~~~~~~~~~~
28-
* Edited docstrings for :py:func:`~pvlib.pvsystem.dc_ohms_from_percent` and
35+
* Edit docstrings for :py:func:`~pvlib.pvsystem.dc_ohms_from_percent` and
2936
:py:func:`~pvlib.pvsystem.dc_ohmic_losses` for clarity. (:issue:`1601`, :pull:`2229`)
30-
* Added 'freestanding' and 'insulated' `racking_model` options for cell
31-
temperature calculation in :py:class:`~pvlib.pvsystem.PVSystem`
37+
* Add 'freestanding' and 'insulated' `racking_model` options for cell
38+
temperature calculation in :py:class:`~pvlib.pvsystem.PVSystem`,
3239
:py:class:`~pvlib.pvsystem.SingleAxisTrackerMount`, and
3340
:py:class:`~pvlib.pvsystem.FixedMount` docstrings. Various formatting edits
3441
for clarity. (:issue:`1942`, :pull:`2232`)
35-
* Added a new citation style guide (:ref:`reference_style`) to the contributing
36-
page. (:issue:`2202`, :pull:`2226`)
37-
* Updated :py:func:`~pvlib.irradiance.reindl` to include definitions of terms
42+
* Update :py:func:`~pvlib.irradiance.reindl` to include definitions of terms
3843
and a new "notes" section (:issue:`2183`, :pull:`2193`)
39-
* Clarified the error message in :py:func:`~pvlib.clearsky.detect_clearsky` when
44+
* Clarify the error message in :py:func:`~pvlib.clearsky.detect_clearsky` when
4045
windows contain fewer than three data points (:issue:`2005`, :pull:`2281`)
41-
* Added a new :ref:`nomenclature` page, in place of the Variables and Symbols
46+
* Clarify mounting cases for parameters for :py:func:`~pvlib.temperature.sapm_module`,
47+
:py:func:`~pvlib.temperature.sapm_cell` and :py:func:`~pvlib.temperature.pvsyst_cell`.
48+
(:issue:`1323`, :pull:`2293`)
49+
* Add an example to :py:func:`~pvlib.pvsystem.retrieve_sam` docstring to
50+
demonstrate how to retrieve a database from the SAM repo. (:pull:`2313`)
51+
* Add a new citation style guide (:ref:`reference_style`) to the contributing
52+
page. (:issue:`2202`, :pull:`2226`)
53+
* Explain how to write docstrings for new functions in :ref:`example-docstring`
54+
(:discuss:`2081`, :pull:`2254`)
55+
* Add a section in the style guide for parameter naming and units best practices.
56+
See :ref:`documentation-units`. (:issue:`2205`, :pull:`2248`)
57+
* Add a new :ref:`nomenclature` page, in place of the Variables and Symbols
4258
page, using the sphinx glossary directive. (:issue:`1421`, :pull:`2234`)
43-
* Explained how to write docstrings for new functions in :ref:`example-docstring`
44-
(:discussion:`2081`, :pull:`2254`)
45-
* Added the following variables to the :ref:`nomenclature` page:
59+
* Add the following variables to the :ref:`nomenclature` page:
4660

4761
- `spectra` and `spectra_components` (:issue:`2150`, :pull:`2264`)
4862

4963

5064
Testing
5165
~~~~~~~
52-
53-
54-
Requirements
55-
~~~~~~~~~~~~
56-
66+
* Update test files to track new PVGIS 5.3 data. (:pull:`2305`)
5767

5868
Maintenance
5969
~~~~~~~~~~~
60-
* Added a decorator to deprecate renamed keyword arguments in functions,
70+
* Add a decorator to deprecate renamed keyword arguments in functions,
6171
:py:func:`pvlib._deprecation.renamed_kwarg_warning`. (:pull:`2237`)
6272

6373

@@ -68,5 +78,22 @@ Contributors
6878
* Dave Pitts (:ghuser:`dgapitts`)
6979
* Kurt Rhee (:ghuser:`kurt-rhee`)
7080
* Mark Mikofski (:ghuser:`mikofski`)
71-
* matsuobasho (:ghuser:`matsuobasho`)
81+
* Roma Koulikov (:ghuser:`matsuobasho`)
7282
* Echedey Luis (:ghuser:`echedey-ls`)
83+
* Kevin Anderson (:ghuser:`kandersolar`)
84+
* Scott Nelson (:ghuser:`scttnlsn`)
85+
* Ioannis Sifnaios (:ghuser:`IoannisSifnaios`)
86+
* Adam R. Jensen (:ghuser:`AdamRJensen`)
87+
* Anton Driesse (:ghuser:`adriesse`)
88+
* Will Holmgren (:ghuser:`wholmgren`)
89+
* Umay Akkoseoglu (:ghuser:`uakkoseo`)
90+
* Mark Campanelli (:ghuser:`markcampanelli`)
91+
* :ghuser:`iblasi`
92+
* Hiromasa Ihara (:ghuser:`miettal`)
93+
* Yunho Kee (:ghuser:`yhkee0404`)
94+
* Hamilton Kibbe (:ghuser:`hamiltonkibbe`)
95+
* Felix Korbelius (:ghuser:`FelixKoTU`)
96+
* Michael Deceglie (:ghuser:`mdeceglie`)
97+
* Will Hobbs (:ghuser:`williamhobbs`)
98+
* Todd Karin (:ghuser:`toddkarin`)
99+
* Lucas Schneeberger (:ghuser:`lucasschn`)

0 commit comments

Comments
 (0)