GOME2_NO2_2024_banner.png

Title

This notebook is an AC SAF notebook prepared by BIRA-IASB (Gaia Pinardi, Hugues Brenot), on illustrating the use of volcanic SO2 GOME-2 data:

A sample zip file is provided with this notebook and instructions on how to register and download more data from the AC SAF archive are also provided below.

AC SAF recomend the usage of HARP for reading, filtering, and gridding as shown below. Other classical options (i.e., xarray) are shown in a companion notebook (also available here: https://acsaf.org/notebooks.php).

We thanks MariLiza Koukouli (AUTH) for discussions and input.

Table of Contents

This notebook contains several sections:

Data description

Documentation

The GOME-2/MetOp total column products are generated at DLR in the framework of EUMETSAT’s AC SAF.

For information and access to all AC SAF products, please refer to the AC SAF web page and help desk: AC SAF Web page: http://acsaf.org AC SAF Helpdesk: helpdesk@acsaf.org

Additional information can be found in EUMETSAT's product Navigator accessible through the following link: http://navigator.eumetsat.int

Current and historical quick look images as well as value added products generated by DLR are available at: http://atmos.eoc.dlr.de/gome2

The ATBD (Algorithm Theoretical Basis Documents) and PUM (PRODUCT USER MANUAL) are available here: https://acsaf.org/docs/atbd/Algorithm_Theoretical_Basis_Document_NTO_OTO_Nov_2019.pdf and https://acsaf.org/docs/pum/Product_User_Manual_NTO_OTO_Nov_2019.pdf

Data download is described here: https://acsaf.org/offline_access.php and rely on accessing an ftp server.

Downloading test data

For this example, the data are included in the zip folder available with this notebook: SO2.zip

save then the zip folder into the data folder, at the same level than this notebook

Data files

The GOME-2 GDP 4.8/4.9 L2 reprocessed datafiles are structures as one file per orbit, ie 15 files per day:

image.png

HDF5 Product Format Description

The product content comprises the following groups:

image.png

Several gases are provided into the same orbital file, as mentionned in the file name:

i.e., GOME_O3-NO2-NO2Tropo-BrO-SO2-H2O-HCHO_L2_20181201134102_051_METOPA_62878_DLR_06.HDF5 will include O3, NO2, NO2Tropo, BrO, SO2, H2O and HCHO data.

In the TOTAL_COLUMNS, the final VCD values are given for all the gases, in a order specified in the file name and in the variable /META_DATA/MainSpecies:

image.png

In addition, each gas has his own specific variables within the DETAILED_RESULTS group.

SO2 specific information

GOME-2 reports SO2 VCDs under several plume-height hypotheses, since the retrieved column depends strongly on this a-priori assumption. The 4 standard assumed layer heights are 15 km, 6 km, 2 km and 1 km.

The highest altitudes are usually relevant for the volcanic cases, while the lower altitudes are targetting anthropogenic emissions. The recommendation is to interpolate between the SO2 VCD provided at the different altitudes, for the altitude that best match the situation of interest.

In order to be able to do this, we recommend to read the VCD in the DETAILED_RESULTS/SO2 group:

image.png

The order of the altitudes is provided in the PlumeHeights variable in the same SO2 group.

Imports

Standard library / numerics / IO imports for what follows: h5py/netCDF4/xarray to read the HDF5 file with three different approaches, numpy for arrays, cf_units for unit handling, datetime/warnings as usual helpers (glob for multi-file patterns, matplotlib/cartopy for the maps built later).

These imports support several parallel approaches shown later in the notebook: xarray/h5py to read the HDF5 file directly, cartopy/matplotlib (with the PolyCollection/GeoAxes patch) to draw the satellite pixels as true geolocated polygons (not just points), numpy.ma and scipy.ndimage.label for the noise/background filtering of the SO2 signal, and math/calendar/datetime for the date and solar-angle calculations used to build the SZA quality flag. warnings.filterwarnings("ignore") silences library warnings (convenient here, but worth removing if you need to debug something upstream).

How to setup HARP

**What is HARP?** HARP (https://atmospherictoolbox.org/harp/) is **one of the best tools to read GOME-2 ACSAF Level-2 HDF5 products**, because it already contains built-in ingestion definitions for many satellite products (including GOME-2, OMI, TROPOMI). **HARP converts the native product structure into a standardized format so that different instruments have the same variable names and dimensions.**

HARP is a toolkit for reading, processing and inter-comparing satellite remote sensing data, model data, in-situ data, and ground based remote sensing data, and it contains interface descriptions to AC SAF data files. The toolkit is composed of a set of command line tools, a C library of analysis functions, and direct interfaces to Python, R, IDL, and MATLAB.

Install HARP (Python interface)

Typical install in a conda environment and check that it works:

conda install -c conda-forge harp

Imports the (just-installed) package

There are several possibilities in python to read an HDF5 file.

We refer here to illustrations presented in the NO2 notebook (https://acsaf.org/notebooks.php) both using HARP or xarray. In the following, we will show the use of both without many explanation.

Define some useful variables

constants/unit conversions

In order to later turn an SO2 column (in DU) into an SO2 mass in kilotonnes once combined with a pixel area, we need a few physical conversion factors: Dobson Units (DU) to molecules/m², to mass (kt, kg/m²), using Avogadro's number and the molar mass of SO2 (64.066 g/mol). We provide the unit conversions here

nice colorbar for SO2

We build an SO2-specific colour scale (white → violet → cyan → green → yellow → orange → red → dark red) with a non-linear, piecewise normalization (PiecewiseNorm). The colorbar bounds (bounds = [0, 0.5, 1, 1.5, 2, 3, 4, 5, 6, 8, 10]) are irregular, so a standard linear normalization would crowd out the low values; PiecewiseNorm stretches every interval to the same visual width regardless of its actual size in DU, so both the background noise and concentrated plumes stay visible on the same map.

define some functions

We define here some functions that we will use to calculate SO2 mass, visualize footprints, calculate date from julian date, ...

Utility functions used further down:

start the routine

Reading the data

Here we points at a some sample orbit files of GOME-2 data on the downloaded and unzipped folder, builds the selected instrument and period and then lists the matching files on disk as a quick existence check before opening anything.

There are several possibilities in python to read an HDF5 file.

We refer here to illustrations presented in the NO2 notebook (https://acsaf.org/notebooks.php) both using HARP or xarray. In the following, we will show the use of both without many explanation.

select instrument and period

Defines the parameters of this run: which satellite (metop), which orbit/time (period, format YYYYMMDDHHMMSS), which SO2 layer height to assume (SO2LH, in km — lower for anthropogenic sources, higher for volcanic plumes), and which region (region). The values are hard-coded here, with several alternative example cases left commented out for quick switching.

Norilsk and Kivu/DR Congo are the two pre-configured cases for anthropogenic emission and volcanic emissions, respectively.

get the data from the path and separate the file name into its different parts

read the data with HARP (and do filtering directly)

You can find here https://stcorp.github.io/harp/doc/html/ingestions/index.html all the ingestions definitions. More particularly, for the GOME-2 AC SAF trace gases product: https://stcorp.github.io/harp/doc/html/ingestions/GOME2_L2_O3MOTO.html

you will find the common HARP conventions, and the mapping from the original product:

image.png