Subsections


Observation Utilities

Some tools for viewing and processing of observation and feedback files are provided in the NEMO repository for convenience. These include OBSTOOLS which are a collection of Fortran programs which are helpful to deal with feedback files. They do such tasks as observation file conversion, printing of file contents, some basic statistical analysis of feedback files. The other tool is an IDL program called dataplot which uses a graphical interface to visualise observations and feedback files. OBSTOOLS and dataplot are described in more detail below.

Obstools

A series of Fortran utilities is provided with NEMO called OBSTOOLS. This are helpful in handling observation files and the feedback file output from the NEMO observation operator. The utilities are as follows

c4comb

The program c4comb combines multiple class 4 files produced by individual processors in an MPI run of NEMO offline obs_oper into a single class 4 file. The program is called in the following way:



c4comb.exe outputfile inputfile1 inputfile2 ...

corio2fb

The program corio2fb converts profile observation files from the Coriolis format to the standard feedback format. The program is called in the following way:



corio2fb.exe outputfile inputfile1 inputfile2 ...

enact2fb

The program enact2fb converts profile observation files from the ENACT format to the standard feedback format. The program is called in the following way:



enact2fb.exe outputfile inputfile1 inputfile2 ...

fbcomb

The program fbcomb combines multiple feedback files produced by individual processors in an MPI run of NEMO into a single feedback file. The program is called in the following way:



fbcomb.exe outputfile inputfile1 inputfile2 ...

fbmatchup

The program fbmatchup will match observations from two feedback files. The program is called in the following way:



fbmatchup.exe outputfile inputfile1 varname1 inputfile2 varname2 ...

fbprint

The program fbprint will print the contents of a feedback file or files to standard output. Selected information can be output using optional arguments. The program is called in the following way:



fbprint.exe [options] inputfile

options:
-b shorter output
-q Select observations based on QC flags
-Q Select observations based on QC flags
-B Select observations based on QC flags
-u unsorted
-s ID select station ID
-t TYPE select observation type
-v NUM1-NUM2 select variable range to print by number
(default all)
-a NUM1-NUM2 select additional variable range to print by number
(default all)
-e NUM1-NUM2 select extra variable range to print by number
(default all)
-d output date range
-D print depths
-z use zipped files

fbsel

The program fbsel will select or subsample observations. The program is called in the following way:



fbsel.exe <input filename> <output filename>

fbstat

The program fbstat will output summary statistics in different global areas into a number of files. The program is called in the following way:



fbstat.exe [-nmlev] <filenames>

fbthin

The program fbthin will thin the data to 1 degree resolution. The code could easily be modified to thin to a different resolution. The program is called in the following way:



fbthin.exe inputfile outputfile

sla2fb

The program sla2fb will convert an AVISO SLA format file to feedback format. The program is called in the following way:



sla2fb.exe [-s type] outputfile inputfile1 inputfile2 ...

Option:
-s Select altimeter data_source

vel2fb

The program vel2fb will convert TAO/PIRATA/RAMA currents files to feedback format. The program is called in the following way:



vel2fb.exe outputfile inputfile1 inputfile2 ...

building the obstools

To build the obstools use in the tools directory use ./maketools -n OBSTOOLS -m [ARCH].

Dataplot

An IDL program called dataplot is included which uses a graphical interface to visualise 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:



IDL> dataplot, "filename"

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.



IDL> spawn, 'ls profb*.nc', files
IDL> dataplot, files

Fig 12.3 shows the main window which is launched when dataplot starts. This is split into three parts. At the top there is a menu bar which contains a variety of drop down menus. Areas - zooms into prespecified regions; plot - plots the data as a timeseries or a T-S diagram if appropriate; Find - allows data to be searched; Config - sets various configuration options.

The middle part is a plot of the geographical location of the observations. This will plot the observation value, the model background value or observation minus background value depending on the option selected in the radio button at the bottom of the window. The plotting colour range can be changed by clicking on the colour bar. The title of the plot gives some basic information about the date range and depth range shown, the extreme values, and the mean and rms values. It is possible to zoom in using a drag-box. You may also zoom in or out using the mouse wheel.

The bottom part of the window controls what is visible in the plot above. There are two bars which select the level range plotted (for profile data). The other bars below select the date range shown. The bottom of the figure allows the option to plot the mean, root mean square, standard deviation or mean square values. As mentioned above you can choose to plot the observation value, the model background value or observation minus background value. The next group of radio buttons selects the map projection. This can either be regular latitude longitude grid, or north or south polar stereographic. The next group of radio buttons will plot bad observations, switch to salinity and plot density for profile observations. The rightmost group of buttons will print the plot window as a postscript, save it as png, or exit from dataplot.

Figure 12.3: Main window of dataplot.
\includegraphics[width=9cm,angle=-90.]{Fig_OBS_dataplot_main}

If a profile point is clicked with the mouse button a plot of the observation and background values as a function of depth (Fig 12.4).

Figure 12.4: Profile plot from dataplot produced by right clicking on a point in the main window.
\includegraphics[width=7cm,angle=-90.]{Fig_OBS_dataplot_prof}

Gurvan Madec and the NEMO Team
NEMO European Consortium2016-11-22