Metop-B IASI - Total Column Carbon Monoxide - Level 2

The Infrared Atmospheric Sounding Interferometer (IASI) is an instrument onboard the Metop-B/C satellites. It was also previously aboard Metop-A. It provides information on the vertical structure of temperature and humidity as well as main atmospheric species.

This notebook provides you an introduction to data from Metop-B IASI. This dataset is used as a proxy for data from IASI-NG, a passive infrared sounder which has the capability to measure the temperature and water vapour profiles of the Earth’s atmosphere. IASI Level 2 data can be downloaded from the IASI portal.

The event featured is the August Complex fire in California, USA in 2020. This was the largest wildfire in CA history, spreading over 1,000,000 acres (over 4,000 sq km).

Basic Facts

Spatial resolution: 4 x 12-km coverage close to the centre of a 48 x 48 km2 cell (average sampling distance: 24 km)
Spatial coverage: Near global
Revisit time: less than one day
Data availability: since 2007

How to access the data

IASI Level 2 are disseminated in the netCDF format and can be downloaded via the IASI portal.


Load required libraries

import os
import xarray as xr
from datetime import datetime
import numpy as np
from netCDF4 import Dataset
import pandas as pd

# Python libraries for visualization
import matplotlib.pyplot as plt
import matplotlib.colors
import matplotlib.cm as cm
from matplotlib.axes import Axes
import cartopy
import cartopy.crs as ccrs
from cartopy.mpl.gridliner import LONGITUDE_FORMATTER, LATITUDE_FORMATTER
from cartopy.mpl.geoaxes import GeoAxes
GeoAxes._pcolormesh_patched = Axes.pcolormesh
from skimage import exposure

import warnings
warnings.filterwarnings('ignore')
warnings.simplefilter(action = "ignore", category = RuntimeWarning)

Load helper functions

%run ../functions.ipynb

Load and browse IASI Total Column Carbon Monoxide data

You can use the Python library xarray to access and manipulate datasets in netCDF format.

Xarray’s function xr.open_dataset enables you to open a netCDF file. Once loaded, you can inspect the data structure.

You see, that the data is a 3-dimensional vector with more than 540,000 individual entries for the time dimension. latitude, longitude and other parameters are stored as individual data variables.

iasi_file = xr.open_dataset('../data/iasi/co/2020/09/11/IASI_METOPB_L2_CO_20200911_ULB-LATMOS_V6.5.0.nc')

iasi_file
<xarray.Dataset>
Dimensions:                            (time: 542455, nlayers: 19, npressures: 20)
Coordinates:
  * time                               (time) float64 4.322e+08 ... 4.323e+08
Dimensions without coordinates: nlayers, npressures
Data variables: (12/21)
    time_string                        (time) |S16 ...
    time_in_day                        (time) float64 ...
    latitude                           (time) float32 ...
    longitude                          (time) float32 ...
    solar_zenith_angle                 (time) float32 ...
    satellite_zenith_angle             (time) float32 ...
    ...                                 ...
    CO_total_column                    (time) float32 ...
    CO_total_column_error              (time) float32 ...
    CO_degrees_of_freedom              (time) float32 ...
    air_partial_column_profile         (time, nlayers) float32 ...
    atmosphere_pressure_grid           (time, npressures) float32 ...
    averaging_kernel_matrix            (time, nlayers, nlayers) float32 ...
Attributes: (12/31)
    title:                       IASI/METOPB ULB-LATMOS carbon monoxide (CO) ...
    institution:                 ULB-LATMOS for algorithm development ; EUMET...
    product_version:             6.5.0
    history:                     2020-09-12 06:32:03 (date of data extraction...
    summary:                     This dataset contains Level 2 carbon monoxid...
    source:                      EUMETSAT IASI Level 2 carbon monoxide (CO) d...
    ...                          ...
    sensor:                      IASI
    spatial_resolution:          12km at nadir
    creator_type:                institution
    creator_name:                ULB-LATMOS
    contact_email:               contact form at http://iasi.aeris-data.fr/co...
    data_policy:                 see https://iasi.aeris-data.fr/data-use-policy/

Retrieve the variable ‘CO total column’ as xarray.DataArray

You can specify one variable of interest by putting the name of the variable into square brackets [] and get more detailed information about the variable. E.g. CO_total_column , which holds data values for total column carbon monoxide.

co = iasi_file['CO_total_column']
co
<xarray.DataArray 'CO_total_column' (time: 542455)>
[542455 values with dtype=float32]
Coordinates:
  * time     (time) float64 4.322e+08 4.322e+08 ... 4.323e+08 4.323e+08
Attributes:
    units:                                                  mol m-2
    long_name:                                              retrieved carbon ...
    standard_name:                                          atmosphere_mole_c...
    ancillary_variables:                                    CO_total_column_e...
    multiplication_factor_to_convert_to_molecules_per_cm2:  6.02214086e+19

Load data into a xarray.DataArray with the function generate_xr_from_1d_vec

With the help of the function generate_xr_from_1d_vec, you can generate a xarray.DataArray object, with latitude and longitude values as coordinates and the total column carbon monoxide information as data values. This data structure will be helpful for plotting and masking the data.

Further, you can retrieve the information for the variables long_name, unit and variable name from the attributes of the data object co.

iasi_co_da = generate_xr_from_1d_vec(file=iasi_file,
                                     lat_path='latitude', 
                                     lon_path='longitude',
                                     variable=co.data, 
                                     parameter_name=co.name, 
                                     longname=co.long_name, 
                                     no_of_dims=1, 
                                     unit=co.units)

iasi_co_da
<xarray.DataArray 'CO_total_column' (ground_pixel: 542455)>
array([0.03949106, 0.03213775, 0.04679925, ..., 0.03180185, 0.03522488,
       0.03115139], dtype=float32)
Coordinates:
    latitude   (ground_pixel) float32 8.665 8.915 8.798 ... 84.91 84.73 85.22
    longitude  (ground_pixel) float32 -47.95 -48.01 -48.49 ... -66.97 -54.55
Dimensions without coordinates: ground_pixel
Attributes:
    long_name:  retrieved carbon monoxide total column in mole/m2
    units:      mol m-2

Mask Total Column Carbon Monoxide data by quality flag

Load quality flag information

The IASI Level 2 data files provide you information on the quality for each data point. This information is useful to generate a quality mask and to mask out data points with a non sufficient quality.

In order to do so, you have to load the quality flag variable retrieval_quality_flag from the data file. The pixels with a quality flag = 2 are the most reliable pixels. Pixels with a quality flag = 1 or 0 shall be masked out.

qf = iasi_file['retrieval_quality_flag']
qf
<xarray.DataArray 'retrieval_quality_flag' (time: 542455)>
[542455 values with dtype=int32]
Coordinates:
  * time     (time) float64 4.322e+08 4.322e+08 ... 4.323e+08 4.323e+08
Attributes:
    long_name:  retrieval quality flag summarizing processing flags
    comment:    = 2 for the most reliable pixels; = 1 for the valuable pixels...

You can re-use the generate_xr_from_1d_vec function again in order to generate a xarray.DataArray with the quality flag information.

iasi_co_qf_da = generate_xr_from_1d_vec(file=iasi_file,
                                        lat_path='latitude', 
                                        lon_path='longitude', 
                                        variable=qf, 
                                        parameter_name=qf.name, 
                                        longname=qf.long_name, 
                                        no_of_dims=1, 
                                        unit='-')
iasi_co_qf_da
<xarray.DataArray 'retrieval_quality_flag' (ground_pixel: 542455)>
array([1, 1, 1, ..., 2, 2, 2], dtype=int32)
Coordinates:
    latitude   (ground_pixel) float32 8.665 8.915 8.798 ... 84.91 84.73 85.22
    longitude  (ground_pixel) float32 -47.95 -48.01 -48.49 ... -66.97 -54.55
Dimensions without coordinates: ground_pixel
Attributes:
    long_name:  retrieval quality flag summarizing processing flags
    units:      -

Mask the Total Column Carbon Monoxide data

The quality flag information can now be used to mask the xarray.DataArray with the data values. You can make use of the function generate_masked_array, where you can specify which pixels shall remain and which ones shall be eliminated. All data points with a quality flag = 2 shall be kept, all others shall be masked out.

You see that the number of data points reduced to just a bit less than 400,000 instead of more than 500,000.

iasi_co_masked = generate_masked_array(xarray=iasi_co_da,
                                       mask=iasi_co_qf_da,
                                       threshold=2,
                                       operator='=')
iasi_co_masked
<xarray.DataArray (ground_pixel: 392634)>
array([0.02875579, 0.0296423 , 0.03025403, ..., 0.03180185, 0.03522488,
       0.03115139], dtype=float32)
Coordinates:
    latitude   (ground_pixel) float32 9.989 10.37 10.54 ... 84.91 84.73 85.22
    longitude  (ground_pixel) float32 -43.75 -41.56 -41.6 ... -66.97 -54.55
Dimensions without coordinates: ground_pixel
Attributes:
    long_name:  retrieved carbon monoxide total column in mole/m2
    units:      mol m-2

Convert units of Total Column Carbon Monoxide data

The last step before visualizing the total column carbon monoxide information is to convert the data from mol/m2 to molecules/cm2. The loaded data variable co has an attribute called multiplication_factor_to_convert_to_molecules_per_cm2, which is used to convert the data values.

iasi_co_masked_converted = iasi_co_masked*co.multiplication_factor_to_convert_to_molecules_per_cm2
iasi_co_masked_converted 
<xarray.DataArray (ground_pixel: 392634)>
array([1.7317139e+18, 1.7851012e+18, 1.8219404e+18, ..., 1.9151522e+18,
       2.1212919e+18, 1.8759807e+18], dtype=float32)
Coordinates:
    latitude   (ground_pixel) float32 9.989 10.37 10.54 ... 84.91 84.73 85.22
    longitude  (ground_pixel) float32 -43.75 -41.56 -41.6 ... -66.97 -54.55
Dimensions without coordinates: ground_pixel

Visualize IASI Total Column Carbon Monoxide

You can visualize the IASI Total Column Carbon Monoxide data with the function visualize_scatter, which uses matplotlib’s scatterplot function. You can set an Orthographic() projection and focus on a region over California.

visualize_scatter(xr_dataarray=iasi_co_masked_converted, 
                  conversion_factor=1e-18,
                  projection=ccrs.Orthographic(-130,30), 
                  vmin=0, 
                  vmax=12, 
                  point_size=8, 
                  color_scale='afmhot_r', 
                  unit='*1e-18 molecules per cm2', 
                  title='Total Column Carbon Monoxide - 11 September 2020')
../_images/figure3_Metop-B_IASI_L2_CO_34_0.png

References

Return to the case study

Monitoring smoke transport with next-generation satellites from Metop-SG: Californian Wildfires Case Study
EPS-SG IASI-NG Carbon Monoxide