R.DIAG Model and Analysis Diagnostic Toolkit

An extensive toolkit is available to users wanting to manipulate 2D and 3D meteorological data, as produced either by the Environment and Climate Change Canada (ECCC) GEM forecast model of the ECCC CCCma General Circulation Model (GCM). The CMC/RPN GEM file formats and two flavors of the GCM's binary sequential format are supported. The toolkit is built in the r.diag 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.
One of the $TMPDIR or $BIG_TMPDIR local variables have to be defined as they are heavily used by r.diag . A set of scripts has been made available to facilitate this. These accessory scripts are documented here .

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.

In addition, the r.diag low-level libraries are used by a companion application that provides for conversions to/from the NetCDF file format. This application can be accessed in the same manner as r.diag itself. The application is available under the cdf2rpn and cdf2ccc names and is documented here.

Currently, there are versions of r.diag and cdf2(rpn/ccc) that run under LINUX (32 and 64 bits, Debian and above) on several sites.

As of October 2014, the r.diag and cdf2(rpn/ccc) source codes are made available under a LGPL licence on the github site.

The older (pre-github) modification history of r.diag is available here . Subroutine error message descriptions are also available.

Contact: Dugas.Bernard@uqam.ca
Last revision : January 2019