Spectral File Format

RFM File Formats


Structure of RFM spectral files (i.e., main RFM output files).

There are two formats, depending on whether the output is on a regular spectral grid on an irregular grid. In the first case the spectral axis can be represented by three numbers in the header, in the second case each data point requires its own associate spectral axis value. The header sections are identical for both formats, the difference being the wavenumber increment (WNOD) being set to zero for the irregular grid.
File Structure
Header Section
!HEADER1 Single record
!HEADER2 Single record
!HEADER3 Single record
NPNT     WNO1     WNOD     WNO2     'LABSPC' Single record
Data Section (Regular Grid)
SPC(1) SPC(2) ... Multiple records
Data Section (Irregular Grid)
WNO(1) SPC(1) NPNT records
WNO(2) SPC(2)

FieldTypeDescription Units Range
!HEADER1 C80 Spectrum type, ray-path and RFM version ID
!HEADER2 C80 Text from *HDR section of Driver Table
!HEADER3 C80 Captions for next record, or additional info.
NPNT I No. spectral points in file[1] ≠ 0
WNO1 D Lower limit of spectrum cm-1 or GHz[1] > 0
WNOD D Spectral grid interval (0=irregular grid) cm-1 or GHz[1] ≥ 0
WNO2 D Upper limit of spectrum cm-1 or GHz[1] > 0
LABSPC C* Spectral Label or type of spectrum[2], in single quotes
WNO(:) D (NPNT) Wavenumber or Frequency of spectral point cm-1 or GHz[1] > 0
SPC(:) R/D[3] (NPNT) Spectral data value
Type: I=Integer; R=Real; D=Double Precision; Cn=character string, length n.

  1. NPNT: a negative value indicates that the spectral axis is GHz (set by GHZ Flag) rather than cm-1.

  2. LABSPC: this is set by LABSPC specified in the *SPC section or, if no label specified, then by the type of spectrum as a left-justified C13 field eg 'Absorption   '. The field is enclosed in single quotes to make reading simpler (if actually required).

  3. Output spectral values are Single precision by default, Double precision with DBL flag. Internally, these are always represented as Double precision.

  4. The RFM outputs the complete spectrum in one WRITE statement. For binary files this will be a single record of NPNT values

Start of file rad_20000.asc from Limb Radiance Example
! Radiance calc. for Limb Path Tang.Hgt =20000 km by RFM v.5.21_16FEB !13MAR24 RFM Example: Limb Radiance Calculation !No.Pts Lower_Wavenumber Delta_Wavenumber Upper_Wavenumber Label 20001 970.0000000000 0.0005000000 980.0000000000 'Radiance ' 435.880981 560.194946 572.234558 456.417664 309.821411 209.966965 156.840210 126.895660 106.999413 92.3703079 81.1000061 72.1965790 65.0540543 59.2847443 54.6649399 51.0735397 48.2717018 45.7430344 43.1198654 40.6035576 38.5360756 36.9558411 35.7397957 34.7971344 34.0883293 33.5984612 33.3261833 33.2819824 33.4915161 34.0046844 ...
rfmrd.py (Read text format file)
rfmrd_bin.py (Read binary format file)