Skip to content

Commit c1aaa3c

Browse files
committed
updates class
1 parent 7b28a20 commit c1aaa3c

6 files changed

+417
-580
lines changed

Tutorial 0 - Overview.ipynb

+1-1
Original file line numberDiff line numberDiff line change
@@ -455,7 +455,7 @@
455455
"name": "python",
456456
"nbconvert_exporter": "python",
457457
"pygments_lexer": "ipython3",
458-
"version": "3.11.7"
458+
"version": "3.12.7"
459459
}
460460
},
461461
"nbformat": 4,

Tutorial 1 - TMY Weather Data.ipynb

+384-559
Large diffs are not rendered by default.

Tutorial 2 - POA Irradiance and Module Temperature.ipynb

+32-20
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"![tutorialpromo](images/tutorial_banner.PNG)\n",
88
"\n",
99
"\n",
10-
"# Tutorial 2 - POA Irradiance & Module Temperature\n",
10+
"# Tutorial 2 - POA Irradiance \n",
1111
"\n",
1212
"This notebook shows how to use pvlib to transform the three irradiance components (GHI, DHI, and DNI) into POA irradiance, the main driver of a PV system. Then this POA and weather data will be used to calculate Module Temperature\n",
1313
"\n",
@@ -106,9 +106,17 @@
106106
},
107107
{
108108
"cell_type": "code",
109-
"execution_count": null,
109+
"execution_count": 1,
110110
"metadata": {},
111-
"outputs": [],
111+
"outputs": [
112+
{
113+
"name": "stdout",
114+
"output_type": "stream",
115+
"text": [
116+
"0.11.2\n"
117+
]
118+
}
119+
],
112120
"source": [
113121
"import pvlib\n",
114122
"import pandas as pd # for data wrangling\n",
@@ -129,7 +137,7 @@
129137
},
130138
{
131139
"cell_type": "code",
132-
"execution_count": null,
140+
"execution_count": 2,
133141
"metadata": {},
134142
"outputs": [],
135143
"source": [
@@ -140,7 +148,7 @@
140148
},
141149
{
142150
"cell_type": "code",
143-
"execution_count": null,
151+
"execution_count": 3,
144152
"metadata": {},
145153
"outputs": [],
146154
"source": [
@@ -184,14 +192,18 @@
184192
},
185193
{
186194
"cell_type": "code",
187-
"execution_count": 3,
195+
"execution_count": 4,
188196
"metadata": {},
189197
"outputs": [
190198
{
191-
"name": "stdout",
192-
"output_type": "stream",
193-
"text": [
194-
"We are looking at data from \"GREENSBORO PIEDMONT TRIAD INT\" , NC\n"
199+
"ename": "NameError",
200+
"evalue": "name 'metadata' is not defined",
201+
"output_type": "error",
202+
"traceback": [
203+
"\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
204+
"\u001b[1;31mNameError\u001b[0m Traceback (most recent call last)",
205+
"Cell \u001b[1;32mIn[4], line 1\u001b[0m\n\u001b[1;32m----> 1\u001b[0m \u001b[38;5;28mprint\u001b[39m(\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mWe are looking at data from \u001b[39m\u001b[38;5;124m\"\u001b[39m, metadata[\u001b[38;5;124m'\u001b[39m\u001b[38;5;124mName\u001b[39m\u001b[38;5;124m'\u001b[39m], \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124m,\u001b[39m\u001b[38;5;124m\"\u001b[39m, metadata[\u001b[38;5;124m'\u001b[39m\u001b[38;5;124mState\u001b[39m\u001b[38;5;124m'\u001b[39m])\n",
206+
"\u001b[1;31mNameError\u001b[0m: name 'metadata' is not defined"
195207
]
196208
}
197209
],
@@ -259,9 +271,9 @@
259271
"df_poa = pvlib.irradiance.get_total_irradiance(\n",
260272
" surface_tilt=20, # tilted 20 degrees from horizontal\n",
261273
" surface_azimuth=180, # facing South\n",
262-
" dni=df_tmy['DNI'],\n",
263-
" ghi=df_tmy['GHI'],\n",
264-
" dhi=df_tmy['DHI'],\n",
274+
" dni=df_tmy['dni'],\n",
275+
" ghi=df_tmy['ghi'],\n",
276+
" dhi=df_tmy['dhi'],\n",
265277
" solar_zenith=solar_position['apparent_zenith'],\n",
266278
" solar_azimuth=solar_position['azimuth'],\n",
267279
" model='isotropic')"
@@ -445,9 +457,9 @@
445457
"df_poa_tracker = pvlib.irradiance.get_total_irradiance(\n",
446458
" surface_tilt=tilt, # time series for tracking array\n",
447459
" surface_azimuth=azimuth, # time series for tracking array\n",
448-
" dni=df_tmy['DNI'],\n",
449-
" ghi=df_tmy['GHI'],\n",
450-
" dhi=df_tmy['DHI'],\n",
460+
" dni=df_tmy['dni'],\n",
461+
" ghi=df_tmy['ghi'],\n",
462+
" dhi=df_tmy['dhi'],\n",
451463
" solar_zenith=solar_position['apparent_zenith'],\n",
452464
" solar_azimuth=solar_position['azimuth'])\n",
453465
"tracker_poa = df_poa_tracker['poa_global']"
@@ -551,7 +563,7 @@
551563
"metadata": {},
552564
"outputs": [],
553565
"source": [
554-
"df_tmy['DryBulb'].head(24*7).plot()\n",
566+
"df_tmy['temp_air'].head(24*7).plot()\n",
555567
"cell_temperature.head(24*7).plot()\n",
556568
"plt.grid()\n",
557569
"plt.legend(['Dry Bulb', 'Cell Temperature'])\n",
@@ -572,8 +584,8 @@
572584
"metadata": {},
573585
"outputs": [],
574586
"source": [
575-
"temperature_difference = cell_temperature - df_tmy['DryBulb']\n",
576-
"plt.scatter(tracker_poa, temperature_difference, c=df_tmy['Wspd'])\n",
587+
"temperature_difference = cell_temperature - df_tmy['temp_air']\n",
588+
"plt.scatter(tracker_poa, temperature_difference, c=df_tmy['wind_speed'])\n",
577589
"plt.colorbar()\n",
578590
"# note you can use LaTeX math in matplotlib labels\n",
579591
"# compare \\degree\" with the unicode symbol above\n",
@@ -617,7 +629,7 @@
617629
"name": "python",
618630
"nbconvert_exporter": "python",
619631
"pygments_lexer": "ipython3",
620-
"version": "3.11.7"
632+
"version": "3.12.7"
621633
}
622634
},
623635
"nbformat": 4,

images/PVSC-50-03.png

-162 KB
Binary file not shown.

images/PVSC-52-HEADER.jpg

-50.3 KB
Binary file not shown.

images/tutorial_banner.PNG

-15.2 KB
Loading

0 commit comments

Comments
 (0)