IASI read_l2_v6 IDL Program

08MAY21
Latest version (v01AUG19): read_l2_v6.pro

Contents

Overview

read_l2_v6.pro is a self-contained IDL procedure for reading EUMETSAT IASI L2 .nat files, v6 format (used from Oct'14 onwards), typically with names like: IASI_SND_02_M02_[...]Z.nat

The procedure is run from the IDL command line and typically run twice, the first to extract a structure containing location and flags for all pixels in the file, and the second to extract profile data for selected locations.

A L2 file covers one orbit of data, typically 770 scan lines with 120 pixels (or FOVs) per scan line, so about 90 000 pixels in total.

Syntax

IDL> READ_L2_V6, L2FIL, LOC, L2DAT, /FORLI, GRD=GRD, FAIL=FAIL, ERRMSG=ERRMSG
Argument Type I/O Description
L2FIL STRING I Name of IASI L2 file to be read
LOC STRUCT(*) I/O Location data and flags for each pixel (I if L2DAT argument is present, O if absent) [Format]
L2DAT STRUCT(*) O Level 2 data for selected pixels [Format]
FORLI FLAG I (Optional) 1=include FORLI products, 0=exclude [see L2DAT format]
GRD STRUCT O (Optional) Profile,spectral grids for L2 products [Format]
FAIL FLAG O (Optional) 0=normal, 1=fatal error occurred [see Error Handling]
ERRMSG STRING O (Optional) Text describing fatal error, ' ' (empty string)=normal [see Error Handling]

Usage

For example:

IDL> READ_L2_V6, L2FIL, LOC
IDL> IDX = WHERE ( LOC.FLG_ITCONV EQ 5 ) 
IDL> READ_L2_V6, L2FIL, LOC[IDX], L2DAT 

The first call (without L2DAT argument) extracts the location and flag data for all pixels in the file.

The second line selects the subset of locations for which there is a good OEM retrieval (see p76, Table 37 of EUM/OPS-EPS/MAN/04/0033). Further selection, eg within particular lat/lon limits, can of course also be applied inside the WHERE ( )

The next call (with L2DAT argument) extracts the L2 data at the selected locations.

Error Handling

If the code detects an unexpected record size or file structure it stops, with a message printed to the terminal.

However, if being run as part of a larger suite of processing, it may be more convenient to have the procedure return control in such situations without stopping. For this, use the FAIL and/or ERRMSG keywords. For example:

IDL> READ_L2_V6, L2FIL, LOC, FAIL=FAIL, ERRMSG=ERRMSG
IDL> IF FAIL THEN PRINT, ERRMSG

LOC Structure

When the procedure is called with just two formal arguments (ie without L2DAT) the structure array LOC is created, with dimension equal to the number of pixels in the files (typically around 90 000 elements). This contains the location, time and flags for each pixel.

Variable Type Description Notes
LOC.LIN INT Scan line# (1:770, approx) (1)
LOC.FOV INT Field of View# (1:120) (1)
LOC.DAY UINT Day# since 1 Jan 2000 (=Day#0) - value for scan line (2)
LOC.MSC ULONG Milliseconds into day (0:86400000) - value for scan line (2)
LOC.LAT FLOAT Latitude (-90:90)
LOC.LON FLOAT Longitude (-180:180)
LOC.ZEN FLOAT Zenith angle at surface (0:59, approx)
LOC.SZA FLOAT Solar Zenith Angle (0:180, ≤90=daytime)
LOC.CLD FLOAT Percentage cloud cover (0:100) (3)
LOC.FLG_xxx BYTE or UINT L2 Flags (see EUM/OPS-EPS/MAN/04/0033 for list and definitions)
If called with the FORLI argument set, the following are also included
CO_QFLAG BYTE CO Retrieval Quality (4)
HNO3_QFLAG BYTE HNO3 Retrieval Quality (4)
O3_QFLAG BYTE O3 Retrieval Quality (4)
SO2_QFLAG BYTE SO2 Retrieval Quality (5)

Notes

  1. When used as an input (ie with L2DAT argument present) only the LOC.LIN and LOC.FOV values are read to identify pixels for which the full L2 data is to be extracted.
  2. Unlike L1 data, the L2 data does not have LOC.DAY and LOC.MSC assigned for the individual pixels, so the values here are taken from the Measurement Data Record (MDR, ie scan line), so identical for all pixels within a scan-line.
  3. LOC.CLD is constructed from summing the L2 FRACTIONAL_CLOUD_COVER fields
  4. For the FORLI CO product a value CO_QFLAG=0 indicates no retrieval, 1=acceptable quality, 2=good quality. (SAF/O3M/ULB/PUM/001). The HNO3 and O3 QFLAGs always seem to be always set to 0.
  5. For the BRESCIA SO2 product a value SO2_QFLAG=255 indicates no data, 9=Retrieval, 11=Model/forecast data (SAF/AC/ULB/PUM/002)

GRD Structure

When the procedure is called with the GRD argument present, the GRD structure is created, containing levels (mostly pressures) on which the L2 products are defined, also the spectral points at which the surface emissivity is defined. The information is taken from the single GIADR (=Global Internal Auxiliary Data Record) in each L2 file (see Table 8.4, p59 of
EUM/OPS-EPS/MAN/04/0033), converted to physical units. The GRD structure is only expected to change with new data versions.

Variable Type Description Nominal Value/Range Notes
GRD.NLT INT No. Temperature profile levels 101
GRD.PRE_T FLOAT Pressure levels [hPa] of temperature profiles 0.005 – 1100 hPa
GRD.NLQ INT No. Humidity profile levels 101
GRD.PRE_Q FLOAT Pressure levels [hPa] of Humidity profiles 0.005 – 1100 hPa
GRD.NLO INT No. Ozone profile levels 101
GRD.PRE_O FLOAT Pressure levels [hPa] of Ozone profiles 0.005 – 1100 hPa
GRD.NEW INT No. Wavenumbers for surface emissivity 12
GRD.WNO_S FLOAT Wavenumbers [cm-1] for surface emissivity 765.497 – 2759.99 [cm-1] (Note 1)
If called with the FORLI argument set, the following are also included
GRD.NL_CO INT No. partial layers for CO 19
GRD.HGT_CO FLOAT Heights [m] for CO partial layers -1, 1000, 2000, ... 18 000 [m] (Note 2)
GRD.NL_HNO3 INT No. partial layers for HNO3 19
GRD.HGT_HNO3 FLOAT Heights [m] for HNO3 partial layers -1, 1000, 2000, ... 18 000 [m] (Note 2)
GRD.NL_O3 INT No. partial layers for O3 40
GRD.HGT_O3 FLOAT Heights [m] for O3 partial layers -1, 1000, 2000, ... 39 000 [m] (Note 2)
GRD.NL_SO2 INT No. estimated SO2 plume heights 5
GRD.HGT_O3 FLOAT Heights [m] for estimated SO2 plumes 4000, 5000, ... 8000 [m]

Notes

  1. Within the L2 file the surface emissivity spectral points are actually in microns, but these are converted to wavenumber for the GRD.WNO_S structure.
  2. The FORLI altitude grids are stored as unsigned integers giving the maximum range 0 – 65535 m. However, the first/lowest value always seems to be 65535, so read_l2_v6.pro returns this as -1.0. Otherwise these are 1 km layers.

L2DAT Structure

If a third argument L2DAT is present in the call, this is interpreted as the instruction to return the L2DAT structure containing the L2 profile information at the locations LOC.LIN,LOC.FOV specified in the second argument (i.e. along-track and across-track coordinates). The data in the .nat file are from the Measurement Data Records (MDR), described in Section 8.5, p61–68 of
EUM/OPS-EPS/MAN/04/0033. The extracted data structure is as follows:

Variable Type Description Units Notes
L2DAT.TEM FLOAT(GRD.NLT) Atmospheric Temperature [K]
L2DAT.TEM_A FLOAT(GRD.NLT) A Priori Temperature [K]
L2DAT.TEM_AQ BYTE A Priori Tem Quality (Note 1)
L2DAT.H2O FLOAT(GRD.NLQ) Atmospheric Water Vapour [ppmv] (Note 2)
L2DAT.H2O_A FLOAT(GRD.NLQ) A Priori Water Vapour [ppmv]
L2DAT.H2O_AQ BYTE A Priori WV Quality (Note 1)
L2DAT.O3 FLOAT(GRD.NLO) Atmospheric Ozone [ppmv] (Note 2)
L2DAT.O3_A FLOAT(GRD.NLO) A Priori Ozone [ppmv] (Note 2)
L2DAT.O3_AQ BYTE A Priori O3 Quality (Note 1)
L2DAT.SFT FLOAT Surface Temperature [K]
L2DAT.SFT_A FLOAT A Priori Surface Temperature [K]
L2DAT.SFT_AQ BYTE A Priori Sfc.Tem Quality (Note 1)
L2DAT.H2O_COL FLOAT H2O Column [kg/m2]
L2DAT.O3_COL FLOAT O3 Column [kg/m2]
L2DAT.N2O_COL FLOAT N2O Column [kg/m2]
L2DAT.CO_COL FLOAT CO Column [kg/m2]
L2DAT.CH4_COL FLOAT CH4 Column [kg/m2]
L2DAT.CO2_COL FLOAT CO2 Column [kg/m2]
L2DAT.SFE FLOAT(GRD.NEW) Surface Emissivity
L2DAT.NCLD BYTE No. Cloud Formations (Note 3)
L2DAT.CLD FLOAT(3) Fractional Cloud Cover [%] (Note 3)
L2DAT.CTT FLOAT(3) Cloud Top Temperature [K] (Note 3)
L2DAT.CTP FLOAT(3) Cloud Top Pressure [hPa] (Note 3)
L2DAT.CPH BYTE(3) Cloud Phase (Note 3, 4)
L2DAT.SFP FLOAT Surface Pressure [hPa]
If called with the FORLI argument set, the following are also included
L2DAT.SURFACE_Z FLOAT Surface Altitude [m]
L2DAT.CO_QFLAG BYTE CO Retrieval Quality (Note 5)
L2DAT.CO_BDIV LONG CO Retrieval Flags (Note 6)
L2DAT.CO_NPCA BYTE N.Vectors describing characterisation matrix (Note 7)
L2DAT.CO_NFITLAYERS BYTE N.Layers actually retrieved (≤GRD.NL_CO)
L2DAT.CO_CP_AIR FLOAT(GRD.NL_CO) Air partial columns on each retrieved layer [molec/cm2]
L2DAT.CO_CP_CO_A FLOAT(GRD.NL_CO) A Priori CO partial columns [molec/cm2]
L2DAT.CO_CP FLOAT(GRD.NL_CO) Retrieved CO partial columns [molec/cm2] (Note 8)
Similarly for HNO3 and O3 but these seem to have QFLAG=0 and NFITLAYERS=0 indicating no data.

Notes

  1. For interpretation of the a priori quality indicators, see section 3.5.4 (p11) of EPS.MIS.SPE.980/760 (IASI Level 2: Product Format Specification).
  2. The L2 .nat file contains these as mass mixing ratios, but this procedure converts these to volume mixing ratios.
  3. The L2 .nat format allows for up to three different cloud formations but in practice a maximum 1 is used, so that L2DAT.NCLD is 0 or 1, and L2DAT.CLD[0] is the same as LOC.CLD.
  4. L2DAT.CPH values are 0=no cloud, 1=liquid, 2=ice, 3=mixed, 255=undefined
  5. CO_QFLAG is the same as returned in the LOC Structure
  6. CO_BDIV Flags are defined in Table 3, p12 of SAF/O3M/ULB/PUM/001
  7. See 5.2.2, p14 of SAF/O3M/ULB/PUM/001
  8. The L2 .nat format actually stores a profile of scaling factors representing the retrieved values as a multiple of the a priori values.