Logo
  • Home
  • About ESA Φ-lab CIN
  • CIN People
  • Opportunities
  • Projects
  • Φ-talks
  • News
→ THE EUROPEAN SPACE AGENCY
Exploring the SeasFire Data Cube

Exploring the SeasFire Data Cube

📆 Project Period
December, 2023
📍 GitHub
gitlab.esa.int

Introduction

The ESA-funded SeasFire project is exploring the potential of spatio-temporal asynchronous links happening between pre-occurring and non-overlapping atmospheric conditions and European fire regimes to predict the seasonal burned areas sizes in Europe by leveraging two major advancements of our time: 1) the availability of a huge amount of satellite data with a good spatio-temporal resolution, which will be used as fire drivers called the Earth system variables, and 2) the progress in Deep Learning (DL) and especially in graph and image based modelling frameworks, finding methods capable of capturing the spatio-temporal interactions of the Earth System variables.

SeasFire Data Cube

This Jupyter notebook reports an example of downloading the SeasFire dataset and doing basic analytics within the SeasFire Data Cube.

The SeasFire Data Cube is a scientific datacube for seasonal fire forecasting around the globe. Apart from seasonal fire forecasting, which is the aim of the datacube, it can also be used for several other tasks. For example, it can be used to model teleconnections and memory effects in the earth system. Additionally, it can be used to model emissions from wildfires and the evolution of wildfire regimes.

Getting started

To use the code and dataset locally, you'll need a few things:

  1. The code from the repository.
  2. The dataset.
  3. The python environment set up.
  4. Jupyterlab to run the notebook.

Cloning the repository

  • git clone https://gitlab.esa.int/ai4eo/esa-philab-group/seasfire.git

Installing the environment

  • conda create -n env_name
  • conda activate env_name
  • conda install ipykernel
  • python -m ipykernel install --user --name=env_name

Importing the required libraries

  • conda install pip
  • pip install -r requirements.txt

Running the notebook locally

  • jupyter lab
  • (select the kernel to match the environment setup for the project)

Managing the data

  • 1deg: (Size: 375MB approx): https://drive.google.com/drive/folders/1-yqhxp98YrCeg78vEeSM58r3EXO5BWwf?usp=drive_link
  • 0.25deg: (Size: 2GB approx): https://drive.google.com/drive/folders/1IhpWRJXGOMJbtUctfnImuj7kCixpYBfC?usp=drive_link

Download and extract the package from the links above. Rename and save the extracted folder in the /data folder as shown below:

  • 1deg: data/seasfire_1deg.zarr
  • 0.25deg: data/seasfire.zarr

Code

import xarray as xr
import zarr

ds = xr.open_zarr('../data/seasfire_1deg.zarr')
# ds = xr.open_zarr('../data/seasfire.zarr')

Plot the NDVI of a particular 8-day period

%%time
ds.ndvi[100].plot(cmap="RdYlGn", vmax=1, vmin=-1)
image

Plot the land surface temperature of a particular place for year 2019

%%time
ds.sel(longitude=36, latitude=40, method='nearest').sel(time=slice('2019-01-01', '2020-01-01')).lst_day.plot()
image

How's the soil water volume (level 1) in the Mediterranean so cells that are 25% forest?

%%time
ds.where(ds.lccs_class_2>25).sel(longitude=slice(-13, 33), latitude=slice(45, 31))['swvl1'].mean(dim=('longitude', 'latitude')).plot()
image

Let's look at the yearly mean instead

%%time
ds.where(ds.lccs_class_2>25).sel(longitude=slice(-13, 33), latitude=slice(45, 31))['swvl1'].resample(time='1Y').mean().mean(dim=('longitude', 'latitude')).plot()
image

How much has the average sea surface temperature changed in the Mediterranean in the last 20 years?

%%time
ds.sel(longitude=slice(-13, 33), latitude=slice(45, 31))['sst'].mean(dim=('longitude', 'latitude')).plot()
image

Let's look at the yearly mean instead

%%time
ds.resample(time='1Y').mean().sel(longitude=slice(-13, 33), latitude=slice(45, 31))['sst'].mean(dim=('longitude', 'latitude')).plot()
image

Let's plot the time series of the total burned areas for the Mediterranean region

%%time
ds.sel(longitude=slice(-13, 33), latitude=slice(45, 31))['gwis_ba'].sum(dim=('longitude', 'latitude')).plot()
image

What about the CO2 emissions from wildfires in the same region?

%%time
ds.sel(longitude=slice(-13, 33), latitude=slice(45, 31))['cams_co2fire'].mean(dim=('longitude', 'latitude')).plot()
image
Logo

About ESA EO

About CIN

About Pi School

ESA Φ-lab Website

ESA Φ-lab Linkedin community

Copyright 2025 @ European Space Agency. All rights reserved.

LinkedInXGitHubInstagramFacebookYouTube