\chapter{Mapping of netCDF variables to BUFR Section 4 Entries}\label{app:bufr}

The following table outlines how \acrfull{bufr} Section 4 entries
are filled from the corresponding netCDF variables.  The [BUFR]
document and the defined Data Fields in this document are used in
the table below to identify entries. Notes: (1) all other BUFR
sections can be filled with information provided in the [BUFR]
document, except for Section 1, Octet Number 16-22, where the
reference time of the occultation shall be used (UTC time derived from
\texttt{\hyphenchar\font=-1{}/data/level\_1b/utc\_georef\_absdate},
\texttt{\hyphenchar\font=-1{}/data/level\_1b/utc\_georef\_abstime}); (2)
BUFR Edition 4 is used; (3) no data at level 2 is provided; (4) the table
is currently based on GRAS, using GPS and the L1/L2 frequencies, the
additional info provides some further impacts for L1/L5 frequency use.


\footnotesize
\begin{longtable}{>{\setlength\hangindent{5mm}}p{0.15\textwidth}p{0.5\textwidth}p{0.3\textwidth}}     % coldefs

       % Define the header
       \toprule
       \textbf{Data Field} & \textbf{NetCDF4 Variables Used} & \textbf{Additional Info} \\
       \midrule
       \endhead

       % Define the footer and caption
       \bottomrule
       \caption[Mapping between BUFR Section 4 and EPS-SG netCDF4 variables]{Mapping between BUFR Section 4 and PFS netCDF4 variables.} \\
       \endfoot

       % Table rows
         \multicolumn{3}{c}{\textbf{Time of Occultation Start}}\\
       7-12   & \texttt{\hyphenchar\font=-1{}/data/level\_1b/utc\_start\_absdate} \newline 
                \texttt{\hyphenchar\font=-1{}/data/level\_1b/utc\_start\_abstime} 
              & converted to UTC time \\
         \multicolumn{3}{c}{\textbf{RO Summary Quality Information}}\\
       13     & \texttt{\hyphenchar\font=-1{}/quality/overall\_quality\_ok} \newline 
                \texttt{\hyphenchar\font=-1{}Global Attribute environment} \newline
                \texttt{\hyphenchar\font=-1{}/quality/rs\_data\_available} \newline 
                \texttt{\hyphenchar\font=-1{}/quality/ol\_data\_available} \newline
                \texttt{\hyphenchar\font=-1{}/data/occultation/occultation\_type} \newline
                \texttt{\hyphenchar\font=-1{}/quality/cl\_snr\_ca\_ok} \newline 
                \texttt{\hyphenchar\font=-1{}/quality/cl\_snr\_p1\_ok} \newline
                \texttt{\hyphenchar\font=-1{}/quality/cl\_snr\_p2\_ok} \newline
              & 16bit field; bit1 set as overall\_quality\_ok;
                bit2 derived from attribute environment, set to Offline if not equals Operational;
                bit3 derived from occultation\_type; bit4 set to non-nominal if quality of all SNR values
                is set to 0; bit5 same as bit1; bit6 and bit7 unset (default); bit8 set if
                rs or ol available; bit9 unset (default); bit10 currently set to L2P (GRAS, not 
                applicable for RO); all remaining bits unset (default)\\
       14     & \texttt{\hyphenchar\font=-1{}/quality/overall\_quality\_ok}
              & multiplied with 100, thus either 0\,\% or 100\,\% \\
         \multicolumn{3}{c}{\textbf{LEO \& GNSS POD}}\\
       15-17  & \texttt{\hyphenchar\font=-1{}/data/occultation/position\_rec\_fixed} & \\
       18-20  & \texttt{\hyphenchar\font=-1{}/data/occultation/velocity\_rec}       & \\
       21     & \texttt{\hyphenchar\font=-1{}/data/occultation/prn}                & First letter determines setting, e.g. for GPS 401\\
       22     & \texttt{\hyphenchar\font=-1{}/data/occultation/prn}                & Integer used to define the PRN number \\
       23-25  & \texttt{\hyphenchar\font=-1{}/data/occultation/position\_gns\_fixed} & \\
       26-28  & \texttt{\hyphenchar\font=-1{}/data/occultation/velocity\_gns}       & \\
         \multicolumn{3}{c}{\textbf{Local Earth Parameters}}\\
       29     & \texttt{\hyphenchar\font=-1{}/data/level\_1b/utc\_start\_absdate}  \newline
                \texttt{\hyphenchar\font=-1{}/data/level\_1b/utc\_start\_abstime}  \newline
                \texttt{\hyphenchar\font=-1{}/data/level\_1b/utc\_georef\_absdate} \newline
                \texttt{\hyphenchar\font=-1{}/data/level\_1b/utc\_georef\_abstime}    & Time in [s] between geo and start time \\
       30     & \texttt{\hyphenchar\font=-1{}/data/occultation/latitude} & \\
       31     & \texttt{\hyphenchar\font=-1{}/data/occultation/longitude} & \\
       32-34  & \texttt{\hyphenchar\font=-1{}/data/occultation/r\_curve\_centre\_fixed} & \\
       35     & \texttt{\hyphenchar\font=-1{}/data/occultation/r\_curve} & \\
       36     & \texttt{\hyphenchar\font=-1{}/data/occultation/azimuth\_north} & \\
       37     & \texttt{\hyphenchar\font=-1{}/data/occultation/undulation} & \\
         \multicolumn{3}{c}{\textbf{RO Step 1b Data}}  \\
       38     &                                      & Determined from number of thinned levels \\
       39     & \texttt{\hyphenchar\font=-1{}/data/level\_1b/thinned/lat\_tp} & \\
       40     & \texttt{\hyphenchar\font=-1{}/data/level\_1b/thinned/lon\_tp} & \\
       41     & \texttt{\hyphenchar\font=-1{}/data/level\_1b/thinned/azimuth\_tp} & \\
       42     &                                      & 3 for corrected, L1, and L2 or L5 \\
       43     &                                      & 0 (corrected), L1, L2 or L5 frequency \\
       44     & \texttt{\hyphenchar\font=-1{}/data/level\_1b/thinned/impact} & Impact parameters for all frequencies the same\\
       45     & \texttt{\hyphenchar\font=-1{}/data/level\_1b/thinned/bangle} \newline
                \texttt{\hyphenchar\font=-1{}/data/level\_1b/thinned/bangle\_ca} \newline
                \texttt{\hyphenchar\font=-1{}/data/level\_1b/thinned/bangle\_ps} \newline & Currently L1/L2 based, TBD for L1/L5 use\\
       46-48  &                                       & Currently unused \\
\end{longtable}
\normalsize


