MORSE L1C Pre-processors

16OCT26

Introduction

MORSE requires a pre-processor to convert satellite spectra from their original format to a common input format: the MORSE L1C file (a plain text file).

Currently there are six such pre-processors, all written in Python.
IASI_L1C Convert IASI L1C .nat data (EUMETSAT format)
CRIS_L1C Convert CrIS L1B data (netCDF format)
MIPAS_L1C Convert L1B data (ESA format)
HIROS_L1C Convert HIROS L1B data (netCDF)
HSDI_L1C Convert HSDI L1B data (netCDF)
HIROSGB_L1C Convert HIROS_GB L1B data (netCDF)

These are written in Python (also IDL versions).

IASI_L1C

Source: [iasi_l1c.py] plus [nloc_iasi_l1c.py] [orb_class.py] [iasi_l1c_class.py] [iasi_l2_class.py] [read_ral.py] [l1c_hdr.py] [jday.py]
Overview
The program can be run just using the IASI .nat file as input, but also allows for two different types of colocated IASI L2 products (RAL and Eumetsat) to be used to provide additional information, in which case the output is further restricted to the L2 locations; also allows for surface emissivity data to be extracted from the U Wisconsin database.
iasi_l1c ( inpfil, outfil, wnobnd, \ latlim=None, lonlim=None, cldlim=None, avhchn=None, \ el2fil=None, el2atm=None, el2sfc=None, el2cld=None, \ ralfil=None, ralatm=None, ralsfc=None, ralcld=None, \ emsfil=None )
Parameters
ArgumentType Description Units Range
Mandatory
inpfil Str Name of IASI .nat input file
outfil Str Name of output MORSE .l1c file
wnobnd Flt(:,2) Lower,Upper Wavenumber limits for each output band[1] cm-1 645–2760
Optional
latlim Flt(2) Min,Max Latitude limits deg N ±90[2]
lonlim Flt(2) Min,Max Longitude limits[3] deg E ±180[2]
cldlim Flt(2) Min,Max Cloud fraction [4] % 0–100[2]
avhchn Str(:) List of AVHRR channels for cluster data [5] ∈{'1','2','3A','3B','4','5'}
el2fil Str Name of Eumetsat L2 input file for colocated output [6]
el2atm Str Name of new orbital file containing colocated Eumetsat L2 profiles [7]
el2sfc Str Name of new orbital file containing colocated Eumetsat L2 surface parameters [8]
ralfil Str(:) Name of RAL L2 netCDF file(s) for colocated output [6]
ralatm Str Name of new orbital file containing colocated RAL L2 profiles [7]
ralsfc Str Name of new orbital file containing colocated RAL surface parameters [8]
ralcld Str Name of new orbital file containing colocated RAL cloud parameters [9]
Notes
  1. wnobnd: Usually this would just be a 2 element array giving the lower and upper wavenumber limits of the part of the IASI spectrum required. However it can also be used to extract multiple ranges.

  2. The defaults for latlim, lonlim and cldlim are to use the full range of values. However the default values for the iasi_l1c input parameters are set to 'None' since 'not checking' values is distinct, and quicker, than 'checking' values are within a range.

  3. lonlim: First element is west boundary of longitude limit so, for example, [170,-170] selects 20 degree span of longitudes from 170E to 170W

  4. cldlim: This can be used to exclude pixels where the cloud cover, as defined by the Cloud Fraction field in the IASI L1C .nat file, is above e.g. 50% cldlim=[0,50]. It could also be used to set the minimum cloud cover, eg 90% cldlim=[90,100], but that is probably less useful.

  5. avhchn: IASI .nat files contain cluster analyses from colocated AVHRR channels, which can be used by MORSE for modelling partly-cloudy fields-of-view. Use avhchn=['4','5'] to extract cluster analyses for channels 4 (10.7μm) and 5 (12.0μm), which are the only two channels currently used by MORSE (data from any other channels are ignored).

  6. el2fil, ralfil: If either a Eumetsat L2 .nat file or RAL L2 netCDF file (or a list of RAL filenames) containing IASI L2 products is supplied, the L1C output will be limited to just those pixels where the L2 contains valid temperature retrievals.

  7. el2atm (requires el2fil) or ralatm (requires ralfil) are the names of .orb format output files which will contain the profile information extracted from the Eumetsat/RAL L2 files, colocated with the L1C data.

  8. el2sfc (requires el2fil) or ralsfc (requires ralfil) are names of .orb format output files which will contain the surface information extracted from the Eumetsat/RAL L2 files, colocated with the L1C data.

  9. el2cld (requires el2fil) or ralcld (requires ralfil) is the name of an .orb format output file which will contain the cloud information extracted from the Eumetsat/RAL L2 files.

CRIS_L1C

Source: [
cris_l1c_class.py]
Overview
The program can be run just using the CrIS L1B netCDF files but if cloud information is required it is necessary to including the (matching) imager files from the VIIRS instrument. All files are split into 6 min granules so the software allows for a large number of files to be combined to form a single L1C file.
from cris_l1c_class import Cris_L1c Cris_L1c ( l1blst, outfil, \ imgdir=None, imgchn=None, noifil=None, \ wnobnd=None, latlim=None, lonlim=None, cldlim=None )
Parameters
ArgumentType Description Units Range
Mandatory
inpfil Str or [Str] Name or list of names of input CrIS L1B netCDF file(s) eg SNDR.J2.CRIS*L1B*.nc
outfil Str Name of output MORSE .l1c file
Optional
imgdir Str Directory containing imager files[1]
noifil Str Name of output CrIS .noi (noise) file[2]
wnobnd (Flt(2)) (List of) Lower,Upper Wavenumber limits for each output band[3] cm-1 [648.75,1096.25],
[1208.75,1751.25],
[2153.75,2551.25]
latlim Flt(2) Min,Max Latitude limits deg N [−90,+90][4]
lonlim Flt(2) Min,Max Longitude limits[5] deg E [−180,+180][4]
cldlim Flt(2) Min,Max Cloud fraction [6] % [0,100][4]
imgchn Str(:) List of VIIRS channels for cluster data [7] ∈{'M12', 'M13', 'M14', 'M15', 'M16', 'I04', 'I05'}
Notes
  1. imgdir: To use cloud or imager cluster data it is also necessary to load the VIIRS data. Only the directory needs to be specified since the program will attempt to construct the matching IMG filename from the L1B filename, which means matching the CrIS filename up to 'L1B' and replacing that with 'IMG'.

  2. noifil: Every CrIS L1B file contains a noise spectrum. Where multiple CrIS files are used this will be an average of all these spectra, weighted by the number of pixels extracted from each file.

  3. wnobnd: Usually this would just be a 2 element array giving the lower and upper wavenumber limits of the part of the CRIS spectrum required. However it can also be used to extract multiple ranges. Each pair must lie within one of the CrIS bands listed under "Range".

  4. latlim, lonlim and cldlim: defaults are to use full range of values, i.e., no limits.

  5. lonlim: First element is west boundary of longitude limit so, for example, [170,-170] selects 20 degree span of longitudes from 170E to 170W

  6. cldlim: This can be used to exclude pixels where the cloud cover, as defined by the viirs_cloud_frac field in the IMG file (converted to a percentage) is above e.g. 50% cldlim=[0,50]. It could also be used to set the minimum cloud cover, eg 90% cldlim=[90,100], but that is probably less useful.

  7. imgchn: CrIS IMG files contain cluster analyses from colocated AVHRR channels, which can be used by MORSE for modelling partly-cloudy fields-of-view. For each channel L1C file will contain the brightness temperatures of the clear and cloudy parts of each pixel, as well as fractions.

MIPAS_L1C

Source: [
mipas_l1c.py] plus [mipas_l1b_class.py]
Overview
The Python function reads a MIPAS L1B file and a list of microwindows, apodises the spectra and extracts the microwindows writing them as a MIPAS L1C file.
mipas_l1c ( l1bfil, micfil=micfil, l1cfil=l1cfil )
Parameters
ArgumentType Description
Mandatory
l1bfil Str Name of MIPAS L1B input file
Optional
micfil Str Microwindow list file [1]
l1cfil Str Name of L1C output file (input for MORSE)[2]
Notes
  1. micfil: The list of required microwindows in .mic file format. If absent the program simply returns headers for each sweep (=spectrum) in the L1B file.
  2. l1cfil: The default output filename is MIP_ooooo.l1c where ooooo is the Absolute Orbit Number.

HIROS_L1C

Source: [
l1c_hiros.py] plus [l1b_hiros_class.py]
Overview
The Python function converts a HIROS L1B file to a MORSE L1C file.
l1c_hiros ( l1bfil, l1cfil, altmin=altmin, altmax=altmax )
Arguments
ArgumentType Description
Mandatory
l1bfil Str Name of HIROS L1B input file (netCDF)
l1cfil Str Name of L1C output file (input for MORSE)
Optional
altmin Flt Minimum tangent altitude [km] [1]
altmax Flt Maximum tangent altitude [km] [1]
Notes
  1. By default the L1C file will contain the full range of tangent altitudes in the L1B file, but the user has the option of restricting the altitude range to those actually required by the retrieval (to reduce the file size).

HSDI_L1C

Source: [
l1c_hsdi.py] plus [l1b_hsdi_class.py]
Overview
The Python function converts an HSDI L1B file to a MORSE L1C file.
l1c_hsdi ( l1bfil, l1cfil, altmin=altmin, altmax=altmax, chnlst=chnlst )
Arguments
ArgumentType Description
Mandatory
l1bfil Str Name of HSDI L1B input file (netCDF)
l1cfil Str Name of L1C output file (input for MORSE)
Optional
altmin Flt Minimum tangent altitude [km] [1]
altmax Flt Maximum tangent altitude [km] [1]
chnlst [Str] Subset of required channels [2]
Notes
  1. By default the L1C file will contain the full range of tangent altitudes in the L1B file, but the user has the option of restricting the altitude range to those actually required by the retrieval (to reduce the file size).

  2. By default the L1C file contains all channels in the L1B file, but a subset of channels can be selected here, eg CHNLST=['HSDI_06','HSDI_07']