The rotgrid-grads package allows to correctly visualise into GrADS grib files produced by atmospheric models on rotated grids, such as COSMO and HIRLAM.

It consists of the program rotgrid_grads, which creates an unformatted index file containing the information for correctly georeferencing a grib field on a rotated grid in GrADS, including wind vector rotation; it can also rewrite the corresponding .ctl file instructing GrADS to make use of the index file which has been created (i.e. adding the PDEF BILIN option, see GrADS manual). By default the index file is generated in Fortran sequential unformatted format.

The program requires the ECMWF emos library or the or the picogrib decoding library for grib decoding.


The rotgrid-grads package version 1.0 can be downloaded directly from this page.


The package is configured with the standard GNU autotools, so, in the simplest case, the building procedure consists in typing:
make install
Try configure --help for more options to the configure script, for example for indicating a particular Fortran compiler or additional library paths. Notice that the ECMWF emos library or the picogrib decoding library must already be installed on your system. If you do not want to do a full make install you can simply copy the rotgrid_grads executable to a directory listed in PATH environment variable.

Rotgrid-grads has been tested on Fedora 8 and Debian lenny i386/x86_64 GNU/Linux systems. It has been successfully tested with gfortran and pgf90 Fortran compilers.


The general syntax is:
rotgrid_grads [options] grib_filename [ctlfilename]
The possible options are: The remaining command line parameters are:


Given a GRIB file lm.grb the complete procedure is: lm.grb > lm.ctl
gribmap -i lm.ctl
rotgrid_grads -r 2. lm.grb lm.ctl
At the end of the procedure you should use the lm_bilin.ctl file rather than lm.ctl inside GrADS in order to have correct georeferencing. Notice that gribmap is an utility which comes packaged with grads, while grib2ctl must be downloaded separately. A sample grib file produced by the COSMO model is provided in the package.

The script included in the package automates this procedure.


If you have questions, doubts or requests for improvement, please address them to Davide Cesari (dcesari <at> arpa <dot> emr <dot> it).

rotgrid-grads is based on a previous program written in collaboration with Simone campagna from Cineca (s.campagna <at> cineca <dot> it).


The program is distributed under the GNU General Public License (see COPYING file).

Last Update 24/02/2010

Back to main page.