RTTOV FAQs

Frequently Asked Questions

Questions for other users and developers can be posted on the RTTOV Forum or you can contact the developers via the Helpdesk.

  1. 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.

    The main changes in each RTTOV release are listed on the what’s new page.

  2. 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/parkind1.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.

  3. 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_ir%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.

    Since RTTOV v12.3 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 Annex N of the RTTOV user guide.

  4. My profile top is below the top level required by RTTOV (usually 0.005hPa), how do I best extrapolate it?

    The easiest way is to use RTTOV’s internal interpolator which interpolates the input profile onto the coefficient levels for the optical depth calculation. When the opts%interpolation%reg_limit_extrap option is set to true (recommended), 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.

    If you don’t want to use the internal interpolation and instead supply a profile on the coefficient levels then for gas concentrations you can use the reference profiles for levels above the top input level. The reference profiles are available on the coefficients download page. You can also access them via the coef structure e.g. for water vapour coefs%coef%ref_prfl_mr(:,coefs%coef%fmv_gas_pos(gas_id_watervapour)) where gas_id_watervapour is available from the rttov_const module. For temperature you can extrapolate from the top level of the input profile using a representative lapse rate from standard atmospheres.

  5. Why does compilation with the HDF5 library fail?

    You must first edit the file build/Makefile.local to point to the location of your HDF5 installation and to include the relevant compiler and linker flags. You must also regenerate the RTTOV Makefiles to include the HDF5 code: this is done automatically when you run the rttov_compile.sh script.

  6. 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
  7. 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 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 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
  8. 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.

  9. 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
    2. conda activate rttov
    3. Copy build/arch/gfortran (or gfortran-openmp) to build/arch/gfortran-conda
    4. Update FC, FC77, and CC using the results from echo $FC and echo $CC
    5. Update LDFLAGS: LDFLAGS=”-shared $LDFLAGS”
    6. Compile RTTOV (use “gfortran-conda”)