|
| 1 | + |
| 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 | +[](<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 | +[](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