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 an early 1990s version of the CCCma (then know as CCRN) diagnostic package but it has since 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 initial commands have to do with providing greater ease in interactive usage, such as implementing command line keys and defining default parametre values. The program also fully supports and makes extensive use of the capabilities inherent in the CMC/RPN standard file formats. It still supports its native CCCma file formats.

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 supported versions of r.diag that run under LINUX (32 and 64 bits, Debian and above) and under IBM's AIX (on the CMC's Powerpc clusters).


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


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