R.DIAG Diagnostic Toolkit

A rather complete toolkit is available to users wanting to manipulate meteorological data files, either analysis or model produced. The toolkit at this time, supports most types of RPN/CMC files and two flavors of the CCRN binary sequential files. The toolkit is built in the r.diag RPN executable. The toolkit commands can be grouped under several themes or section.

Available sections:
  1. Display programs
  2. File/label/record manipulation programs
  3. General computation programs
  4. Grid programs 
  5. Spherical harmonic and fourier programs
  6. Zonal cross-section programs
  7. Time-series analysis and matrix operations programs

Up to four characters follow each description...
  1. Number of input files (excluding stdin)
  2. Number of output files (excluding stdout)
  3. C if the program reads stdin
  4. G if the program is restricted to global fields

In addition, r.diag can be configured with several environment variables and/or command line keys. An up to date description of these keys and variables is available in the Diag_Config document.

r.diag
is derived from the CCCma (aka CCRN) diagnostic package but has undergone extensive re-writing. It includes most of the modules in the original package as well as several new commands. Most of the extensions to existing commands have to do with providing greater ease in interactive usage: inplementing command line keys and defining default parametre values. The program works with a somewhat greater range of file types, namely CCCma as well as several CMC/RPN datafiles.

There also exist a set of Bourne shell scripts based on r.diag that can be used to output (via batch submissions) rather complete order one and order two statistics. These can be found under:

${ARMNLIB}/scripts/Ljdiag

The files exemple.start.diag and local_variables provide an example of such a diagnostic batch job. r.diag in general, and these scripts in particular use the $TMPDIR concept extensively. A small number of commands have been implemented to facilitate this and they are documented here.


Currently, there are versions of r.diag that run under SGI's IRIX6.5 (although no longer at CMC; the last version built on this platform was r.diag_6.0.4), under LINUX (Debian and above) and under IBM's AIX5.3 (as on CMC's clusters).


The modification history of r.diag is available here. Subroutine error message descriptions are also available.


Last update : May, 2010
Author : Bernard Dugas, tel. (514) 421-4734
Email : Bernard.Dugas@ec.gc.ca