Skip to content

Commit 7b28a20

Browse files
committed
initial push not updated
0 parents  commit 7b28a20

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+7405
-0
lines changed

.gitignore

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
.ipynb_checkpoints
2+
*.py
3+
*.html
4+
5+
_build/
6+
venv/

LICENSE

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
BSD 3-Clause License
2+
3+
Copyright (c) 2024, Mark Mikofski, Silvana Ovaitt
4+
All rights reserved.
5+
6+
Redistribution and use in source and binary forms, with or without
7+
modification, are permitted provided that the following conditions are met:
8+
9+
1. Redistributions of source code must retain the above copyright notice, this
10+
list of conditions and the following disclaimer.
11+
12+
2. Redistributions in binary form must reproduce the above copyright notice,
13+
this list of conditions and the following disclaimer in the documentation
14+
and/or other materials provided with the distribution.
15+
16+
3. Neither the name of the copyright holder nor the names of its
17+
contributors may be used to endorse or promote products derived from
18+
this software without specific prior written permission.
19+
20+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
24+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
26+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
27+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
28+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
17.3 MB
Binary file not shown.

PBL_Case 1.ipynb

+58
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
{
2+
"cells": [
3+
{
4+
"cell_type": "markdown",
5+
"id": "8439c511",
6+
"metadata": {},
7+
"source": [
8+
"![tutorial banner](images/tutorial_banner.PNG)\n",
9+
"\n",
10+
"\n",
11+
"\n",
12+
"# 2024 PVSC - Problem Based Learning\n",
13+
"\n",
14+
"\n",
15+
"### Goal: Model a PV Module's energy loss due to high wind stowing\n",
16+
"\n",
17+
"\n"
18+
]
19+
},
20+
{
21+
"cell_type": "code",
22+
"execution_count": null,
23+
"id": "6ebe8f10",
24+
"metadata": {},
25+
"outputs": [],
26+
"source": []
27+
},
28+
{
29+
"cell_type": "code",
30+
"execution_count": null,
31+
"id": "630f207d-fc45-48b0-860c-c459db22df2b",
32+
"metadata": {},
33+
"outputs": [],
34+
"source": []
35+
}
36+
],
37+
"metadata": {
38+
"kernelspec": {
39+
"display_name": "Python 3 (ipykernel)",
40+
"language": "python",
41+
"name": "python3"
42+
},
43+
"language_info": {
44+
"codemirror_mode": {
45+
"name": "ipython",
46+
"version": 3
47+
},
48+
"file_extension": ".py",
49+
"mimetype": "text/x-python",
50+
"name": "python",
51+
"nbconvert_exporter": "python",
52+
"pygments_lexer": "ipython3",
53+
"version": "3.11.7"
54+
}
55+
},
56+
"nbformat": 4,
57+
"nbformat_minor": 5
58+
}

PBL_Case 2.ipynb

+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
{
2+
"cells": [
3+
{
4+
"cell_type": "markdown",
5+
"id": "8439c511",
6+
"metadata": {},
7+
"source": [
8+
"![tutorial banner](images/tutorial_banner.PNG)\n",
9+
"\n",
10+
"\n",
11+
"\n",
12+
"# 2024 PVSC - Problem Based Learning 2\n",
13+
"\n",
14+
"\n",
15+
"### Goal: Model the first Scenario of the PVPMC 2021 Modeling Challenge!\n",
16+
"\n",
17+
"Weather File: data/TMY3_Albuquerque_NM.csv\n",
18+
"\n",
19+
"![RoundRobin Scen2](images/PVPMC_RoundRobin2021_Scen2_1.PNG)"
20+
]
21+
}
22+
],
23+
"metadata": {
24+
"kernelspec": {
25+
"display_name": "Python 3 (ipykernel)",
26+
"language": "python",
27+
"name": "python3"
28+
},
29+
"language_info": {
30+
"codemirror_mode": {
31+
"name": "ipython",
32+
"version": 3
33+
},
34+
"file_extension": ".py",
35+
"mimetype": "text/x-python",
36+
"name": "python",
37+
"nbconvert_exporter": "python",
38+
"pygments_lexer": "ipython3",
39+
"version": "3.11.7"
40+
}
41+
},
42+
"nbformat": 4,
43+
"nbformat_minor": 5
44+
}

README.md

+122
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,122 @@
1+
![tutorialpromo](images/tutorial_banner.PNG)
2+
3+
# 2024 PVSC Python Tutorial
4+
Welcome! The goal of this tutorial is to introduce attendees to open-source modeling of PV systems and their production.
5+
The tutorial is divided into 3 sections:
6+
7+
## Section 1: 1.25 hr
8+
This section will introduce the tutorial facilitators, the Jupyter and Google-Collab platform, and python. Then we will proceed to a working example.
9+
The working example will have you use an APIs to download weather data, and use this to model sun position and hten irradiance at surface of a module (POA).
10+
We will wrap up with modeling module's temperature.
11+
This is covered by tutorials 0 - 2.
12+
* [**Tutorial 0**: Overview](https://colab.research.google.com/github/PV-Tutorials/2024_PVSC/blob/main/Tutorial%200%20-%20Overview.ipynb)
13+
* [**Tutorial 1**: TMY Weather Data](https://colab.research.google.com/github/PV-Tutorials/2024_PVSC/blob/main/Tutorial%201%20-%20TMY%20Weather%20Data.ipynb)
14+
* [**Tutorial 2**: POA Irradiance and Module Temperature](https://colab.research.google.com/github/PV-Tutorials/2024_PVSC/blob/main/Tutorial%202%20-%20POA%20Irradiance%20and%20Module%20Temperature.ipynb)
15+
16+
## Section 2: 1 hr
17+
This will be a problem based learning, where you will calculate a pv module power output by taking code from section 1, and adding new code from the documentation provided.
18+
This section will be in small teams created during the session based on skill level. Facilitators will roam around supporting.
19+
This is covered by tutorial PBL 1.
20+
* [**Tutorial PBL - 1**: Model power output of a module](https://colab.research.google.com/github/PV-Tutorials/2024_PVSC/blob/main/PBL_Case%201.ipynb)
21+
22+
## Section 3: 0.5 hrs
23+
We will go over other open-source tools, and examples available in this tutorial for you to peruse afterwards.
24+
25+
We hope that at the end of this tutorial you will
26+
-Have a basic understanding of python, how to run it in the online platform.
27+
-Be able to identify and use source of weather data, even through a fancy API.
28+
-Know how to code-- in other words copy and paste, and read documentation-- for four functions from Pvlib.
29+
-Have enough knowledge to do the appendix tutorials on your own if you want to deepen your knowledge
30+
-Have a clearer understanding of what pvlib does, and what other open source tools are there for you to use.
31+
32+
## Appendix Tutorials:
33+
* [**Tutorial A**: Model output power from a single module](https://colab.research.google.com/github/PV-Tutorials/2024_PVSC/blob/main/Tutorial%20A%20-%20Model%20a%20Module's%20Performance.ipynb)
34+
* [**Tutorial B**: Combine modules to form strings, calculate inverter efficiency
35+
and total array output](https://colab.research.google.com/github/PV-Tutorials/2024_PVSC/blob/main/Tutorial%20B%20-%20Array%20Power.ipynb)
36+
* [**Tutorial C**: Single diode model ](https://colab.research.google.com/github/PV-Tutorials/2024_PVSC/blob/main/Tutorial%20C%20-%20Single%20Diode%20Model.ipynb)
37+
* [**Tutorial D**: Open-source tool: pvfree](https://colab.research.google.com/github/PV-Tutorials/2024_PVSC/blob/main/Tutorial%20D%20-%20pvfree.ipynb)
38+
* [**Tutorial E**: Using the powerful due-diligence software SAM via pySAM](https://colab.research.google.com/github/PV-Tutorials/2024_PVSC/blob/main/Tutorial%20E%20-%20PySAM%20Financial%20Model.ipynb)
39+
40+
* **Tutorials Appendices**: More tutorials on a variety of fun topics
41+
42+
## What you will need for the tutorial during the live session (June 9th)
43+
44+
During this tutorials, we hope you get to play with the code. A laptop is ideal, but we have had students doing them through their phones or tablets, or joining in with a peer.
45+
You will NOT have to install anything on your computer if you don't want, as we will be running the tutorial in Google Collab. However, you WILL need to be logged-in to a google account to run the tutorials online.
46+
Alternatively, you can install on your computer (instructions below).
47+
48+
49+
## Tutorial Setup
50+
These tutorials are made with [Jupyter](https://jupyter.org), which is a
51+
browser based interactive Python notebook that allows you to run the tutorials
52+
in the cloud without any additional setup. On the day of the tutorial, we will
53+
use [Google Colaboratory](https://colab.research.google.com/).
54+
55+
### Google Colaboratory
56+
To run these tutorials in [Google Colaboratory](https://colab.research.google.com/)
57+
you can click the button below:
58+
59+
<a target="_blank" href="https://colab.research.google.com/github/PV-Tutorials/2024_PVSC/blob/main/Tutorial%200%20-%20Overview.ipynb">
60+
<img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/>
61+
</a>
62+
63+
You can also select Colaboratory from the launch icon at the top of each tutorial
64+
in the [Jupyter book](https://pvsc-tutorials.github.io/2024_PVSC/index.html).
65+
66+
#### Installing Requirements
67+
When using Google Colaboratory, you must uncomment the first cell that installs
68+
the tutorial requirements.
69+
70+
!pip install -r https://raw.githubusercontent.com/PVSC-Tutorials/2024_PVSC/main/requirements.txt
71+
72+
### Jupyter Books
73+
74+
The full tutorial is hosted as a [Jupyter book](https://jupyterbook.org/intro.html).
75+
This book has navigation, search, and can be used to launch each book in Colaboratory.
76+
77+
[![Jupyter Book Badge](https://jupyterbook.org/badge.svg)](<https://PV-Tutorials.github.io/2024_PVSC/index.html>)
78+
79+
### My Binder
80+
81+
The tutorials will remain available on GitHub, and you can run
82+
the tutorial anytime in [Binder](https://mybinder.org) by clicking the
83+
following link:
84+
85+
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/PV-Tutorials/2024_PVSC/main)
86+
87+
### Locally
88+
89+
You can also run the tutorial locally with
90+
[miniconda](https://docs.conda.io/en/latest/miniconda.html) by following thes
91+
steps:
92+
93+
1. Install [miniconda](https://docs.conda.io/en/latest/miniconda.html).
94+
95+
1. Clone the repository:
96+
97+
```
98+
git clone https://github.com/PV-Tutorials/2024_PVSC.git
99+
```
100+
101+
1. Create the environment and install the requirements. The repository includes
102+
a `requirements.txt` file that contains a list the packages needed to run
103+
this tutorial. To install them using conda run:
104+
105+
```
106+
conda create -n pvsc2024 jupyter -c pvlib --file requirements.txt
107+
conda activate pvsc2024
108+
```
109+
110+
1. Start a Jupyter session:
111+
112+
```
113+
jupyter notebook
114+
```
115+
116+
1. Use the file explorer in Jupyter lab to browse to `2024_PVSC`
117+
and start the first Tutorial.
118+
119+
120+
### Licensing
121+
122+
<a rel="license" href="http://creativecommons.org/licenses/by/4.0/"><img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by/4.0/88x31.png" /></a><br />This work is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by/4.0/">Creative Commons Attribution 4.0 International License</a>.

0 commit comments

Comments
 (0)