NWPSAF 1D-Var User Manual

Software Version 1.0

Peter Weston, Met Office, Exeter, UK


Revision History
Document revision Date Author Notes
Version 0.1 26/2/14 P. Weston Documentation for beta version 1.0, based on Met Office 1D-Var v3.5 user guide
Version 0.2 15/5/14 P. Weston Documentation for version 1.0, changes from beta testing
Version 0.3 29/5/14 P. Weston Documentation for version 1.0, changes following comments from B. Conway
Version 0.4 04/6/14 P. Weston Documentation for version 1.0, changes following comments from N. Atkinson
Version 0.5 18/7/14 P. Weston Documentation for version 1.0, changes following comments from P. Watts
Version 1.0 22/8/14 P. Weston Version valid for NWPSAF 1D-Var v1.0

This software was developed within the context of the EUMETSAT Satellite Application Facility on Numerical Weather Prediction (NWP SAF), under the Cooperation Agreement dated 29 June 2011, between EUMETSAT and the Met Office, UK, by one or more partners within the NWP SAF. The partners in the NWP SAF are the Met Office, ECMWF, KNMI and Météo France.

© EUMETSAT 2014, All Rights Reserved.


1. Introduction
2. Compiling and Running the Code
3. Input Files
4. Output Files
5. Setting Up a New Observation Type
6. Notes, bugs and features
7. Getting Help
8. Reference
9. Acknowledgements
(Appendices are stored as seperate files to reduce the size of the printout for this document)
Appendix A. Structure of Code
Appendix B. Minimization
Appendix C. Cloudy Retrievals
Appendix D. Adding a New Radiative Transfer Model
Appendix E. Microwave cloud liquid water retrieval

1. Introduction

This document describes a stand-alone 1DVar code for nadir-viewing passive sounding satellite instruments that has been developed at the Met Office as part of the NWP SAF. The code contains the merged capabilities of the obsolete Met Office, ECMWF and SSMIS 1D-Var schemes. It was originally developed for the IASI instrument but it may be used with many different sounding instruments with minimal changes.

The philosophy behind the development of this code was to produce a flexible, stand-alone 1DVar retrieval system that may be used for a wide variety of satellite instruments. To facilitate this, there are multiple processing options at various parts of the code with a resultant small increase in complexity compared to what it would be if only one instrument were being considered. It is anticipated that users may want to remove routines that are superfluous to their requirements (or alternatively simply take selected routines) before using this code.

The program functions first by reading in user supplied background and observation data (together with appropriate error covariance matrices). The routines that are provided to do this assume data is supplied in a predefined ASCII format, but these routines can be replaced with ones more specific to the format of data that is to be used.

Routines for channel selection and cloud detection are included but bias correction needs to be performed by the user.

Retrievals are made through the optimal estimation methods of Rodgers (1976). Three minimisation routines are provided with the one that is used depending on the size and linearity of the problem.

A radiative transfer program is required that will supply both radiances and Jacobians and this is accessed through a general purpose interface routine. Currently RTTOV (versions 7.1, 8.7, 9.3, 10.2 and 11.1), Gastropod and RTIASI version 4 (with some modifications) are implemented.

The code is written is European Standard Fortran 90 and advanced F90 features are used as much as possible. The code was originally designed to closely follow the structures in the Met Office's Observation Processing System (OPS) and is partly based on the operational SatRad 1DVar code written at the Met Office by Andrew Smith.

A graphical user interface (GUI) accompanies the code and can be used to simplify the compilation and running of the code. It also automatically produces plots of the inputs and outputs for visualisation of retrievals. It should be noted that the NWPSAF 1D-Var can be run from the command line without the need to use the GUI. The GUI represents extra functionality and some users may find it easier to compile and run the code via the GUI rather than the command line.

[ Return to Top ]

2. Compiling and Running the Code.

Instructions for compiling and testing the code can be found in the readme.txt file in the top 1DVar_v1.0 directory.

A graphical user interface (GUI) is provided to allow the customisation of retrieval runs via an intuitive interface rather than using the command line. The GUI user guide can be accessed here. The GUI also allows the user to plot and compare some of the standard outputted quantities. Alternatively the guidance below can be followed and the code can be run manually from the command line.

To run the code successfully a radiative transfer coefficients file must be located in the top 1DVar_v1.0 directory. This coefficients file must be compatible with the radiative transfer model chosen and the instrument whose data is being used. Coefficients files can be downloaded for free from the NWPSAF RTTOV website for example RTTOV v11 coefficients can be downloaded from here.

The supplied makefile is set up to compile with RTTOV-11 by default. In order to use a different radiative transfer model a number of steps need to be completed (it has been noted that this process is more complicated than it could be and that this will be addressed in future versions):

To compile the default code you should compile RTTOV without the HDF macro enabled. If you have compiled RTTOV with the HDF macro then you will need to use one of the expanded sets of linker flags in the makefile which are commented out by default and also link a hdf5 library in the makefile. If you wish to read in emissivities from an atlas then you will also need to make a few changes to the makefile:

N.B. Due to some preprocessing directives (e.g. #include) present in RTTOV-10 and RTTOV-11 interface files a C preprocessor is now run during the compilation. The compiler options used are based upon which RTTOV version is specified in the makefile.

[ Return to Top ]

3. Input Files

3a. Control Files: ControlData.NL
3b. Control Files: Retrievals.NL
3c. Data Files: ObsFile.dat
3d. Data Files: Background.dat
3e. Auxiliary Files: Rmatrix.dat
3f. Auxiliary Files: Bmatrix.dat
3g. Auxiliary Files: ChannelChoice.dat

There are two main control files, ControlData.NL and Retrieval.NL, and two main data files, ObsFile.dat and Background.dat. Auxiliary data such as error covariance matrices and channel selection choices are stored for each data type in a directory called xxx_COEFFS_DIR where xxx refers to the data type being processed (e.g., IASI_COEFFS_DIR).

All input files are ASCII and all values are in free-format.

3a. Control Files: ControlData.NL

ControlData.NL is a Fortran90 namelist file containing the input parameters required for the running of the code. The table below lists the parameters that may be specified through this file and which ones would normally be required. As one can see most of these parameters have a default value. This file and the IASI_Read_ControlData that reads it may be easily expanded in future if one wants to add further options. Note that there are comments included in this file as supplied, but some Fortran90 compilers may not allow this, in which case they would need to be removed.

Namelist Control for IASI_1DVar

Variable Required? Default Value Type Notes
RTModelToUse No RTTOV String 'RTTOV','RTTOV8','RTTOV9','RTTOV10','RTTOV11','RTIASI' & 'Gastropod' allowed
Coeffs_Dir Yes - String Relative path of directory containing auxiliary data.
FirstOb, LastOb No 1, Number of obs. INTEGER  
GeneralMode No 10='ProductionMode' INTEGER Allowed values are 0='Operational', 10='Production', 20='Diagnostic', 30='Debug' and 40='Verbose'
Perform1DVar No True LOGICAL Purpose of running with false might be to test the setup or IO before running with true 
DetectCloud No True LOGICAL  
MaxIterations No 10 INTEGER  
DeltaJ No 0.01 REAL Maximum fractional change in cost function for convergence.
SmallJCost_Gradient No 1. REAL Maximum value of cost function gradient (in terms of total cost) for convergence. Marquardt-Levenberg minimisation only.
Max_ML_Iterations No 10 INTEGER Marquardt-Levenberg minimisation only
Gamma_Factor No 10 REAL Factor by which Gamma is changed between iterations. Marquardt-Levenberg minimisation only
GammaMax No 1025 REAL Marquardt-Levenberg minimisation only
DoTExtrapolation No TRUE LOGICAL If using a background profile where the top level is lower than 0.01hPa then setting this option to true means the profile is extrapolated to 0.01hPa
Minimisation_Method No 1='Newtonian' INTEGER 0=None (sets Perform1DVar to false), 1=Newtonian, 2=Marquardt-Levenberg
Allow_Eqn_101 No .TRUE. LOGICAL Set to false if the Eqn 101 minimisation is never to be used.
Force_Eqn_101 No .FALSE. LOGICAL Set to true to use Eqn 101 in all situations (Marquardt-Levenberg and additional cost function terms cannot be used in this case).
MaxChanUsed No 10000 INTEGER  
Yes -9999. REAL If IASI_DetectCloud is TRUE
Yes -9999. REAL If IASI_DetectCloud is TRUE
CloudAbsThresh_IRWindow Yes -9999. REAL If IASI_DetectCloud is TRUE
HighCloudAbsThresh_IRWindow Yes -9999. REAL If IASI_DetectCloud is TRUE
Additional_Cost_Function No 0=None INTEGER 0=None, 1=CloudBoundaries
Retrieval of cloud only
Cloud_Min_Pressure No 100hPa REAL Minimum allowed pressure for retrieved cloud top in hPa. Retrieval of cloud only.
Use_EmisAtlas No .FALSE. LOGICAL Switch to control whether an emissivity atlas is used or not
Atlas_Dir No 'EmisAtlas' CHARACTER Directory containing the emissivity atlas
0=no clw profile
Allowed values are 0 and 1.  0= No clw profile in the Background file and 1=clw profile in the Background file
0=no qtotal retrieval
Allowed values are 0 and 1. 0=LWP retrieval, 1=Qtotal retrieval
Output_dir No '.' CHARACTER Directory where the outputs will be written

Example ControlData.NL files can be found in the Sample_Namelists directory and when copied into the top directory should have any satellite instrument or number of levels removed from the file name. An example ControlData.NL file is:

! AIRS Control file for IASI_1DVar

! ******** WITH F90 (rather than F95) ***********************************

&Control SoundingType_Text='AIRS'
! Relative path of the coefficients directory
! This controls the verbosity of the output 0=Minimal, 40=verbose
! For the minimisation option, 1 is Newtonian, 2 is Marquardt-Levenberg
! Cloud liquid water profile in the background, 0=no (default), 1=yes
! Cloud liquid water retrieval method, 0=LWP retrieval, 1=qtotal retrieval
! These are cloud cost thresholds:
HighCloudAbsThresh_IRWindow=-55. /

[ Return to Top of Section ]

3b. Control Files: Retrievals.NL

Retrieval.NL controls the variables that are to be retrieved and provides the mapping between the minimization vector, the RT model vector and the B-matrix (Figure 1 gives and example of how the three vectors are mapped for a typical IASI retrieval).

Fig. 1. Mapping of retrieval vector, RT vector and B-matrix

The Retrieval.NL file is a Fortran90 namelist file. The quantities to be retrieved are specified through the presence of two- or three-element matrices in this file. Absence of a quantity from this file means that this element is not to be retrieved.

Example Retrieval.NL files can be found in the Sample_Namelists directory and when copied into the top directory should have any satellite instrument or number of levels removed from the file name. A typical Retrieval.NL file for a 43 level retrieval is shown below. In addition there are sample Retrieval.NL files for 51 and 54 level retrievals supplied with the package. All possible namelist entries are included here but, in practice, only those quantities that are actually being retrieved need to be included.

! Retrieval set up file for AIRS
! ******** WITH F90 (rather than F95) ***********************************

&Retrieval Temperature=1,43,1
Humidity= 18,26,44
Ozone= 0,0,0
Surface_Temperature= 1,70
Surface_Humidity= 1,71
Surface_Pressure= 0,0
Skin_Temperature= 1,72
Cloud_Liquid_Water= 0,0
Cloud_Top_Pressure= 0,0
Cloud_Fraction= 0,0
Surface_UWind= 0,0
Surface_VWind= 0,0 /

The three-element matrices are for profiles. The first two elements denote the top levels in the atmosphere and the number of levels that are to be retrieved respectively. The pressure profile of the atmosphere being defined in the Background.dat file. The final element is the position in the background error covariance matrix that corresponds to the top level to be retrieved. If any of these elements are zero, the profile is not retrieved.

In the example given, therefore, 43 levels of temperature are to be retrieved starting with the first (top) level. Only 26 humidity levels are to be retrieved starting at level 18 (and finishing with level 43). Ozone is not to be retrieved at all. In the background error covariance matrix, the first 43 elements are for temperature, while elements 44-69 correspond to the humidity on levels 18-43.

The two-element matrices are for scalar (mostly surface) quantities. If the first element is non-zero the quantity is to be retrieved (provided the second entry is valid). The second entry points to the position in the background error covariance matrix for this quantity. For microwave cloud liquid water (or liquid water path (LWP)) retrievals, a covariance matrix not correlated to any other variables is assumed and this single value (0.2, inherited from the SSMIS 1D-Var code) is hardcoded into the routine NWPSAF_InitBmatrix.f90. Hence, if LWP has to be retrieved while the first element has to non-zero, the second element has to remain 0.

Cloud_Top_Pressure and Cloud_Fraction do not require a background error covariance entry as the default is to assume large background errors for these quantities if they are to be retrieved. The retrieval of these cloudy parameters uses some additional code to the normal retrieval. The methodology for this is documented in Appendix C.

In the example given, surface temperature, skin temperature and surface humidity are retrieved.

[ Return to Top of Section ]

3c. Data Files: Obsfile.dat

The Obsfile.dat file contains the observation information. All data are specified in free format with mandatory colons delimiting the explanatory labels in the header.

The file starts with 10 lines that are reserved for users comments. Next comes header information which details the number of observations present in the file plus information on which channels have been used to make up a composite instrument (such as ATOVS).

There are are two optional header entries: "Composite Instruments:" and "Channels:".

"Composite Instruments:" is used where there is the possibility of more than one "composite instrument" (a composite instrument being a collection of one (e.g, IASI) or more (e.g., ATOVS) instruments that are treated as a single entity for retrieval purposes). The composite instrument entry will then specify the number of instruments followed on separate lines of text with the names of the composite instruments (these should be identical with the required entries in the RMatrix files). E.g. for ATOVS on NOAA satellites 15 and 16:

This is a test ATOVS observations file

This is based on a RTTOV simulated set of radiances from NOAA-15
which is computed from ADC's background profile surf emis=0 RWS
22nd March 2

There are 10 header lines in total here!!!

So this is line 10.
Number of Observations in File: 10
No. of Chans per Observation: 40
Total Number of instruments making up observations : 6
*** In the following Series, Platform and Instrument are defined ***
*** according to the relevant RT Model definitions (if required): ***
Composite Instruments: 2
Sat. Series Platform Instrument First_Channel Last_Channel Sat ID
1 15 0 1 20 15
1 15 3 21 35 15
1 15 4 36 40 15
1 16 0 1 20 16
1 16 3 21 35 16
1 16 4 36 40 16
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
33 34 35 36 37 38 39 40
Obs ID: 1 Obs Type: 2 Satellite ID: 15
Latitude: 0.000 Longitude: 0.000 Elevation: 0.0
Surface Type: 1 Sat Zen Angle: 0.000 Solar Zen Ang: 38.000
Brightness Temperatures:
226.717 218.949 219.645 224.452 236.374 247.804
257.609 274.562 247.897 269.388 248.331 226.588
261.211 252.591 241.597 236.591 266.911 271.983
271.537 -9999.00 152.095 152.105 209.206 245.611
244.334 233.650 226.083 220.954 216.761 215.937
217.657 221.861 233.096 245.561 200.407 206.016
235.261 242.110 252.165 261.941
Obs ID: 2 Obs Type: 2 Satellite ID: 16
Latitude: 0.000 Longitude: 0.000 Elevation: 0.0
Surface Type: 1 Sat Zen Angle: 0.000 Solar Zen Ang: 38.000
Brightness Temperatures:
225.552 219.724 219.573 226.521 237.666 246.276
255.913 267.355 250.477 259.886 251.149 229.323
260.399 248.081 240.887 237.802 264.660 266.901
266.492 -9999.00 152.369 156.488 217.802 243.712
243.308 234.084 225.322 220.200 217.276 217.978
For the case where the "Composite Instruments" option isn't specified (e.g., for IASI) the section between "Number of Observations" and "-----------" above is replaced with:
Number of Observations in File :    980
No. of Chans per Observation: 8461
Number of instruments making up observations : 1
*** In the following Series, Platform and Instrument are defined ***
*** according to the relevant RT Model definitions (if required): ***
Sat. Series Platform Instrument First_Channel Last_Channel Sat ID
1 1 1 1 8461 300
The "Sat ID" is used to keep track of the instruments where more than one is being used at a time (it was previously called the "WMO No." but this was misleading).

The "Channels" option is used for those cases where only a subset of available instrument channels are required. After this the instrument channels that are actually being used are listed. This is purely to allow the correct channels to be set up in the RT code and in all other places (except the R-matrix - see below) the n input channels are referred to as channels 1 ... n.

After the headers lines, each observation is listed, prefixed by a sub-header detailing auxiliary data for the observation in question such as observation number, latitude, longitude, satellite view angle, etc.

Observation sub-headers in ObsFile.dat
Entry Notes Type Variable set in IASI_Read_Observations
First sub-header line:
Obs ID Integer Number identifying the current observation (usually 1-Number of Obs.) Observations % ID
Obs Type Integer Obsolete but retained for backward compatibility -
Satellite ID Integer Specifies the satellite to be used (ref. "Sat ID" in main header) Observations % SatID
Second sub-header line (Optional):
Year Integer Year of Observation (YYYY) Observations % Date(1)
Month Integer Month of Observation (MM). Observations % Date(2)
Day Integer Day of Observation (DD) Observations % Date(3)
Third sub-header line:
Latitude Real Latitude of Observations (°N) Observations % Latitude % Value
Longitude Real Longitude of Observations (°E). Observations % Longitude % Value
Elevation Real Height of surface (metres above sea level). (Not currently used) Observations % Elevation
Fourth sub-header line:
Surface Type Integer Type of surface. 1=Sea; 2=SeaIce; 3=Land; 4=Highland; 5=Mismatch. For types 3-5, land is assumed by the radiative transfer model. Observations % Surface
Sat Zen Angle Real Satellite Zenith Angle at surface (°). (This was in previous versions erroneously labelled Sat View Angle). Observations % SatZenith
Solar Zen. Ang. Real Solar Zenith Angle at surface (°) Observations % SolarZenith

Please note once more that the colons in the header and sub-header lines are used by the program as delimiters and must be included. Please also note that the second (optional) sub-header line is required when using an emissivity atlas with RTTOV-10 or RTTOV-11. In all other situations it may be omitted. Following the sub-header lines, the observed brightness temperatures are listed (free-format).

This file and the subroutine that reads it may be replaced by one in a format defined by the user.

[ Return to Top of Section ]

3d. Data Files: Background.dat

The Background.dat file starts with a 10 header lines that are reserved for user's comments.

The next three lines are general information for the file:
The first of these lines is the number of profiles contained in the file. This may either be unity (in which case the same background is used for all observations) or be the same as the number of observations (i.e., one background per observation).
The second line is the number of levels for each profile. In the current implementation this should be set to 43.
The third and final line defines the choice for the units for water vapour abundance:

Value Definition
1 volume mixing ratio in ppmv with respect to dry air
2 mass mixing ratio in kg/kg dry air
3 relative humidity

The minimisation itself is always performed using the natural logarithm of the mass mixing ratio q (kg/kg), Ln(q).

Each profile is then listed with three comment lines preceeding each. The profiles are presented in four columns in free-format (pressure in Pa, temperature in Kelvin, Water Vapour in the predefined units and Ozone in ppmv with respect to dry air). Finally surface information is provided (each entry being preceeded by a label ending with a colon). The surface parameters provided, in order, are: Surface Temperature (K), Surface Humidity (in the pre-defined units), Skin Temperature(K), Surface Pressure (Pa), 10m U-Wind (m/s), 10m U-Wind (m/s).

If microwave cloud liquid water retrievals are to be performed (either LWP retrieval or qtotal retrieval), a fifth column containing cloud liquid water profiles (in kg/kg) has to be provided.

[ Return to Top of Section ]

Auxiliary Files:

Auxiliary data found in the xxx_COEFFS_DIR and Sample_Bmatrices directories include the observation error covariance matrix (in Rmatrix_orig), three background error covariance matrices (in Bmatrix_43L, Bmatrix_51L & Bmatrix_54L), and the channel selection file (Channelchoice_orig.dat). "xxx" refers to the observation type which is currently IASI, ATOVS, ATMS, CrIS, SSMIS or AIRS.

3e. Auxiliary Files: Rmatrix_orig

The Rmatrix_orig file contains the observational error covariance matrix used by the 1DVar scheme. Currently one error covariance is used for all observations being processed (for a given instrument, of course) with the values being given in brightness temperature. There is no correction for scene temperature in the code, so the R-matrix values should be appropriate for the expected scene temperature of the channel in question. The forward model error is included in the observational error. This matrix must be positive definite or a fatal error will result.

Three options are available for storing the observational errors. These are full matrix, band-diagonal (of which diagonal is a subset), and eigenvalue/eigenvector. In the case of a diagonal R-matrix, the values in the file represent the variances of the observation errors. The band-diagonal option has been included as one way of representing the errors of apodised interferometer observations, while the eigenvalue format is in anticipation of more sophisticated ways of representing the errors of instruments with many channels and has not been fully tested as yet.

The file is formatted as follows (all entries are in free-format):

The first line describes the instrument (or "Composite Instrument") for which the file is valid. If "Composite Instruments" were set up in the observation file, the names in the observation and R-matrix files should agree. If composite instruments were not set up, the first R-matrix is read in.

The second line is made up of four integers which are (in order):

  • The "matrix type", i.e, the form in which the matrix is stored: 1=Full matrix, 2=band diagonal (of which diagonal is a subset) and 3=eigenvalue/eigenvector representation.
  • The number of channels in the R-matrix
  • The number of "elements": For the full matrix, this is the number of channels once more; for the band diagonal matrix this is the number of bands (1=diagonal, 2=tri-diagonal, etc.); for the eigenvalue/eigenvector representation this is the number of eigenvectors used.
  • "Inverse". If this fourth entry is one, the matrix is stored as an inverse. This would only be useful for a full matrix where the number of channels to be used (in retrievals and cloud detection) is fixed.

    Next, before the errors themselves, the channels used are listed. This is the only place apart from the observation file where the absolute instrument channel numbers are used. This is done to ensure that the observation error covariances are indeed for the channels that are present in the observation file. See the example below for ATOVS where channels 1-20 for HIRS, 1-15 for AMSU-A, and 1-5 for AMSU-B are lsited.

    Finally, the R-matrix itself is read in.

  • In the full matrix case, the full matrix is simply placed in the file here.
  • In the band diagonal case, the matrix is read in starting with the diagonal elements and then progressing through the bands further and further from the diaginal. Padding zeros are added to the ends of each off-diagonal band, so the entry for each band is as long as the number of channels. Of course, for the diagonal case only one band is required.
  • In the eigenvalue/eigenvector case, the required number of eigenvectors are read from the file and then a vector of the associated eigenvalues are read in.

    An example Rmatrix file is shown here:

    2 40 1 0
    1 2 3 4 5 6 7 8 9
    10 11 12 13 14 15 16 17 18
    19 20 1 2 3 4 5 6 7
    8 9 10 11 12 13 14 15 1
    2 3 4 5
    1.22 0.5 0.5 0.5 0.5 0.5 1.22 6.32 1.4 6.32
    3.0 4.0 1.22 1.22 0.5 0.4 0.4 0.4 0.4 9.9
    2.0 2.0 2.0 1.26 0.25 0.25 0.25 0.25 0.4 0.4
    0.5 0.95 1.22 1.22 3.0 8.0 5.0 4.0 4.0 4.0
    In this example the matrix type is band-diagonal with 40 channels and 1 band (so it is a diagonal matrix). The matrix is not already inverted. The R-matrix for HIRS 1-20, AMSU-A 1-15 and AMSU-B 1-5 is set up.

  • [ Return to Top of Section ]

    3f. Auxiliary Files: Bmatrix_43L, Bmatrix_51L & Bmatrix_54L

    The Bmatrix_??L files contains the background error covariance matrices used by the 1DVar scheme. The full matrix is specified. The number (??) refers to the number of levels the matrix is valid on. A retrieval may be run on any number of levels with RTTOV versions 9 to 11 making use of the vertical interpolation functionality within these models. However, for such a retrieval to run you will need to supply your own Bmatrix file on the required number of levels.

    In this implementation, there are two B-Matrices specified in each file - one for land and one for sea - but there is no other variability in this matrix allowed for (e.g., no latitudinal variation).

    The file itself simply consists of two comment lines followed by the dimension of the matrix (integer). The next lines are the B-Matrix in free format with one line per row/column (the matrix is symmetric).

    For the second, land, matrix the same format is repeated (i.e., two comment lines, the number of elements and the matrix itself).

    [ Return to Top of Section ]

    3g. Auxiliary Files: ChannelChoice_orig.dat

    The ChannelChoice_orig.dat file contains the choice of channels to be processed. The first line in the file contains Num_Channels, the number of channels for which selection codes (for cloud detection, retrieval, monitoring) are specified. The following Num_Channels lines in the file contain three columns of integers (plus a fourth, optional, column which can include characters). These columns are:

  • channel number -- the index of the selected channel in the channel set specified in the observation file (if a reduced (pre-selected) set of n channels is present in the observation file, channel numbers specified in the ChannelChoice_orig.dat file correspond to indices (in the range 1 ... n) for the reduced channel set).
  • a code for the situations in which this channel is used for retrievals
  • a code indicating whether this channel is to be used for cloud detection and/or background monitoring.
  • A fourth may be used to indicate the true channel numbers for those situations where the observation file contains a reduced set of channels. This is for informational purposes only and is not used by the program.

    The codes employed in this file are as follows:

    2nd column: Retrievals Code. The situations in which the channel is used are determined by the value of the integer in this column. The code is based on which bits are one in the binary representation of the integer. Bits for surface type and cloud situation are coded as follows:

              Bit Number        Sounding Option
    1 Surface = Sea
    2 Surface = SeaIce
    3 Surface = Land
    4 Surface = Highland
    5 Surface = Surface Mismatch
    6 Cloud = Clear
    7 Cloud = IRCloudy
    8 Cloud = MWCloudy *
    9 Cloud = Rain *
    10 Cloud = High Cloud
    So, for example, if the code is 1023 (=1111111111 in binary) the channel is used in all cases. If the code is 33 (=100001) then the channel is to be used only for clear skies over sea.

    * The cloud codes corresponding to bits 8 & 9 are not used at present, but are reserved for microwave cloudy and rain situations.

    3rd column: Monitoring and Cloud Detection Code. If the absolute integer value in this column is set to 1, the channel is to be monitored (i.e., the radiances for this channel are to be calculated for the background profile and compared to the observations. If the column value is 3, the channel is used for monitoring and cloud detection. If the value is 2, the channel is used in cloud detection but not monitoring. All channels that are to be used in retrievals are monitored by default.

    If the value of the Monitoring and Cloud Detection Code is negative, the same codes as above apply to the absolute value plus the channel is the designated window channel (if more than one window channel is specified, the last one is used). The window channel is used in the window channel test where the field of view is designated as cloudy if the difference between the observed and background brightness temperatures for the window channel exceeds the value of CostThresh_IRWindow_sea/land which is set up through the

  • ControlData.NL file.

    In the following example file the selection codes for 11 channels are specified. HIRS 5-12 are used for retrievals in clear cases and AMSU-A 3-5 in all cases. HIRS-8 is also used as the window channel:

    5 33 3 HIRS-5
    6 33 3 HIRS-6
    7 33 3 HIRS-7
    8 33 -3 HIRS-8
    9 33 3 HIRS-9
    10 33 3 HIRS-10
    11 33 3 HIRS-11
    12 33 3 HIRS-12
    23 1023 3 AMSU-3
    24 1023 3 AMSU-4
    25 1023 3 AMSU-5

    [ Return to Top of Section ]

    [ Return to Top]

    Output Files:

    4a. Retrieved_Profiles.dat
    4b. Retrieved_BTs.dat
    4c. Additional Output: Minimisation.log and Minimisation_BTs.log
    4d. Additional Output: A-Matrix and Am-Matrix

    There are two main output files, Retrieved_BTs.dat and Retrieved_Profiles.dat. These are ASCII files and their contents should be obvious from inspection.

    Additional diagnostic files are produced if the program is run in DebugMode or higher (set GeneralMode to 30 or more in ControlData.NL). These files are A-Matrix.out, Am-Matrix.out, Minimisation.log, and Minimisation_BT.log.

    4a. Output: Retrieved_Profiles.dat

    The Retrieved_Profiles.dat file contains the profiles retrieved from the 1DVar stage. If the 1DVar retrieval is not performed (e.g., the field of view is cloudy but only clear retrievals are allowed), the profiles are not written to this file; if the retrieval is performed but does not converge the final retrieved profile is written to this file, however (the number of iterations will be one higher than MaxIterations in this case).

    The file is written in ASCII and should be self-explanatory. Both background and retrieved fields are supplied. The retrieved fields that are output are: Temperature Profile, Humidity Profile (in the same units as set up in the Background.dat file), Ozone profile, surface temperature, surface humidity (in same units as in the background file), skin temperature and surface pressure. If a Cloudy Retrieval is being done, cloud top pressure and cloud fraction are also output. If a microwave LWP retreival is being done, that will also be output. In addition the observation number, number of iterations, normalised cost function and normalised cost function gradient are reported.

    An abridged example of the contents of this file is:

     Observation =  1
    Retrieval Background
    Pressure (hPa) T (K) q (ppmv) Ozone T (K) q (ppmv) Ozone
    1013.25 272.132 0.4296E+04 0.2456E-01 272.070 0.4280E+04 0.2456E-01
    1005.43 271.952 0.4227E+04 0.2507E-01 271.854 0.4220E+04 0.2507E-01
    985.88 271.509 0.4061E+04 0.2643E-01 271.311 0.4074E+04 0.2643E-01
    . . . . . . .
    . . . . . . .
    . . . . . . .
    0.69 265.252 0.5636E+01 0.6042E+01 265.741 0.5636E+01 0.6042E+01
    0.29 256.937 0.5410E+01 0.5971E+01 257.553 0.5410E+01 0.5971E+01
    0.10 241.249 0.4361E+01 0.5792E+01 241.635 0.4361E+01 0.5792E+01
    Surface Temperature (K): 272.935 272.070
    Surface Humidity (ppmv): 5202.160 4279.650
    Skin Temperature (K): 272.935 272.070
    Surface Pressure (Pa): 101325. 101325.

    No. of Iterations: 2
    Normalised Cost Function: 0.654 Normalised Gradient: 0.001
    Observation = 2
    Retrieval Background
    Pressure (hPa) T (K) q (ppmv) Ozone T (K) q (ppmv) Ozone
    1013.25 271.698 0.4169E+04 0.2456E-01 272.070 0.4280E+04 0.2456E-01
    1005.43 271.480 0.4110E+04 0.2507E-01 271.854 0.4220E+04 0.2507E-01
    985.88 271.008 0.3965E+04 0.2643E-01 271.311 0.4074E+04 0.2643E-01
    . . . . . . .
    . . . . . . .
    . . . . . . .
    2.61 242.475 0.4945E+01 0.6106E+01 242.500 0.4945E+01 0.6106E+01
    1.42 256.285 0.5429E+01 0.6080E+01 256.212 0.5429E+01 0.6080E+01
    0.69 265.855 0.5636E+01 0.6042E+01 265.741 0.5636E+01 0.6042E+01
    0.29 257.713 0.5410E+01 0.5971E+01 257.553 0.5410E+01 0.5971E+01
    0.10 241.273 0.4361E+01 0.5792E+01 241.635 0.4361E+01 0.5792E+01
    Surface Temperature (K): 268.230 272.070
    Surface Humidity (ppmv): 4559.714 4279.650
    Skin Temperature (K): 268.230 272.070
    Surface Pressure (Pa): 101325. 101325.

    No. of Iterations: 2
    Normalised Cost Function: 0.782 Normalised Gradient: 0.000
    [ Return to Top of Section ]

    4b. Output: Retrieved_BTs.dat

    The Retrieved_BTs.dat file contains the brightness retrieved from the 1DVar stage together with the observed brightness temperatures and those calculated from the background profile. If the 1DVar retrieval is not performed (e.g., the field of view is cloudy but only clear retrievals are allowed), the brightness temperatures are not written to this file; if the retrieval is performed but does not converge the final retrieved brightness temperatures are written to this file, however.

    Each observation has three headers: the observation number, the number of channels used in the retrieval and the column titles. Four columns are then reported: the channel number, the background brightness temperature, the observed brightness temperature and the retrieved brightness temperature. The channel numbers reported are those specified in the first column of the ChannelChoice.dat file. Only those channels used in the retrieval are reported.

    The following is a typical Retrieved_BTs.dat produced from a retrieval using HIRS 1-19 and AMSU-13:

      Observation =  1
    Number of Channels Used = 20
    Channel Background Observed Retrieved
    1 226.579 226.717 226.167
    2 219.569 218.949 219.310
    3 219.321 219.645 219.153
    4 225.255 224.452 225.000
    5 237.027 236.374 236.813
    6 247.197 247.804 247.077
    7 256.419 257.609 256.574
    8 271.211 274.562 271.996
    9 250.658 247.897 251.042
    10 269.220 269.388 269.773
    11 251.843 248.331 250.209
    12 232.814 226.588 230.007
    13 261.277 261.211 261.721
    14 250.869 252.591 250.952
    15 241.685 241.597 241.568
    16 237.392 236.591 237.163
    17 266.360 266.911 266.937
    18 270.537 271.983 271.343
    19 271.088 271.537 271.877
    32 223.373 221.861 222.736
    [ Return to Top of Section ]

    4c. Additional Output: Minimisation.log and Minimisation_BT.log

    These files are output when the program is run in DebugMode or VerboseMode. They are used primarily to aid in bebugging by tracking the iteration-to-iteration progress of the minimisation.

    Minimisation.log outputs the elements of the retrieval vector (RT_Params%RTGuess(:) in IASI_Minimize) together with the Marquardt-Levenberg gamma factor (zero if not using Marquardt-Levenberg minimisation) and the (un-normalised) cost function for each iteration. The exact makeup and order of the retrieval vector will vary according to the variables that are to be retrieved, but Fig. 1 gives the makeup of this vector in the default set-up supplied.

    Minimisation_BT.log outputs the observed-guess brightness temperature differences for the channels used in the retrieval together with the Marquardt-Levenberg gamma factor (zero if not using Marquardt-Levenberg minimisation) for each iteration.

    [ Return to Top of Section ]

    4d. Additional Output: A-Matrix and Am-Matrix

    The analysis error covariance matrix and the propagated measurement noise matrix are output to A-Matrix and Am-Matrix respectivly. These are the expected retrieval error and the expected contribution to the retrieval error from observation noise respectively as calculated through linear retrieval theory. They are output in the same order as the elements in the input B-matrix and are output for each iteration. The A-matrix is also calculated from the background profile for the first observation only.

    For a full discussion of the derivation of the propagated measurement error matrix see Rodgers (1990) where it is referred to as the measurement error covariance, SM.

    [ Return to Top of Section ]

    [ Return to Top ]

    5. Setting Up a New Observation Type

    To set up a new instrument requires the creation of new data and auxiliary files but should be relatively straightforward unless unsupported retrieval variables and/or radiative transfer models are required in which case code changes will be needed.

    If a fastmodel other than RTTOV, Gastropod or RTIASI is required, the interface with the new fastmodel will need to be coded up and called from IASI_Fastmodel_Interface.f90. Follow the example of one of the the step-by-step guide in Appendix D.

    Additional retrieval variables will require changes to the fastmodel interfaces (at least for the fastmodels to be used), IASIMod_RTModel, IASI_Read_Background, IASI_SetUpBackground, IASI_SetUpRetrievals, IASI_TranslateDataOut and probably IASI_CheckIteration.

    Contact nwpsaf@metoffice.gov.uk for questions on changing the code.

    [ Return to Top ]

    6. Notes, bugs and features

    Every attempt has been made to make this code as versatile and as bug-free as possible. Any problems should be reported to the NWPSAF helpdesk.

    There are many user-defined parameters in this code. Some of these parameters may not have been optimised for the users' requirements. This particularly applies to channel selection and and cloud detection channels and thresholds. The user is invited to critically review these.

    7. Getting Help

    Contact the NWPSAF helpdesk. for all enquiries.

    8. Reference.

    Rodgers, C.D. (1990). Characterization and error analysis of profiles retrieved from remote sounding measurements. J. Geophys. Res., 95, 5587-5595.

    [ Return to Top ]

    9. Acknowledgements

    This work was aided greatly by the advice and input of Andrew Smith, Matthew Szyndel, Roger Saunders (all of the Met Office), Andrew Collard (NCEP), Reinhold Hess (DWD), Vanessa Sherlock (NIWA) and Yoshiaki Takeuchi (JMA).

    [ Return to Top ]


    Appendix A. Structure of Code
    Appendix B. Minimization
    Appendix C. Cloudy Retrievals
    Appendix D. Adding a New Radiative Transfer Model
    Appendix E. Microwave cloud liquid water retrieval