Skip to content

Commit 90119fc

Browse files
committed
review
1 parent 70d5d5f commit 90119fc

File tree

1 file changed

+123
-7
lines changed

1 file changed

+123
-7
lines changed

docs/notebooks/2.3 Dust Soiling with Kimber.ipynb

Lines changed: 123 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,12 @@
77
"source": [
88
"July 2024 was an exceptional month in terms of irradiance anomalies in North America. In one of [Solcast's weekly PVMag publications](https://www.pv-magazine.com/2024/08/02/aerosols-from-wildfires-slash-north-american-solar-production/) we have highlighted how irradiance was severely impacted in the north west of the continent by aerosols deriving from the raging Canadian wildfires.\n",
99
"\n",
10-
"In addition to the reduced irradiance from the aerosol's absorption, another factor to take into account into the overall impact of these aerosols on solar generation is dust soiling as the accumulated particles block or scatter incident light, further reducing power output.\n",
10+
"In addition to the reduced irradiance from the aerosol's absorption, another factor to take into account into the overall impact of these aerosols on solar generation is dust soiling as the accumulated particles block or scatter incident light, further reducing power output. The Solcast API allows the user to specify the dust-derived losses:\n",
11+
"- in the `rooftop_pv_power` the `loss_factor` parameter effectively captures the non-temperature loss effects on the nameplate rating of the PV system, including inefficiency and soiling\n",
12+
"- in the `advanced_pv_power` the `apply_dust_soiling` is a user-override for the dust soiling average computed by Solcast. If you specify this parameter in your API call, the API will replace the site's annual or monthly average dust soiling values with the value you specify in your API call.E.g. if you specify a 0.7 dust soiling, your returned power will be reduced by 70%.\n",
1113
"\n",
12-
"In this tutorial we are going to see how we can model aerosols using the `pvlib` python toolbox and Solcast's weather data while trying to see the impact of these aerosols on a site that may have been affected by these wildfires.\n",
14+
"\n",
15+
"In this tutorial we are going to see how we can model dust soiling using the `pvlib` python toolbox and Solcast's weather data while trying to see the impact of these aerosols on a site that may have been affected by these wildfires.\n",
1316
"\n",
1417
"First off, install `pvlib`."
1518
]
@@ -21,7 +24,7 @@
2124
"metadata": {},
2225
"outputs": [],
2326
"source": [
24-
"!pip install pvlib"
27+
"#!pip install pvlib folium"
2528
]
2629
},
2730
{
@@ -35,6 +38,7 @@
3538
"import datetime\n",
3639
"import matplotlib.pyplot as plt\n",
3740
"import pandas as pd\n",
41+
"import folium\n",
3842
"from pvlib.iotools import solcast\n",
3943
"from pvlib.soiling import kimber\n",
4044
"\n",
@@ -55,11 +59,121 @@
5559
"execution_count": 3,
5660
"id": "386742a4-c8d2-42a3-ab9e-55bbd0aebef6",
5761
"metadata": {},
58-
"outputs": [],
62+
"outputs": [
63+
{
64+
"data": {
65+
"text/html": [
66+
"<div style=\"width:100%;\"><div style=\"position:relative;width:100%;height:0;padding-bottom:60%;\"><span style=\"color:#565656\">Make this Notebook Trusted to load map: File -> Trust Notebook</span><iframe srcdoc=\"&lt;!DOCTYPE html&gt;\n",
67+
"&lt;html&gt;\n",
68+
"&lt;head&gt;\n",
69+
" \n",
70+
" &lt;meta http-equiv=&quot;content-type&quot; content=&quot;text/html; charset=UTF-8&quot; /&gt;\n",
71+
" \n",
72+
" &lt;script&gt;\n",
73+
" L_NO_TOUCH = false;\n",
74+
" L_DISABLE_3D = false;\n",
75+
" &lt;/script&gt;\n",
76+
" \n",
77+
" &lt;style&gt;html, body {width: 100%;height: 100%;margin: 0;padding: 0;}&lt;/style&gt;\n",
78+
" &lt;style&gt;#map {position:absolute;top:0;bottom:0;right:0;left:0;}&lt;/style&gt;\n",
79+
" &lt;script src=&quot;https://cdn.jsdelivr.net/npm/[email protected]/dist/leaflet.js&quot;&gt;&lt;/script&gt;\n",
80+
" &lt;script src=&quot;https://code.jquery.com/jquery-3.7.1.min.js&quot;&gt;&lt;/script&gt;\n",
81+
" &lt;script src=&quot;https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js&quot;&gt;&lt;/script&gt;\n",
82+
" &lt;script src=&quot;https://cdnjs.cloudflare.com/ajax/libs/Leaflet.awesome-markers/2.0.2/leaflet.awesome-markers.js&quot;&gt;&lt;/script&gt;\n",
83+
" &lt;link rel=&quot;stylesheet&quot; href=&quot;https://cdn.jsdelivr.net/npm/[email protected]/dist/leaflet.css&quot;/&gt;\n",
84+
" &lt;link rel=&quot;stylesheet&quot; href=&quot;https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css&quot;/&gt;\n",
85+
" &lt;link rel=&quot;stylesheet&quot; href=&quot;https://netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap-glyphicons.css&quot;/&gt;\n",
86+
" &lt;link rel=&quot;stylesheet&quot; href=&quot;https://cdn.jsdelivr.net/npm/@fortawesome/[email protected]/css/all.min.css&quot;/&gt;\n",
87+
" &lt;link rel=&quot;stylesheet&quot; href=&quot;https://cdnjs.cloudflare.com/ajax/libs/Leaflet.awesome-markers/2.0.2/leaflet.awesome-markers.css&quot;/&gt;\n",
88+
" &lt;link rel=&quot;stylesheet&quot; href=&quot;https://cdn.jsdelivr.net/gh/python-visualization/folium/folium/templates/leaflet.awesome.rotate.min.css&quot;/&gt;\n",
89+
" \n",
90+
" &lt;meta name=&quot;viewport&quot; content=&quot;width=device-width,\n",
91+
" initial-scale=1.0, maximum-scale=1.0, user-scalable=no&quot; /&gt;\n",
92+
" &lt;style&gt;\n",
93+
" #map_ee29c184f7f382cb237f06858d36fe2d {\n",
94+
" position: relative;\n",
95+
" width: 100.0%;\n",
96+
" height: 100.0%;\n",
97+
" left: 0.0%;\n",
98+
" top: 0.0%;\n",
99+
" }\n",
100+
" .leaflet-container { font-size: 1rem; }\n",
101+
" &lt;/style&gt;\n",
102+
" \n",
103+
"&lt;/head&gt;\n",
104+
"&lt;body&gt;\n",
105+
" \n",
106+
" \n",
107+
" &lt;div class=&quot;folium-map&quot; id=&quot;map_ee29c184f7f382cb237f06858d36fe2d&quot; &gt;&lt;/div&gt;\n",
108+
" \n",
109+
"&lt;/body&gt;\n",
110+
"&lt;script&gt;\n",
111+
" \n",
112+
" \n",
113+
" var map_ee29c184f7f382cb237f06858d36fe2d = L.map(\n",
114+
" &quot;map_ee29c184f7f382cb237f06858d36fe2d&quot;,\n",
115+
" {\n",
116+
" center: [48.30783, -105.1017],\n",
117+
" crs: L.CRS.EPSG3857,\n",
118+
" zoom: 5,\n",
119+
" zoomControl: true,\n",
120+
" preferCanvas: false,\n",
121+
" }\n",
122+
" );\n",
123+
"\n",
124+
" \n",
125+
"\n",
126+
" \n",
127+
" \n",
128+
" var tile_layer_d8b24bb1bf8ecea85ad47dea671e116c = L.tileLayer(\n",
129+
" &quot;https://tile.openstreetmap.org/{z}/{x}/{y}.png&quot;,\n",
130+
" {&quot;attribution&quot;: &quot;\\u0026copy; \\u003ca href=\\&quot;https://www.openstreetmap.org/copyright\\&quot;\\u003eOpenStreetMap\\u003c/a\\u003e contributors&quot;, &quot;detectRetina&quot;: false, &quot;maxNativeZoom&quot;: 19, &quot;maxZoom&quot;: 19, &quot;minZoom&quot;: 0, &quot;noWrap&quot;: false, &quot;opacity&quot;: 1, &quot;subdomains&quot;: &quot;abc&quot;, &quot;tms&quot;: false}\n",
131+
" );\n",
132+
" \n",
133+
" \n",
134+
" tile_layer_d8b24bb1bf8ecea85ad47dea671e116c.addTo(map_ee29c184f7f382cb237f06858d36fe2d);\n",
135+
" \n",
136+
" \n",
137+
" var marker_9686a3c1f458b9d351b882524a6b678f = L.marker(\n",
138+
" [48.30783, -105.1017],\n",
139+
" {}\n",
140+
" ).addTo(map_ee29c184f7f382cb237f06858d36fe2d);\n",
141+
" \n",
142+
" \n",
143+
" var popup_75250b2d29fdbca20625e7d5b57b0851 = L.popup({&quot;maxWidth&quot;: &quot;100%&quot;});\n",
144+
"\n",
145+
" \n",
146+
" \n",
147+
" var html_9915ab855585f124eb817b981327b775 = $(`&lt;div id=&quot;html_9915ab855585f124eb817b981327b775&quot; style=&quot;width: 100.0%; height: 100.0%;&quot;&gt;Fort Peck&lt;/div&gt;`)[0];\n",
148+
" popup_75250b2d29fdbca20625e7d5b57b0851.setContent(html_9915ab855585f124eb817b981327b775);\n",
149+
" \n",
150+
" \n",
151+
"\n",
152+
" marker_9686a3c1f458b9d351b882524a6b678f.bindPopup(popup_75250b2d29fdbca20625e7d5b57b0851)\n",
153+
" ;\n",
154+
"\n",
155+
" \n",
156+
" \n",
157+
"&lt;/script&gt;\n",
158+
"&lt;/html&gt;\" style=\"position:absolute;width:100%;height:100%;left:0;top:0;border:none !important;\" allowfullscreen webkitallowfullscreen mozallowfullscreen></iframe></div></div>"
159+
],
160+
"text/plain": [
161+
"<folium.folium.Map at 0x7f7e8d08fa60>"
162+
]
163+
},
164+
"execution_count": 3,
165+
"metadata": {},
166+
"output_type": "execute_result"
167+
}
168+
],
59169
"source": [
60170
"# Surfrad's Fort Peck\n",
61171
"latitude, longitude = 48.30783,\t-105.1017\n",
62-
"start, end = \"2024-05-01T04:00:00\", \"2024-08-01T04:00:00\" "
172+
"start, end = \"2024-05-01T04:00:00\", \"2024-08-01T04:00:00\" \n",
173+
"\n",
174+
"map = folium.Map(location=[latitude, longitude], zoom_start=5) \n",
175+
"folium.Marker([latitude, longitude], popup=\"Fort Peck\").add_to(map)\n",
176+
"map"
63177
]
64178
},
65179
{
@@ -371,13 +485,15 @@
371485
"id": "aebc90fe-e944-403d-8872-d2652c7c57a8",
372486
"metadata": {},
373487
"source": [
374-
"The result is that, given our soiling rate assumptions, the soiling losses are 1/3 or less of the losses that this site would have seen during this period if a bi weekly cleaning schedule was to be implemented."
488+
"The result is that, given our soiling rate assumptions, the soiling losses are 1/3 or less of the losses that this site would have seen during this period if a biweekly cleaning schedule was to be implemented.\n",
489+
"\n",
490+
"You could now take a look at the example `2.1 PVLib - ModelChain with Solcast weather data.ipynb` where we show calculating AC power with `pvlib` and you could model the power as a function of the different soiling losses."
375491
]
376492
},
377493
{
378494
"cell_type": "code",
379495
"execution_count": null,
380-
"id": "4fe2ea12-ecbe-4619-82bc-f77bf2ce4a13",
496+
"id": "05435d9a-52fc-4394-be02-dcecb753ec81",
381497
"metadata": {},
382498
"outputs": [],
383499
"source": []

0 commit comments

Comments
 (0)