Index: branches/2017/dev_merge_2017/DOC/texfiles/chapters/chap_OBS.tex
===================================================================
--- branches/2017/dev_merge_2017/DOC/texfiles/chapters/chap_OBS.tex	(revision 9373)
+++ branches/2017/dev_merge_2017/DOC/texfiles/chapters/chap_OBS.tex	(revision 9376)
@@ -65,17 +65,17 @@
 
 \item Download some EN4 data from 
-\href{http://www.metoffice.gov.uk/hadobs}{http://www.metoffice.gov.uk/hadobs}. Choose observations which are
+\href{http://www.metoffice.gov.uk/hadobs}{www.metoffice.gov.uk/hadobs}. Choose observations which are
 valid for the period of your test run because the observation operator compares
 the model and observations for a matching date and time. 
 
 \item Compile the OBSTOOLS code using: 
-\begin{verbatim}
+\begin{shcode}
 ./maketools -n OBSTOOLS -m [ARCH].
-\end{verbatim}
+\end{shcode}
 
 \item Convert the EN4 data into feedback format: 
-\begin{verbatim}
+\begin{shcode}
 enact2fb.exe profiles_01.nc EN.4.1.1.f.profiles.g10.YYYYMM.nc
-\end{verbatim}
+\end{shcode}
 
 \item Include the following in the NEMO namelist to run the observation
@@ -84,5 +84,5 @@
 
 %------------------------------------------namobs_example-----------------------------------------------------
-\namdisplay{namobs_example}
+%\fortranfile{namelists/namobs_example}
 %-------------------------------------------------------------------------------------------------------------
 
@@ -114,5 +114,5 @@
 
 %------------------------------------------namobs--------------------------------------------------------
-\namdisplay{namobs}
+\fortranfile{namelists/namobs}
 %-------------------------------------------------------------------------------------------------------------
 
@@ -126,7 +126,5 @@
 \subsection{Profile feedback}
 
-\begin{alltt}
-\tiny
-\begin{verbatim}
+\begin{ccode}
 netcdf profiles_01 {
 dimensions:
@@ -280,12 +278,9 @@
           :Convention = "NEMO unified observation operator output" ;
 }
-\end{verbatim}
-\end{alltt}
+\end{ccode}
 
 \subsection{Sea level anomaly feedback}
 
-\begin{alltt}
-\tiny
-\begin{verbatim}
+\begin{ccode}
 netcdf sla_01 {
 dimensions:
@@ -407,6 +402,5 @@
           :Convention = "NEMO unified observation operator output" ;
 }
-\end{verbatim}
-\end{alltt}
+\end{ccode}
 
 The mean dynamic
@@ -416,7 +410,5 @@
 surface height. Below is an example header for this file (on the ORCA025 grid).
 
-\begin{alltt}
-\tiny
-\begin{verbatim}
+\begin{ccode}
 dimensions:
         x = 1442 ;
@@ -433,12 +425,9 @@
                 sossheig:units = "metres" ;
                 sossheig:grid = "orca025T" ;
-\end{verbatim}
-\end{alltt}
+\end{ccode}
 
 \subsection{Sea surface temperature feedback}
 
-\begin{alltt}
-\tiny
-\begin{verbatim}
+\begin{ccode}
 netcdf sst_01 {
 dimensions:
@@ -553,6 +542,5 @@
           :Convention = "NEMO unified observation operator output" ;
 }
-\end{verbatim}
-\end{alltt}
+\end{ccode}
 
 \section{Theoretical details}
@@ -935,7 +923,5 @@
 read the second time counter from a single file the namelist would be.
 
-\begin{alltt}
-\tiny
-\begin{verbatim} 
+\begin{fortrancode}
 !----------------------------------------------------------------------
 !       namooo Offline obs_oper namelist
@@ -947,6 +933,5 @@
    nn_ooo_idx = 2
 /
-\end{verbatim} 
-\end{alltt}
+\end{fortrancode}
 
 \subsubsection{Multiple fields per run}
@@ -956,7 +941,5 @@
 12 hourly fields are to be interpolated in a setup where 288 steps equals 24 hours.
 
-\begin{alltt}
-\tiny
-\begin{verbatim} 
+\begin{fortrancode}
 !----------------------------------------------------------------------
 !       namooo Offline obs_oper namelist
@@ -970,6 +953,5 @@
    nn_ooo_freq = 144
 /
-\end{verbatim} 
-\end{alltt}
+\end{fortrancode}
 
 The above namelist will result in feedback files whose first 12 hours contain
@@ -1079,20 +1061,14 @@
 fields plus an analysis field would be 7 counterparts per observation.
 
-\begin{alltt}
-\tiny
-\begin{verbatim}
+\begin{fortrancode}
    cl4_match_len = 7
-\end{verbatim}
-\end{alltt}
+\end{fortrancode}
 
 Then to correctly allocate a class 4 file the forecast axis must be defined. This
 is controlled via \textbf{cl4\_fcst\_len}, which in out above example would be 3.
 
-\begin{alltt}
-\tiny
-\begin{verbatim}
+\begin{fortrancode}
    cl4_fcst_len = 3
-\end{verbatim}
-\end{alltt}
+\end{fortrancode}
 
 Then for each model field it is necessary to designate what class 4 variable and
@@ -1101,13 +1077,10 @@
 when interpreting the data afterwards. 
 
-\begin{alltt}
-\tiny
-\begin{verbatim}
+\begin{fortrancode}
    cl4_vars = "forecast" "forecast" "forecast" "persistence" "persistence"
               "persistence" "best_estimate"
    cl4_fcst_idx = 1 2 3 1 2 3 1
    cl4_leadtime = 12 36 60 
-\end{verbatim}
-\end{alltt}
+\end{fortrancode}
 
 In terms of files and indices of fields inside each file the class 4 approach
@@ -1115,18 +1088,13 @@
 with a single field per file our example inputs will be specified.
 
-\begin{alltt}
-\tiny
-\begin{verbatim}
+\begin{fortrancode}
    ooo_files = "F.1.nc" "F.2.nc" "F.3.nc" "P.1.nc" "P.2.nc" "P.3.nc" "A.1.nc"
    nn_ooo_idx = 1 1 1 1 1 1 1
-\end{verbatim}
-\end{alltt}
+\end{fortrancode}
 
 When we combine all of the naming conventions, global attributes and i/o instructions
 the class 4 namelist becomes.
 
-\begin{alltt}
-\tiny
-\begin{verbatim}
+\begin{fortrancode}
 !----------------------------------------------------------------------
 !       namooo Offline obs_oper namelist
@@ -1176,6 +1144,5 @@
    cl4_inst = "UK Met Office"
 /
-\end{verbatim}
-\end{alltt}
+\end{fortrancode}
 
 \subsubsection{Climatology interpolation}
@@ -1200,12 +1167,9 @@
 operations, 1 per forecast.
 
-\begin{alltt}
-\tiny
-\begin{verbatim}
+\begin{fortrancode}
    ooo_files = "F1.nc" "F1.nc" "F2.nc" "F2.nc"
 ...
    cl4_fcst_idx = 1 2
-\end{verbatim}
-\end{alltt}
+\end{fortrancode}
 
 The above notation reveals the internal split between match up iterators and file
@@ -1239,10 +1203,9 @@
 MPI run of NEMO offline obs\_oper into a single class 4 file. The program is called in the following way:
 
-\begin{alltt}
+
 \footnotesize
-\begin{verbatim}
+\begin{shcode}
 c4comb.exe outputfile inputfile1 inputfile2 ...
-\end{verbatim}
-\end{alltt}
+\end{shcode}
 
 \subsubsection{corio2fb}
@@ -1251,10 +1214,8 @@
 standard feedback format. The program is called in the following way:
 
-\begin{alltt}
 \footnotesize
-\begin{verbatim}
+\begin{shcode}
 corio2fb.exe outputfile inputfile1 inputfile2 ...
-\end{verbatim}
-\end{alltt}
+\end{shcode}
 
 \subsubsection{enact2fb}
@@ -1263,10 +1224,8 @@
 feedback format. The program is called in the following way:
 
-\begin{alltt}
 \footnotesize
-\begin{verbatim}
+\begin{shcode}
 enact2fb.exe outputfile inputfile1 inputfile2 ...
-\end{verbatim}
-\end{alltt}
+\end{shcode}
 
 \subsubsection{fbcomb}
@@ -1275,10 +1234,8 @@
 MPI run of NEMO into a single feedback file. The program is called in the following way:
 
-\begin{alltt}
 \footnotesize
-\begin{verbatim}
+\begin{shcode}
 fbcomb.exe outputfile inputfile1 inputfile2 ...
-\end{verbatim}
-\end{alltt}
+\end{shcode}
 
 \subsubsection{fbmatchup}
@@ -1287,11 +1244,8 @@
 in the following way:
 
-\begin{alltt}
 \footnotesize
-\begin{verbatim}
+\begin{shcode}
 fbmatchup.exe outputfile inputfile1 varname1 inputfile2 varname2 ...
-\end{verbatim}
-\end{alltt}
-
+\end{shcode}
 
 \subsubsection{fbprint}
@@ -1301,7 +1255,6 @@
 following way:
 
-\begin{alltt}
 \footnotesize
-\begin{verbatim}
+\begin{shcode}
 fbprint.exe [options] inputfile
 
@@ -1323,6 +1276,5 @@
      -D            print depths
      -z            use zipped files
-\end{verbatim}
-\end{alltt}
+\end{shcode}
 
 \subsubsection{fbsel}
@@ -1331,10 +1283,8 @@
 following way:
 
-\begin{alltt}
 \footnotesize
-\begin{verbatim}
+\begin{shcode}
 fbsel.exe <input filename> <output filename>
-\end{verbatim}
-\end{alltt}
+\end{shcode}
 
 \subsubsection{fbstat}
@@ -1343,10 +1293,8 @@
 files. The program is called in the following way:
 
-\begin{alltt}
 \footnotesize
-\begin{verbatim}
+\begin{shcode}
 fbstat.exe [-nmlev] <filenames>
-\end{verbatim}
-\end{alltt}
+\end{shcode}
 
 \subsubsection{fbthin}
@@ -1355,10 +1303,8 @@
 modified to thin to a different resolution. The program is called in the following way:
 
-\begin{alltt}
 \footnotesize
-\begin{verbatim}
+\begin{shcode}
 fbthin.exe inputfile outputfile
-\end{verbatim}
-\end{alltt}
+\end{shcode}
 
 \subsubsection{sla2fb}
@@ -1367,13 +1313,11 @@
 called in the following way:
 
-\begin{alltt}
 \footnotesize
-\begin{verbatim}
+\begin{shcode}
 sla2fb.exe [-s type] outputfile inputfile1 inputfile2 ...
 
 Option:
      -s            Select altimeter data_source
-\end{verbatim}
-\end{alltt}
+\end{shcode}
 
 \subsubsection{vel2fb}
@@ -1382,10 +1326,8 @@
 is called in the following way:
 
-\begin{alltt}
 \footnotesize
-\begin{verbatim}
+\begin{shcode}
 vel2fb.exe outputfile inputfile1 inputfile2 ...
-\end{verbatim}
-\end{alltt}
+\end{shcode}
 
 \subsection{building the obstools}
@@ -1398,21 +1340,17 @@
 observations and feedback files. It is possible to zoom in, plot individual profiles and
 calculate some basic statistics. To plot some data run IDL and then:
-\begin{alltt}
 \footnotesize
-\begin{verbatim}
+\begin{minted}{idl}
 IDL> dataplot, "filename"
-\end{verbatim}
-\end{alltt}
+\end{minted}
 
 To read multiple files into dataplot, for example multiple feedback files from different
 processors or from different days, the easiest method is to use the spawn command to generate
 a list of files which can then be passed to dataplot.
-\begin{alltt}
 \footnotesize
-\begin{verbatim}
+\begin{minted}{idl}
 IDL> spawn, 'ls profb*.nc', files
 IDL> dataplot, files
-\end{verbatim}
-\end{alltt}
+\end{minted}
 
 Fig~\ref{fig:obsdataplotmain} shows the main window which is launched when dataplot starts.
