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.
Chap_OBS.tex in branches/dev_2802_OBStools/DOC/TexFiles/Chapters – NEMO

source: branches/dev_2802_OBStools/DOC/TexFiles/Chapters/Chap_OBS.tex @ 3069

Last change on this file since 3069 was 3069, checked in by djlea, 12 years ago

Update OBS and ASM documentation. Small updates and fixes to dataplot.

File size: 43.7 KB
Line 
1% ================================================================
2% Chapter observation operator (OBS)
3% ================================================================
4\chapter{Observation and model comparison (OBS)}
5\label{OBS}
6
7Authors: D. Lea, M. Martin, K. Mogensen, A. Vidard, A. Weaver...   % do we keep that ?
8
9\minitoc
10
11
12\newpage
13$\ $\newline    % force a new line
14
15The observation and model comparison code (OBS) reads in observation files (profile
16temperature and salinity, sea surface temperature, sea level anomaly, sea ice concentration,
17and velocity) and calculates  an interpolated model equivalent value at the observation
18location and nearest model timestep. The resulting data are saved in a ``feedback'' file (or
19files). The code was originally developed for use with the NEMOVAR data assimilation code, but
20can be used for validation or verification of model or  any other data assimilation system.
21
22The OBS code is called from \np{opa.F90} for model initialisation and to calculate the model
23equivalent values for observations on the 0th timestep. The code is then called again after
24each timestep from \np{step.F90}. To build with the OBS code active \key{diaobs} must be
25set.
26
27For all data types a 2D horizontal  interpolator is needed to interpolate the model fields to
28the observation location. For {\em in situ} profiles, a 1D vertical interpolator is needed in
29addition to provide model fields at the observation depths. Currently this only works in
30z-level model configurations, but is being developed to work with a generalised vertical
31coordinate system. Temperature data from moored buoys (TAO, TRITON, PIRATA) in the
32ENACT/ENSEMBLES data-base are available as daily averaged quantities. For this type of
33observation the observation operator will compare such observations to the model temperature
34fields averaged over one day. The relevant observation type may be specified in the namelist
35using \np{endailyavtypes}. Otherwise the model value from the nearest timestep to the
36observation time is used.
37
38The code is controlled by the namelist \textit{nam\_obs}. See the following sections for more
39details on setting up the namelist.
40
41Section~\ref{OBS_example} introduces a test example of the observation operator code including
42where to obtain data and how to setup the namelist. Section~\ref{OBS_details} introduces some
43more technical details of the different observation types used and also shows a more complete
44namelist. Section~\ref{OBS_theory} introduces some of the theoretical aspects of the
45observation operator including interpolation methods and running on multiple processors.
46Section~\ref{OBS_obsutils} introduces some utilities to help working with the files produced
47by the OBS code.
48
49% ================================================================
50% Example
51% ================================================================
52\section{Running the observation operator code example}
53\label{OBS_example}
54
55This section describes an example of running the observation operator code using
56profile data which can be freely downloaded. It shows how to adapt an
57existing run and build of NEMO to run the observation operator.
58
59\begin{enumerate}
60\item Compile NEMO with \key{diaobs} set.
61
62\item Download some ENSEMBLES EN3 data from
63\href{http://www.hadobs.org}{http://www.hadobs.org}. Choose observations which are
64valid for the period of your test run because the observation operator compares
65the model and observations for a matching date and time.
66
67\item Add the following to the NEMO namelist to run the observation
68operator on this data. Set the \np{enactfiles} namelist parameter to the
69observation  file name:
70\end{enumerate}
71
72%------------------------------------------namobs_example-----------------------------------------------------
73\namdisplay{namobs_example}
74%-------------------------------------------------------------------------------------------------------------
75
76The options \np{ln\_t3d} and \np{ln\_s3d} switch on the temperature and salinity
77profile observation operator code. The \np{ln\_ena} switch turns on the reading
78of ENACT/ENSEMBLES type profile data. The filename or array of filenames are
79specified using the \np{enactfiles} variable. The model grid points for a
80particular  observation latitude and longitude are found using the grid
81searching part of the code. This can be expensive, particularly for large
82numbers of observations, setting \np{ln\_grid\_search\_lookup} allows the use of
83a lookup table which is saved into an ``xypos`` file (or files). This will need
84to be generated the first time if it does not exist in the run directory.
85However, once produced it will significantly speed up future grid searches.
86Setting \np{ln\_grid\_global} means that the code distributes the observations
87evenly between processors. Alternatively each processor will work with
88observations located within the model subdomain (see section~\ref{OBS_parallel}).
89
90A number of utilities are now provided to plot the feedback files, convert and
91recombine the files. These are explained in more detail in section~\ref{OBS_obsutils}.
92
93\section{Technical details}
94\label{OBS_details}
95
96Here we show a more complete example namelist and also show the NetCDF headers
97of the observation
98files that may be used with the observation operator
99
100%------------------------------------------namobs--------------------------------------------------------
101\namdisplay{namobs}
102%-------------------------------------------------------------------------------------------------------------
103
104This name list uses the "feedback" type observation file input format for
105profile, sea level anomaly and sea surface temperature data. All the
106observation files must be in NetCDF format. Some example headers (produced using
107\mbox{\textit{ncdump~-h}}) for profile
108data, sea level anomaly and sea surface temperature are in the following
109subsections.
110
111\subsection{Profile feedback type observation file header}
112
113\begin{alltt}
114\tiny
115\begin{verbatim}
116netcdf profiles_01 {
117dimensions:
118     N_OBS = 603 ;
119     N_LEVELS = 150 ;
120     N_VARS = 2 ;
121     N_QCF = 2 ;
122     N_ENTRIES = 1 ;
123     N_EXTRA = 1 ;
124     STRINGNAM = 8 ;
125     STRINGGRID = 1 ;
126     STRINGWMO = 8 ;
127     STRINGTYP = 4 ;
128     STRINGJULD = 14 ;
129variables:
130     char VARIABLES(N_VARS, STRINGNAM) ;
131          VARIABLES:long_name = "List of variables in feedback files" ;
132     char ENTRIES(N_ENTRIES, STRINGNAM) ;
133          ENTRIES:long_name = "List of additional entries for each variable in feedback files" ;
134     char EXTRA(N_EXTRA, STRINGNAM) ;
135          EXTRA:long_name = "List of extra variables" ;
136     char STATION_IDENTIFIER(N_OBS, STRINGWMO) ;
137          STATION_IDENTIFIER:long_name = "Station identifier" ;
138     char STATION_TYPE(N_OBS, STRINGTYP) ;
139          STATION_TYPE:long_name = "Code instrument type" ;
140     double LONGITUDE(N_OBS) ;
141          LONGITUDE:long_name = "Longitude" ;
142          LONGITUDE:units = "degrees_east" ;
143          LONGITUDE:_Fillvalue = 99999.f ;
144     double LATITUDE(N_OBS) ;
145          LATITUDE:long_name = "Latitude" ;
146          LATITUDE:units = "degrees_north" ;
147          LATITUDE:_Fillvalue = 99999.f ;
148     double DEPTH(N_OBS, N_LEVELS) ;
149          DEPTH:long_name = "Depth" ;
150          DEPTH:units = "metre" ;
151          DEPTH:_Fillvalue = 99999.f ;
152     int DEPTH_QC(N_OBS, N_LEVELS) ;
153          DEPTH_QC:long_name = "Quality on depth" ;
154          DEPTH_QC:Conventions = "q where q =[0,9]" ;
155          DEPTH_QC:_Fillvalue = 0 ;
156     int DEPTH_QC_FLAGS(N_OBS, N_LEVELS, N_QCF) ;
157          DEPTH_QC_FLAGS:long_name = "Quality flags on depth" ;
158          DEPTH_QC_FLAGS:Conventions = "NEMOVAR flag conventions" ;
159     double JULD(N_OBS) ;
160          JULD:long_name = "Julian day" ;
161          JULD:units = "days since JULD_REFERENCE" ;
162          JULD:Conventions = "relative julian days with decimal part (as parts of day)" ;
163          JULD:_Fillvalue = 99999.f ;
164     char JULD_REFERENCE(STRINGJULD) ;
165          JULD_REFERENCE:long_name = "Date of reference for julian days" ;
166          JULD_REFERENCE:Conventions = "YYYYMMDDHHMMSS" ;
167     int OBSERVATION_QC(N_OBS) ;
168          OBSERVATION_QC:long_name = "Quality on observation" ;
169          OBSERVATION_QC:Conventions = "q where q =[0,9]" ;
170          OBSERVATION_QC:_Fillvalue = 0 ;
171     int OBSERVATION_QC_FLAGS(N_OBS, N_QCF) ;
172          OBSERVATION_QC_FLAGS:long_name = "Quality flags on observation" ;
173          OBSERVATION_QC_FLAGS:Conventions = "NEMOVAR flag conventions" ;
174          OBSERVATION_QC_FLAGS:_Fillvalue = 0 ;
175     int POSITION_QC(N_OBS) ;
176          POSITION_QC:long_name = "Quality on position (latitude and longitude)" ;
177          POSITION_QC:Conventions = "q where q =[0,9]" ;
178          POSITION_QC:_Fillvalue = 0 ;
179     int POSITION_QC_FLAGS(N_OBS, N_QCF) ;
180          POSITION_QC_FLAGS:long_name = "Quality flags on position" ;
181          POSITION_QC_FLAGS:Conventions = "NEMOVAR flag conventions" ;
182          POSITION_QC_FLAGS:_Fillvalue = 0 ;
183     int JULD_QC(N_OBS) ;
184          JULD_QC:long_name = "Quality on date and time" ;
185          JULD_QC:Conventions = "q where q =[0,9]" ;
186          JULD_QC:_Fillvalue = 0 ;
187     int JULD_QC_FLAGS(N_OBS, N_QCF) ;
188          JULD_QC_FLAGS:long_name = "Quality flags on date and time" ;
189          JULD_QC_FLAGS:Conventions = "NEMOVAR flag conventions" ;
190          JULD_QC_FLAGS:_Fillvalue = 0 ;
191     int ORIGINAL_FILE_INDEX(N_OBS) ;
192          ORIGINAL_FILE_INDEX:long_name = "Index in original data file" ;
193          ORIGINAL_FILE_INDEX:_Fillvalue = -99999 ;
194     float POTM_OBS(N_OBS, N_LEVELS) ;
195          POTM_OBS:long_name = "Potential temperature" ;
196          POTM_OBS:units = "Degrees Celsius" ;
197          POTM_OBS:_Fillvalue = 99999.f ;
198     float POTM_Hx(N_OBS, N_LEVELS) ;
199          POTM_Hx:long_name = "Model interpolated potential temperature" ;
200          POTM_Hx:units = "Degrees Celsius" ;
201          POTM_Hx:_Fillvalue = 99999.f ;
202     int POTM_QC(N_OBS) ;
203          POTM_QC:long_name = "Quality on potential temperature" ;
204          POTM_QC:Conventions = "q where q =[0,9]" ;
205          POTM_QC:_Fillvalue = 0 ;
206     int POTM_QC_FLAGS(N_OBS, N_QCF) ;
207          POTM_QC_FLAGS:long_name = "Quality flags on potential temperature" ;
208          POTM_QC_FLAGS:Conventions = "NEMOVAR flag conventions" ;
209          POTM_QC_FLAGS:_Fillvalue = 0 ;
210     int POTM_LEVEL_QC(N_OBS, N_LEVELS) ;
211          POTM_LEVEL_QC:long_name = "Quality for each level on potential temperature" ;
212          POTM_LEVEL_QC:Conventions = "q where q =[0,9]" ;
213          POTM_LEVEL_QC:_Fillvalue = 0 ;
214     int POTM_LEVEL_QC_FLAGS(N_OBS, N_LEVELS, N_QCF) ;
215          POTM_LEVEL_QC_FLAGS:long_name = "Quality flags for each level on potential temperature" ;
216          POTM_LEVEL_QC_FLAGS:Conventions = "NEMOVAR flag conventions" ;
217          POTM_LEVEL_QC_FLAGS:_Fillvalue = 0 ;
218     int POTM_IOBSI(N_OBS) ;
219          POTM_IOBSI:long_name = "ORCA grid search I coordinate" ;
220     int POTM_IOBSJ(N_OBS) ;
221          POTM_IOBSJ:long_name = "ORCA grid search J coordinate" ;
222     int POTM_IOBSK(N_OBS, N_LEVELS) ;
223          POTM_IOBSK:long_name = "ORCA grid search K coordinate" ;
224     char POTM_GRID(STRINGGRID) ;
225          POTM_GRID:long_name = "ORCA grid search grid (T,U,V)" ;
226     float PSAL_OBS(N_OBS, N_LEVELS) ;
227          PSAL_OBS:long_name = "Practical salinity" ;
228          PSAL_OBS:units = "PSU" ;
229          PSAL_OBS:_Fillvalue = 99999.f ;
230     float PSAL_Hx(N_OBS, N_LEVELS) ;
231          PSAL_Hx:long_name = "Model interpolated practical salinity" ;
232          PSAL_Hx:units = "PSU" ;
233          PSAL_Hx:_Fillvalue = 99999.f ;
234     int PSAL_QC(N_OBS) ;
235          PSAL_QC:long_name = "Quality on practical salinity" ;
236          PSAL_QC:Conventions = "q where q =[0,9]" ;
237          PSAL_QC:_Fillvalue = 0 ;
238     int PSAL_QC_FLAGS(N_OBS, N_QCF) ;
239          PSAL_QC_FLAGS:long_name = "Quality flags on practical salinity" ;
240          PSAL_QC_FLAGS:Conventions = "NEMOVAR flag conventions" ;
241          PSAL_QC_FLAGS:_Fillvalue = 0 ;
242     int PSAL_LEVEL_QC(N_OBS, N_LEVELS) ;
243          PSAL_LEVEL_QC:long_name = "Quality for each level on practical salinity" ;
244          PSAL_LEVEL_QC:Conventions = "q where q =[0,9]" ;
245          PSAL_LEVEL_QC:_Fillvalue = 0 ;
246     int PSAL_LEVEL_QC_FLAGS(N_OBS, N_LEVELS, N_QCF) ;
247          PSAL_LEVEL_QC_FLAGS:long_name = "Quality flags for each level on practical salinity" ;
248          PSAL_LEVEL_QC_FLAGS:Conventions = "NEMOVAR flag conventions" ;
249          PSAL_LEVEL_QC_FLAGS:_Fillvalue = 0 ;
250     int PSAL_IOBSI(N_OBS) ;
251          PSAL_IOBSI:long_name = "ORCA grid search I coordinate" ;
252     int PSAL_IOBSJ(N_OBS) ;
253          PSAL_IOBSJ:long_name = "ORCA grid search J coordinate" ;
254     int PSAL_IOBSK(N_OBS, N_LEVELS) ;
255          PSAL_IOBSK:long_name = "ORCA grid search K coordinate" ;
256     char PSAL_GRID(STRINGGRID) ;
257          PSAL_GRID:long_name = "ORCA grid search grid (T,U,V)" ;
258     float TEMP(N_OBS, N_LEVELS) ;
259          TEMP:long_name = "Insitu temperature" ;
260          TEMP:units = "Degrees Celsius" ;
261          TEMP:_Fillvalue = 99999.f ;
262
263// global attributes:
264          :title = "NEMO observation operator output" ;
265          :Convention = "NEMO unified observation operator output" ;
266}
267\end{verbatim}
268\end{alltt}
269
270\subsection{Sea level anomaly feedback type observation file header}
271
272\begin{alltt}
273\tiny
274\begin{verbatim}
275netcdf sla_01 {
276dimensions:
277     N_OBS = 41301 ;
278     N_LEVELS = 1 ;
279     N_VARS = 1 ;
280     N_QCF = 2 ;
281     N_ENTRIES = 1 ;
282     N_EXTRA = 1 ;
283     STRINGNAM = 8 ;
284     STRINGGRID = 1 ;
285     STRINGWMO = 8 ;
286     STRINGTYP = 4 ;
287     STRINGJULD = 14 ;
288variables:
289     char VARIABLES(N_VARS, STRINGNAM) ;
290          VARIABLES:long_name = "List of variables in feedback files" ;
291     char ENTRIES(N_ENTRIES, STRINGNAM) ;
292          ENTRIES:long_name = "List of additional entries for each variable in feedback files" ;
293     char EXTRA(N_EXTRA, STRINGNAM) ;
294          EXTRA:long_name = "List of extra variables" ;
295     char STATION_IDENTIFIER(N_OBS, STRINGWMO) ;
296          STATION_IDENTIFIER:long_name = "Station identifier" ;
297     char STATION_TYPE(N_OBS, STRINGTYP) ;
298          STATION_TYPE:long_name = "Code instrument type" ;
299     double LONGITUDE(N_OBS) ;
300          LONGITUDE:long_name = "Longitude" ;
301          LONGITUDE:units = "degrees_east" ;
302          LONGITUDE:_Fillvalue = 99999.f ;
303     double LATITUDE(N_OBS) ;
304          LATITUDE:long_name = "Latitude" ;
305          LATITUDE:units = "degrees_north" ;
306          LATITUDE:_Fillvalue = 99999.f ;
307     double DEPTH(N_OBS, N_LEVELS) ;
308          DEPTH:long_name = "Depth" ;
309          DEPTH:units = "metre" ;
310          DEPTH:_Fillvalue = 99999.f ;
311     int DEPTH_QC(N_OBS, N_LEVELS) ;
312          DEPTH_QC:long_name = "Quality on depth" ;
313          DEPTH_QC:Conventions = "q where q =[0,9]" ;
314          DEPTH_QC:_Fillvalue = 0 ;
315     int DEPTH_QC_FLAGS(N_OBS, N_LEVELS, N_QCF) ;
316          DEPTH_QC_FLAGS:long_name = "Quality flags on depth" ;
317          DEPTH_QC_FLAGS:Conventions = "NEMOVAR flag conventions" ;
318     double JULD(N_OBS) ;
319          JULD:long_name = "Julian day" ;
320          JULD:units = "days since JULD_REFERENCE" ;
321          JULD:Conventions = "relative julian days with decimal part (as parts of day)" ;
322          JULD:_Fillvalue = 99999.f ;
323     char JULD_REFERENCE(STRINGJULD) ;
324          JULD_REFERENCE:long_name = "Date of reference for julian days" ;
325          JULD_REFERENCE:Conventions = "YYYYMMDDHHMMSS" ;
326     int OBSERVATION_QC(N_OBS) ;
327          OBSERVATION_QC:long_name = "Quality on observation" ;
328          OBSERVATION_QC:Conventions = "q where q =[0,9]" ;
329          OBSERVATION_QC:_Fillvalue = 0 ;
330     int OBSERVATION_QC_FLAGS(N_OBS, N_QCF) ;
331          OBSERVATION_QC_FLAGS:long_name = "Quality flags on observation" ;
332          OBSERVATION_QC_FLAGS:Conventions = "NEMOVAR flag conventions" ;
333          OBSERVATION_QC_FLAGS:_Fillvalue = 0 ;
334     int POSITION_QC(N_OBS) ;
335          POSITION_QC:long_name = "Quality on position (latitude and longitude)" ;
336          POSITION_QC:Conventions = "q where q =[0,9]" ;
337          POSITION_QC:_Fillvalue = 0 ;
338     int POSITION_QC_FLAGS(N_OBS, N_QCF) ;
339          POSITION_QC_FLAGS:long_name = "Quality flags on position" ;
340          POSITION_QC_FLAGS:Conventions = "NEMOVAR flag conventions" ;
341          POSITION_QC_FLAGS:_Fillvalue = 0 ;
342     int JULD_QC(N_OBS) ;
343          JULD_QC:long_name = "Quality on date and time" ;
344          JULD_QC:Conventions = "q where q =[0,9]" ;
345          JULD_QC:_Fillvalue = 0 ;
346     int JULD_QC_FLAGS(N_OBS, N_QCF) ;
347          JULD_QC_FLAGS:long_name = "Quality flags on date and time" ;
348          JULD_QC_FLAGS:Conventions = "NEMOVAR flag conventions" ;
349          JULD_QC_FLAGS:_Fillvalue = 0 ;
350     int ORIGINAL_FILE_INDEX(N_OBS) ;
351          ORIGINAL_FILE_INDEX:long_name = "Index in original data file" ;
352          ORIGINAL_FILE_INDEX:_Fillvalue = -99999 ;
353     float SLA_OBS(N_OBS, N_LEVELS) ;
354          SLA_OBS:long_name = "Sea level anomaly" ;
355          SLA_OBS:units = "metre" ;
356          SLA_OBS:_Fillvalue = 99999.f ;
357     float SLA_Hx(N_OBS, N_LEVELS) ;
358          SLA_Hx:long_name = "Model interpolated sea level anomaly" ;
359          SLA_Hx:units = "metre" ;
360          SLA_Hx:_Fillvalue = 99999.f ;
361     int SLA_QC(N_OBS) ;
362          SLA_QC:long_name = "Quality on sea level anomaly" ;
363          SLA_QC:Conventions = "q where q =[0,9]" ;
364          SLA_QC:_Fillvalue = 0 ;
365     int SLA_QC_FLAGS(N_OBS, N_QCF) ;
366          SLA_QC_FLAGS:long_name = "Quality flags on sea level anomaly" ;
367          SLA_QC_FLAGS:Conventions = "NEMOVAR flag conventions" ;
368          SLA_QC_FLAGS:_Fillvalue = 0 ;
369     int SLA_LEVEL_QC(N_OBS, N_LEVELS) ;
370          SLA_LEVEL_QC:long_name = "Quality for each level on sea level anomaly" ;
371          SLA_LEVEL_QC:Conventions = "q where q =[0,9]" ;
372          SLA_LEVEL_QC:_Fillvalue = 0 ;
373     int SLA_LEVEL_QC_FLAGS(N_OBS, N_LEVELS, N_QCF) ;
374          SLA_LEVEL_QC_FLAGS:long_name = "Quality flags for each level on sea level anomaly" ;
375          SLA_LEVEL_QC_FLAGS:Conventions = "NEMOVAR flag conventions" ;
376          SLA_LEVEL_QC_FLAGS:_Fillvalue = 0 ;
377     int SLA_IOBSI(N_OBS) ;
378          SLA_IOBSI:long_name = "ORCA grid search I coordinate" ;
379     int SLA_IOBSJ(N_OBS) ;
380          SLA_IOBSJ:long_name = "ORCA grid search J coordinate" ;
381     int SLA_IOBSK(N_OBS, N_LEVELS) ;
382          SLA_IOBSK:long_name = "ORCA grid search K coordinate" ;
383     char SLA_GRID(STRINGGRID) ;
384          SLA_GRID:long_name = "ORCA grid search grid (T,U,V)" ;
385     float MDT(N_OBS, N_LEVELS) ;
386          MDT:long_name = "Mean Dynamic Topography" ;
387          MDT:units = "metre" ;
388          MDT:_Fillvalue = 99999.f ;
389
390// global attributes:
391          :title = "NEMO observation operator output" ;
392          :Convention = "NEMO unified observation operator output" ;
393}
394\end{verbatim}
395\end{alltt}
396
397The mean dynamic
398topography (MDT) must be provided in a separate file defined on the model grid
399 called {\it slaReferenceLevel.nc}. The MDT is required in
400order to produce the model equivalent sea level anomaly from the model sea
401surface height. Below is an example header for this file (on the ORCA025 grid).
402
403\begin{alltt}
404\tiny
405\begin{verbatim}
406dimensions:
407        x = 1442 ;
408        y = 1021 ;
409variables:
410        float nav_lon(y, x) ;
411                nav_lon:units = "degrees_east" ;
412        float nav_lat(y, x) ;
413                nav_lat:units = "degrees_north" ;
414        float sossheig(y, x) ;
415                sossheig:_FillValue = -1.e+30f ;
416                sossheig:coordinates = "nav_lon nav_lat" ;
417                sossheig:long_name = "Mean Dynamic Topography" ;
418                sossheig:units = "metres" ;
419                sossheig:grid = "orca025T" ;
420\end{verbatim}
421\end{alltt}
422
423\subsection{Sea surface temperature feedback type observation file header}
424
425\begin{alltt}
426\tiny
427\begin{verbatim}
428netcdf sst_01 {
429dimensions:
430     N_OBS = 33099 ;
431     N_LEVELS = 1 ;
432     N_VARS = 1 ;
433     N_QCF = 2 ;
434     N_ENTRIES = 1 ;
435     STRINGNAM = 8 ;
436     STRINGGRID = 1 ;
437     STRINGWMO = 8 ;
438     STRINGTYP = 4 ;
439     STRINGJULD = 14 ;
440variables:
441     char VARIABLES(N_VARS, STRINGNAM) ;
442          VARIABLES:long_name = "List of variables in feedback files" ;
443     char ENTRIES(N_ENTRIES, STRINGNAM) ;
444          ENTRIES:long_name = "List of additional entries for each variable in feedback files" ;
445     char STATION_IDENTIFIER(N_OBS, STRINGWMO) ;
446          STATION_IDENTIFIER:long_name = "Station identifier" ;
447     char STATION_TYPE(N_OBS, STRINGTYP) ;
448          STATION_TYPE:long_name = "Code instrument type" ;
449     double LONGITUDE(N_OBS) ;
450          LONGITUDE:long_name = "Longitude" ;
451          LONGITUDE:units = "degrees_east" ;
452          LONGITUDE:_Fillvalue = 99999.f ;
453     double LATITUDE(N_OBS) ;
454          LATITUDE:long_name = "Latitude" ;
455          LATITUDE:units = "degrees_north" ;
456          LATITUDE:_Fillvalue = 99999.f ;
457     double DEPTH(N_OBS, N_LEVELS) ;
458          DEPTH:long_name = "Depth" ;
459          DEPTH:units = "metre" ;
460          DEPTH:_Fillvalue = 99999.f ;
461     int DEPTH_QC(N_OBS, N_LEVELS) ;
462          DEPTH_QC:long_name = "Quality on depth" ;
463          DEPTH_QC:Conventions = "q where q =[0,9]" ;
464          DEPTH_QC:_Fillvalue = 0 ;
465     int DEPTH_QC_FLAGS(N_OBS, N_LEVELS, N_QCF) ;
466          DEPTH_QC_FLAGS:long_name = "Quality flags on depth" ;
467          DEPTH_QC_FLAGS:Conventions = "NEMOVAR flag conventions" ;
468     double JULD(N_OBS) ;
469          JULD:long_name = "Julian day" ;
470          JULD:units = "days since JULD_REFERENCE" ;
471          JULD:Conventions = "relative julian days with decimal part (as parts of day)" ;
472          JULD:_Fillvalue = 99999.f ;
473     char JULD_REFERENCE(STRINGJULD) ;
474          JULD_REFERENCE:long_name = "Date of reference for julian days" ;
475          JULD_REFERENCE:Conventions = "YYYYMMDDHHMMSS" ;
476     int OBSERVATION_QC(N_OBS) ;
477          OBSERVATION_QC:long_name = "Quality on observation" ;
478          OBSERVATION_QC:Conventions = "q where q =[0,9]" ;
479          OBSERVATION_QC:_Fillvalue = 0 ;
480     int OBSERVATION_QC_FLAGS(N_OBS, N_QCF) ;
481          OBSERVATION_QC_FLAGS:long_name = "Quality flags on observation" ;
482          OBSERVATION_QC_FLAGS:Conventions = "NEMOVAR flag conventions" ;
483          OBSERVATION_QC_FLAGS:_Fillvalue = 0 ;
484     int POSITION_QC(N_OBS) ;
485          POSITION_QC:long_name = "Quality on position (latitude and longitude)" ;
486          POSITION_QC:Conventions = "q where q =[0,9]" ;
487          POSITION_QC:_Fillvalue = 0 ;
488     int POSITION_QC_FLAGS(N_OBS, N_QCF) ;
489          POSITION_QC_FLAGS:long_name = "Quality flags on position" ;
490          POSITION_QC_FLAGS:Conventions = "NEMOVAR flag conventions" ;
491          POSITION_QC_FLAGS:_Fillvalue = 0 ;
492     int JULD_QC(N_OBS) ;
493          JULD_QC:long_name = "Quality on date and time" ;
494          JULD_QC:Conventions = "q where q =[0,9]" ;
495          JULD_QC:_Fillvalue = 0 ;
496     int JULD_QC_FLAGS(N_OBS, N_QCF) ;
497          JULD_QC_FLAGS:long_name = "Quality flags on date and time" ;
498          JULD_QC_FLAGS:Conventions = "NEMOVAR flag conventions" ;
499          JULD_QC_FLAGS:_Fillvalue = 0 ;
500     int ORIGINAL_FILE_INDEX(N_OBS) ;
501          ORIGINAL_FILE_INDEX:long_name = "Index in original data file" ;
502          ORIGINAL_FILE_INDEX:_Fillvalue = -99999 ;
503     float SST_OBS(N_OBS, N_LEVELS) ;
504          SST_OBS:long_name = "Sea surface temperature" ;
505          SST_OBS:units = "Degree centigrade" ;
506          SST_OBS:_Fillvalue = 99999.f ;
507     float SST_Hx(N_OBS, N_LEVELS) ;
508          SST_Hx:long_name = "Model interpolated sea surface temperature" ;
509          SST_Hx:units = "Degree centigrade" ;
510          SST_Hx:_Fillvalue = 99999.f ;
511     int SST_QC(N_OBS) ;
512          SST_QC:long_name = "Quality on sea surface temperature" ;
513          SST_QC:Conventions = "q where q =[0,9]" ;
514          SST_QC:_Fillvalue = 0 ;
515     int SST_QC_FLAGS(N_OBS, N_QCF) ;
516          SST_QC_FLAGS:long_name = "Quality flags on sea surface temperature" ;
517          SST_QC_FLAGS:Conventions = "NEMOVAR flag conventions" ;
518          SST_QC_FLAGS:_Fillvalue = 0 ;
519     int SST_LEVEL_QC(N_OBS, N_LEVELS) ;
520          SST_LEVEL_QC:long_name = "Quality for each level on sea surface temperature" ;
521          SST_LEVEL_QC:Conventions = "q where q =[0,9]" ;
522          SST_LEVEL_QC:_Fillvalue = 0 ;
523     int SST_LEVEL_QC_FLAGS(N_OBS, N_LEVELS, N_QCF) ;
524          SST_LEVEL_QC_FLAGS:long_name = "Quality flags for each level on sea surface temperature" ;
525          SST_LEVEL_QC_FLAGS:Conventions = "NEMOVAR flag conventions" ;
526          SST_LEVEL_QC_FLAGS:_Fillvalue = 0 ;
527     int SST_IOBSI(N_OBS) ;
528          SST_IOBSI:long_name = "ORCA grid search I coordinate" ;
529     int SST_IOBSJ(N_OBS) ;
530          SST_IOBSJ:long_name = "ORCA grid search J coordinate" ;
531     int SST_IOBSK(N_OBS, N_LEVELS) ;
532          SST_IOBSK:long_name = "ORCA grid search K coordinate" ;
533     char SST_GRID(STRINGGRID) ;
534          SST_GRID:long_name = "ORCA grid search grid (T,U,V)" ;
535
536// global attributes:
537          :title = "NEMO observation operator output" ;
538          :Convention = "NEMO unified observation operator output" ;
539}
540\end{verbatim}
541\end{alltt}
542
543\section{Theoretical details}
544\label{OBS_theory}
545
546\subsection{Horizontal interpolation methods}
547
548Consider an observation point ${\rm P}$ with
549with longitude and latitude $({\lambda_{}}_{\rm P}, \phi_{\rm P})$ and the
550four nearest neighbouring model grid points ${\rm A}$, ${\rm B}$, ${\rm C}$ 
551and ${\rm D}$ with longitude and latitude ($\lambda_{\rm A}$, $\phi_{\rm A}$),
552($\lambda_{\rm B}$, $\phi_{\rm B}$) etc.
553All horizontal interpolation methods implemented in NEMO
554estimate the value of a model variable $x$ at point $P$ as
555a weighted linear combination of the values of the model
556variables at the grid points ${\rm A}$, ${\rm B}$ etc.:
557\begin{eqnarray}
558{x_{}}_{\rm P} & \hspace{-2mm} = \hspace{-2mm} & 
559\frac{1}{w} \left( {w_{}}_{\rm A} {x_{}}_{\rm A} +
560                   {w_{}}_{\rm B} {x_{}}_{\rm B} +
561                   {w_{}}_{\rm C} {x_{}}_{\rm C} +
562                   {w_{}}_{\rm D} {x_{}}_{\rm D} \right)
563\end{eqnarray}
564where ${w_{}}_{\rm A}$, ${w_{}}_{\rm B}$ etc. are the respective weights for the
565model field at points ${\rm A}$, ${\rm B}$ etc., and
566$w = {w_{}}_{\rm A} + {w_{}}_{\rm B} + {w_{}}_{\rm C} + {w_{}}_{\rm D}$.
567
568Four different possibilities are available for computing the weights.
569
570\begin{enumerate}
571
572\item[1.] {\bf Great-Circle distance-weighted interpolation.} The weights
573  are computed as a function of the great-circle distance $s(P, \cdot)$ 
574  between $P$ and the model grid points $A$, $B$ etc. For example,
575  the weight given to the field ${x_{}}_{\rm A}$ is specified as the
576  product of the distances from ${\rm P}$ to the other points:
577  \begin{eqnarray}
578  {w_{}}_{\rm A} = s({\rm P}, {\rm B}) \, s({\rm P}, {\rm C}) \, s({\rm P}, {\rm D})
579  \nonumber
580  \end{eqnarray}
581  where
582  \begin{eqnarray}
583   s\left ({\rm P}, {\rm M} \right )
584     & \hspace{-2mm} = \hspace{-2mm} & 
585      \cos^{-1} \! \left\{ 
586               \sin {\phi_{}}_{\rm P} \sin {\phi_{}}_{\rm M}
587             + \cos {\phi_{}}_{\rm P} \cos {\phi_{}}_{\rm M} 
588               \cos ({\lambda_{}}_{\rm M} - {\lambda_{}}_{\rm P})
589                   \right\}
590   \end{eqnarray}
591   and $M$ corresponds to $B$, $C$ or $D$.
592   A more stable form of the great-circle distance formula for
593   small distances ($x$ near 1) involves the arcsine function
594   ($e.g.$ see p.~101 of \citet{Daley_Barker_Bk01}:
595   \begin{eqnarray}
596   s\left( {\rm P}, {\rm M} \right)
597     & \hspace{-2mm} = \hspace{-2mm} & 
598      \sin^{-1} \! \left\{ \sqrt{ 1 - x^2 } \right\}
599   \nonumber
600   \end{eqnarray}
601   where
602   \begin{eqnarray}
603    x & \hspace{-2mm} = \hspace{-2mm} & 
604      {a_{}}_{\rm M} {a_{}}_{\rm P} + {b_{}}_{\rm M} {b_{}}_{\rm P} + {c_{}}_{\rm M} {c_{}}_{\rm P}
605   \nonumber
606   \end{eqnarray}
607   and
608   \begin{eqnarray}
609      {a_{}}_{\rm M} & \hspace{-2mm} = \hspace{-2mm} & \sin {\phi_{}}_{\rm M},
610      \nonumber \\
611      {a_{}}_{\rm P} & \hspace{-2mm} = \hspace{-2mm} & \sin {\phi_{}}_{\rm P},
612      \nonumber \\
613      {b_{}}_{\rm M} & \hspace{-2mm} = \hspace{-2mm} & \cos {\phi_{}}_{\rm M} \cos {\phi_{}}_{\rm M},
614      \nonumber \\
615      {b_{}}_{\rm P} & \hspace{-2mm} = \hspace{-2mm} & \cos {\phi_{}}_{\rm P} \cos {\phi_{}}_{\rm P},
616      \nonumber \\
617      {c_{}}_{\rm M} & \hspace{-2mm} = \hspace{-2mm} & \cos {\phi_{}}_{\rm M} \sin {\phi_{}}_{\rm M},
618      \nonumber \\
619      {c_{}}_{\rm P} & \hspace{-2mm} = \hspace{-2mm} & \cos {\phi_{}}_{\rm P} \sin {\phi_{}}_{\rm P}.
620      \nonumber
621   \nonumber
622  \end{eqnarray}
623
624\item[2.] {\bf Great-Circle distance-weighted interpolation with small angle
625  approximation.} Similar to the previous interpolation but with the
626  distance $s$ computed as
627  \begin{eqnarray}
628    s\left( {\rm P}, {\rm M} \right)
629     & \hspace{-2mm} = \hspace{-2mm} & 
630      \sqrt{ \left( {\phi_{}}_{\rm M} - {\phi_{}}_{\rm P} \right)^{2} 
631      + \left( {\lambda_{}}_{\rm M} - {\lambda_{}}_{\rm P} \right)^{2}
632        \cos^{2} {\phi_{}}_{\rm M} }
633  \end{eqnarray}
634  where $M$ corresponds to $A$, $B$, $C$ or $D$.
635
636\item[3.] {\bf Bilinear interpolation for a regular spaced grid.} The
637  interpolation is split into two 1D interpolations in the longitude
638  and latitude directions, respectively.
639
640\item[4.] {\bf Bilinear remapping interpolation for a general grid.} An
641  iterative scheme that involves first mapping a quadrilateral cell
642  into a cell with coordinates (0,0), (1,0), (0,1) and (1,1). This
643  method is based on the SCRIP interpolation package \citep{Jones_1998}.
644 
645\end{enumerate}
646
647\subsection{Grid search}
648
649For many grids used by the NEMO model, such as the ORCA family,
650the horizontal grid coordinates $i$ and $j$ are not simple functions
651of latitude and longitude. Therefore, it is not always straightforward
652to determine the grid points surrounding any given observational position.
653Before the interpolation can be performed, a search
654algorithm is then required to determine the corner points of
655the quadrilateral cell in which the observation is located.
656This is the most difficult and time consuming part of the
6572D interpolation procedure.
658A robust test for determining if an observation falls
659within a given quadrilateral cell is as follows. Let
660${\rm P}({\lambda_{}}_{\rm P} ,{\phi_{}}_{\rm P} )$ denote the observation point,
661and let ${\rm A}({\lambda_{}}_{\rm A} ,{\phi_{}}_{\rm A} )$,
662${\rm B}({\lambda_{}}_{\rm B} ,{\phi_{}}_{\rm B} )$,
663${\rm C}({\lambda_{}}_{\rm C} ,{\phi_{}}_{\rm C} )$ 
664and
665${\rm D}({\lambda_{}}_{\rm D} ,{\phi_{}}_{\rm D} )$ denote
666the bottom left, bottom right, top left and top right
667corner points of the cell, respectively.
668To determine if P is inside
669the cell, we verify that the cross-products
670\begin{eqnarray}
671\begin{array}{lllll}
672{{\bf r}_{}}_{\rm PA} \times {{\bf r}_{}}_{\rm PC}
673& = & [({\lambda_{}}_{\rm A}\; -\; {\lambda_{}}_{\rm P} )
674      ({\phi_{}}_{\rm C}   \; -\; {\phi_{}}_{\rm P} )
675    - ({\lambda_{}}_{\rm C}\; -\; {\lambda_{}}_{\rm P} )
676      ({\phi_{}}_{\rm A}   \; -\; {\phi_{}}_{\rm P} )] \; \widehat{\bf k} \\
677{{\bf r}_{}}_{\rm PB} \times {{\bf r}_{}}_{\rm PA}
678& = & [({\lambda_{}}_{\rm B}\; -\; {\lambda_{}}_{\rm P} )
679      ({\phi_{}}_{\rm A}   \; -\; {\phi_{}}_{\rm P} )
680    - ({\lambda_{}}_{\rm A}\; -\; {\lambda_{}}_{\rm P} )
681      ({\phi_{}}_{\rm B}   \; -\; {\phi_{}}_{\rm P} )] \; \widehat{\bf k} \\
682{{\bf r}_{}}_{\rm PC} \times {{\bf r}_{}}_{\rm PD}
683& = & [({\lambda_{}}_{\rm C}\; -\; {\lambda_{}}_{\rm P} )
684      ({\phi_{}}_{\rm D}   \; -\; {\phi_{}}_{\rm P} )
685    - ({\lambda_{}}_{\rm D}\; -\; {\lambda_{}}_{\rm P} )
686      ({\phi_{}}_{\rm C}   \; -\; {\phi_{}}_{\rm P} )] \; \widehat{\bf k} \\
687{{\bf r}_{}}_{\rm PD} \times {{\bf r}_{}}_{\rm PB}
688& = & [({\lambda_{}}_{\rm D}\; -\; {\lambda_{}}_{\rm P} )
689      ({\phi_{}}_{\rm B}   \; -\; {\phi_{}}_{\rm P} )
690    - ({\lambda_{}}_{\rm B}\; -\; {\lambda_{}}_{\rm P} )
691      ({\phi_{}}_{\rm D}  \;  - \; {\phi_{}}_{\rm P} )] \; \widehat{\bf k} \\
692\end{array}
693\label{eq:cross}
694\end{eqnarray}
695point in the opposite direction to the unit normal
696$\widehat{\bf k}$ (i.e., that the coefficients of
697$\widehat{\bf k}$ are negative),
698where ${{\bf r}_{}}_{\rm PA}$, ${{\bf r}_{}}_{\rm PB}$,
699etc. correspond to the vectors between points P and A,
700P and B, etc.. The method used is
701similar to the method used in
702the SCRIP interpolation package \citep{Jones_1998}.
703
704In order to speed up the grid search, there is the possibility to construct
705a lookup table for a user specified resolution. This lookup
706table contains the lower and upper bounds on the $i$ and $j$ indices
707to be searched for on a regular grid. For each observation position,
708the closest point on the regular grid of this position is computed and
709the $i$ and $j$ ranges of this point searched to determine the precise
710four points surrounding the observation.
711
712\subsection{Parallel aspects of horizontal interpolation}
713\label{OBS_parallel}
714
715For horizontal interpolation, there is the basic problem that the
716observations are unevenly distributed on the globe. In numerical
717models, it is common to divide the model grid into subgrids (or
718domains) where each subgrid is executed on a single processing element
719with explicit message passing for exchange of information along the
720domain boundaries when running on a massively parallel processor (MPP)
721system. This approach is used by \NEMO.
722
723For observations there is no natural distribution since the
724observations are not equally distributed on the globe.
725Two options have been made available: 1) geographical distribution;
726and 2) round-robin.
727
728\subsubsection{Geographical distribution of observations among processors}
729
730%>>>>>>>>>>>>>>>>>>>>>>>>>>>>
731\begin{figure}      \begin{center}
732\includegraphics[width=10cm,height=12cm,angle=-90.]{./TexFiles/Figures/Fig_ASM_obsdist_local}
733\caption{      \label{fig:obslocal}
734Example of the distribution of observations with the geographical distribution of observational data.} 
735\end{center}      \end{figure}
736%>>>>>>>>>>>>>>>>>>>>>>>>>>>>
737
738This is the simplest option in which the observations are distributed according
739to the domain of the grid-point parallelization. Figure~\ref{fig:obslocal}
740shows an example of the distribution of the {\em in situ} data on processors
741with a different colour for each observation
742on a given processor for a 4 $\times$ 2 decomposition with ORCA2.
743The grid-point domain decomposition is clearly visible on the plot.
744
745The advantage of this approach is that all
746information needed for horizontal interpolation is available without
747any MPP communication. Of course, this is under the assumption that
748we are only using a $2 \times 2$ grid-point stencil for the interpolation
749(e.g., bilinear interpolation). For higher order interpolation schemes this
750is no longer valid. A disadvantage with the above scheme is that the number of
751observations on each processor can be very different. If the cost of
752the actual interpolation is expensive relative to the communication of
753data needed for interpolation, this could lead to load imbalance.
754
755\subsubsection{Round-robin distribution of observations among processors}
756
757%>>>>>>>>>>>>>>>>>>>>>>>>>>>>
758\begin{figure}     \begin{center}
759\includegraphics[width=10cm,height=12cm,angle=-90.]{./TexFiles/Figures/Fig_ASM_obsdist_global}
760\caption{      \label{fig:obsglobal}
761Example of the distribution of observations with the round-robin distribution of observational data.}
762\end{center}     \end{figure}
763%>>>>>>>>>>>>>>>>>>>>>>>>>>>>
764
765An alternative approach is to distribute the observations equally
766among processors and use message passing in order to retrieve
767the stencil for interpolation. The simplest distribution of the observations
768is to distribute them using a round-robin scheme. Figure~\ref{fig:obsglobal}
769shows the distribution of the {\em in situ} data on processors for the
770round-robin distribution of observations with a different colour for
771each observation on a given processor for a 4 $\times$ 2 decomposition
772with ORCA2 for the same input data as in Fig.~\ref{fig:obslocal}.
773The observations are now clearly randomly distributed on the globe.
774In order to be able to perform horizontal interpolation in this case,
775a subroutine has been developed that retrieves any grid points in the
776global space.
777
778\subsection{Vertical interpolation operator}
779
780Vertical interpolation is achieved using either a cubic spline or
781linear interpolation. For the cubic spline, the top and
782bottom boundary conditions for the second derivative of the
783interpolating polynomial in the spline are set to zero.
784At the bottom boundary, this is done using the land-ocean mask.
785
786\newpage
787
788\section{Observation Utilities}
789\label{OBS_obsutils}
790
791Some tools for viewing and processing of observation and feedback files are provided in the
792NEMO repository for convenience. These include OBSTOOLS which are a collection of Fortran
793programs which are helpful to deal with feedback files. They do such tasks as observation file
794conversion, printing of file contents, some basic statistical analysis of feedback files. The
795other tool is an IDL program called dataplot which uses a graphical interface to visualise
796observations and feedback files. OBSTOOLS and dataplot are described in more detail below. 
797
798\subsection{Obstools}
799
800A series of Fortran utilities is provided with NEMO called OBSTOOLS. This are helpful in
801handling observation files and the feedback file output from the NEMO observation operator.
802The utilities are as follows
803
804\subsubsection{corio2fb}
805
806The program corio2fb converts profile observation files from the Coriolis format to the
807standard feedback format. The program is called in the following way:
808
809\begin{alltt}
810\footnotesize
811\begin{verbatim}
812corio2fb.exe outputfile inputfile1 inputfile2 ...
813\end{verbatim}
814\end{alltt}
815
816\subsubsection{enact2fb}
817
818The program enact2fb converts profile observation files from the ENACT format to the standard
819feedback format. The program is called in the following way:
820
821\begin{alltt}
822\footnotesize
823\begin{verbatim}
824enact2fb.exe outputfile inputfile1 inputfile2 ...
825\end{verbatim}
826\end{alltt}
827
828\subsubsection{fbcomb}
829
830The program fbcomb combines multiple feedback files produced by individual processors in an
831MPI run of NEMO into a single feedback file. The program is called in the following way:
832
833\begin{alltt}
834\footnotesize
835\begin{verbatim}
836fbcomb.exe outputfile inputfile1 inputfile2 ...
837\end{verbatim}
838\end{alltt}
839
840\subsubsection{fbmatchup}
841
842The program fbmatchup will match observations from two feedback files. The program is called
843in the following way:
844
845\begin{alltt}
846\footnotesize
847\begin{verbatim}
848fbmatchup.exe outputfile inputfile1 varname1 inputfile2 varname2 ...
849\end{verbatim}
850\end{alltt}
851
852
853\subsubsection{fbprint}
854
855The program fbprint will print the contents of a feedback file or files to standard output.
856Selected information can be output using optional arguments. The program is called in the
857following way:
858
859\begin{alltt}
860\footnotesize
861\begin{verbatim}
862fbprint.exe [options] inputfile
863
864options:
865     -b            shorter output
866     -q            Select observations based on QC flags
867     -Q            Select observations based on QC flags
868     -B            Select observations based on QC flags
869     -u            unsorted
870     -s ID         select station ID 
871     -t TYPE       select observation type
872     -v NUM1-NUM2  select variable range to print by number
873                      (default all)
874     -a NUM1-NUM2  select additional variable range to print by number
875                      (default all)
876     -e NUM1-NUM2  select extra variable range to print by number
877                      (default all)
878     -d            output date range
879     -D            print depths
880     -z            use zipped files
881\end{verbatim}
882\end{alltt}
883
884\subsubsection{fbsel}
885
886The program fbsel will select or subsample observations. The program is called in the
887following way:
888
889\begin{alltt}
890\footnotesize
891\begin{verbatim}
892fbsel.exe <input filename> <output filename>
893\end{verbatim}
894\end{alltt}
895
896\subsubsection{fbstat}
897
898The program fbstat will output summary statistics in different global areas into a number of
899files. The program is called in the following way:
900
901\begin{alltt}
902\footnotesize
903\begin{verbatim}
904fbstat.exe [-nmlev] <filenames>
905\end{verbatim}
906\end{alltt}
907
908\subsubsection{fbthin}
909
910The program fbthin will thin the data to 1 degree resolution. The code could easily be
911modified to thin to a different resolution. The program is called in the following way:
912
913\begin{alltt}
914\footnotesize
915\begin{verbatim}
916fbthin.exe inputfile outputfile
917\end{verbatim}
918\end{alltt}
919
920\subsubsection{sla2fb}
921
922The program sla2fb will convert an AVISO SLA format file to feedback format. The program is
923called in the following way:
924
925\begin{alltt}
926\footnotesize
927\begin{verbatim}
928sla2fb.exe [-s type] outputfile inputfile1 inputfile2 ...
929
930Option:
931     -s            Select altimeter data_source
932\end{verbatim}
933\end{alltt}
934
935\subsubsection{vel2fb}
936
937The program vel2fb will convert TAO/PIRATA/RAMA currents files to feedback format. The program
938is called in the following way:
939
940\begin{alltt}
941\footnotesize
942\begin{verbatim}
943vel2fb.exe outputfile inputfile1 inputfile2 ...
944\end{verbatim}
945\end{alltt}
946
947\subsection{building the obstools}
948
949To build the obstools use in the tools directory use ./maketools -n OBSTOOLS -m [ARCH].
950
951\subsection{Dataplot}
952
953An IDL program called dataplot is included which uses a graphical interface to visualise
954observations and feedback files. It is possible to zoom in, plot individual profiles and
955calculate some basic statistics. To plot some data run IDL and then:
956\begin{alltt}
957\footnotesize
958\begin{verbatim}
959IDL> dataplot, "filename"
960\end{verbatim}
961\end{alltt}
962
963To read multiple files into dataplot, for example multiple feedback files from different
964processors or from different days, the easiest method is to use the spawn command to generate
965a list of files which can then be passed to dataplot.
966\begin{alltt}
967\footnotesize
968\begin{verbatim}
969IDL> spawn, 'ls profb*.nc', files
970IDL> dataplot, files
971\end{verbatim}
972\end{alltt}
973
974Fig~\ref{fig:obsdataplotmain} shows the main window which is launched when dataplot starts.
975This is split into three parts. At the top there is a menu bar which contains a variety of
976drop down menus. Areas - zooms into prespecified regions; plot - plots the data as a
977timeseries or a T-S diagram if appropriate; Find - allows data to be searched; Config - sets
978various configuration options.
979
980The middle part is a plot of the geographical location of the observations. This will plot the
981observation value, the model background value or observation minus background value depending
982on the option selected in the radio button at the bottom of the window. The plotting colour
983range can be changed by clicking on the colour bar. The title of the plot gives some basic
984information about the date range and depth range shown, the extreme values, and the mean and
985rms values. It is possible to zoom in using a drag-box. You may also zoom in or out using the
986mouse wheel.
987
988The bottom part of the window controls what is visible in the plot above. There are two bars
989which select the level range plotted (for profile data). The other bars below select the date
990range shown. The bottom of the figure allows the option to plot the mean, root mean square,
991standard deviation or mean square values. As mentioned above you can choose to plot the
992observation value, the model background value or observation minus background value. The next
993group of radio buttons selects the map projection. This can either be regular latitude
994longitude grid, or north or south polar stereographic. The next group of radio buttons will
995plot bad observations, switch to salinity and plot density for profile observations. The
996rightmost group of buttons will print the plot window as a postscript, save it as png, or exit
997from dataplot.
998
999%>>>>>>>>>>>>>>>>>>>>>>>>>>>>
1000\begin{figure}     \begin{center}
1001%\includegraphics[width=10cm,height=12cm,angle=-90.]{./TexFiles/Figures/Fig_OBS_dataplot_main}
1002\includegraphics[width=9cm,angle=-90.]{./TexFiles/Figures/Fig_OBS_dataplot_main}
1003\caption{      \label{fig:obsdataplotmain}
1004Main window of dataplot.}
1005\end{center}     \end{figure}
1006%>>>>>>>>>>>>>>>>>>>>>>>>>>>>
1007
1008If a profile point is clicked with the mouse button a plot of the observation and background
1009values as a function of depth (Fig~\ref{fig:obsdataplotprofile}).
1010
1011%>>>>>>>>>>>>>>>>>>>>>>>>>>>>
1012\begin{figure}     \begin{center}
1013%\includegraphics[width=10cm,height=12cm,angle=-90.]{./TexFiles/Figures/Fig_OBS_dataplot_prof}
1014\includegraphics[width=7cm,angle=-90.]{./TexFiles/Figures/Fig_OBS_dataplot_prof}
1015\caption{      \label{fig:obsdataplotprofile}
1016Profile plot from dataplot produced by right clicking on a point in the main window.}
1017\end{center}     \end{figure}
1018%>>>>>>>>>>>>>>>>>>>>>>>>>>>>
1019
1020
1021
1022
Note: See TracBrowser for help on using the repository browser.