Skip to content

Commit c874000

Browse files
committed
more edits
1 parent 3e937ca commit c874000

File tree

2 files changed

+48
-29
lines changed

2 files changed

+48
-29
lines changed

docs/sphinx/source/clearsky.rst

Lines changed: 43 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,26 @@
33
Clear sky
44
=========
55

6-
Clear sky irradiance data is essential to many PV modeling tasks. Here, we
7-
review the clear sky modeling capabilities of pvlib-python. The
8-
:ref:`location` section demonstrates the easiest way to obtain a time
9-
series of clear sky data for a location. The :ref:`ineichen` and
10-
:ref:`simplified_solis` sections detail the clear sky algorithms and
11-
input data.
6+
This section reviews the clear sky modeling capabilities of
7+
pvlib-python.
8+
9+
pvlib-python supports two ways to generate clear sky irradiance:
10+
11+
1. A :py:class:`~pvlib.location.Location` object's
12+
:py:meth:`~pvlib.location.Location.get_clearsky` method.
13+
2. The functions contained within the :py:mod:`~pvlib.clearsky` module,
14+
including :py:func:`~pvlib.clearsky.ineichen` and
15+
:py:func:`~pvlib.clearsky.simplified_solis`.
16+
17+
Users that work with simple time series data may prefer to use
18+
:py:meth:`~pvlib.location.Location.get_clearsky`, while users
19+
that want finer control, more explicit code, or work with
20+
multidimensional data may prefer to use the basic functions.
21+
22+
The :ref:`location` subsection demonstrates the easiest
23+
way to obtain a time series of clear sky data for a location.
24+
The :ref:`ineichen` and :ref:`simplified_solis` subsections detail the
25+
clear sky algorithms and input data.
1226

1327
We'll need these imports for the examples below.
1428

@@ -40,7 +54,8 @@ The easiest way to obtain a time series of clear sky irradiance is to use a
4054
work of calculating solar position, extraterrestrial irradiance,
4155
airmass, and atmospheric pressure, as appropriate, leaving the user to
4256
only specify the most important parameters: time and atmospheric
43-
attenuation.
57+
attenuation. The time input must be a :py:class:`pandas.DatetimeIndex`,
58+
while the atmospheric attenuation inputs may be constants or arrays.
4459

4560
.. ipython:: python
4661
@@ -80,11 +95,12 @@ See the sections below for more detail on the clear sky models.
8095

8196
.. _ineichen:
8297

83-
Ineichen
84-
--------
98+
Ineichen and Perez
99+
------------------
85100

86-
The Ineichen and Perez clear sky model parameterizes irradiance
87-
in terms of the Linke turbidity [Ine02]_.
101+
The Ineichen and Perez clear sky model parameterizes irradiance in terms
102+
of the Linke turbidity [Ine02]_. pvlib-python implements this model in
103+
the :py:func:`pvlib.clearsky.ineichen` function.
88104

89105
Turbidity data
90106
^^^^^^^^^^^^^^
@@ -103,11 +119,12 @@ the year. You could run it in a loop to create plots for all months.
103119
filepath = os.path.join(pvlib_path, 'data', 'LinkeTurbidities.mat')
104120
105121
mat = scipy.io.loadmat(filepath)
122+
# data is in units of 20 x turbidity
106123
linke_turbidity_table = mat['LinkeTurbidity'] / 20.
107124
108125
month = 1
109126
plt.imshow(linke_turbidity_table[:, :, month-1], vmin=1, vmax=5);
110-
plt.title(calendar.month_name[1+month]);
127+
plt.title('Linke turbidity, ' + calendar.month_name[1+month]);
111128
plt.colorbar(shrink=0.5);
112129
plt.tight_layout();
113130
@savefig turbidity-1.png width=10in
@@ -117,7 +134,7 @@ the year. You could run it in a loop to create plots for all months.
117134
118135
month = 7
119136
plt.imshow(linke_turbidity_table[:, :, month-1], vmin=1, vmax=5);
120-
plt.title(calendar.month_name[month]);
137+
plt.title('Linke turbidity, ' + calendar.month_name[month]);
121138
plt.colorbar(shrink=0.5);
122139
plt.tight_layout();
123140
@savefig turbidity-7.png width=10in
@@ -129,9 +146,9 @@ turbidity value for that time at those coordinates. By default, the
129146
:py:func:`~pvlib.clearsky.lookup_linke_turbidity` function will linearly
130147
interpolate turbidity from month to month. This removes discontinuities
131148
in multi-month PV models. Here's a plot of a few locations in the
132-
Southwest U.S. with and without interpolation. We have intentionally
133-
shown points that are relatively close so that you can get a sense of
134-
the variability of the data set.
149+
Southwest U.S. with and without interpolation. We chose points that are
150+
relatively close so that you can get a better sense of the spatial
151+
variability of the data set.
135152

136153
.. ipython:: python
137154
@@ -174,7 +191,7 @@ A clear sky time series using basic pvlib functions.
174191
linke_turbidity = pvlib.clearsky.lookup_linke_turbidity(times, latitude, longitude)
175192
dni_extra = pvlib.irradiance.extraradiation(apparent_zenith.index.dayofyear)
176193
177-
# an input is a Series, so solis is a DataFrame
194+
# an input is a pandas Series, so solis is a DataFrame
178195
ineichen = clearsky.ineichen(apparent_zenith, airmass, linke_turbidity,
179196
altitude, dni_extra)
180197
ax = ineichen.plot();
@@ -183,9 +200,9 @@ A clear sky time series using basic pvlib functions.
183200
@savefig ineichen-vs-time-climo.png width=6in
184201
plt.show();
185202
186-
The function respects the input types. Array input results in an OrderedDict
187-
of array output, and Series input results in a DataFrame output. The keys
188-
are 'ghi', 'dni', and 'dhi'.
203+
The input data types determine the returned output type. Array input
204+
results in an OrderedDict of array output, and Series input results in a
205+
DataFrame output. The keys are 'ghi', 'dni', and 'dhi'.
189206

190207
Grid with a clear sky irradiance for a few turbidity values.
191208

@@ -239,7 +256,9 @@ Simplified Solis
239256
----------------
240257

241258
The Simplified Solis model parameterizes irradiance in terms of
242-
precipitable water and aerosol optical depth [Ine08ss]_.
259+
precipitable water and aerosol optical depth [Ine08ss]_. pvlib-python
260+
implements this model in the :py:func:`pvlib.clearsky.simplified_solis`
261+
function.
243262

244263
Aerosol and precipitable water data
245264
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -289,9 +308,9 @@ A clear sky time series using basic pvlib functions.
289308
@savefig solis-vs-time-0.1-1.png width=6in
290309
plt.show();
291310
292-
The function respects the input types. Array input results in an OrderedDict
293-
of array output, and Series input results in a DataFrame output. The keys
294-
are 'ghi', 'dni', and 'dhi'.
311+
The input data types determine the returned output type. Array input
312+
results in an OrderedDict of array output, and Series input results in a
313+
DataFrame output. The keys are 'ghi', 'dni', and 'dhi'.
295314

296315
Irradiance as a function of solar elevation.
297316

docs/tutorials/irradiance.ipynb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2371,21 +2371,21 @@
23712371
],
23722372
"metadata": {
23732373
"kernelspec": {
2374-
"display_name": "Python 3",
2374+
"display_name": "Python 2",
23752375
"language": "python",
2376-
"name": "python3"
2376+
"name": "python2"
23772377
},
23782378
"language_info": {
23792379
"codemirror_mode": {
23802380
"name": "ipython",
2381-
"version": 3
2381+
"version": 2
23822382
},
23832383
"file_extension": ".py",
23842384
"mimetype": "text/x-python",
23852385
"name": "python",
23862386
"nbconvert_exporter": "python",
2387-
"pygments_lexer": "ipython3",
2388-
"version": "3.5.1"
2387+
"pygments_lexer": "ipython2",
2388+
"version": "2.7.11"
23892389
}
23902390
},
23912391
"nbformat": 4,

0 commit comments

Comments
 (0)