Frequently Asked Questions
RTTOV FAQs
- 1 Do I need to bother to upgrade to the latest version of RTTOV?
- 2 I’m upgrading from RTTOV v13 (or earlier) to v14. How do the profile inputs differ?
- 3 How do the RTTOV v14 pressure levels relate to the ECMWF model levels (e.g. for IFS, CAMS, ERA5 data)?
- 4 What vertical pressure levels should I obtain ERA5 data on for use with RTTOV?
- 5 Can I compile the code in single precision to save space?
- 6 I don’t have an O3, CO2, CO, N2O, CH4 or SO2 profile to include in the state vector. What can I do?
- 7 My profile top is below the top level required by RTTOV (usually 0.005hPa), how do I best extrapolate it?
- 8 Why does compilation with the netCDF library fail?
- 9 Why do some of the tests fail when I compile with certain compilers (e.g. ifort)?
- 10 Why do I get run-time errors with the Python wrapper or GUI when using conda?
- 11 Is there an easier way to install/run the GUI?
- 12 How can I create a conda environment in which to build RTTOV?
Questions for other users and developers can be posted on the RTTOV Forum or you can contact the developers via the Helpdesk.
-
Do I need to bother to upgrade to the latest version of RTTOV?
Each new release of RTTOV adds new functionality which you may wish to exploit in your applications. While there are usually changes to the interface with major releases that require modifications in your code which calls RTTOV, these are documented in detail in the user guide. The NWP SAF actively supports only the most recent major version of RTTOV and it’s associated minor releases, although we will provide coefficients and bug fixes for the last minor release of the previous major version. Important note: see this information about deprecated and recommended optical depth coefficients.
The main changes in each RTTOV release are listed on the what’s new page.
-
I’m upgrading from RTTOV v13 (or earlier) to v14. How do the profile inputs differ?
When moving from v13 to v14, the input vertical profiles of temperature, water vapour, and trace gases are unmodified. In v13 you provide these on specified pressure levels. In v14 those pressure levels become the pressure “full-levels”. In v14 you must additionally specify the pressure “half-levels”. The number of half-levels is one greater than the number of full-levels. The top half-level is at or close to 0 hPa. The bottom half-level is the surface pressure because the surface is always at the bottom of the profile in v14. The full-levels interleave the half-levels. The full-level pressures are an optional input to v14. If omitted, they are computed as the mean of adjacent half-level pressures.
For scattering inputs for microwave simulations in v14, the hydrometeor/cloud fields are provided on pressure full-levels. This is the same as in RTTOV-SCATT in v13.
For visible/infrared scattering simulations, the hydrometeor/cloud and/or aerosol fields are also provided on pressure full-levels in v14. In v13, these cloud/aerosol fields were provided on the layers bound by the pressure (full-)levels. This means that in the older versions of RTTOV, you must either omit one level from the cloud/aerosol fields (usually the top level, which effectively shifts the cloud/aerosol fields upwards by half a layer), or average the values in adjacent levels for input to RTTOV (which introduces a smoothing/interpolation error).
-
How do the RTTOV v14 pressure levels relate to the ECMWF model levels (e.g. for IFS, CAMS, ERA5 data)?
In RTTOV v14, the ECMWF vertical grid maps directly onto the RTTOV profile structure. The ECMWF model defines pressure half-levels as a linear function of surface pressure based on a fixed set of coefficients. For example, see here for the 137L coefficients. These are the half-levels input to RTTOV v14. The ECMWF model defines pressure full-levels as the mean of adjacent half-level pressure values which is consistent with RTTOV v14. All ECMWF fields of temperature, water vapour, trace gases, hydrometeors, and aerosols are specified on pressure full-levels. Therefore all fields can be copied directly into the relevant members of the RTTOV profile structure.
-
What vertical pressure levels should I obtain ERA5 data on for use with RTTOV?
For RTTOV v14 you must obtain ERA5 data on “model levels”. RTTOV v14 does not accept profile data on fixed pressure levels, so you cannot input ERA5 data on “pressure levels”. It is generally recommended to use data on model levels (137L in the case of ERA5) with all RTTOV versions because of the far higher vertical resolution, and because the top level is much higher.
-
Can I compile the code in single precision to save space?
The RTTOV real, integer and logical “kind” values are defined in the src/main/rttov_kinds.F90 module. However editing this module is not recommended (and hence not supported) and in particular running the AD/K models in single precision can result in significant errors in the output.
-
I don’t have an O3, CO2, CO, N2O, CH4 or SO2 profile to include in the state vector. What can I do?
You can use a coefficient file which includes the relevant gas or gases in the mixed gases. If you use a a coefficient file which allows the relevant gases to vary you do not have to provide profiles of these trace gases: if omitted RTTOV will use the reference (background) profile from the coefficient file. You must take care to set the logical flags for example opts%rt_all%co_data etc to false if you don’t have a CO profile, otherwise RTTOV assumes you are providing a valid profile and will fail if you do not.
You can use the rttov_scale_ref_gas_prof subroutine to populate your profiles structures with scaled copies of the reference profiles. This can be useful, for example, if you wish to use a lower CO2 concentration than the RTTOV reference profile (~400ppm), but you do not have a full atmospheric profile: this subroutine makes it simple to populate your profiles structures with scaled copies of the reference CO2 with a different maximum ppm concentration. See the RTTOV user guide.
-
My profile top is below the top level required by RTTOV (usually 0.005hPa), how do I best extrapolate it?
It is not necessary to do anything in this case: RTTOV interpolates the input profile onto the coefficient levels for the optical depth calculation. Where necessary, profiles are extrapolated at the top of the atmosphere by maintaining the relative position between the relevant training profile limits at the top profile level in all levels above this to the top coefficient level. See the user guide for more details on this. You should ensure that the vertical extent of your input profiles covers the weighting functions of the channels being simulated.
-
Why does compilation with the netCDF library fail?
You must first edit the file build/Makefile.local to point to the location of your netCDF (and possibly also HDF5) installation and to include the relevant compiler and linker flags. You must also regenerate the RTTOV Makefiles to include the netCDF code: this is done automatically when you run the rttov_compile.sh script.
-
Why do some of the tests fail when I compile with certain compilers (e.g. ifort)?
You should increase the stack size before running the test scripts, for example by executing:
$ ulimit -s unlimited
For PC-RTTOV tests running the K model with NTHREADS > 1, you may need to increase the OpenMP stack size as well:
$ export OMP_STACKSIZE=1000M
-
Why do I get run-time errors with the Python wrapper or GUI when using conda?
Some users have found that Python calls to RTTOV or the GUI fail to run. Errors are similar to:
At line 591 of file ../../src/main/rttov_getoptions.F90 Internal Error: get_unit(): Bad internal unit KIND
This affects users who use conda and results from an incompatibility with the compiler environment that conda makes available at run-time vs the system default. This problem does not seem to affect miniconda.
To fix this you should try installing the conda gcc package:
$ conda install gcc
And then do a fresh build of RTTOV. You may also have to recompile the netCDF (and possibly HDF5) library with the version of gfortran from the conda gcc package, and then link the RTTOV build to this library. When running RTTOV you may then need to add the library from your conda environment and the updated netCDF (and HDF5) library to the LD_LIBRARY_PATH.
If you are running on Mac OSX then one user discovered that the following worked:
$ conda install clang_osx-64 clangxx_osx-64 gfortran_osx-64
-
Is there an easier way to install/run the GUI?
A Docker container is available which may help when installing/running the RTTOV-GUI. Full instructions included in the README.md file.
-
How can I create a conda environment in which to build RTTOV?
A user was able to do this by following these steps:
1. $ conda create -n rttov -c conda-forge python=3 hdf5 gfortran_linux-64 netcdf4 netcdf-fortran
NB you may also need to install the meson package in your conda environment to compile the Python interface to RTTOV:
$ conda install meson
2. $ conda activate rttov
3. Copy build/arch/gfortran-openmp (or gfortran) to build/arch/gfortran-conda
4. Update FC, FC77, and CC using the results from echo $FC and echo $CC
5. Add “-shared” to LDFLAGS: LDFLAGS_ARCH
6. Compile RTTOV (use “gfortran-conda”)