Skip to content

Commit cbb61bd

Browse files
committed
respond to comments in diffuse fraction example
- fix use :py:func: to xref functions in docs, instead of :meth: - add comment to explain conversion of mbars to Pa - use Gsc not E0 in kt comparison plot
1 parent 9bdd1bb commit cbb61bd

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

docs/examples/plot_diffuse_fraction.py

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@
3535
solpos = get_solarposition(
3636
greensboro.index, latitude=metadata['latitude'],
3737
longitude=metadata['longitude'], altitude=metadata['altitude'],
38-
pressure=greensboro.Pressure*100, temperature=greensboro.DryBulb)
38+
pressure=greensboro.Pressure*100, # convert from millibar to Pa
39+
temperature=greensboro.DryBulb)
3940

4041
# %%
4142
# Methods for separating DHI into diffuse and direct components include:
@@ -45,7 +46,7 @@
4546
# DISC
4647
# ----
4748
#
48-
# DISC :py:meth:`~pvlib.irradiance.disc` is an empirical correlation developed
49+
# DISC :py:func:`~pvlib.irradiance.disc` is an empirical correlation developed
4950
# at SERI (now NREL) in 1987. The direct normal irradiance (DNI) is related to
5051
# clearness index (kt) by two polynomials split at kt = 0.6, then combined with
5152
# an exponential relation with airmass.
@@ -61,7 +62,7 @@
6162
# DIRINT
6263
# ------
6364
#
64-
# DIRINT :py:meth:`~pvlib.irradiance.dirint` is a modification of DISC
65+
# DIRINT :py:func:`~pvlib.irradiance.dirint` is a modification of DISC
6566
# developed by Richard Perez and Pierre Ineichen in 1992.
6667

6768
dni_dirint = irradiance.dirint(
@@ -78,7 +79,7 @@
7879
# Erbs
7980
# ----
8081
#
81-
# The Erbs method, :py:meth:`~pvlib.irradiance.erbs` developed by Daryl Gregory
82+
# The Erbs method, :py:func:`~pvlib.irradiance.erbs` developed by Daryl Gregory
8283
# Erbs at the University of Wisconsin in 1982 is a piecewise correlation that
8384
# splits kt into 3 regions: linear for kt <= 0.22, a 4th order polynomial
8485
# between 0.22 < kt <= 0.8, and a horizontal line for kt > 0.8.
@@ -90,7 +91,7 @@
9091
# Boland
9192
# ----
9293
#
93-
# The Boland method, :py:meth:`~pvlib.irradiance.boland` is a single logistic
94+
# The Boland method, :py:func:`~pvlib.irradiance.boland` is a single logistic
9495
# exponential correlation that is continuously differentiable and bounded
9596
# between zero and one.
9697

@@ -115,7 +116,7 @@
115116
greensboro.DHI, out_disc.dhi_disc, out_dirint.dhi_dirint,
116117
out_erbs.dhi_erbs, out_boland.dhi_boland]
117118
dhi = pd.concat(dhi, axis=1).rename(columns=dhi_renames)
118-
ghi_kt = pd.concat([greensboro.GHI/1367.0, out_erbs.kt], axis=1)
119+
ghi_kt = pd.concat([greensboro.GHI/1366.1, out_erbs.kt], axis=1)
119120

120121
# %%
121122
# Finally, let's plot them for a few winter days and compare
@@ -131,7 +132,7 @@
131132
ax[1].set_ylabel('DHI $[W/m^2]$')
132133
ghi_kt[JAN6AM:JAN6PM].plot(ax=ax[2])
133134
ax[2].grid(which='both')
134-
ax[2].set_ylabel(r'$\frac{GHI}{E0}, k_t$')
135+
ax[2].set_ylabel(r'$\frac{GHI}{G_{SC}}, k_t$')
135136
f.tight_layout()
136137

137138
# %%

docs/sphinx/source/whatsnew/v0.9.5.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Enhancements
2020
:py:func:`pvlib.snow.loss_townsend` (:issue:`1636`, :pull:`1653`)
2121
* Added optional ``n_ar`` parameter to :py:func:`pvlib.iam.physical` to
2222
support an anti-reflective coating. (:issue:`1501`, :pull:`1616`)
23-
* :py:meth:`~pvlib.irradiance.boland` is another diffuse fraction, DF,
23+
* :py:func:`~pvlib.irradiance.boland` is another diffuse fraction, DF,
2424
estimation method similar to Erbs but uses a single logistic exponential
2525
correlation between DF and clearness index, kt, that is continuously
2626
differentiable and bounded between zero and one. (:pull:`1179`)

0 commit comments

Comments
 (0)