New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
Changeset 12178 for NEMO/branches/2019/dev_r11078_OSMOSIS_IMMERSE_Nurser/doc/latex/NEMO/subfiles/chap_OBS.tex – NEMO

Ignore:
Timestamp:
2019-12-11T12:02:38+01:00 (4 years ago)
Author:
agn
Message:

updated trunk to v 11653

Location:
NEMO/branches/2019/dev_r11078_OSMOSIS_IMMERSE_Nurser/doc
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2019/dev_r11078_OSMOSIS_IMMERSE_Nurser/doc

    • Property svn:ignore deleted
    • Property svn:externals set to
      ^/utils/badges badges
      ^/utils/logos logos
  • NEMO/branches/2019/dev_r11078_OSMOSIS_IMMERSE_Nurser/doc/latex

    • Property svn:ignore deleted
  • NEMO/branches/2019/dev_r11078_OSMOSIS_IMMERSE_Nurser/doc/latex/NEMO

    • Property svn:externals set to
      ^/utils/figures/NEMO figures
  • NEMO/branches/2019/dev_r11078_OSMOSIS_IMMERSE_Nurser/doc/latex/NEMO/subfiles

    • Property svn:ignore set to
      *.ind
      *.ilg
  • NEMO/branches/2019/dev_r11078_OSMOSIS_IMMERSE_Nurser/doc/latex/NEMO/subfiles/chap_OBS.tex

    r11123 r12178  
    22 
    33\begin{document} 
    4 % ================================================================ 
    5 % Chapter observation operator (OBS) 
    6 % ================================================================ 
     4 
    75\chapter{Observation and Model Comparison (OBS)} 
    86\label{chap:OBS} 
    97 
    10 Authors: D. Lea, M. Martin, K. Mogensen, A. Vidard, A. Weaver, A. Ryan, ...   % do we keep that ? 
    11  
    12 \minitoc 
    13  
    14 \newpage 
    15  
    16 The observation and model comparison code (OBS) reads in observation files 
    17 (profile temperature and salinity, sea surface temperature, sea level anomaly, sea ice concentration, and velocity) and calculates an interpolated model equivalent value at the observation location and nearest model timestep. 
     8%\subsubsection*{Changes record} 
     9%\begin{tabular}{l||l|m{0.65\linewidth}} 
     10%    Release   & Author        & Modifications \\ 
     11%    {\em 4.0} & {\em D. J. Lea} & {\em \NEMO\ 4.0 updates}  \\ 
     12%    {\em 3.6} & {\em M. Martin, A. Ryan} & {\em Add averaging operator, standalone obs oper} \\ 
     13%    {\em 3.4} & {\em D. J. Lea, M. Martin, ...} & {\em Initial version}  \\ 
     14%    {\em --\texttt{"}--} & {\em ... K. Mogensen, A. Vidard, A. Weaver} & {\em ---\texttt{"}---}  \\ 
     15%\end{tabular} 
     16 
     17\thispagestyle{plain} 
     18 
     19\chaptertoc 
     20 
     21\paragraph{Changes record} ~\\ 
     22 
     23{\footnotesize 
     24  \begin{tabularx}{\textwidth}{l||X|X} 
     25    Release & Author(s) & Modifications \\ 
     26    \hline 
     27    {\em   4.0} & {\em ...} & {\em ...} \\ 
     28    {\em   3.6} & {\em ...} & {\em ...} \\ 
     29    {\em   3.4} & {\em ...} & {\em ...} \\ 
     30    {\em <=3.4} & {\em ...} & {\em ...} 
     31  \end{tabularx} 
     32} 
     33 
     34\clearpage 
     35 
     36The observation and model comparison code, the observation operator (OBS), reads in observation files 
     37(profile temperature and salinity, sea surface temperature, sea level anomaly, sea ice concentration, and velocity) and calculates an interpolated model equivalent value at the observation location and nearest model time step. 
    1838The resulting data are saved in a ``feedback'' file (or files). 
    1939The code was originally developed for use with the NEMOVAR data assimilation code, 
    2040but can be used for validation or verification of the model or with any other data assimilation system. 
    2141 
    22 The OBS code is called from \mdl{nemogcm} for model initialisation and to calculate the model equivalent values for observations on the 0th timestep. 
    23 The code is then called again after each timestep from \mdl{step}. 
    24 The code is only activated if the namelist logical \np{ln\_diaobs} is set to true. 
     42The OBS code is called from \mdl{nemogcm} for model initialisation and to calculate the model equivalent values for observations on the 0th time step. 
     43The code is then called again after each time step from \mdl{step}. 
     44The code is only activated if the \nam{obs}{obs} namelist logical \np{ln_diaobs}{ln\_diaobs} is set to true. 
    2545 
    2646For all data types a 2D horizontal interpolator or averager is needed to 
     
    2848For {\em in situ} profiles, a 1D vertical interpolator is needed in addition to 
    2949provide model fields at the observation depths. 
    30 This now works in a generalised vertical coordinate system.  
    31  
    32 Some profile observation types (\eg tropical moored buoys) are made available as daily averaged quantities. 
     50This now works in a generalised vertical coordinate system. 
     51 
     52Some profile observation types (\eg\ tropical moored buoys) are made available as daily averaged quantities. 
    3353The observation operator code can be set-up to calculate the equivalent daily average model temperature fields using 
    34 the \np{nn\_profdavtypes} namelist array. 
     54the \np{nn_profdavtypes}{nn\_profdavtypes} namelist array. 
    3555Some SST observations are equivalent to a night-time average value and 
    3656the observation operator code can calculate equivalent night-time average model SST fields by 
    37 setting the namelist value \np{ln\_sstnight} to true. 
    38 Otherwise the model value from the nearest timestep to the observation time is used. 
    39  
    40 The code is controlled by the namelist \textit{namobs}. 
     57setting the namelist value \np{ln_sstnight}{ln\_sstnight} to true. 
     58Otherwise (by default) the model value from the nearest time step to the observation time is used. 
     59 
     60The code is controlled by the namelist \nam{obs}{obs}. 
    4161See the following sections for more details on setting up the namelist. 
    4262 
    43 \autoref{sec:OBS_example} introduces a test example of the observation operator code including 
     63In \autoref{sec:OBS_example} a test example of the observation operator code is introduced, including 
    4464where to obtain data and how to setup the namelist. 
    45 \autoref{sec:OBS_details} introduces some more technical details of the different observation types used and 
    46 also shows a more complete namelist. 
    47 \autoref{sec:OBS_theory} introduces some of the theoretical aspects of the observation operator including 
     65In \autoref{sec:OBS_details} some more technical details of the different observation types used are introduced, and we 
     66also show a more complete namelist. 
     67In \autoref{sec:OBS_theory} some of the theoretical aspects of the observation operator are described including 
    4868interpolation methods and running on multiple processors. 
    49 \autoref{sec:OBS_ooo} describes the offline observation operator code. 
    50 \autoref{sec:OBS_obsutils} introduces some utilities to help working with the files produced by the OBS code. 
    51  
    52 % ================================================================ 
    53 % Example 
    54 % ================================================================ 
     69In \autoref{sec:OBS_sao} the standalone observation operator code is described. 
     70In \autoref{sec:OBS_obsutils} we describe some utilities to help work with the files produced by the OBS code. 
     71 
     72%% ================================================================================================= 
    5573\section{Running the observation operator code example} 
    5674\label{sec:OBS_example} 
    5775 
    58 This section describes an example of running the observation operator code using 
    59 profile data which can be freely downloaded. 
    60 It shows how to adapt an existing run and build of NEMO to run the observation operator. 
     76In this section an example of running the observation operator code is described using 
     77profile observation data which can be freely downloaded. 
     78It shows how to adapt an existing run and build of \NEMO\ to run the observation operator. Note also the observation operator and the assimilation increments code are run in the ORCA2\_ICE\_OBS SETTE test. 
    6179 
    6280\begin{enumerate} 
    63 \item Compile NEMO. 
     81\item Compile \NEMO. 
    6482 
    6583\item Download some EN4 data from \href{http://www.metoffice.gov.uk/hadobs}{www.metoffice.gov.uk/hadobs}. 
    6684  Choose observations which are valid for the period of your test run because 
    67   the observation operator compares the model and observations for a matching date and time.  
    68  
    69 \item Compile the OBSTOOLS code using:  
     85  the observation operator compares the model and observations for a matching date and time. 
     86 
     87\item Compile the OBSTOOLS code in the \path{tools} directory using: 
    7088\begin{cmds} 
    71 ./maketools -n OBSTOOLS -m [ARCH]. 
     89./maketools -n OBSTOOLS -m [ARCH] 
    7290\end{cmds} 
    7391 
    74 \item Convert the EN4 data into feedback format:  
     92replacing \texttt{[ARCH]} with the build architecture file for your machine. Note the tools are checked out from a separate location of the repository (under \path{/utils/tools}). 
     93 
     94\item Convert the EN4 data into feedback format: 
    7595\begin{cmds} 
    7696enact2fb.exe profiles_01.nc EN.4.1.1.f.profiles.g10.YYYYMM.nc 
    7797\end{cmds} 
    7898 
    79 \item Include the following in the NEMO namelist to run the observation operator on this data: 
     99\item Include the following in the \NEMO\ namelist to run the observation operator on this data: 
    80100\end{enumerate} 
    81101 
    82 Options are defined through the \ngn{namobs} namelist variables. 
    83 The options \np{ln\_t3d} and \np{ln\_s3d} switch on the temperature and salinity profile observation operator code. 
    84 The filename or array of filenames are specified using the \np{cn\_profbfiles} variable. 
     102Options are defined through the \nam{obs}{obs} namelist variables. 
     103The options \np{ln_t3d}{ln\_t3d} and \np{ln_s3d}{ln\_s3d} switch on the temperature and salinity profile observation operator code. 
     104The filename or array of filenames are specified using the \np{cn_profbfiles}{cn\_profbfiles} variable. 
    85105The model grid points for a particular observation latitude and longitude are found using 
    86106the grid searching part of the code. 
    87107This can be expensive, particularly for large numbers of observations, 
    88 setting \np{ln\_grid\_search\_lookup} allows the use of a lookup table which 
    89 is saved into an ``xypos`` file (or files). 
     108setting \np{ln_grid_search_lookup}{ln\_grid\_search\_lookup} allows the use of a lookup table which 
     109is saved into an \np{cn_gridsearch}{cn\_gridsearch} file (or files). 
    90110This will need to be generated the first time if it does not exist in the run directory. 
    91111However, once produced it will significantly speed up future grid searches. 
    92 Setting \np{ln\_grid\_global} means that the code distributes the observations evenly between processors. 
     112Setting \np{ln_grid_global}{ln\_grid\_global} means that the code distributes the observations evenly between processors. 
    93113Alternatively each processor will work with observations located within the model subdomain 
    94 (see section~\autoref{subsec:OBS_parallel}). 
     114(see \autoref{subsec:OBS_parallel}). 
    95115 
    96116A number of utilities are now provided to plot the feedback files, convert and recombine the files. 
    97 These are explained in more detail in section~\autoref{sec:OBS_obsutils}. 
    98 Utilites to convert other input data formats into the feedback format are also described in 
    99 section~\autoref{sec:OBS_obsutils}. 
    100  
     117These are explained in more detail in \autoref{sec:OBS_obsutils}. 
     118Utilities to convert other input data formats into the feedback format are also described in 
     119\autoref{sec:OBS_obsutils}. 
     120 
     121%% ================================================================================================= 
    101122\section{Technical details (feedback type observation file headers)} 
    102123\label{sec:OBS_details} 
    103124 
    104 Here we show a more complete example namelist \ngn{namobs} and also show the NetCDF headers of 
     125Here we show a more complete example namelist \nam{obs}{obs} and also show the NetCDF headers of 
    105126the observation files that may be used with the observation operator. 
    106127 
    107 %------------------------------------------namobs-------------------------------------------------------- 
    108  
    109 \nlst{namobs} 
    110 %------------------------------------------------------------------------------------------------------------- 
    111  
    112 The observation operator code uses the "feedback" observation file format for all data types. 
     128\begin{listing} 
     129  \nlst{namobs} 
     130  \caption{\forcode{&namobs}} 
     131  \label{lst:namobs} 
     132\end{listing} 
     133 
     134The observation operator code uses the feedback observation file format for all data types. 
    113135All the observation files must be in NetCDF format. 
    114136Some example headers (produced using \mbox{\textit{ncdump~-h}}) for profile data, sea level anomaly and 
    115137sea surface temperature are in the following subsections. 
    116138 
    117 \subsection{Profile feedback} 
     139%% ================================================================================================= 
     140\subsection{Profile feedback file} 
    118141 
    119142\begin{clines} 
     
    271294\end{clines} 
    272295 
    273 \subsection{Sea level anomaly feedback} 
     296%% ================================================================================================= 
     297\subsection{Sea level anomaly feedback file} 
    274298 
    275299\begin{clines} 
     
    395419\end{clines} 
    396420 
    397 The mean dynamic topography (MDT) must be provided in a separate file defined on 
     421To use Sea Level Anomaly (SLA) data the mean dynamic topography (MDT) must be provided in a separate file defined on 
    398422the model grid called \ifile{slaReferenceLevel}. 
    399423The MDT is required in order to produce the model equivalent sea level anomaly from the model sea surface height. 
     
    417441\end{clines} 
    418442 
    419 \subsection{Sea surface temperature feedback} 
     443%% ================================================================================================= 
     444\subsection{Sea surface temperature feedback file} 
    420445 
    421446\begin{clines} 
     
    534559\end{clines} 
    535560 
     561%% ================================================================================================= 
    536562\section{Theoretical details} 
    537563\label{sec:OBS_theory} 
    538564 
     565%% ================================================================================================= 
    539566\subsection{Horizontal interpolation and averaging methods} 
    540567 
     
    542569the model equivalent of the observation is calculated by interpolating from 
    543570the four surrounding grid points to the observation location. 
    544 Some satellite observations (\eg microwave satellite SST data, or satellite SSS data) have a footprint which 
     571Some satellite observations (\eg\ microwave satellite SST data, or satellite SSS data) have a footprint which 
    545572is similar in size or larger than the model grid size (particularly when the grid size is small). 
    546573In those cases the model counterpart should be calculated by averaging the model grid points over 
    547574the same size as the footprint. 
    548 NEMO therefore has the capability to specify either an interpolation or an averaging 
    549 (for surface observation types only).  
    550  
    551 The main namelist option associated with the interpolation/averaging is \np{nn\_2dint}. 
     575\NEMO\ therefore has the capability to specify either an interpolation or an averaging 
     576(for surface observation types only). 
     577 
     578The main namelist option associated with the interpolation/averaging is \np{nn_2dint}{nn\_2dint}. 
    552579This default option can be set to values from 0 to 6. 
    553580Values between 0 to 4 are associated with interpolation while values 5 or 6 are associated with averaging. 
    554581\begin{itemize} 
    555 \item \np{nn\_2dint}\forcode{ = 0}: Distance-weighted interpolation 
    556 \item \np{nn\_2dint}\forcode{ = 1}: Distance-weighted interpolation (small angle) 
    557 \item \np{nn\_2dint}\forcode{ = 2}: Bilinear interpolation (geographical grid) 
    558 \item \np{nn\_2dint}\forcode{ = 3}: Bilinear remapping interpolation (general grid) 
    559 \item \np{nn\_2dint}\forcode{ = 4}: Polynomial interpolation 
    560 \item \np{nn\_2dint}\forcode{ = 5}: Radial footprint averaging with diameter specified in the namelist as 
    561   \np{rn\_???\_avglamscl} in degrees or metres (set using \np{ln\_???\_fp\_indegs}) 
    562 \item \np{nn\_2dint}\forcode{ = 6}: Rectangular footprint averaging with E/W and N/S size specified in 
    563   the namelist as \np{rn\_???\_avglamscl} and \np{rn\_???\_avgphiscl} in degrees or metres 
    564   (set using \np{ln\_???\_fp\_indegs}) 
     582\item \np[=0]{nn_2dint}{nn\_2dint}: Distance-weighted interpolation 
     583\item \np[=1]{nn_2dint}{nn\_2dint}: Distance-weighted interpolation (small angle) 
     584\item \np[=2]{nn_2dint}{nn\_2dint}: Bilinear interpolation (geographical grid) 
     585\item \np[=3]{nn_2dint}{nn\_2dint}: Bilinear remapping interpolation (general grid) 
     586\item \np[=4]{nn_2dint}{nn\_2dint}: Polynomial interpolation 
     587\item \np[=5]{nn_2dint}{nn\_2dint}: Radial footprint averaging with diameter specified in the namelist as 
     588  \texttt{rn\_[var]\_avglamscl} in degrees or metres (set using \texttt{ln\_[var]\_fp\_indegs}) 
     589\item \np[=6]{nn_2dint}{nn\_2dint}: Rectangular footprint averaging with E/W and N/S size specified in 
     590  the namelist as \texttt{rn\_[var]\_avglamscl} and \texttt{rn\_[var]\_avgphiscl} in degrees or metres 
     591  (set using \texttt{ln\_[var]\_fp\_indegs}) 
    565592\end{itemize} 
    566 The ??? in the last two options indicate these options should be specified for each observation type for 
     593Replace \texttt{[var]} in the last two options with the observation type (sla, sst, sss or sic) for 
    567594which the averaging is to be performed (see namelist example above). 
    568 The \np{nn\_2dint} default option can be overridden for surface observation types using 
    569 namelist values \np{nn\_2dint\_???} where ??? is one of sla,sst,sss,sic. 
    570  
    571 Below is some more detail on the various options for interpolation and averaging available in NEMO. 
    572  
     595The \np{nn_2dint}{nn\_2dint} default option can be overridden for surface observation types using 
     596namelist values \texttt{nn\_2dint\_[var]} where \texttt{[var]} is the observation type. 
     597 
     598Below is some more detail on the various options for interpolation and averaging available in \NEMO. 
     599 
     600%% ================================================================================================= 
    573601\subsubsection{Horizontal interpolation} 
    574602 
    575 Consider an observation point ${\rm P}$ with with longitude and latitude $({\lambda_{}}_{\rm P}, \phi_{\rm P})$ and 
    576 the four nearest neighbouring model grid points ${\rm A}$, ${\rm B}$, ${\rm C}$ and ${\rm D}$ with 
    577 longitude and latitude ($\lambda_{\rm A}$, $\phi_{\rm A}$),($\lambda_{\rm B}$, $\phi_{\rm B}$) etc. 
    578 All horizontal interpolation methods implemented in NEMO estimate the value of a model variable $x$ at point $P$ as 
    579 a weighted linear combination of the values of the model variables at the grid points ${\rm A}$, ${\rm B}$ etc.: 
     603Consider an observation point ${\mathrm P}$ with longitude and latitude (${\lambda_{}}_{\mathrm P}$, $\phi_{\mathrm P}$) and 
     604the four nearest neighbouring model grid points ${\mathrm A}$, ${\mathrm B}$, ${\mathrm C}$ and ${\mathrm D}$ with 
     605longitude and latitude ($\lambda_{\mathrm A}$, $\phi_{\mathrm A}$),($\lambda_{\mathrm B}$, $\phi_{\mathrm B}$) etc. 
     606All horizontal interpolation methods implemented in \NEMO\ estimate the value of a model variable $x$ at point $P$ as 
     607a weighted linear combination of the values of the model variables at the grid points ${\mathrm A}$, ${\mathrm B}$ etc.: 
     608 
    580609\begin{align*} 
    581   {x_{}}_{\rm P} & \hspace{-2mm} = \hspace{-2mm} & 
    582                                                    \frac{1}{w} \left( {w_{}}_{\rm A} {x_{}}_{\rm A} + 
    583                                                    {w_{}}_{\rm B} {x_{}}_{\rm B} + 
    584                                                    {w_{}}_{\rm C} {x_{}}_{\rm C} + 
    585                                                    {w_{}}_{\rm D} {x_{}}_{\rm D} \right) 
     610  {x_{}}_{\mathrm P} = 
     611\frac{1}{w} \left( {w_{}}_{\mathrm A} {x_{}}_{\mathrm A} + 
     612{w_{}}_{\mathrm B} {x_{}}_{\mathrm B} + 
     613{w_{}}_{\mathrm C} {x_{}}_{\mathrm C} + 
     614{w_{}}_{\mathrm D} {x_{}}_{\mathrm D} \right) 
    586615\end{align*} 
    587 where ${w_{}}_{\rm A}$, ${w_{}}_{\rm B}$ etc. are the respective weights for the model field at 
    588 points ${\rm A}$, ${\rm B}$ etc., and $w = {w_{}}_{\rm A} + {w_{}}_{\rm B} + {w_{}}_{\rm C} + {w_{}}_{\rm D}$. 
     616 
     617where ${w_{}}_{\mathrm A}$, ${w_{}}_{\mathrm B}$ etc. are the respective weights for the model field at 
     618points ${\mathrm A}$, ${\mathrm B}$ etc., and $w = {w_{}}_{\mathrm A} + {w_{}}_{\mathrm B} + {w_{}}_{\mathrm C} + {w_{}}_{\mathrm D}$. 
    589619 
    590620Four different possibilities are available for computing the weights. 
    591621 
    592622\begin{enumerate} 
    593  
    594 \item[1.] {\bf Great-Circle distance-weighted interpolation.} 
     623\item {\bfseries Great-Circle distance-weighted interpolation.} 
    595624  The weights are computed as a function of the great-circle distance $s(P, \cdot)$ between $P$ and 
    596625  the model grid points $A$, $B$ etc. 
    597   For example, the weight given to the field ${x_{}}_{\rm A}$ is specified as the product of the distances 
    598   from ${\rm P}$ to the other points: 
    599   \begin{align*} 
    600     {w_{}}_{\rm A} = s({\rm P}, {\rm B}) \, s({\rm P}, {\rm C}) \, s({\rm P}, {\rm D}) 
    601   \end{align*} 
    602   where  
    603   \begin{align*} 
    604     s\left ({\rm P}, {\rm M} \right )  
    605      & \hspace{-2mm} = \hspace{-2mm} &  
    606       \cos^{-1} \! \left\{  
    607                \sin {\phi_{}}_{\rm P} \sin {\phi_{}}_{\rm M} 
    608              + \cos {\phi_{}}_{\rm P} \cos {\phi_{}}_{\rm M}  
    609                \cos ({\lambda_{}}_{\rm M} - {\lambda_{}}_{\rm P})  
     626  For example, the weight given to the field ${x_{}}_{\mathrm A}$ is specified as the product of the distances 
     627  from ${\mathrm P}$ to the other points: 
     628 
     629  \begin{alignat*}{2} 
     630    {w_{}}_{\mathrm A} = s({\mathrm P}, {\mathrm B}) \, s({\mathrm P}, {\mathrm C}) \, s({\mathrm P}, {\mathrm D}) 
     631  \end{alignat*} 
     632 
     633  where 
     634 
     635  \begin{alignat*}{2} 
     636    s\left({\mathrm P}, {\mathrm M} \right) & = & \hspace{0.25em} \cos^{-1} \! \left\{ 
     637               \sin {\phi_{}}_{\mathrm P} \sin {\phi_{}}_{\mathrm M} 
     638             + \cos {\phi_{}}_{\mathrm P} \cos {\phi_{}}_{\mathrm M} 
     639               \cos ({\lambda_{}}_{\mathrm M} - {\lambda_{}}_{\mathrm P}) 
    610640                   \right\} 
    611    \end{align*} 
     641   \end{alignat*} 
     642 
    612643   and $M$ corresponds to $B$, $C$ or $D$. 
    613644   A more stable form of the great-circle distance formula for small distances ($x$ near 1) 
    614    involves the arcsine function (\eg see p.~101 of \citet{daley.barker_bk01}: 
    615    \begin{align*} 
    616      s\left( {\rm P}, {\rm M} \right) & \hspace{-2mm} = \hspace{-2mm} & \sin^{-1} \! \left\{ \sqrt{ 1 - x^2 } \right\} 
    617    \end{align*} 
     645   involves the arcsine function (\eg\ see p.~101 of \citet{daley.barker_bk01}: 
     646 
     647   \begin{alignat*}{2} 
     648     s\left( {\mathrm P}, {\mathrm M} \right) = \sin^{-1} \! \left\{ \sqrt{ 1 - x^2 } \right\} 
     649   \end{alignat*} 
     650 
    618651   where 
    619    \begin{align*} 
    620      x & \hspace{-2mm} = \hspace{-2mm} & 
    621                                          {a_{}}_{\rm M} {a_{}}_{\rm P} + {b_{}}_{\rm M} {b_{}}_{\rm P} + {c_{}}_{\rm M} {c_{}}_{\rm P} 
    622    \end{align*} 
    623    and  
    624    \begin{align*} 
    625       {a_{}}_{\rm M} & \hspace{-2mm} = \hspace{-2mm} & \sin {\phi_{}}_{\rm M}, \\ 
    626       {a_{}}_{\rm P} & \hspace{-2mm} = \hspace{-2mm} & \sin {\phi_{}}_{\rm P}, \\ 
    627       {b_{}}_{\rm M} & \hspace{-2mm} = \hspace{-2mm} & \cos {\phi_{}}_{\rm M} \cos {\phi_{}}_{\rm M}, \\ 
    628       {b_{}}_{\rm P} & \hspace{-2mm} = \hspace{-2mm} & \cos {\phi_{}}_{\rm P} \cos {\phi_{}}_{\rm P}, \\ 
    629       {c_{}}_{\rm M} & \hspace{-2mm} = \hspace{-2mm} & \cos {\phi_{}}_{\rm M} \sin {\phi_{}}_{\rm M}, \\ 
    630       {c_{}}_{\rm P} & \hspace{-2mm} = \hspace{-2mm} & \cos {\phi_{}}_{\rm P} \sin {\phi_{}}_{\rm P}. 
    631   \end{align*} 
    632  
    633 \item[2.] {\bf Great-Circle distance-weighted interpolation with small angle approximation.} 
     652 
     653   \begin{alignat*}{2} 
     654     x = {a_{}}_{\mathrm M} {a_{}}_{\mathrm P} + {b_{}}_{\mathrm M} {b_{}}_{\mathrm P} + {c_{}}_{\mathrm M} {c_{}}_{\mathrm P} 
     655   \end{alignat*} 
     656 
     657   and 
     658 
     659   \begin{alignat*}{3} 
     660   & {a_{}}_{\mathrm M} & = && \quad \sin {\phi_{}}_{\mathrm M}, \\ 
     661   & {a_{}}_{\mathrm P} & = && \quad \sin {\phi_{}}_{\mathrm P}, \\ 
     662   & {b_{}}_{\mathrm M} & = && \quad \cos {\phi_{}}_{\mathrm M} \cos {\phi_{}}_{\mathrm M}, \\ 
     663   & {b_{}}_{\mathrm P} & = && \quad \cos {\phi_{}}_{\mathrm P} \cos {\phi_{}}_{\mathrm P}, \\ 
     664   & {c_{}}_{\mathrm M} & = && \quad \cos {\phi_{}}_{\mathrm M} \sin {\phi_{}}_{\mathrm M}, \\ 
     665   & {c_{}}_{\mathrm P} & = && \quad \cos {\phi_{}}_{\mathrm P} \sin {\phi_{}}_{\mathrm P}. 
     666   \end{alignat*} 
     667 
     668\item {\bfseries Great-Circle distance-weighted interpolation with small angle approximation.} 
    634669  Similar to the previous interpolation but with the distance $s$ computed as 
    635   \begin{align*} 
    636     s\left( {\rm P}, {\rm M} \right) 
    637     & \hspace{-2mm} = \hspace{-2mm} & 
    638                                       \sqrt{ \left( {\phi_{}}_{\rm M} - {\phi_{}}_{\rm P} \right)^{2} 
    639                                       + \left( {\lambda_{}}_{\rm M} - {\lambda_{}}_{\rm P} \right)^{2} 
    640                                       \cos^{2} {\phi_{}}_{\rm M} } 
    641   \end{align*} 
     670  \begin{alignat*}{2} 
     671    s\left( {\mathrm P}, {\mathrm M} \right) 
     672    & = & \sqrt{ \left( {\phi_{}}_{\mathrm M} - {\phi_{}}_{\mathrm P} \right)^{2} 
     673                                      + \left( {\lambda_{}}_{\mathrm M} - {\lambda_{}}_{\mathrm P} \right)^{2} 
     674                                      \cos^{2} {\phi_{}}_{\mathrm M} } 
     675  \end{alignat*} 
    642676  where $M$ corresponds to $A$, $B$, $C$ or $D$. 
    643677 
    644 \item[3.] {\bf Bilinear interpolation for a regular spaced grid.} 
     678\item {\bfseries Bilinear interpolation for a regular spaced grid.} 
    645679  The interpolation is split into two 1D interpolations in the longitude and latitude directions, respectively. 
    646680 
    647 \item[4.] {\bf Bilinear remapping interpolation for a general grid.} 
     681\item {\bfseries Bilinear remapping interpolation for a general grid.} 
    648682  An iterative scheme that involves first mapping a quadrilateral cell into 
    649683  a cell with coordinates (0,0), (1,0), (0,1) and (1,1). 
    650684  This method is based on the \href{https://github.com/SCRIP-Project/SCRIP}{SCRIP interpolation package}. 
    651    
     685 
    652686\end{enumerate} 
    653687 
     688%% ================================================================================================= 
    654689\subsubsection{Horizontal averaging} 
    655690 
     
    658693\item The standard grid-searching code is used to find the nearest model grid point to the observation location 
    659694  (see next subsection). 
    660 \item The maximum number of grid points is calculated in the local grid domain for which 
    661   the averaging is likely need to cover. 
    662 \item The lats/longs of the grid points surrounding the nearest model grid box are extracted using 
    663   existing mpi routines. 
     695\item The maximum number of grid points required for that observation in each local grid domain is calculated. Some of these points may later turn out to have zero weight depending on the shape of the footprint. 
     696\item The longitudes and latitudes of the grid points surrounding the nearest model grid box are extracted using 
     697  existing MPI routines. 
    664698\item The weights for each grid point associated with each observation are calculated, 
    665699  either for radial or rectangular footprints. 
     
    673707 
    674708Examples of the weights calculated for an observation with rectangular and radial footprints are shown in 
    675 Figs.~\autoref{fig:obsavgrec} and~\autoref{fig:obsavgrad}. 
    676  
    677 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
     709\autoref{fig:OBS_avgrec} and~\autoref{fig:OBS_avgrad}. 
     710 
    678711\begin{figure} 
    679   \begin{center} 
    680     \includegraphics[width=0.90\textwidth]{Fig_OBS_avg_rec} 
    681     \caption{ 
    682       \protect\label{fig:obsavgrec} 
    683       Weights associated with each model grid box (blue lines and numbers) 
    684       for an observation at -170.5\deg{E}, 56.0\deg{N} with a rectangular footprint of 1\deg x 1\deg. 
    685     } 
    686   \end{center} 
     712  \centering 
     713  \includegraphics[width=0.66\textwidth]{Fig_OBS_avg_rec} 
     714  \caption[Observational weights with a rectangular footprint]{ 
     715    Weights associated with each model grid box (blue lines and numbers) 
     716    for an observation at -170.5\deg{E}, 56.0\deg{N} with a rectangular footprint of 1\deg\ x 1\deg.} 
     717  \label{fig:OBS_avgrec} 
    687718\end{figure} 
    688 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    689  
    690 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
     719 
    691720\begin{figure} 
    692   \begin{center} 
    693     \includegraphics[width=0.90\textwidth]{Fig_OBS_avg_rad} 
    694     \caption{ 
    695       \protect\label{fig:obsavgrad} 
    696       Weights associated with each model grid box (blue lines and numbers) 
    697       for an observation at -170.5\deg{E}, 56.0\deg{N} with a radial footprint with diameter 1\deg. 
    698     }  
    699   \end{center} 
     721  \centering 
     722  \includegraphics[width=0.66\textwidth]{Fig_OBS_avg_rad} 
     723  \caption[Observational weights with a radial footprint]{ 
     724    Weights associated with each model grid box (blue lines and numbers) 
     725    for an observation at -170.5\deg{E}, 56.0\deg{N} with a radial footprint with diameter 1\deg.} 
     726  \label{fig:OBS_avgrad} 
    700727\end{figure} 
    701 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    702  
    703  
     728 
     729%% ================================================================================================= 
    704730\subsection{Grid search} 
    705731 
    706 For many grids used by the NEMO model, such as the ORCA family, the horizontal grid coordinates $i$ and $j$ are not simple functions of latitude and longitude. 
     732For many grids used by the \NEMO\ model, such as the ORCA family, the horizontal grid coordinates $i$ and $j$ are not simple functions of latitude and longitude. 
    707733Therefore, it is not always straightforward to determine the grid points surrounding any given observational position. 
    708 Before the interpolation can be performed, a search algorithm is then required to determine the corner points of  
     734Before the interpolation can be performed, a search algorithm is then required to determine the corner points of 
    709735the quadrilateral cell in which the observation is located. 
    710 This is the most difficult and time consuming part of the 2D interpolation procedure.  
     736This is the most difficult and time consuming part of the 2D interpolation procedure. 
    711737A robust test for determining if an observation falls within a given quadrilateral cell is as follows. 
    712 Let ${\rm P}({\lambda_{}}_{\rm P} ,{\phi_{}}_{\rm P} )$ denote the observation point, 
    713 and let ${\rm A}({\lambda_{}}_{\rm A} ,{\phi_{}}_{\rm A} )$, ${\rm B}({\lambda_{}}_{\rm B} ,{\phi_{}}_{\rm B} )$, 
    714 ${\rm C}({\lambda_{}}_{\rm C} ,{\phi_{}}_{\rm C} )$ and ${\rm D}({\lambda_{}}_{\rm D} ,{\phi_{}}_{\rm D} )$ 
    715 denote the bottom left, bottom right, top left and top right corner points of the cell, respectively.  
    716 To determine if P is inside the cell, we verify that the cross-products  
     738Let ${\mathrm P}({\lambda_{}}_{\mathrm P} ,{\phi_{}}_{\mathrm P} )$ denote the observation point, 
     739and let ${\mathrm A}({\lambda_{}}_{\mathrm A} ,{\phi_{}}_{\mathrm A} )$, ${\mathrm B}({\lambda_{}}_{\mathrm B} ,{\phi_{}}_{\mathrm B} )$, 
     740${\mathrm C}({\lambda_{}}_{\mathrm C} ,{\phi_{}}_{\mathrm C} )$ and ${\mathrm D}({\lambda_{}}_{\mathrm D} ,{\phi_{}}_{\mathrm D} )$ 
     741denote the bottom left, bottom right, top left and top right corner points of the cell, respectively. 
     742To determine if P is inside the cell, we verify that the cross-products 
    717743\begin{align*} 
    718744  \begin{array}{lllll} 
    719     {{\bf r}_{}}_{\rm PA} \times {{\bf r}_{}}_{\rm PC} 
    720     & = & [({\lambda_{}}_{\rm A}\; -\; {\lambda_{}}_{\rm P} ) 
    721           ({\phi_{}}_{\rm C}   \; -\; {\phi_{}}_{\rm P} ) 
    722           - ({\lambda_{}}_{\rm C}\; -\; {\lambda_{}}_{\rm P} ) 
    723           ({\phi_{}}_{\rm A}   \; -\; {\phi_{}}_{\rm P} )] \; \widehat{\bf k} \\ 
    724     {{\bf r}_{}}_{\rm PB} \times {{\bf r}_{}}_{\rm PA} 
    725     & = & [({\lambda_{}}_{\rm B}\; -\; {\lambda_{}}_{\rm P} ) 
    726           ({\phi_{}}_{\rm A}   \; -\; {\phi_{}}_{\rm P} ) 
    727           - ({\lambda_{}}_{\rm A}\; -\; {\lambda_{}}_{\rm P} ) 
    728           ({\phi_{}}_{\rm B}   \; -\; {\phi_{}}_{\rm P} )] \; \widehat{\bf k} \\ 
    729     {{\bf r}_{}}_{\rm PC} \times {{\bf r}_{}}_{\rm PD} 
    730     & = & [({\lambda_{}}_{\rm C}\; -\; {\lambda_{}}_{\rm P} ) 
    731           ({\phi_{}}_{\rm D}   \; -\; {\phi_{}}_{\rm P} ) 
    732           - ({\lambda_{}}_{\rm D}\; -\; {\lambda_{}}_{\rm P} ) 
    733           ({\phi_{}}_{\rm C}   \; -\; {\phi_{}}_{\rm P} )] \; \widehat{\bf k} \\ 
    734     {{\bf r}_{}}_{\rm PD} \times {{\bf r}_{}}_{\rm PB} 
    735     & = & [({\lambda_{}}_{\rm D}\; -\; {\lambda_{}}_{\rm P} ) 
    736           ({\phi_{}}_{\rm B}   \; -\; {\phi_{}}_{\rm P} ) 
    737           - ({\lambda_{}}_{\rm B}\; -\; {\lambda_{}}_{\rm P} ) 
    738           ({\phi_{}}_{\rm D}  \;  - \; {\phi_{}}_{\rm P} )] \; \widehat{\bf k} \\ 
     745    {{\mathbf r}_{}}_{\mathrm PA} \times {{\mathbf r}_{}}_{\mathrm PC} 
     746    & = & [({\lambda_{}}_{\mathrm A}\; -\; {\lambda_{}}_{\mathrm P} ) 
     747          ({\phi_{}}_{\mathrm C}   \; -\; {\phi_{}}_{\mathrm P} ) 
     748          - ({\lambda_{}}_{\mathrm C}\; -\; {\lambda_{}}_{\mathrm P} ) 
     749          ({\phi_{}}_{\mathrm A}   \; -\; {\phi_{}}_{\mathrm P} )] \; \widehat{\mathbf k} \\ 
     750    {{\mathbf r}_{}}_{\mathrm PB} \times {{\mathbf r}_{}}_{\mathrm PA} 
     751    & = & [({\lambda_{}}_{\mathrm B}\; -\; {\lambda_{}}_{\mathrm P} ) 
     752          ({\phi_{}}_{\mathrm A}   \; -\; {\phi_{}}_{\mathrm P} ) 
     753          - ({\lambda_{}}_{\mathrm A}\; -\; {\lambda_{}}_{\mathrm P} ) 
     754          ({\phi_{}}_{\mathrm B}   \; -\; {\phi_{}}_{\mathrm P} )] \; \widehat{\mathbf k} \\ 
     755    {{\mathbf r}_{}}_{\mathrm PC} \times {{\mathbf r}_{}}_{\mathrm PD} 
     756    & = & [({\lambda_{}}_{\mathrm C}\; -\; {\lambda_{}}_{\mathrm P} ) 
     757          ({\phi_{}}_{\mathrm D}   \; -\; {\phi_{}}_{\mathrm P} ) 
     758          - ({\lambda_{}}_{\mathrm D}\; -\; {\lambda_{}}_{\mathrm P} ) 
     759          ({\phi_{}}_{\mathrm C}   \; -\; {\phi_{}}_{\mathrm P} )] \; \widehat{\mathbf k} \\ 
     760    {{\mathbf r}_{}}_{\mathrm PD} \times {{\mathbf r}_{}}_{\mathrm PB} 
     761    & = & [({\lambda_{}}_{\mathrm D}\; -\; {\lambda_{}}_{\mathrm P} ) 
     762          ({\phi_{}}_{\mathrm B}   \; -\; {\phi_{}}_{\mathrm P} ) 
     763          - ({\lambda_{}}_{\mathrm B}\; -\; {\lambda_{}}_{\mathrm P} ) 
     764          ({\phi_{}}_{\mathrm D}  \;  - \; {\phi_{}}_{\mathrm P} )] \; \widehat{\mathbf k} \\ 
    739765  \end{array} 
    740   % \label{eq:cross} 
     766  % \label{eq:OBS_cross} 
    741767\end{align*} 
    742 point in the opposite direction to the unit normal $\widehat{\bf k}$ 
    743 (\ie that the coefficients of $\widehat{\bf k}$ are negative), 
    744 where ${{\bf r}_{}}_{\rm PA}$, ${{\bf r}_{}}_{\rm PB}$, etc. correspond to 
     768point in the opposite direction to the unit normal $\widehat{\mathbf k}$ 
     769(\ie\ that the coefficients of $\widehat{\mathbf k}$ are negative), 
     770where ${{\mathbf r}_{}}_{\mathrm PA}$, ${{\mathbf r}_{}}_{\mathrm PB}$, etc. correspond to 
    745771the vectors between points P and A, P and B, etc.. 
    746772The method used is similar to the method used in the \href{https://github.com/SCRIP-Project/SCRIP}{SCRIP interpolation package}. 
     
    750776be searched for on a regular grid. 
    751777For each observation position, the closest point on the regular grid of this position is computed and 
    752 the $i$ and $j$ ranges of this point searched to determine the precise four points surrounding the observation.  
    753  
     778the $i$ and $j$ ranges of this point searched to determine the precise four points surrounding the observation. 
     779 
     780%% ================================================================================================= 
    754781\subsection{Parallel aspects of horizontal interpolation} 
    755782\label{subsec:OBS_parallel} 
     
    757784For horizontal interpolation, there is the basic problem that 
    758785the observations are unevenly distributed on the globe. 
    759 In numerical models, it is common to divide the model grid into subgrids (or domains) where 
     786In \NEMO\ the model grid is divided into subgrids (or domains) where 
    760787each subgrid is executed on a single processing element with explicit message passing for 
    761788exchange of information along the domain boundaries when running on a massively parallel processor (MPP) system. 
    762 This approach is used by \NEMO. 
    763  
    764 For observations there is no natural distribution since the observations are not equally distributed on the globe.  
     789 
     790For observations there is no natural distribution since the observations are not equally distributed on the globe. 
    765791Two options have been made available: 
    7667921) geographical distribution; 
    767793and 2) round-robin. 
    768794 
     795%% ================================================================================================= 
    769796\subsubsection{Geographical distribution of observations among processors} 
    770797 
    771 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    772798\begin{figure} 
    773   \begin{center} 
    774     \includegraphics[width=10cm,height=12cm,angle=-90.]{Fig_ASM_obsdist_local} 
    775     \caption{ 
    776       \protect\label{fig:obslocal} 
    777       Example of the distribution of observations with the geographical distribution of observational data. 
    778     } 
    779   \end{center} 
     799  \centering 
     800  \includegraphics[width=0.66\textwidth]{Fig_ASM_obsdist_local} 
     801  \caption[Observations with the geographical distribution]{ 
     802    Example of the distribution of observations with 
     803    the geographical distribution of observational data} 
     804  \label{fig:OBS_local} 
    780805\end{figure} 
    781 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    782806 
    783807This is the simplest option in which the observations are distributed according to 
    784808the domain of the grid-point parallelization. 
    785 \autoref{fig:obslocal} shows an example of the distribution of the {\em in situ} data on processors with 
    786 a different colour for each observation on a given processor for a 4 $\times$ 2 decomposition with ORCA2.  
     809\autoref{fig:OBS_local} shows an example of the distribution of the {\em in situ} data on processors with 
     810a different colour for each observation on a given processor for a 4 $\times$ 2 decomposition with ORCA2. 
    787811The grid-point domain decomposition is clearly visible on the plot. 
    788812 
    789813The advantage of this approach is that all information needed for horizontal interpolation is available without 
    790814any MPP communication. 
    791 Of course, this is under the assumption that we are only using a $2 \times 2$ grid-point stencil for 
    792 the interpolation (\eg bilinear interpolation). 
     815This is under the assumption that we are dealing with point observations and only using a $2 \times 2$ grid-point stencil for 
     816the interpolation (\eg\ bilinear interpolation). 
    793817For higher order interpolation schemes this is no longer valid. 
    794818A disadvantage with the above scheme is that the number of observations on each processor can be very different. 
     
    796820this could lead to load imbalance. 
    797821 
     822%% ================================================================================================= 
    798823\subsubsection{Round-robin distribution of observations among processors} 
    799824 
    800 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    801825\begin{figure} 
    802   \begin{center} 
    803     \includegraphics[width=10cm,height=12cm,angle=-90.]{Fig_ASM_obsdist_global} 
    804     \caption{ 
    805       \protect\label{fig:obsglobal} 
    806       Example of the distribution of observations with the round-robin distribution of observational data. 
    807     } 
    808   \end{center} 
     826  \centering 
     827  \includegraphics[width=0.66\textwidth]{Fig_ASM_obsdist_global} 
     828  \caption[Observations with the round-robin distribution]{ 
     829    Example of the distribution of observations with 
     830    the round-robin distribution of observational data.} 
     831  \label{fig:OBS_global} 
    809832\end{figure} 
    810 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    811833 
    812834An alternative approach is to distribute the observations equally among processors and 
    813835use message passing in order to retrieve the stencil for interpolation. 
    814836The simplest distribution of the observations is to distribute them using a round-robin scheme. 
    815 \autoref{fig:obsglobal} shows the distribution of the {\em in situ} data on processors for 
     837\autoref{fig:OBS_global} shows the distribution of the {\em in situ} data on processors for 
    816838the round-robin distribution of observations with a different colour for each observation on a given processor for 
    817 a 4 $\times$ 2 decomposition with ORCA2 for the same input data as in \autoref{fig:obslocal}. 
     839a 4 $\times$ 2 decomposition with ORCA2 for the same input data as in \autoref{fig:OBS_local}. 
    818840The observations are now clearly randomly distributed on the globe. 
    819841In order to be able to perform horizontal interpolation in this case, 
    820842a subroutine has been developed that retrieves any grid points in the global space. 
    821843 
     844%% ================================================================================================= 
    822845\subsection{Vertical interpolation operator} 
    823846 
     
    827850At the bottom boundary, this is done using the land-ocean mask. 
    828851 
    829 \newpage 
    830  
    831 % ================================================================ 
    832 % Offline observation operator documentation 
    833 % ================================================================ 
     852For profile observation types we do both vertical and horizontal interpolation. \NEMO\ has a generalised vertical coordinate system this means the vertical level depths can vary with location. Therefore, it is necessary first to perform vertical interpolation of the model value to the observation depths for each of the four surrounding grid points. After this the model values, at these points, at the observation depth, are horizontally interpolated to the observation location. 
    834853 
    835854%\usepackage{framed} 
    836855 
    837 \section{Offline observation operator} 
    838 \label{sec:OBS_ooo} 
    839  
     856%% ================================================================================================= 
     857\section{Standalone observation operator} 
     858\label{sec:OBS_sao} 
     859 
     860%% ================================================================================================= 
    840861\subsection{Concept} 
    841862 
    842 The obs oper maps model variables to observation space. 
    843 It is possible to apply this mapping without running the model. 
    844 The software which performs this functionality is known as the \textbf{offline obs oper}. 
    845 The obs oper is divided into three stages. 
    846 An initialisation phase, an interpolation phase and an output phase. 
    847 The implementation of which is outlined in the previous sections. 
    848 During the interpolation phase the offline obs oper populates the model arrays by 
    849 reading saved model fields from disk. 
    850  
    851 There are two ways of exploiting this offline capacity. 
     863The observation operator maps model variables to observation space. This is normally done while the model is running, i.e. online, it is possible to apply this mapping offline without running the model with the \textbf{standalone observation operator} (SAO). The process is divided into an initialisation phase, an interpolation phase and an output phase. 
     864During the interpolation phase the SAO populates the model arrays by 
     865reading saved model fields from disk. The interpolation and the output phases use the same OBS code described in the preceding sections. 
     866 
     867There are two ways of exploiting the standalone capacity. 
    852868The first is to mimic the behaviour of the online system by supplying model fields at 
    853869regular intervals between the start and the end of the run. 
    854870This approach results in a single model counterpart per observation. 
    855 This kind of usage produces feedback files the same file format as the online obs oper. 
    856 The second is to take advantage of the offline setting in which 
    857 multiple model counterparts can be calculated per observation. 
     871This kind of usage produces feedback files the same file format as the online observation operator. 
     872The second is to take advantage of the ability to run offline by calculating 
     873multiple model counterparts for each observation. 
    858874In this case it is possible to consider all forecasts verifying at the same time. 
    859 By forecast, I mean any method which produces an estimate of physical reality which is not an observed value. 
    860 In the case of class 4 files this means forecasts, analyses, persisted analyses and 
    861 climatological values verifying at the same time. 
    862 Although the class 4 file format doesn't account for multiple ensemble members or 
    863 multiple experiments per observation, it is possible to include these components in the same or multiple files. 
    864  
    865 %-------------------------------------------------------------------------------------------------------- 
    866 % offline_oper.exe  
    867 %-------------------------------------------------------------------------------------------------------- 
    868  
    869 \subsection{Using the offline observation operator} 
    870  
     875By forecast, we mean any method which produces an estimate of physical reality which is not an observed value. 
     876 
     877% sao.exe 
     878 
     879%% ================================================================================================= 
     880\subsection{Using the standalone observation operator} 
     881 
     882%% ================================================================================================= 
    871883\subsubsection{Building} 
    872884 
    873 In addition to \emph{OPA\_SRC} the offline obs oper requires the inclusion of the \emph{OOO\_SRC} directory. 
    874 \emph{OOO\_SRC} contains a replacement \mdl{nemo} and \mdl{nemogcm} which 
     885In addition to \emph{OPA\_SRC} the SAO requires the inclusion of the \emph{SAO\_SRC} directory. 
     886\emph{SAO\_SRC} contains a replacement \mdl{nemo} and \mdl{nemogcm} which 
    875887overwrites the resultant \textbf{nemo.exe}. 
    876 This is the approach taken by \emph{SAS\_SRC} and \emph{OFF\_SRC}. 
    877  
    878 %-------------------------------------------------------------------------------------------------------- 
    879 % Running  
    880 %-------------------------------------------------------------------------------------------------------- 
     888Note this a similar approach to that taken by the standalone surface scheme \emph{SAS\_SRC} and the offline TOP model \emph{OFF\_SRC}. 
     889 
     890% Running 
     891%% ================================================================================================= 
    881892\subsubsection{Running} 
    882893 
    883 The simplest way to use the executable is to edit and append the \textbf{ooo.nml} namelist to 
    884 a full NEMO namelist and then to run the executable as if it were nemo.exe.  
    885  
    886 \subsubsection{Quick script} 
    887  
    888 A useful Python utility to control the namelist options can be found in \textbf{OBSTOOLS/OOO}. 
    889 The functions which locate model fields and observation files can be manually specified. 
    890 The package can be installed by appropriate use of the included setup.py script. 
    891  
    892 Documentation can be auto-generated by Sphinx by running \emph{make html} in the \textbf{doc} directory. 
    893  
    894 %-------------------------------------------------------------------------------------------------------- 
     894The simplest way to use the executable is to edit and append the \textbf{sao.nml} namelist to 
     895a full \NEMO\ namelist and then to run the executable as if it were nemo.exe. 
     896 
    895897% Configuration section 
    896 %-------------------------------------------------------------------------------------------------------- 
    897 \subsection{Configuring the offline observation operator} 
    898 The observation files and settings understood by \textbf{namobs} have been outlined in the online obs oper section. 
    899 In addition there are two further namelists wich control the operation of the offline obs oper. 
    900 \textbf{namooo} which controls the input model fields and \textbf{namcl4} which 
    901 controls the production of class 4 files.  
    902  
     898%% ================================================================================================= 
     899\subsection{Configuring the standalone observation operator} 
     900The observation files and settings understood by \nam{obs}{obs} have been outlined in the online observation operator section. 
     901In addition is a further namelist \nam{sao}{sao} which used to set the input model fields for the SAO 
     902 
     903%% ================================================================================================= 
    903904\subsubsection{Single field} 
    904905 
    905 In offline mode model arrays are populated at appropriate time steps via input files. 
    906 At present, \textbf{tsn} and \textbf{sshn} are populated by the default read routines.  
     906In the SAO the model arrays are populated at appropriate time steps via input files. 
     907At present, \textbf{tsn} and \textbf{sshn} are populated by the default read routines. 
    907908These routines will be expanded upon in future versions to allow the specification of any model variable. 
    908909As such, input files must be global versions of the model domain with 
    909910\textbf{votemper}, \textbf{vosaline} and optionally \textbf{sshn} present. 
    910911 
    911 For each field read there must be an entry in the \textbf{namooo} namelist specifying 
     912For each field read there must be an entry in the \nam{sao}{sao} namelist specifying 
    912913the name of the file to read and the index along the \emph{time\_counter}. 
    913914For example, to read the second time counter from a single file the namelist would be. 
     
    915916\begin{forlines} 
    916917!---------------------------------------------------------------------- 
    917 !       namooo Offline obs_oper namelist 
     918!       namsao Standalone obs_oper namelist 
    918919!---------------------------------------------------------------------- 
    919 !   ooo_files    specifies the files containing the model counterpart 
    920 !   nn_ooo_idx   specifies the time_counter index within the model file 
    921 &namooo 
    922    ooo_files = "foo.nc" 
    923    nn_ooo_idx = 2 
     920!   sao_files    specifies the files containing the model counterpart 
     921!   nn_sao_idx   specifies the time_counter index within the model file 
     922&namsao 
     923   sao_files = "foo.nc" 
     924   nn_sao_idx = 2 
    924925/ 
    925926\end{forlines} 
    926927 
     928%% ================================================================================================= 
    927929\subsubsection{Multiple fields per run} 
    928930 
    929 Model field iteration is controlled via \textbf{nn\_ooo\_freq} which 
     931Model field iteration is controlled via \textbf{nn\_sao\_freq} which 
    930932specifies the number of model steps at which the next field gets read. 
    931933For example, if 12 hourly fields are to be interpolated in a setup where 288 steps equals 24 hours. 
     
    933935\begin{forlines} 
    934936!---------------------------------------------------------------------- 
    935 !       namooo Offline obs_oper namelist 
     937!       namsao Standalone obs_oper namelist 
    936938!---------------------------------------------------------------------- 
    937 !   ooo_files    specifies the files containing the model counterpart 
    938 !   nn_ooo_idx   specifies the time_counter index within the model file 
    939 !   nn_ooo_freq  specifies number of time steps between read operations 
    940 &namooo 
    941    ooo_files = "foo.nc" "foo.nc" 
    942    nn_ooo_idx = 1 2 
    943    nn_ooo_freq = 144 
     939!   sao_files    specifies the files containing the model counterpart 
     940!   nn_sao_idx   specifies the time_counter index within the model file 
     941!   nn_sao_freq  specifies number of time steps between read operations 
     942&namsao 
     943   sao_files = "foo.nc" "foo.nc" 
     944   nn_sao_idx = 1 2 
     945   nn_sao_freq = 144 
    944946/ 
    945947\end{forlines} 
     
    952954%\end{framed} 
    953955 
    954 It is easy to see how a collection of fields taken fron a number of files at different indices can be combined at 
     956A collection of fields taken from a number of files at different indices can be combined at 
    955957a particular frequency in time to generate a pseudo model evolution. 
    956 As long as all that is needed is a single model counterpart at a regular interval then 
    957 namooo is all that needs to be edited. 
    958 However, a far more interesting approach can be taken in which multiple forecasts, analyses, persisted analyses and 
    959 climatologies are considered against the same set of observations. 
    960 For this a slightly more complicated approach is needed. 
    961 It is referred to as \emph{Class 4} since it is the fourth metric defined by the GODAE intercomparison project. 
    962  
    963 %-------------------------------------------------------------------------------------------------------- 
    964 % Class 4 file section 
    965 %-------------------------------------------------------------------------------------------------------- 
    966 \subsubsection{Multiple model counterparts per observation a.k.a Class 4} 
    967  
    968 A generalisation of feedback files to allow multiple model components per observation. 
    969 For a single observation, as well as previous forecasts verifying at the same time 
    970 there are also analyses, persisted analyses and climatologies.  
    971  
    972  
    973 The above namelist performs two basic functions. 
    974 It organises the fields given in \textbf{namooo} into groups so that observations can be matched up multiple times. 
    975 It also controls the metadata and the output variable of the class 4 file when a write routine is called. 
    976  
    977 %\begin{framed} 
    978 \textbf{Note: ln\_cl4} must be set to \forcode{.true.} in \textbf{namobs} to use class 4 outputs. 
    979 %\end{framed} 
    980  
    981 \subsubsection{Class 4 naming convention} 
    982  
    983 The standard class 4 file naming convention is as follows. 
    984  
    985 \noindent 
    986 \linebreak 
    987 \textbf{\$\{prefix\}\_\$\{yyyymmdd\}\_\$\{sys\}\_\$\{cfg\}\_\$\{vn\}\_\$\{kind\}\_\$\{nproc\}}.nc 
    988  
    989 \noindent 
    990 \linebreak 
    991 Much of the namelist is devoted to specifying this convention. 
    992 The following namelist settings control the elements of the output file names. 
    993 Each should be specified as a single string of character data. 
    994  
    995 \begin{description} 
    996 \item[cl4\_prefix] 
    997   Prefix for class 4 files \eg class4 
    998 \item[cl4\_date] 
    999   YYYYMMDD validity date 
    1000 \item[cl4\_sys] 
    1001   The name of the class 4 model system \eg FOAM 
    1002 \item[cl4\_cfg] 
    1003   The name of the class 4 model configuration \eg orca025 
    1004 \item[cl4\_vn] 
    1005   The name of the class 4 model version \eg 12.0 
    1006 \end{description} 
    1007  
    1008 \noindent 
    1009 The kind is specified by the observation type internally to the obs oper. 
    1010 The processor number is specified internally in NEMO.  
    1011  
    1012 \subsubsection{Class 4 file global attributes} 
    1013  
    1014 Global attributes necessary to fulfill the class 4 file definition. 
    1015 These are also useful pieces of information when collaborating with external partners. 
    1016  
    1017 \begin{description} 
    1018 \item[cl4\_contact] 
    1019   Contact email for class 4 files. 
    1020 \item[cl4\_inst] 
    1021   The name of the producers institution. 
    1022 \item[cl4\_cfg] 
    1023   The name of the class 4 model configuration \eg orca025 
    1024 \item[cl4\_vn] 
    1025   The name of the class 4 model version \eg 12.0 
    1026 \end{description} 
    1027  
    1028 \noindent 
    1029 The obs\_type, creation date and validity time are specified internally to the obs oper. 
    1030  
    1031 \subsubsection{Class 4 model counterpart configuration} 
    1032  
    1033 As seen previously it is possible to perform a single sweep of the obs oper and 
    1034 specify a collection of model fields equally spaced along that sweep. 
    1035 In the class 4 case the single sweep is replaced with multiple sweeps and 
    1036 a certain ammount of book keeping is needed to ensure each model counterpart makes its way to 
    1037 the correct piece of memory in the output files. 
    1038  
    1039 \noindent 
    1040 \linebreak 
    1041 In terms of book keeping, the offline obs oper needs to know how many full sweeps need to be performed. 
    1042 This is specified via the \textbf{cl4\_match\_len} variable and 
    1043 is the total number of model counterparts per observation. 
    1044 For example, a 3 forecasts plus 3 persistence fields plus an analysis field would be 7 counterparts per observation. 
    1045  
    1046 \begin{forlines} 
    1047    cl4_match_len = 7 
    1048 \end{forlines} 
    1049  
    1050 Then to correctly allocate a class 4 file the forecast axis must be defined. 
    1051 This is controlled via \textbf{cl4\_fcst\_len}, which in out above example would be 3. 
    1052  
    1053 \begin{forlines} 
    1054    cl4_fcst_len = 3 
    1055 \end{forlines} 
    1056  
    1057 Then for each model field it is necessary to designate what class 4 variable and index along 
    1058 the forecast dimension the model counterpart should be stored in the output file. 
    1059 As well as a value for that lead time in hours, this will be useful when interpreting the data afterwards.  
    1060  
    1061 \begin{forlines} 
    1062    cl4_vars = "forecast" "forecast" "forecast" "persistence" "persistence" 
    1063               "persistence" "best_estimate" 
    1064    cl4_fcst_idx = 1 2 3 1 2 3 1 
    1065    cl4_leadtime = 12 36 60  
    1066 \end{forlines} 
    1067  
    1068 In terms of files and indices of fields inside each file the class 4 approach makes use of 
    1069 the \textbf{namooo} namelist. 
    1070 If our fields are in separate files with a single field per file our example inputs will be specified. 
    1071  
    1072 \begin{forlines} 
    1073    ooo_files = "F.1.nc" "F.2.nc" "F.3.nc" "P.1.nc" "P.2.nc" "P.3.nc" "A.1.nc" 
    1074    nn_ooo_idx = 1 1 1 1 1 1 1 
    1075 \end{forlines} 
    1076  
    1077 When we combine all of the naming conventions, global attributes and i/o instructions the class 4 namelist becomes. 
    1078  
    1079 \begin{forlines} 
    1080 !---------------------------------------------------------------------- 
    1081 !       namooo Offline obs_oper namelist 
    1082 !---------------------------------------------------------------------- 
    1083 !   ooo_files    specifies the files containing the model counterpart 
    1084 !   nn_ooo_idx   specifies the time_counter index within the model file 
    1085 !   nn_ooo_freq  specifies number of time steps between read operations 
    1086 &namooo 
    1087    ooo_files = "F.1.nc" "F.2.nc" "F.3.nc" "P.1.nc" "P.2.nc" "P.3.nc" "A.1.nc" 
    1088    nn_ooo_idx = 1 1 1 1 1 1 1 
    1089 / 
    1090 !---------------------------------------------------------------------- 
    1091 !       namcl4 Offline obs_oper class 4 namelist 
    1092 !---------------------------------------------------------------------- 
    1093 ! 
    1094 !  Naming convention 
    1095 !  ----------------- 
    1096 !  cl4_prefix    specifies the output file prefix 
    1097 !  cl4_date      specifies the output file validity date 
    1098 !  cl4_sys       specifies the model counterpart system 
    1099 !  cl4_cfg       specifies the model counterpart configuration 
    1100 !  cl4_vn        specifies the model counterpart version 
    1101 !  cl4_inst      specifies the model counterpart institute 
    1102 !  cl4_contact   specifies the file producers contact details 
    1103 ! 
    1104 !  I/O specification 
    1105 !  ----------------- 
    1106 !  cl4_vars      specifies the names of the output file netcdf variable 
    1107 !  cl4_fcst_idx  specifies output file forecast index 
    1108 !  cl4_fcst_len  specifies forecast axis length 
    1109 !  cl4_match_len specifies number of unique matches per observation 
    1110 !  cl4_leadtime  specifies the forecast axis lead time  
    1111 ! 
    1112 &namcl4 
    1113    cl4_match_len = 7 
    1114    cl4_fcst_len = 3 
    1115    cl4_fcst_idx = 1 2 3 1 2 3 1 
    1116    cl4_vars = "forecast" "forecast" "forecast" "persistence" "persistence" 
    1117               "persistence" "best_estimate" 
    1118    cl4_leadtime = 12 36 60 
    1119    cl4_prefix = "class4" 
    1120    cl4_date = "20130101" 
    1121    cl4_vn = "12.0" 
    1122    cl4_sys = "FOAM" 
    1123    cl4_cfg = "AMM7" 
    1124    cl4_contact = "example@example.com" 
    1125    cl4_inst = "UK Met Office" 
    1126 / 
    1127 \end{forlines} 
    1128  
    1129 \subsubsection{Climatology interpolation} 
    1130  
    1131 The climatological counterpart is generated at the start of the run by 
    1132 restarting the model from climatology through appropriate use of \textbf{namtsd}. 
    1133 To override the offline observation operator read routine and to take advantage of the restart settings, 
    1134 specify the first entry in \textbf{cl4\_vars} as "climatology". 
    1135 This will then pipe the restart from climatology into the output class 4 file. 
    1136 As in every other class 4 matchup the input file, input index and output index must be specified. 
    1137 These can be replaced with dummy data since they are not used but 
    1138 they must be present to cycle through the matchups correctly.  
    1139  
    1140 \subsection{Advanced usage} 
    1141  
    1142 In certain cases it may be desirable to include both multiple model fields per observation window with 
    1143 multiple match ups per observation. 
    1144 This can be achieved by specifying \textbf{nn\_ooo\_freq} as well as the class 4 settings. 
    1145 Care must be taken in generating the ooo\_files list such that the files are arranged into 
    1146 consecutive blocks of single match ups. 
    1147 For example, 2 forecast fields of 12 hourly data would result in 4 separate read operations but 
    1148 only 2 write operations, 1 per forecast. 
    1149  
    1150 \begin{forlines} 
    1151    ooo_files = "F1.nc" "F1.nc" "F2.nc" "F2.nc" 
    1152 ... 
    1153    cl4_fcst_idx = 1 2 
    1154 \end{forlines} 
    1155  
    1156 The above notation reveals the internal split between match up iterators and file iterators. 
    1157 This technique has not been used before so experimentation is needed before results can be trusted. 
    1158  
    1159 \newpage 
    1160  
     958If all that is needed is a single model counterpart at a regular interval then 
     959the standard SAO is all that is required. 
     960However, just to note, it is possible to extend this approach by comparing multiple forecasts, analyses, persisted analyses and 
     961climatologies with the same set of observations. 
     962This approach is referred to as \emph{Class 4} since it is the fourth metric defined by the GODAE intercomparison project. This requires multiple runs of the SAO and running an additional utility (not currently in the \NEMO\ repository) to combine the feedback files into one class 4 file. 
     963 
     964%% ================================================================================================= 
    1161965\section{Observation utilities} 
    1162966\label{sec:OBS_obsutils} 
    1163967 
    1164 Some tools for viewing and processing of observation and feedback files are provided in 
    1165 the NEMO repository for convenience. 
    1166 These include OBSTOOLS which are a collection of \fortran programs which are helpful to deal with feedback files. 
     968For convenience some tools for viewing and processing of observation and feedback files are provided in 
     969the \NEMO\ repository. 
     970These tools include OBSTOOLS which are a collection of \fortran\ programs which are helpful to deal with feedback files. 
    1167971They do such tasks as observation file conversion, printing of file contents, 
    1168972some basic statistical analysis of feedback files. 
    1169 The other tool is an IDL program called dataplot which uses a graphical interface to 
     973The other main tool is an IDL program called dataplot which uses a graphical interface to 
    1170974visualise observations and feedback files. 
    1171975OBSTOOLS and dataplot are described in more detail below. 
    1172976 
     977%% ================================================================================================= 
    1173978\subsection{Obstools} 
    1174979 
    1175 A series of \fortran utilities is provided with NEMO called OBSTOOLS. 
    1176 This are helpful in handling observation files and the feedback file output from the NEMO observation operator. 
    1177 The utilities are as follows 
    1178  
    1179 \subsubsection{c4comb} 
    1180  
    1181 The program c4comb combines multiple class 4 files produced by individual processors in 
    1182 an MPI run of NEMO offline obs\_oper into a single class 4 file. 
    1183 The program is called in the following way: 
    1184  
    1185  
    1186 \footnotesize 
    1187 \begin{cmds} 
    1188 c4comb.exe outputfile inputfile1 inputfile2 ... 
    1189 \end{cmds} 
    1190  
     980A series of \fortran\ utilities is provided with \NEMO\ called OBSTOOLS. 
     981This are helpful in handling observation files and the feedback file output from the observation operator. A brief description of some of the utilities follows 
     982 
     983%% ================================================================================================= 
    1191984\subsubsection{corio2fb} 
    1192985 
    1193986The program corio2fb converts profile observation files from the Coriolis format to the standard feedback format. 
    1194 The program is called in the following way: 
    1195  
    1196 \footnotesize 
     987It is called in the following way: 
     988 
    1197989\begin{cmds} 
    1198990corio2fb.exe outputfile inputfile1 inputfile2 ... 
    1199991\end{cmds} 
    1200992 
     993%% ================================================================================================= 
    1201994\subsubsection{enact2fb} 
    1202995 
    1203996The program enact2fb converts profile observation files from the ENACT format to the standard feedback format. 
    1204 The program is called in the following way: 
    1205  
    1206 \footnotesize 
     997It is called in the following way: 
     998 
    1207999\begin{cmds} 
    12081000enact2fb.exe outputfile inputfile1 inputfile2 ... 
    12091001\end{cmds} 
    12101002 
     1003%% ================================================================================================= 
    12111004\subsubsection{fbcomb} 
    12121005 
    12131006The program fbcomb combines multiple feedback files produced by individual processors in 
    1214 an MPI run of NEMO into a single feedback file. 
    1215 The program is called in the following way: 
    1216  
    1217 \footnotesize 
     1007an MPI run of \NEMO\ into a single feedback file. 
     1008It is called in the following way: 
     1009 
    12181010\begin{cmds} 
    12191011fbcomb.exe outputfile inputfile1 inputfile2 ... 
    12201012\end{cmds} 
    12211013 
     1014%% ================================================================================================= 
    12221015\subsubsection{fbmatchup} 
    12231016 
    12241017The program fbmatchup will match observations from two feedback files. 
    1225 The program is called in the following way: 
    1226  
    1227 \footnotesize 
     1018It is called in the following way: 
     1019 
    12281020\begin{cmds} 
    12291021fbmatchup.exe outputfile inputfile1 varname1 inputfile2 varname2 ... 
    12301022\end{cmds} 
    12311023 
     1024%% ================================================================================================= 
    12321025\subsubsection{fbprint} 
    12331026 
    12341027The program fbprint will print the contents of a feedback file or files to standard output. 
    12351028Selected information can be output using optional arguments. 
    1236 The program is called in the following way: 
    1237  
    1238 \footnotesize 
     1029It is called in the following way: 
     1030 
    12391031\begin{cmds} 
    12401032fbprint.exe [options] inputfile 
     
    12461038     -B            Select observations based on QC flags 
    12471039     -u            unsorted 
    1248      -s ID         select station ID   
     1040     -s ID         select station ID 
    12491041     -t TYPE       select observation type 
    1250      -v NUM1-NUM2  select variable range to print by number  
     1042     -v NUM1-NUM2  select variable range to print by number 
    12511043                      (default all) 
    1252      -a NUM1-NUM2  select additional variable range to print by number  
     1044     -a NUM1-NUM2  select additional variable range to print by number 
    12531045                      (default all) 
    1254      -e NUM1-NUM2  select extra variable range to print by number  
     1046     -e NUM1-NUM2  select extra variable range to print by number 
    12551047                      (default all) 
    12561048     -d            output date range 
     
    12591051\end{cmds} 
    12601052 
     1053%% ================================================================================================= 
    12611054\subsubsection{fbsel} 
    12621055 
    12631056The program fbsel will select or subsample observations. 
    1264 The program is called in the following way: 
    1265  
    1266 \footnotesize 
     1057It is called in the following way: 
     1058 
    12671059\begin{cmds} 
    12681060fbsel.exe <input filename> <output filename> 
    12691061\end{cmds} 
    12701062 
     1063%% ================================================================================================= 
    12711064\subsubsection{fbstat} 
    12721065 
    12731066The program fbstat will output summary statistics in different global areas into a number of files. 
    1274 The program is called in the following way: 
    1275  
    1276 \footnotesize 
     1067It is called in the following way: 
     1068 
    12771069\begin{cmds} 
    12781070fbstat.exe [-nmlev] <filenames> 
    12791071\end{cmds} 
    12801072 
     1073%% ================================================================================================= 
    12811074\subsubsection{fbthin} 
    12821075 
    12831076The program fbthin will thin the data to 1 degree resolution. 
    12841077The code could easily be modified to thin to a different resolution. 
    1285 The program is called in the following way: 
    1286  
    1287 \footnotesize 
     1078It is called in the following way: 
     1079 
    12881080\begin{cmds} 
    12891081fbthin.exe inputfile outputfile 
    12901082\end{cmds} 
    12911083 
     1084%% ================================================================================================= 
    12921085\subsubsection{sla2fb} 
    12931086 
    12941087The program sla2fb will convert an AVISO SLA format file to feedback format. 
    1295 The program is called in the following way: 
    1296  
    1297 \footnotesize 
     1088It is called in the following way: 
     1089 
    12981090\begin{cmds} 
    12991091sla2fb.exe [-s type] outputfile inputfile1 inputfile2 ... 
     
    13031095\end{cmds} 
    13041096 
     1097%% ================================================================================================= 
    13051098\subsubsection{vel2fb} 
    13061099 
    13071100The program vel2fb will convert TAO/PIRATA/RAMA currents files to feedback format. 
    1308 The program is called in the following way: 
    1309  
    1310 \footnotesize 
     1101It is called in the following way: 
     1102 
    13111103\begin{cmds} 
    13121104vel2fb.exe outputfile inputfile1 inputfile2 ... 
    13131105\end{cmds} 
    13141106 
     1107%% ================================================================================================= 
    13151108\subsection{Building the obstools} 
    13161109 
    13171110To build the obstools use in the tools directory use ./maketools -n OBSTOOLS -m [ARCH]. 
    13181111 
     1112%% ================================================================================================= 
    13191113\subsection{Dataplot} 
    13201114 
    13211115An IDL program called dataplot is included which uses a graphical interface to 
    1322 visualise observations and feedback files. 
     1116visualise observations and feedback files. Note a similar package has recently developed in python (also called dataplot) which does some of the same things that the IDL dataplot does. Please contact the authors of the this chapter if you are interested in this. 
     1117 
    13231118It is possible to zoom in, plot individual profiles and calculate some basic statistics. 
    13241119To plot some data run IDL and then: 
    1325 \footnotesize 
     1120 
    13261121\begin{minted}{idl} 
    13271122IDL> dataplot, "filename" 
     
    13311126for example multiple feedback files from different processors or from different days, 
    13321127the easiest method is to use the spawn command to generate a list of files which can then be passed to dataplot. 
    1333 \footnotesize 
     1128 
    13341129\begin{minted}{idl} 
    13351130IDL> spawn, 'ls profb*.nc', files 
     
    13371132\end{minted} 
    13381133 
    1339 \autoref{fig:obsdataplotmain} shows the main window which is launched when dataplot starts. 
     1134\autoref{fig:OBS_dataplotmain} shows the main window which is launched when dataplot starts. 
    13401135This is split into three parts. 
    13411136At the top there is a menu bar which contains a variety of drop down menus. 
     
    13501145The plotting colour range can be changed by clicking on the colour bar. 
    13511146The title of the plot gives some basic information about the date range and depth range shown, 
    1352 the extreme values, and the mean and rms values. 
     1147the extreme values, and the mean and RMS values. 
    13531148It is possible to zoom in using a drag-box. 
    13541149You may also zoom in or out using the mouse wheel. 
     
    13621157observation minus background value. 
    13631158The next group of radio buttons selects the map projection. 
    1364 This can either be regular latitude longitude grid, or north or south polar stereographic. 
     1159This can either be regular longitude latitude grid, or north or south polar stereographic. 
    13651160The next group of radio buttons will plot bad observations, switch to salinity and 
    13661161plot density for profile observations. 
    13671162The rightmost group of buttons will print the plot window as a postscript, save it as png, or exit from dataplot. 
    13681163 
    1369 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    13701164\begin{figure} 
    1371   \begin{center} 
    1372     % \includegraphics[width=10cm,height=12cm,angle=-90.]{Fig_OBS_dataplot_main} 
    1373     \includegraphics[width=9cm,angle=-90.]{Fig_OBS_dataplot_main} 
    1374     \caption{ 
    1375       \protect\label{fig:obsdataplotmain} 
    1376       Main window of dataplot. 
    1377     } 
    1378   \end{center} 
     1165  \centering 
     1166  \includegraphics[width=0.66\textwidth]{Fig_OBS_dataplot_main} 
     1167  \caption{Main window of dataplot} 
     1168  \label{fig:OBS_dataplotmain} 
    13791169\end{figure} 
    1380 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    13811170 
    13821171If a profile point is clicked with the mouse button a plot of the observation and background values as 
    1383 a function of depth (\autoref{fig:obsdataplotprofile}). 
    1384  
    1385 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
     1172a function of depth (\autoref{fig:OBS_dataplotprofile}). 
     1173 
    13861174\begin{figure} 
    1387   \begin{center} 
    1388     % \includegraphics[width=10cm,height=12cm,angle=-90.]{Fig_OBS_dataplot_prof} 
    1389     \includegraphics[width=7cm,angle=-90.]{Fig_OBS_dataplot_prof} 
    1390     \caption{ 
    1391       \protect\label{fig:obsdataplotprofile} 
    1392       Profile plot from dataplot produced by right clicking on a point in the main window. 
    1393     } 
    1394   \end{center} 
     1175  \centering 
     1176  \includegraphics[width=0.66\textwidth]{Fig_OBS_dataplot_prof} 
     1177  \caption[Profile plot from dataplot]{ 
     1178    Profile plot from dataplot produced by right clicking on a point in the main window} 
     1179  \label{fig:OBS_dataplotprofile} 
    13951180\end{figure} 
    1396 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    1397  
    1398 \biblio 
    1399  
    1400 \pindex 
     1181 
     1182\onlyinsubfile{\input{../../global/epilogue}} 
    14011183 
    14021184\end{document} 
Note: See TracChangeset for help on using the changeset viewer.