There are 2 ways to carry on with the workshop:
- Using Anaconda (on your computer, install required). This is the preferred way.
We will use Spyder (desktop, most advanced) and JupyterLab (notebooks, most user friendly) - Using a Binder (online). If you don't want to install python on your computer but still want to run the python examples.
You can run and modify code during the workshop, but changes are not saved. The Binder is that same as the Workshop notebook but you can run the code within.
Do the following BEFORE the beginning of the workshop (ideally the day before). This takes about 40 minutes, at reasonably good internet speed.
-
Install Anaconda, which is a free "bundle" of Python and many modules, libraries and other programs commonly used in scientific research. Please install Anaconda from here: https://www.anaconda.com/download. Install is free, but you need to create an account for the download.
-
Once Anaconda finishes installing, open the Anaconda Navigator. Sometimes this is automatically opened after the installation finishes. If not, search in the Windows Taskbar (in Mac, search in the Launchpad) for "Anaconda Navigator".
-
Once Anaconda Navigator is open, take a look at the available applications, find the application named “Spyder” (option 1a) and “JupyterLab”. If it is already installed, there will be a “Launch” button… if it is NOT installed, there will be a “Install” button. Make sure Spyder and JupyterLab are installed (by clicking on the ”Install” button)… but you may NOT want to “launch” it just yet. Wait until you finish installing the packages shown below.
-
Open the Anaconda Prompt (Windows) or Terminal (Mac). Easiest way is by searching in the Windows Taskbar the term "Anaconda Prompt" (Windows) or search in the Launchpad for "Terminal" (Mac). Then follow the next steps to install 3 modules (i.e. netcdf4, cartopy and cmocean):
- Install
netcdf4, by copy-pasting in the Anaconda Prompt (or Terminal):
-
Click [Enter]
-
If it asks you "are you sure?", type "y" and click [Enter] again.
-
Install
cartopy, by copy-pasting in the Anaconda Prompt (or Terminal):
-
Click [Enter]
-
If it asks you "are you sure?", type "y" and click [Enter] again.
-
Install
cmocean, by copy-pasting in the Anaconda Prompt (or Terminal):
- Click [Enter]
- If it asks you "are you sure?", type "y" and click [Enter] again.
-
Do this step only the day prior to the workshop, otherwise the link will not work. Get the workshop files from GitHub. Download the workshop repository from here: https://github.com/alaurent101/WYTEC2_Python_Workshop/archive/refs/heads/main.zip
Unzip the file anywhere on your computer and rename the folder WYTEC2_Python_Workshop. This will be the base location for the workshop.
-
On the day of the workshop you just have to open Anaconda and know the path to the workshop folder.
- On the day of the workshop, load the binder in your web browser
It should take a couple of minutes to load the tutorial and you'll be ready to go.
For this workshop you will need 3 programs (sometimes 4):
- Workshop notebook: It is this web-page, which has the instructions on what to do in the lab. If you are reading "this" you already found Workshop manual.
- Spyder: This is the desktop program that you will use to write and run Python code. We'll talk more about Spyder below.
- JupyterLab: This is the notebook program that you will also use to write and run Python code. We'll talk more about JupyterLab below.
- Terminal: Every once in a while you will need to install additional Python modules. This is done in the Terminal. More on this below.
In the first part of the workshop, you will be required to read along the Workshop notebook and copy-paste code from the Workshop notebook into Spyder to run it. This will create output in the form of numbers, graphs, maps, etc. So you will be jumping back and forth between the Workshop notebook and Spyder throughout the first part of the Workshop. If you chose the Binder option you can run the code directly from there.
In the second part of the workshop, we will work directly on the Workshop notebook with JupyterLab. If you chose the Binder it would look the same (online version).\