IASI read_l1c IDL Program |
|
|
| IDL> READ_L1C, L1CFIL, LOC, SPC, /AVHRR, /BBT, SKPQAL=SKPQAL, WNOLIM=WNOLIM, MPH=MPH, FAIL=FAIL, ERRMSG=ERRMSG |
| Argument | Type | I/O | Description |
|---|---|---|---|
| L1CFIL | STRING | I | Name of IASI L1C .nat file to be read |
| LOC | STRUCT(*) | I/O | Structure containing pixel time/location info. |
| SPC | STRUCT(*) | O | Structure containing selected spectra |
| AVHRR | FLAG | I | (Optional) 1=Include AVHRR radiance cluster analyses in LOC |
| BBT | FLAG | I | (Optional) 1=SPC in brightness temperatures [K], 0=Radiance [nW/(cm2.sr.cm-1)] |
| SKPQAL | INT(3) | I | (Optional) Over-ride band quality flags [v20JAN20 onwards] |
| MPH | STRUCT | O | (Optional) Main Product Header [v29DEC18 onwards] |
| FAIL | FLAG | O | (Optional) 0=normal, 1=fatal error occurred |
| ERRMSG | STRING | O | (Optional) Text describing fatal error, ''=normal |
IDL> READ_L1C, l1cfile.nat, locThis creates an array structure loc containing information for each pixel. Typically this contains around 91200 array elements (=760 scan lines per orbit x 30 scan steps per line x 4 pixels per scan step). The exact contents of loc are likely to evolve depending on user-requirements but the current structure is outlined below.
The user then calls the procedure again, this time using a subset of loc as input to select specific spectra, and with an additional argument to hold the result. For example, to select only spectra with less than 5% cloud fraction
IDL> idx = WHERE ( loc.cld LT 5.0, nspc )which will return an array structure spc.rad where spc has nspc elements and each spc.rad is a real array of 8461 elements represent radiances in nW/(cm2.sr.cm-1) spanning 645-2760 cm-1 @ 0.25 cm-1.
IDL> READ_L1C, l1cfile.nat, loc[idx], spc
Alternatively, since spc could still be a very large array, the procedure could also be called to extract spectra sequentially
FOR ipix = 0, npix-1 DO BEGINOptional arguments
READ_L1C, l1cfile.nat, loc[idx[ipix]], spc
[ deal with spc[0].rad ]
ENDFOR
IDL> READ_L1C, l1cfile.nat, loc, /AVHRR
IDL> READ_L1C, l1cfile.nat, loc[idx], spc, /BBTwill generate spectra as spc.bbt containing brightness temperature spectra [K].
IDL> READ_L1C, l1cfile.nat, loc, SKPQAL=[1,1,1]would extract all pixels irrespective of quality flags (although this information is still in the LOC.QAL variable), and
IDL> READ_L1C, l1cfile.nat, loc, SKPQAL=[0,1,1]would select all pixels for which band 1 quality is good but ignoring the quality flags of the other bands.
IDL> READ_L1C, l1cfile.nat, loc, ERRMSG=ERRMSGIn the absence of FAIL or ERRMSG arguments the procedure will halt on encountering a fatal error and print the message to the terminal.
IDL> IF ERRMSG EQ '' THEN PRINT, 'Error: ' + ERRMSG
IDL> READ_L1C, l1cfile.nat, loc, FAIL=FAILIt can also be combined with the ERRMSG argument:
IDL> IF FAIL THEN PRINT, 'a fatal error occurred'
IDL> READ_L1C, l1cfile.nat, loc, FAIL=FAIL, ERRMSG=ERRMSGIn the absence of FAIL or ERRMSG arguments the procedure will halt on encountering a fatal error and print the message to the terminal.
IDL> IF FAIL THEN PRINT, ERRMSG
IDL> READ_L1C, l1cfile.nat, loc, MPH=MPHCurrently this is limited to MPH.SPACECRAFT_ID, MPH.SENSING_START, MPH.SENSING_END, MPH.ORBIT_START, MPH.ORBIT_END but it should be straightforward to add more if you need them.
IDL> READ_L1C, l1cfile.nat, loc[idx], spc, wnolim=[700,800]will limit the spc.rad arrays to 700-800cm-1 (ie 401 elements instead of 8461).
| Variable | Type | Description |
|---|---|---|
| LOC.IOF | LONG | Byte offset of associated spectrum (for internal use) [v29DEC18 onwards] |
| LOC.LIN | INT | Scan line# (1-761 typically for a complete orbit) |
| LOC.STP | INT | Across track step# (1-30) |
| LOC.PIX | INT | Pixel# (1-4) |
| LOC.DAY | UINT | Day# since 1 Jan 2000 (= Day 0) |
| LOC.DAYLIN | UINT | Day# at start of MDR (= scan line) [v04APR18 onwards] |
| LOC.MSC | LONG | Millisecs since start of day |
| LOC.MSCLIN | LONG | Millisecs at start of MDR (= scan line) [v04APR18 onwards] |
| LOC.QAL | BYTE(3) | Quality flags for each band (0=OK, 1=bad) |
| LOC.LAT | FLOAT | Latitude [deg N] |
| LOC.LON | FLOAT | Longitude [deg E] |
| LOC.ZEN | FLOAT | Zenith angle [deg] at surface (0=nadir view) |
| LOC.SZA | FLOAT | Solar zenith angle [deg] at surce (<90=day-time) |
| LOC.CLD | FLOAT | Cloud fraction [%] (set -1 for old IASI data) |
| LOC.LND | FLOAT | Land fraction [%] (set -1 for old IASI data) |
| And, with AVHRR flag set: | ||
| LOC.NCL | INT | No. of radiance clusters identified (max 7) |
| LOC.PCT | FLOAT(7) | Fraction of FOV occupied by each cluster [%] |
| LOC.RAV | FLOAT(6,7) | Mean radiance* for each channel,cluster |
| LOC.RSD | FLOAT(6,7) | Radiance* SD for each channel,cluster |
| * For AVHRR Ch1,2,3a radiances in W/(m2.sr) For Ch3b,4,5 radiances in nW/(cm2.sr.cm-1) | ||