The Radio Occultation Processing Package , ROPP

This paper describes the Radio Occultation Processing Package, ROPP, a product of the EUMETSAT Radio Occultation Meteorology Satellite Application Facility (ROM SAF) developed by a large number of scientists over many years. A brief review of the concepts, functionality and structure of ROPP is followed by more detailed descriptions of its key capabilities. Example results from a full chain of processing using some of the ROPP tools are presented. Some current and prospective uses of ROPP are given. Instructions on how to access the code and its supporting documentation are provided.


Introduction
Radio occultation (RO) observations are an increasingly important means of measuring the tropospheric and stratospheric refractivity, and, indirectly, tropospheric and stratospheric temperature and pressure, and tropospheric humidity (e.g.Kursinski et al., 1997;Anthes, 2011).Their high vertical resolution, freedom from significant bias and global coverage are widely recognised (e.g.Anthes et al., 2008) and have led to the extensive use of RO data for atmospheric research (e.g.Schmidt et al., 2010;Zhang et al., 2010), for assimilation in numerical weather prediction (NWP) models (e.g.Cucurull and Derber, 2008;Healy and Thépaut, 2006;Aparicio and Deblonde, 2008) and for climate monitoring (e.g.Steiner et al., 2011;Ho et al., 2012).It follows that there is a need for widely available, well-supported and fully documented software packages that provide the tools to undertake common RO data processing requirements.This paper describes one such package, ROPP.
The Radio Occultation Processing Package, ROPP, is provided by EUMETSAT's 1 Radio Occultation Meteorology Satellite Application Facility (ROM SAF, known as the GRAS SAF before 2012).It comprises software (as source code) and supporting build and test scripts, data files and documentation, which are designed to help users wishing to process, quality-control and assimilate RO data into their NWP models.Facilities are provided for the full chain of RO data processing, from phase delays to bending angles, to refractivities and dry temperatures, and finally to 1D-Var retrieved temperature and humidity profiles.
Although the software is aimed at the GRAS 2 instrument on the Metop 3 satellites, as far as is possible it is generic, in that it can handle any other GNSS 4 -LEO 5 configuration radio occultation mission (COSMIC 6 , CHAMP 7 , etc.).We note, however, that a LEO-LEO configuration is not currently supported.
Prospective users can obtain ROPP from the "ROPP Software" link of the ROM SAF home page (http://www.romsaf.org).They can download the entire ROPP distribution, or individual modules.They can integrate a subset of ROPP code into their own software applications, linking individual modules to their own code.Alternatively, they can use the executable tools provided as part of each module as standalone applications for RO data processing.Fully documented build This paper describes the status of ROPP-7 (v7.0), which was released in October 2013.

Concept and strategy
ROPP should not be viewed as a "black box" processor but as a suite of library functions and example applications (written in Fortran 95).The software was originally intended for users who wish to combine RO-specific routines with their own code, but by now ROPP has developed into a package which offers validated standalone tools for format conversion and RO data processing.Whichever way ROPP is used, users are welcome to modify or replace components in ROPP to suit their existing local systems.
Updates to ROPP -which include new science, modifications in response to new data or software dependencies, and bug fixes -are regularly released by the ROM SAF after a period of review and beta-testing by interested parties.
ROPP functionality mirrors most aspects of the ROM SAF operational data production chain (i.e. the generation of NRT 8 refractivity profiles from bending angles) but will not be exactly the same code -although the operational chain will use some elements of ROPP and vice versa.The publicly available version of ROPP also contains additional alternative algorithms as user-switchable options.

Main functionality
ROPP consists of a number of modules, some of which depend on others.Modules not only contain source code but also build and test scripts, data, example test results and user documentation.The ROPP-7.0 modules and their headline functionalities are listed in Table 1, and the relations between them are indicated in Fig. 1.The main purpose and functionality of each module are discussed in the following sections, but, in brief, the two service modules and three scientific modules of ROPP are as follows.
The utilities module of ROPP includes quality control and range-checking tools, and a variety of conversion routines, including co-ordinate transformations (between Earthcentred inertial (ECI) and Earth-centred, Earth-fixed (ECEF) co-ordinates, geopotential and geometric heights, etc.) and date/time and unit conversions.
The input and output module of ROPP provides access to a variety of data formats: -gridded background field data sets in GRIB2 16 format.
ROPP handles these diverse data formats by converting them to its own well-defined RO data structure (in netCDF).
The preprocessing module contains tools to undertake the staged preprocessing from excess phase (i.e. the phase accumulated by the carrier wave during transit of the atmosphere and ionosphere above that which would be accumulated along a straight line path in vacuo between the transmitter and receiver) to bending angle, through to refractivity and dry temperature (Gorbunov et al., 2011).It also contains tools to diagnose tropopause heights from profiles of bending angle, refractivity, dry temperature or background model temperature (Lewis, 2009;WMO, 1957).
The forward modelling module contains forward operators (including tangent linear, adjoint and gradient calculation code) for pressure-based, height-based and hybrid NWP model vertical grids, to generate refractivities and bending angles from model state variables (Healy and Thépaut, 2006).It also includes a 2-D bending angle calculation tool (Healy et al., 2007 The 1D-Var module contains cost function minimisers that allow the retrieval of pressure/height, temperature and humidity profiles from refractivity or bending angle profiles, given colocated NWP model background profiles (Healy and Eyre, 2000;Rennie, 2010).
ROPP also includes sample reference data files and example output test files, as well as full user documentation.Further details of its contents and capabilities can be found in the "ROPP Overview Guide" document at http://www.romsaf.org.

Detailed view of ROPP
More detailed descriptions of the ROPP modules, and of the third-party software needed to run them, follow.

Utility module
The ROPP UTILS module provides height-and dateconversion routines, and other general purpose library functions such as string handling, message output, array manipulation and basic mathematical routines.These are used by other ROPP modules and would probably not be called directly by users from their own programs.Table 2 lists some of the routines in this module.
ROPP is designed for terrestrial applications.If a user wished to develop RO tools appropriate to other planetary atmospheres, the ROPP UTILS module is where the bulk of the changes (to planetary radius, gravity, rotation rate etc.) would need to be made.

Input/output module
The ROPP IO module reads radio occultation data from a variety of sources (EUMETSAT; BUFR; UCAR; GFZ; and, for background profiles, text and GRIB files) and converts them to ROPP's internal, netCDF-based format for radio occultation data.ROPP can also write out such data in BUFR format.Most of these data-reading tools use data thinning and rangechecking routines which are themselves part of the module.Table 3 lists some of the routines and tools in the IO module.

Preprocessing module
The ROPP PP module has been largely adopted from the OCC code developed by Michael Gorbunov at the Institute for Atmospheric Physics, Moscow.OCC has been shown to generate refractivities that are in excellent agreement (less than 0.2 % systematic difference) with those calculated at UCAR and by forward modelling ECMWF analyses (http: //www.ecmwf.int;Gorbunov et al., 2011).
ROPP PP provides routines to compute L1 and L2 bending angles from excess phase data by geometrical optics and wave optics methods.Ionospherically corrected bending angle profiles are derived by combining L1 and L2 bending angles linearly or in a statistically optimised way.Climatological bending angle profiles are appended above the corrected ones, in order that refractivity profiles can be calculated by means of an inverse Abel transform.Dry temperatures are generated from the refractivities.ROPP PP also contains code to calculate tropopause heights from a variety of fields in an RO profile.Table 4 lists some of the routines and tools in this module.
In more detail, the tools in the ropp_pp module perform the following tasks.
ropp_pp_occ_tool processes excess phase and amplitude data into refractivity, bending angle and dry temperature profiles, in the following steps.
-Compute the occultation point and undulation (height of geoid minus height of ellipsoid).
-Filter, quality-control and carry out mission-specific processing of amplitude and phase data (Gorbunov et al., 2006).
-Compute bending angles by geometric optics or wave optics (CT2) (Gorbunov and Lauritsen, 2004).By default, ROPP uses CT2 below 25 km and geometric optics above.The concatenated bending angles are then interpolated onto a common (i.e. the same for L1 and L2) uniformly spaced grid of impact parameters, whose default spacing is 100 m.
-Compute inverse Abel transform of the ionospherically corrected bending angle profile to generate a refractivity profile.
-Generate a dry temperature profile corresponding to this refractivity profile.
-Write results to the RO data structure and thence to the output file.
Figure 3 shows the output of ropp_pp_occ_tool when the unprocessed COSMIC excess phase data shown in Fig. 2 are passed through it.The derived bending angles are also displayed.
ropp_pp_invert_tool is almost the same as ropp_pp_occ_tool, but starts from "level 1b" L1 and -Read the bending angle, refractivity, dry temperature or background model temperature profile.
-Compute the covariance transform (COT) (Lewis, 2009) of the bending angle or refractivity, or the lapse rate (LRT) of dry temperature or temperature.
-Diagnose the tropopause height (TPH) in the appropriate vertical co-ordinate from the maximum of the COT or the value of the LRT.Also, within the tropics, diagnose the "cold point" tropopause height (CPT) for the temperature-based diagnostics.
-Diagnose and record a TPH quality control (QC) flag, based on confidence in the derived TPH.
-Write the TPH and its QC flag to the RO data structure and thence to the output file.
Figure 4 shows the tropopause heights for the COS-MIC occultation and colocated/simultaneous ECMWF background profile used in this paper.All six are reasonably close, and the four "observationally" based TPHs are within 400 m after the impact altitude of the bending-angle-based TPH has been converted to altitude by dividing by the refractive index at the tropopause (a downward shift of around 200 m).

Forward modelling module
The ROPP FM module contains forward operators which calculate refractivity and bending angle profiles from background model data on pressure-based, height-based and "hybrid" NWP model vertical grids.Tangent linear, adjoint and gradient codes of the forward operators are provided for use in assimilation processing.Table 5 lists some of the routines and tools in this module.
In more detail, the tools in the ropp_fm module perform the following tasks.
ropp_fm_bg2ro_1d forward models 1-D background fields into profiles of refractivity and bending angle, in the following steps.
-Read level 2b input model data (ECMWF pressurebased or Met Office height-based) and generate a "state vector" x of pressure p, temperature T and humidity q as functions of geopotential height Z.
-Read or define (if not in input file) the observation levels on which the output will be calculated.
-If desired, calculate the forward model gradients ∂N i /∂x j and ∂α i /∂x j .
The "innovation" curves (i.e.observation minus forward modelled background) in the top two panels of Fig. 5 show the bending angles and refractivities that result from passing the background profiles in the bottom two panels of Fig. 2  through ropp_fm_bg2ro_1d.
ropp_fm_bg2ro_2d extends the forward modelling of ropp_fm_bg2ro_1d by accounting for variation of the refractivity across the occultation plane, rather than just in the vertical at the tangent point.This has been found to have a beneficial effect on O-B differences in the lower troposphere (Healy et al., 2007).It works as follows.
-Read 2-D level 2b input model data (ECMWF pressurebased or Met Office height-based) and generate a 2-D state vector x of pressure p, temperature T and humidity q as functions of geopotential height Z and (uniformly spaced) horizontal angle θ .-Read or define (if not in input file) observation levels on which the output will be calculated.
-Compute the 1-D bending angle profile at the centre of the 2-D occultation slice, using the Abel transform method of ropp_fm_bg2ro_1d, for comparison.3), and its fractional difference from the background b and 1D-Var solution a, after forward modelling (effectively) by ropp_fm_bg2ro_1d.Also included: fractional difference to UCAR-generated bending angle u.Top right: same but for refractivity.Bottom left: background temperatures, as generated by grib2bgrasc and bgrasc2ropp (see Fig. 3), and the difference from the solution temperatures, as returned by ropp_1dvar_bangle.Bottom right: as bottom left but for specific humidities.

1D-Var retrieval module
The ROPP 1DVAR module provides quality control, minimisation and diagnostic routines for the retrieval of pressure, geopotential height, temperature and humidity profiles from profiles of refractivity or bending angle and (colocated, simultaneous) NWP background profiles, together with error covariance matrices of the observation and background.Table 6 lists some of the routines and tools in this module.In more detail, the tools in the ropp_1dvar module perform the following tasks.
ropp_1dvar_bangle carries out a 1D-Var minimisation of the usual cost function J , where where x is the state vector, b is the background state vector, o is the vector of bending angle observations, H is the (non-linear) forward model (Sect.3.4), B is the background error covariance matrix and O is the covariance matrix of the combined measurement and forward model error.It works as follows.
-Read input model data (ECMWF pressure-based or Met Office height-based) and generate the background state vector b of temperature T and humidity q as functions of geopotential height Z.
-Read the background error matrix B. The correlations usually come from an auxiliary file.The diagonal elements, the variances, can also be supplied externally or profile-by-profile in the background file.
-Read the bending angles on impact parameters to generate the observation vector o.
-Read the bending angle error covariance matrix O.The correlations usually come from an auxiliary file.(The bending angle correlation matrix is usually assumed to be the identity.)The diagonal elements, the variances, can also be supplied externally or profile-by-profile in the observation file.
-Carry out quality control based on range-checking, O-B (i.e.o − H(b)) and probability of gross error, and generate diagnostics if desired.
-Forward model bending angles from solution state vector a.
-Generate O-A (i.e.o −H(a)) and analysis error covariance matrix A.
-Write to RO data structure and thence to output file.
Figure 5 shows the result of passing the (LC) bending angle profile shown in Fig. 3 and the colocated ECMWF background profile shown in Fig. 2 through ropp_1dvar_bangle.The retrieval has generally pulled the background towards the observations, as expected.Temperature increments of around 1 K and specific humidity increments of around 1 g kg −1 near the surface result.
Figure 5 also compares the ROPP-derived bending angles and refractivities with those in the corresponding "atmPrf" file, as processed by UCAR.Below 40 km the ROPP refractivities are closer to those of UCAR than they are to the forward modelled ECMWF background, which lends confidence to the integrity of the ROPP refractivities for this occultation.Above 40 km the ROPP refractivities are up to 5 % larger than those of UCAR.This may be due to different statistical optimisation (blending of noisy bending angles with smoother climatology) applied in the two codes.ROPP is closer to the ECMWF background in this regime.
The UCAR and ROPP bending angles are also closer to each other than either is to the forward modelled ECMWF background between 10 and 40 km.Below 10 km the difference between UCAR and ROPP is possibly due to different treatments of the open loop data in this regime.Above 40 km the differences may again be due to different statistical optimisation in the two codes.drawn the background to the observations.(Note that the temperature and humidity increments in this figure come from the bending angle retrieval.)

Testing module
The ROPP TEST module comprises a comprehensive suite of test routines, and associated test data sets, which can be run on a range of compilers and platforms.This "Test Folder" is one of the main ways of formally validating the ROPP code prior to public release of a new major version of the package.Table 7 lists some of the elements of this module.
Note that the complete ropp_test suite is not intended for users but for internal validation of the ROPP code, although some functionality of ropp_test is included in ropp_io, ropp_pp, ropp_fm and ropp_1dvar for users to verify that the code has been correctly built.

Third-party software
Full implementation of ROPP requires the installation of some standard freely available third-party software packages, principal among which is the netCDF library for general data input and output.Some tools need access to a BUFR library for reading or writing NWP data in that format.Another uses routines in a GRIB library to extract background profiles from a gridded data set.The ROPP documentation clearly indicates which packages are needed by which modules and tools.Naturally, any licence restrictions associated with these packages must be adhered to by ROPP users.

Uses of ROPP
It is important to realise that ROPP is designed to be used both as a research tool and for operational processing.
The following organisations use, or intend shortly to use, ROPP in their operational systems, where its main use is in the assimilation of RO data.-The Korea Institute of Atmospheric Prediction Systems (KIAPS) intend to use ROPP to assimilate bending angles into their new data assimilation system (H.Kwon, personal communication, 2014).
-The Centro de Previsão de Tempo e Estudos Climáticos (CPTEC, Brazil) use ROPP's forward modelling and quality control tools for the assimilation of refractivities in their research data assimilation system.They hope to start pre-operational testing soon (L.Sapucci, personal communication, 2014).
-The Chinese Academy of Sciences (CAS) are considering whether to use ROPP in the preprocessing of data from the GNOS instrument (W.Bai, personal communication, 2014).
Forward models based on the implementations in ROPP are also used operationally at the Met Office and ECMWF (S.Healy, personal communication, 2014).Although ROPP is used extensively within the ROM SAF as a research tool, it is beginning to be used more widely, as in the following examples.
- Zhang et al. (2010) used ROPP to examine the effect of ionospheric correction on radio occultation measurements over Australia.
- Zin et al. (2012) investigated the properties of the ROSA GNSS receiver with ROPP.
- Ringer and Healy (2008) investigated climatological trends in bending angle using the ROPP forward model algorithms.
-Von Engeln et al. 2009 compared bending angle observations made by the GRAS instrument to ECMWF forecasts which were forward modelled with (effectively) ROPP.
As ROPP is developed, new functionality will be introduced, which, it is hoped, will be of interest to researchers in a range of areas.

Conclusions
This paper has given a brief overview of the Radio Occultation Processing Package.Its structure and functionality have been briefly described, and details of its key software tools have been given.Results have been shown of a "full chain" of ROPP processing, from COSMIC data files and ECMWF background fields to ionospherically corrected bending angles and refractivities, to 1D-Var retrievals of temperature and humidity.Example tropopause height diagnostics of the resulting profiles have also been shown.Figure 6 summarises the full data flow.
Past, present and future examples of the use of ROPP have been given.The hope is that this paper may encourage other radio occultation scientists to try using ROPP to process their data.
Further information on the use of ROPP within the ROM SAF can be found from the "Publications" link of the ROM SAF home page (http://www.romsaf.org).This page also has links to ROM SAF reports, conference proceedings, articles and other publications of interest to those in the field of radio occultation.

Figure 1 .
Figure1.The modules (bold) and tools (italic) within ROPP-7.0.The module at the head of an arrow depends directly on the module at its tail.

Figure 2 .
Figure 2. The results of passing "atmPhs" COSMIC data through some of the tools in the ropp_io module.Top left: L1 and L2 signal-to-noise ratios (unprocessed); top right: L1 and L2 excess phases (unprocessed); bottom left: colocated background temperatures extracted from ECMWF analysis/forecast at 00:00 and 06:00 UTC, and the resulting simultaneous profile, obtained by linearly interpolating in time between them, as produced by grib2bgrasc and bgrasc2ropp; bottom right: as bottom left but for specific humidity.

Figure 5 .
Figure5.The results of passing COSMIC bending angles and refractivities, and the colocated/simultaneous ECMWF background fields, through ropp_1dvar_bangle and ropp_1dvar_refrac.Top left: observed bending angle profile o, as generated by ropp_pp_occ_tool (see Fig.3), and its fractional difference from the background b and 1D-Var solution a, after forward modelling (effectively) by ropp_fm_bg2ro_1d.Also included: fractional difference to UCAR-generated bending angle u.Top right: same but for refractivity.Bottom left: background temperatures, as generated by grib2bgrasc and bgrasc2ropp (see Fig.3), and the difference from the solution temperatures, as returned by ropp_1dvar_bangle.Bottom right: as bottom left but for specific humidities.
Figure5shows the result of passing the (LC) bending angle profile shown in Fig.3and the colocated ECMWF background profile shown in Fig.2through ropp_1dvar_bangle.The retrieval has generally pulled the background towards the observations, as expected.Temperature increments of around 1 K and specific humidity increments of around 1 g kg −1 near the surface result.Figure5also compares the ROPP-derived bending angles and refractivities with those in the corresponding "atmPrf" file, as processed by UCAR.Below 40 km the ROPP refractivities are closer to those of UCAR than they are to the forward modelled ECMWF background, which lends confidence to the integrity of the ROPP refractivities for this occultation.Above 40 km the ROPP refractivities are up to 5 % larger than those of UCAR.This may be due to different statistical optimisation (blending of noisy bending angles with smoother climatology) applied in the two codes.ROPP is closer to the ECMWF background in this regime.The UCAR and ROPP bending angles are also closer to each other than either is to the forward modelled ECMWF background between 10 and 40 km.Below 10 km the difference between UCAR and ROPP is possibly due to different treatments of the open loop data in this regime.Above 40 km the differences may again be due to different statistical optimisation in the two codes.ropp_1dvar_refrac does the same as ropp_1dvar_bangle but uses refractivity observations instead of bending angles.Naturally, different observation background errors O are needed.The O-B and O-A profiles of a retrieval based on the refractivities generated (automatically) by ropp_pp_occ_tool, by inverse Abel transform of the bending angles of Fig. 3, are shown in the top right element of Fig. 5. Again, the 1D-Var retrieval procedure has

Figure 6 .
Figure6.Data flow in the "full chain" of processing described in this paper.Analogous flowcharts would apply if starting from, for example, CHAMP RO data from GFZ and background data from the Met Office NWP model.For brevity, α and "bangle" denote bending angle, while N and "refrac" denote refractivity.

Table 1 .
.0 modules and their main functionalities.

Table 3 .
Subroutines and standalone executables in the ROPP IO module.

Table 4 .
Subroutines and standalone executables in the ROPP PP module.

Table 5 .
Subroutines and standalone executables in the ROPP FM module.

Table 6 .
Subroutines and standalone executables in the ROPP 1DVAR module.

Table 7 .
Elements of the ROPP TEST module.

-
The ROM SAF uses ROPP algorithms to generate operational refractivity profiles from bending angles provided by EUMETSAT, and code based on ROPP to generate retrieved temperature and humidity profiles from those refractivities(Lauritsen et al., 2011).ROPP is also used in the ROM SAF's offline operational processing of gridded climate products, which starts from excess phase and amplitude data (http://www.romsaf.org).