Frequently Asked Questions
RTTOV FAQs
- 1 Do I need to bother to upgrade to the latest version of RTTOV?
- 2 Can I compile the code in single precision to save space?
- 3 I don’t have an O3, CO2, CO, N2O, CH4 or SO2 profile to include in the state vector. What can I do?
- 4 My profile top is below the top level required by RTTOV (usually 0.005hPa), how do I best extrapolate it?
- 5 Why does compilation with the netCDF library fail?
- 6 Why do some of the tests fail when I compile with certain compilers (e.g. ifort)?
- 7 Why do I get run-time errors with the Python wrapper or GUI when using conda?
- 8 Is there an easier way to install/run the GUI?
- 9 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.
-
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
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”)