HomeMy BADCDataSearchCommunityHelp
Guided Tour Getting data Formats Software 10 FAQ

GrADS (Grid Analysis and Display System)

A brief introduction to the GrADS software package.

Contents


Overview

Grid Analysis and Display System (GrADS) is a freely available package used for analysis, manipulation and plotting of earth science data. It is designed for gridded datasets but can also cope with station data.

Below are some key features of GrADS:

Return to top of page


Example output

Figure 1 shows a GrADS plot and the command-line interface running on a Linux operating system.


Figure 1. GrADS example output.

Return to top of page


File formats catered for

GrADS can open the following file formats:

GrADS writes output to GrADS binary format as standard.

Return to top of page


Typical operations

GrADS will typically be used for operations such as:

Return to top of page


Quick start tutorial

In order to use GrADS you must have it installed on your machine. It can be downloaded from:

http://grads.iges.org/grads/downloads.html

Note that you can download either the source code or a pre-compiled binary. Use the latter if you are not sure about building the software yourself, the binary executable should work straight away on your system.

This tutorial requires that you have a sample NetCDF file. You can download the sample file here (84KB). The file (called 'wind_comps.nc') is a NetCDF file containing u-wind and v-wind data over the globe at a 2.5° resolution at the 1000hPA level. Save the NetCDF in the directory you are working in before you start the tutorial.

The following commands should allow you to calculate the wind-speed ('wspd') from the u-wind ('u') and v-wind ('v'), plot the resulting variable and write it to an output NetCDF file.

The command to type is shown in bold and the output in plain type. The commands are annotated in normal font in the right-hand column. The tutorial follows:

ga-> gradsThis starts the GrADS shell. Windows users will need to click on the GrADS icon to start it, or select it from the 'Start' menu.
Grid Analysis and Display System (GrADS) Version 1.8SL11
Copyright (c) 1988-2001 by Brian Doty
Center for Ocean-Land-Atmosphere Studies
Institute for Global Environment and Society
All Rights Reserved

Config: v1.8SL11 32-bit little-endian readline sdf/xdf netcdf lats printim

Issue 'q config' command for more information.

Landscape mode? (no for portrait): y
GX Package Initialization: Size = 11 8.5
ga-> sdfopen 'wind_comps.nc'Opens the NetCDF file.
Scanning self-describing file: wind_comps.nc
Found 2 data variables in SDF file.
Found displayable variable u with 0 levels in SDF file.
Found displayable variable v with 0 levels in SDF file.
SDF file wind_comps.nc is open as file 1
LON set to 0 360
LAT set to -90 90
LEV set to 0 0
Time values set: 2003:1:1:0 2003:1:1:0
ga-> q fileGives details of the file contents.
File 1 : BADC test data: u and v wind component.
Descriptor: wind_comps.nc
Binary: wind_comps.nc
Type = Gridded
Xsize = 144 Ysize = 73 Zsize = 1 Tsize = 1
Number of Variables = 2
u 0 -999 ** U-velocity m s**-1
v 0 -999 ** V-velocity m s**-1
ga-> wspd=mag(u,v)Calculates the combined wind speed and assigns it to the variable 'wspd'. The function mag(u,v) is a built function equivalent to sqrt(uexpr*uexpr+vexpr*vexpr).
Define memory allocation size = 42340 bytes
> d wspdPlot the wind speed variable.

> set fwrite output.datOpen a file to write to called 'output.dat' in GrADS binary format.
FWrite file name = out2.dat FWwrite byte order is little_endian; format is stream
> set gxout fwriteDirect the output to the file.
> d wspdWrites output to the file.
Wrote 10585 elements to out2.dat as Stream Little_Endian
> quitCloses GrADS.

If you have problems with the tutorial please contact BADC Support.

Return to top of page


Further information

Further documentation, tutorials, download and installation instructions for GrADS can be found at the GrADS web pages (http://www.iges.org/grads/).

Return to top of page

Home    Contact    Disclaimer   
Last Modified: