Commit 9e17ecc1 authored by Julia Wagemann's avatar Julia Wagemann
Browse files

Material for workshop on wildfire monitoring

parent 58ccf801
%% Cell type:markdown id: tags:
<img src='./img/fire_workshop_banner.png' alt='Logo EU Copernicus EUMETSAT' align='centre' width='90%'></img>
%% Cell type:markdown id: tags:
<br>
%% Cell type:markdown id: tags:
## Workshop and Data Discovery
%% Cell type:markdown id: tags:
# Existing and new generation earth observation based products for wildfire monitoring and forecast
%% Cell type:markdown id: tags:
Jointly organized by [EUMETSAT](https://www.eumetsat.int/website/home/index.html), [CAMS-ECMWF](https://atmosphere.copernicus.eu/), [AC SAF](https://acsaf.org/), [LSA SAF](https://landsaf.ipma.pt/en/), with support from [Copernicus](https://www.copernicus.eu/en)
%% Cell type:markdown id: tags:
<br>
%% Cell type:markdown id: tags:
The **user workshop on wildfire monitoring and forecast** is a an online event aiming to inform about existing and upcoming datasets for detection of `fire`, `related emissions` and `impacts`.
The course is a combination of expert webinars and two 'data disovery' sessions introducing you to different satellite- and model-based data for wildfire monitoring. The 'data discovery' sessions has the following outline
* 25 May | 14:00-15:30 (CEST): **Data discovery - Satellite-based data**
* 26 May | 14:00-15:30 (CEST): **Data discovery - Portugal fires 2020 workflow**
%% Cell type:markdown id: tags:
<br>
%% Cell type:markdown id: tags:
## Data on wildfire monitoring
%% Cell type:markdown id: tags:
This course features the following data:
* **Satellite-based data products**
* AC-SAF Metop-A/B GOME-2 Level-2 data: [Absorbing Aerosol Index (AAI)](./11_AC-SAF_Metop-AB_GOME-2_AAI.ipynb) and [Absorbing Aerosol Height (AAH)](./12_AC-SAF_Metop-AB_GOME-2_AAH.ipynb)
* LSA-SAF data: [EDLST, FRP_PIXEL, NDVI](./41_LSA-SAF.ipynb)
* Metop-A/B IASI Level-2 data: [Carbon Monoxide](./13_Metop-AB_IASI_CO.ipynb)
* Copernicus Sentinel-5P TROPOMI Level 2 data: [Ultraviolett Aerosol Index](./13_Metop-AB_IASI_CO.ipynb) and [Carbon Monoxide](./31_Sentinel-5P_TROPOMI_CO.ipynb)
* Copernicus Sentinel-3 OLCI Level-1B data: [Red-Green-Blue (RGB) radiances](./21_Sentinel-3_OLCI_RGB.ipynb)
* Copernicus Sentinel-3 SLSTR Level 2 data: [Fire Radiative Power](./22_Sentinel-3_SLSTR_FRP.ipynb)
* **Model-based data products**
* Copernicus Atmosphere Monitoring Service (CAMS) | Global Fire Assimilation System (GFAS): [Fire Radiative Power](./51_CAMS_GFAS_FRPFIRE.ipynb)
* Copernicus Emergency Management Service (CEMS) | Global ECMWF Fire Forecasts (GEFF): [Fire Weather Index](./61_CEMS_GEFF_FWI_data_overview.ipynb)
%% Cell type:markdown id: tags:
<br>
%% Cell type:markdown id: tags:
## Course material
%% Cell type:markdown id: tags:
The course outline follows the sequence of data types introduced during the webinars in the morning:
* **0 - Introduction to the practical course content**
* [Introduction to Python and Project Jupyter](./01_introduction_to_python_and_jupyter.ipynb)
* [Overview of data and data access systems](./02_atmospheric_composition_overview.ipynb)
* **1 - AC SAF and Metop-A/B/C GOME-2 and IASI data**
* [1.1 AC SAF Metop-ABC GOME-2 AAI](./11_AC-SAF_Metop-AB_GOME-2_AAI.ipynb)
* [1.2 AC SAF Metop-B GOME-2 AAH](./12_AC-SAF_Metop-AB_GOME-2_AAH.ipynb)
* [1.3 Metop-AB IASI CO](./13_Metop-AB_IASI_CO.ipynb)
* **2 - Copernicus Sentinel-3 data**
* [2.1 Sentinel-3 OLCI Level-1 RGB](./21_Sentinel-3_OLCI_RGB.ipynb)
* [2.2 Sentinel-3 SLSTR Fire Radiative Power](./22_Sentinel-3_SLSTR_FRP.ipynb)
* **3 - Copernicus Sentinel-5P data**
* [3.1 Sentinel-5P TROPOMI CO](./31_Sentinel-5P_TROPOMI_CO.ipynb)
* [3.2 Sentinel-5P TROPOMI UVAI](./32_Sentinel-5P_TROPOMI_UVAI.ipynb)
* **4 - LSA SAF data products for fire monitoring**
* [4.1 LSA SAF data products for fire monitoring](./41_LSA-SAF.ipynb)
* **5 - Copernicus Atmosphere Monitoring Service (CAMS) data**
* [5.1 CAMS Global Fire Assimilation System (GFAS) FRPFIRE](./51_CAMS_GFAS_FRPFIRE.ipynb)
* **6 - Global ECMWF Fire Forecasting (GEFF) data**
* [6.1 GEFF data overview](./61_CEMS_GEFF_FWI_data_overview.ipynb)
* [6.2 GEFF harmonized danger classes](./62_CEMS_GEFF_FWI_harmonized_danger_classes.ipynb)
* [6.3 GEFF custom danger classes](./63_CEMS_GEFF_FWI_custom_danger_classes.ipynb)
* **7 - Practical Workflow - Portugal fires 2020**
* [7.1 Case study - Portugal Fires - Summer 2020](./71_workflow_portugal_fires_2020.ipynb)
<br>
**NOTE:** Throughout the course, general functions to `load`, `re-shape`, `process` and `visualize` the datasets are defined. These functions are re-used when applicable. The [functions notebook](./functions.ipynb) gives you an overview of all the functions defined and used for the course.
%% Cell type:markdown id: tags:
<br>
%% Cell type:markdown id: tags:
## Learning outcomes
%% Cell type:markdown id: tags:
The course is designed for `medium-level users`, who have basic Python knowledge and understanding of Fire monitoring data.
After the course, you should have:
* an idea about the **different datasets on Fire Monitoring data**,
* knowledge about the most useful **Python packages** to handle, process and visualise large volumes of Earth Observation data
* an idea about how the **data can help to detect and monitor fire events**
%% Cell type:markdown id: tags:
<hr>
%% Cell type:markdown id: tags:
## Access to the `JupyterHub`
%% Cell type:markdown id: tags:
The course material is made available on a JupyterHub instance, a pre-defined environment that gives learners direct access to the data and Python packages required for following the course.
The `JupyterHub` can be accessed as follows:
%% Cell type:markdown id: tags:
* Web address: [https://training.ltpy.adamplatform.eu](https://training.ltpy.adamplatform.eu)
* Create an account: [https://login.ltpy.adamplatform.eu/](https://login.ltpy.adamplatform.eu/)
* Log into the `JupyterHub` with your account created.
%% Cell type:markdown id: tags:
<hr>
%% Cell type:markdown id: tags:
<img src='./img/copernicus_logo.png' alt='Logo EU Copernicus' align='right' width='20%'><br><br><br><br>
<p style="text-align:right;">This project is licensed under the <a href="./LICENSE">MIT License</a> and is developed under a Copernicus contract.
%% Cell type:markdown id: tags:
<img src='./img/logo_fire_workshop.png' alt='Logo EU Copernicus EUMETSAT' align='right' width='40%'></img>
%% Cell type:markdown id: tags:
<br>
%% Cell type:markdown id: tags:
<a href="./00_index.ipynb"><< Index</a><span style="float:right;"><a href="./02_atmospheric_composition_overview.ipynb">02 - Atmospheric Composition Data - Overview and data access >></a>
%% Cell type:markdown id: tags:
# Optional: Introduction to Python and Project Jupyter
%% Cell type:markdown id: tags:
## Project Jupyter
%% Cell type:markdown id: tags:
<div class="alert alert-block alert-success" align="center">
<b><i>"Project Jupyter exists to develop open-source software, open-standards, and services for interactive computing across dozens of programming languages."</i></b>
</div>
%% Cell type:markdown id: tags:
<br>
%% Cell type:markdown id: tags:
Project Jupyter offers different tools to facilitate interactive computing, either with a web-based application (`Jupyter Notebooks`), an interactive development environment (`JupyterLab`) or via a `JupyterHub` that brings interactive computing to groups of users.
<br>
%% Cell type:markdown id: tags:
<center><img src='./img/jupyter_environment.png' alt='Logo Jupyter environment' width='60%'></img></center>
%% Cell type:markdown id: tags:
* **Jupyter Notebook** is an open-source web application that allows you to create and share documents that contain live code, equations, visualizations and narrative text.
* **JupyterLab 1.0: Jupyter’s Next-Generation Notebook Interface** <br> JupyterLab is a web-based interactive development environment for Jupyter notebooks, code, and data.
* **JupyterHub** <br>JupyterHub brings the power of notebooks to groups of users. It gives users access to computational environments and resources without burdening the users with installation and maintenance tasks. <br> Users - including students, researchers, and data scientists - can get their work done in their own workspaces on shared resources which can be managed efficiently by system administrators.
%% Cell type:markdown id: tags:
<hr>
%% Cell type:markdown id: tags:
## Why Jupyter Notebooks?
%% Cell type:markdown id: tags:
* Started with Python support, now **support of over 40 programming languages, including Python, R, Julia, ...**
* Notebooks can **easily be shared via GitHub, NBViewer, etc.**
* **Code, data and visualizations are combined in one place**
* A great tool for **teaching**
* **JupyterHub allows you to access an environment ready to code**
%% Cell type:markdown id: tags:
## Installation
%% Cell type:markdown id: tags:
### Installing Jupyter using Anaconda
%% Cell type:markdown id: tags:
Anaconda comes with the Jupyter Notebook installed. You just have to download Anaconda and following the installation instructions. Once installed, the jupyter notebook can be started with:
%% Cell type:code id: tags:
``` python
jupyter notebook
```
%% Cell type:markdown id: tags:
### Installing Jupyter with pip
%% Cell type:markdown id: tags:
Experienced Python users may want to install Jupyter using Python's package manager `pip`.
With `Python3` you do:
%% Cell type:code id: tags:
``` python
python3 -m pip install --upgrade pip
python3 -m pip install jupyter
```
%% Cell type:markdown id: tags:
In order to run the notebook, you run the same command as with Anaconda at the Terminal :
%% Cell type:code id: tags:
``` python
jupyter notebook
```
%% Cell type:markdown id: tags:
## Jupyter notebooks UI
%% Cell type:markdown id: tags:
* Notebook dashboard
* Create new notebook
* Notebook editor (UI)
* Menu
* Toolbar
* Notebook area and cells
* Cell types
* Code
* Markdown
* Edit (green) vs. Command mode (blue)
%% Cell type:markdown id: tags:
<br>
<div style='text-align:center;'>
<figure><img src='./img/notebook_ui.png' width='100%'/>
<figcaption><i>Notebook editor User Interface (UI)</i></figcaption>
</figure>
</div>
%% Cell type:markdown id: tags:
## Shortcuts
%% Cell type:markdown id: tags:
Get an overview of the shortcuts by hitting `H` or go to `Help/Keyboard shortcuts`
%% Cell type:markdown id: tags:
#### Most useful shortcuts
%% Cell type:markdown id: tags:
* `Esc` - switch to command mode
* `B` - insert below
* `A` - insert above
* `M` - Change current cell to Markdown
* `Y` - Change current cell to code
* `DD` - Delete cell
* `Enter` - go back to edit mode
* `Esc + F` - Find and replace on your code
* `Shift + Down / Upwards` - Select multiple cells
* `Shift + M` - Merge multiple cells
%% Cell type:markdown id: tags:
## Cell magics
%% Cell type:markdown id: tags:
Magic commands can make your life a lot easier, as you only have one command instead of an entire function or multiple lines of code.<br>
> Go to an [extensive overview of magic commands]()
%% Cell type:markdown id: tags:
### Some of the handy ones
%% Cell type:markdown id: tags:
**Overview of available magic commands**
%% Cell type:code id: tags:
``` python
%lsmagic
```
%% Cell type:markdown id: tags:
**See and set environment variables**
%% Cell type:code id: tags:
``` python
%env
```
%% Cell type:markdown id: tags:
**Install and list libraries**
%% Cell type:code id: tags:
``` python
!pip install numpy
!pip list | grep pandas
```
%% Cell type:markdown id: tags:
**Write cell content to a Python file**
%% Cell type:code id: tags:
``` python
%%writefile hello_world.py
print('Hello World')
```
%% Cell type:markdown id: tags:
**Load a Python file**
%% Cell type:code id: tags:
``` python
%pycat hello_world.py
```
%% Cell type:markdown id: tags:
**Get the time of cell execution**
%% Cell type:code id: tags:
``` python
%%time
tmpList = []
for i in range(100):
tmpList.append(i+i)
print(tmpList)
```
%% Cell type:markdown id: tags:
**Show matplotlib plots inline**
%% Cell type:code id: tags:
``` python
%matplotlib inline
```
%% Cell type:markdown id: tags:
<br>
%% Cell type:markdown id: tags:
## Sharing Jupyter Notebooks
%% Cell type:markdown id: tags:
### Sharing static Jupyter Notebooks
%% Cell type:markdown id: tags:
* [nbviewer](https://nbviewer.jupyter.org/) - A simple way to share Jupyter Notebooks. You can simply paste the GitHub location of your Jupyter notebook there and it is nicely rendered.
* [GitHub](https://github.com/) - GitHub offers an internal rendering of Jupyter Notebooks. There are some limitations and time delays of the proper rendering. Thus, we would suggest to use `nbviewer` to share nicely rendered Jupyter Notebooks.
%% Cell type:markdown id: tags:
### Reproducible Jupyter Notebooks
%% Cell type:markdown id: tags:
<img src="./img/mybinder_logo.png" align="left" width="30%"></img>
[Binder](https://mybinder.org/) allows you to open notebooks hosted on a Git repo in an executable environment, making the code immediately reproducible by anyone, anywhere.
Binder builds a Docker image of the repo where the notebooks are hosted.
%% Cell type:markdown id: tags:
<br>
%% Cell type:markdown id: tags:
## Ressources
%% Cell type:markdown id: tags:
* [Project Jupyter](https://jupyter.org/)
* [JupyterHub](https://jupyterhub.readthedocs.io/en/stable/)
* [JupyterLab](https://jupyterlab.readthedocs.io/en/stable/)
* [nbviewer](https://nbviewer.jupyter.org/)
* [Binder](https://mybinder.org/)
%% Cell type:markdown id: tags:
<br>
%% Cell type:markdown id: tags:
<a href="./00_index.ipynb"><< Index</a><span style="float:right;"><a href="./02_atmospheric_composition_overview.ipynb">02 - Atmospheric Composition Data - Overview and data access >></a>
%% Cell type:markdown id: tags:
<hr>
%% Cell type:markdown id: tags:
<img src='./img/copernicus_logo.png' alt='Logo EU Copernicus' align='right' width='20%'><br><br><br><br>
<p style="text-align:right;">This project is licensed under the <a href="./LICENSE">MIT License</a> and is developed under a Copernicus contract.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment