Skip to content

Getting Started with DART RTTOV

Tim Hoar edited this page Aug 17, 2020 · 2 revisions

This document has the following sections:

Building RTTOV

First, you'll want to download RTTOV from here:

https://nwp-saf.eumetsat.int/site/software/rttov/download/

You will need to register for an account with EUMETSAT if you don't have one. Then login with your username, etc. You should get a compressed tar file with a name like rttov123.tar.gz I untarred it into a directory that had the version number.

When built, the RTTOV directory will occupy about 2Gb. Build RTTOV as per the instructions. When I built it, it required knowing where the HDF5 and netCDF libraries were located, and you could optionally specify a location to LAPACK if that was already installed. Essentially, you edited the build/Makefile.local file as per the instructions in the file, ran the rttov_compile.sh script and let it build for a few minutes. In the end, the runtime output was:

... make[1]: Leaving directory '/glade/work/thoar/rttov/12.3/src/gui'

RTTOV compiled successfully

0[1426] cheyenne2:/<4>12.3/build >


While RTTOV is building, download the coefficients. Grab (any version of)
`rtcoef_eos_2_airs.H5` and `sccldcoef_eos_2_airs.H5` from:

https://nwp-saf.eumetsat.int/site/software/rttov/download/coefficients/coefficient-download/

The coefficients should go in the rttov-recommended directory (since I downloaded v12.3, the base directory was `rtcoef_rttov12` - there are many coefficient directories in there) and then must be linked to the DART run directory during an experiment. From the coefficient-download page, follow the directions outlined in:
`Download to folders as follows:`

Downloading the correct set of coefficient files for the RTTOV configuration of interest requires familiarity with RTTOV. Be warned.

You will need some of the information in the `Makefile.local` and the location of the RTTOV 
installation to incorporate into the build configuration for DART.

## Building DART

These instructions will use the notation that `$DART` is the directory of your DART installation.

In the `$DART/build_templates` directory, copy the appropriate RTTOV template
to the _mkmf.template_ ... but before you run _quickbuild.csh_ you must first add the
`obs_def_rttov_mod.f90` to the `input.nml:preprocess_nml:input_files` variable to add
the capability to use the RTTOV forward operators. Below is an example, you may not need or want all of these, but for this purpose the important part is that `obs_def_rttov_mod.f90` is part of the list:

&preprocess_nml overwrite_output = .true., input_obs_kind_mod_file = '../../../assimilation_code/modules/observations/DEFAULT_obs_kind_mod.F90', output_obs_kind_mod_file = '../../../assimilation_code/modules/observations/obs_kind_mod.f90', input_obs_def_mod_file = '../../../observations/forward_operators/DEFAULT_obs_def_mod.F90', output_obs_def_mod_file = '../../../observations/forward_operators/obs_def_mod.f90', input_files = '../../../observations/forward_operators/obs_def_reanalysis_bufr_mod.f90', '../../../observations/forward_operators/obs_def_radar_mod.f90', '../../../observations/forward_operators/obs_def_metar_mod.f90', '../../../observations/forward_operators/obs_def_dew_point_mod.f90', '../../../observations/forward_operators/obs_def_rel_humidity_mod.f90', '../../../observations/forward_operators/obs_def_altimeter_mod.f90', '../../../observations/forward_operators/obs_def_gps_mod.f90', '../../../observations/forward_operators/obs_def_vortex_mod.f90', '../../../observations/forward_operators/obs_def_gts_mod.f90', '../../../observations/forward_operators/obs_def_rttov_mod.f90', /



Look in the DART `build_templates` directory and copy either `mkmf.template.rttov.gfortran` or
`mkmf.template.rttov.intel` to `mkmf.template` and configure for your system. We have tried to make it so that you only have to specify the location of three software packages:
1. NETCDF
2. HDF
3. RTTOV

The libraries and compile options should be correct if the three library locations are specified correctly. Let us know if this is not true for you - and if you've solved it, let us know what you had to do!

As always, if you want to run DART with debugging, there is an example `FFLAGS` statement that is commented out. You can swap that with the 'normal' setting that has light optimization.

Run _quickbuild.csh_ in the normal fashion.

cd $DART/models/wrf/work ./quickbuild.csh


## Running a trivial _perfect_model_obs_ experiment

### Preparation

There is a database `rttov_sensor_db.csv` that relates the observation, channels etc. to a required coefficient file name - the database must be available in the run directory. These coefficient file names are intended to be similar to (if not identical to) the coefficient filenames from EUMETSAT.
Link the RTTOV coefficient files to the expected coefficient filename in the run directory.
The DART executables and input namelist must also be present. The following is an example and not meant to
be **all** that is required.

cd <wherever_you_run> ln -s $DART/observations/forward_operators/rttov_sensor_db.csv . ln -s $DART/models/wrf/work/perfect_model_obs . ln -s $DART/models/wrf/work/input.nml . ...


The `input.nml` must be edited to
- select the RTTOV options
- the WRF variables necessary to support the forward operators
- all the rest of the DA options

The advantage of doing a simple _perfect_model_obs_ (pmo) test is that it runs the forward operators exactly as is done in _filter_, at a much lower cost (only need 1 WRF state!).  If the DART QC code in the `obs_seq.out` is not `0`, there is a problem.  If the forward operator fails in pmo, it gets assigned a QC value of `1000` in addition to any error code from the model. For instance, an error code of `1003` means that the WRF `model_mod:model_interpolate()` routine returned an error code of 3 ... `"3 = unsupported obs kind"`. You can determine what variables were needed by the `$DART/observations/forward_operators/obs_def_rttov_mod.f90` _get_expected_radiance()_ routine and check to see that they are specified to be part of the DART WRF state and that the WRF _model_interpolate()_ routine supports them.

## Getting real observations.

Running a real experiment requires real observations. At present, there are three observation converters: AIRS, GMI, and AMSU/A
Be advised that the units of the forward operator must match the units of the observations in the observation sequence files.
Presently, the DART/RTTOV implementation is such that all observations of QTY_BRIGHTNESS_TEMPERATURE are in degrees Kelvin,
all observations of QTY_RADIANCE are as described in the RTTOV v12 user guide V1.3 (p54): "mW/cm-1/sr/sq.m"
(Doc ID: NWPSAF-MO-UD-037, Date: 05/03/2019)

More information on each of the converters (data sources, etc.) is coming soon.