VISUALISATION COSMO-MODEL OUTPUT
USING GRADS
COSMIN BARBU
BOGDAN MACO
AMALIA IRIZA
Outline:
What is GrADS?
Grid Analysis and Display System - developed at the Center for Ocean-Land-Atmosphere
Studies (COLA)
GrADS is a freely available package used for analysis, manipulation and plotting of
science data (e.g. data from meteorological models )
Key features of GrADS:
• available for multiple platforms as an executable (including Windows)
• accessible by both a command-line and scripting interface
• support for multiple common data formats (Binary, GRIB, NetCDF, HDF-SDS).
• significant support for user-defined plotting (Line and bar graphs, scatter plots, streamlines,
wind vectors).
• manipulation of large 4-D datasets.
• a rich set of built-in functions for data manipulation.
The GrADS operating concept
Create a control file to describe a dataset for GrADS platform:
vi [Link]
Start GrADS session:
l
grads (enter in the command line)
Launch the data:
l
open [Link]
The GrADS display procedure:
Set display dimension:
l
set lon West [East] sets longitudes [deg E], e.g. "set lon 17 23.5"
set lat South [North] sets latitudes [deg N], e.g. "set lat -10 15"
set lev p1 [p2] sets level [hPa], e.g. "set lev 500"
set time time [time2] , e.g. "set time 15Z19jul2011"
Display the variable:
l
d expression display expression, e.g. T, or 0.01*pmsl, U;V, T-273.15
Save the plot:
l
printim [Link] create png-file
Close the data:
l
close 1
Quit GrADS platform:
l
quit
GrADS is basically a set of three files that are required in order to read a data file:
The GRIB data file itself (*.grb, *.grib).
A GrADS control file (*.ctl).
A Gribmap file (or index file; *.idx or *.gmp).
How do I create these files?
The GrADS control file can be written using the grib2ctl utility
run the [Link] utility at the command line (on a Unix/Linux operating system):
grib2ctl [Link] > [Link]
This will have generated the control file [Link].
The Gribmap file can be generated using the gribmap utility which comes freely
available as part of the GrADS package
gribmap -e -i [Link]
This will have generated the gribmap file [Link].
Tips & tricks:
-using gme2ctl (available at DWD) will generate both file (*.ctl, *.idx)
Data description file (.ctl file)
GrADS implements a 4-dimensional data model, where the dimensions are latitude, longitude, level and time. Each data set is
l
located within this 4-dimensional space by use of a data descriptor
l
The control file (extension .ctl) is used to explain the data structure of a data for GrADS platform to coordinate the metadata
information in data for plotting.
DSET ^all_lfff_refdata
INDEX ^all_lfff_refdata.idx
undef 9.999E+20
TITLE File all_lfff_refdata
Here is an grid control file example: dtype grib 255
* Rotated LatLon grid: South pole lat -40.000000 lon 10.000000 rot angle 0.000000
ydef 161 linear -5.000000 0.0625
xdef 129 linear -4.000000 0.0625
tdef 13 linear 12Z13may2013 1hr
zdef 41 levels
41 40 39 38 37 36 35 34 33 32 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1
vars 14
T_G 0 11,1,0 ** surface temperature [K]
T_2m 0 11,105,2 ** 2 m temperature [K]
T 40 11,110,0 ** temperature [K]
TD_2m 0 17,105,2 ** 2 m dew-point temperature [K]
TDIVHUM 0 42,1,0 ** surface vert. integral of divergence of tot. water content [kg/(m**2)]
TKE 41 152,109,0 ** turbulent kinetic energy [(m/s)**2]
TMAX_2m 0 15,105,2 ** 2 m maximum temperature [K]
TMIN_2m 0 16,105,2 ** 2 m minimum temperature [K]
TOP_CON 0 73,1,0 ** surface convection top index [1]
TOT_PREC 0 61,1,0 ** surface total precipitation [kg/(m**2)]
U_10m 0 33,105,10 ** 10 m u-component (zonal) of wind [m/s]
U 40 33,110,0 ** u-component (zonal) of wind [m/s]
V_10m 0 34,105,10 ** 10 m v-component (merdional) of wind [m/s]
V 40 34,110,0 ** v-component (merdional) of wind [m/s]
ENDVARS
Control file options:
DSET: The control file referred data.
absolute path: dset /export/home/training3/RUN/FOR00/[Link]
relative path: dset ^[Link]
TITLE: The title description of the data (optional)
title description
The name of the index file, e.g.
index [Link]
UNDEF: The undefined or missing value in input data
undef value
The undefined value will not be plotted out when GrADS is plotting the value
dtype grib 255
The number of the grid that is used.
Coordinate definition:
xdef: Longitudinal direction coordinate
ydef: Latitudinal direction coordinate
zdef: Vertical direction coordinate
tdef Time progressive coordinate:
VARS: declare how many variables in the input data
vars num (the number of variables)
Variable declaration:
Variable_name levels unit description
variable_name: the variable name, which is called in display command for plotting
levels: the number of vertical grids, which must not great than the zdef grid_number
unit: the unit corresponds the format in different type data (as grib or netCDF)
description: the description of the variable
NLEV Number of vertical levels (0 stands for a two-dimensional field).
EE Element number in the Grib tables.
LEVTYP Leveltyp in the Grib tables.
LEVBOT Bottom level for Leveltyp 105.
ENDVARS: declare the variables in input declaration is ending
A weakness of GrADS is, that it cannot distinguish between different Grib tables. Therefore, vari-ables from different Grib tables, but
with the same element number cannot be displayed properly. This holds for example for the wind speed U (in Grib Table 2, ee=33)
and cloud ice QI (in Grib Table 201, ee=33).
Let's practice:
Start
GrADS_executive <options>
In the command prompt type grads
options
-help: list available options for the version
- l/ -p: perform the display on real page as landscape(11inch x 8.5inch)/portrait(8.5inch x 11inch) mode
-b: enable to operate GrADS command without x-window
-c <command>: execute the command after startup GrADS system
training3: /export/home/training3 =>grads
Grid Analysis and Display System (GrADS) Version 2.0.a9
Copyright (c) 1988-2010 by Brian Doty and the
Institute for Global Environment and Society (IGES)
GrADS comes with ABSOLUTELY NO WARRANTY
See file COPYRIGHT for more information
Config: v2.0.a9 little-endian readline printim grib2 netcdf hdf4-sds hdf5 opendap-grids geotiff shapefile
Issue 'q config' command for more detailed configuration information
Landscape mode? ('n' for portrait):
GX Package Initialization: Size = 11 8.5
ga->
Important commands:
set lon West [East] sets longitudes [deg E], e.g. "set lon 17 23.5"
set lat South [North] sets latitudes [deg N], e.g. "set lat -10 15"
set lev p1 [p2] sets level [hPa], e.g. "set lev 500"
set time time [time2] sets time in format hhZddmmmyyyy, hh=hour, dd=day, mmm=month, yyyy=year, e.g. "set time 15Z19jul2011"
q XX query, i.e. get information XX
q file description of the file
q dims information about set dimensions
q time information about time settings
q ctlinfo show content of control-file
set gxout XX Choose display style, e.g. contour, shaded, grfill, barb
More commands:
set display color white white background of map
set mpdset hires use high-resolution coastlines/maps
draw string Hello 2.5 1.2 write string Hello at position 2.5 inches, 1.2 inches
cbar draw the colour bar (Standard script [Link])
set clevs 0.1 0.5 1 5 10 25 50 75 100 set contour levels
set cmin 25 show only values above 25
set ccolor 2 set contour color
Basic commands are:
set
d (or display) draw
query
close open c (or clear)
See [Link]/grads/gadoc/[Link], especially for set
Graphic types: set gxout
shaded contour grfill 13
Some examples:
set gxout barb draw WMO wind barbs
d skip(u_10m*2,4);v_10m*2 draw every 4th wind grid point as barb (in knots)
set gxout stream draw streamlines
d u_10m;v_10m draw wind at 10m as streamlines
d mag(u_10m,v_10m) draw wind speed (in m/s)
d hdivg(u_10m,v_10m)*1.e4 draw divergence (10-4 s-1)
d hcurl (u_10m,v_10m)*1.e4 draw vorticity (10-4 s-1)
set clevs 0.1 0.5 1 5 10 25 50 75 100 set contour levels
d tot_prec draw precipitation
condepth=(htop_con-hbas_con)/1000 compute convective cloud depth (in km)
d maskout(condepth, condepth-0.5) draw condepth >= 0.5 km; alternative:
set cmin 0.5
d condepth
Graphics types: set gxout
15
Tutorial examples:
“COSMO tutorial 2015”
- page 33
We'll practice together
COSMO Romanian domains:
GrADS Environment Variables
GrADS is working with scripts, that can be executed during a GrADS session. Also you haveto access special
data e.g. to display a map background. The directories, where data and scripts
are stored, have to be specified by special GrADS environment variables. GADDDIR specifies the
directory with special GrADS data and GASCRP defines the directory holding GrADS scripts. The
settings for this course are:
export GADDIR=${Path To}/grads/fonts
export GASCRP=${Path To}/grads/bin
all_lfff_refdata
This grib files contains all output files from the COSMO-Model refference data set.
lfff00000000c, lfff00000000, . . . , lfff00120000
If you made the reference run, you can create it by typing
cat lfff00000000c lfff*00 > all_lfff_refdata
The GrADS data descriptor file for the reference data set.
[Link] all_lfff_refdata > ref_model.ctl
gribmap -i ref_model.ctl
Starting GrADS
GrADS can be started interactively by using the command grads. The user is prompted for specifying a landscape or
a portrait window. Normally, a landscape window is chosen, so just press ENTER.
options
-help: list available options for the version
- l/ -p: perform the display on real page as landscape(11inch x 8.5inch)/portrait(8.5inch x 11inch) mode
-b: enable to operate GrADS command without x-window
-c <command>: execute the command after startup GrADS system
In the text window (from where you started GrADS), you should now see the GrADS prompt
ga->.
First, the data descriptor file has to be opened. For that you have to enter:
ga-> open ref_model.ctl
You can take a look on the contents of this file by entering
ga-> query file
q XX query, i.e. get information XX
q file description of the file
q dims information about set dimensions
q time information about time settings
q ctlinfo show content of control-file
Displaying Data
Data can be displayed by using the command display (or abbreviated: d):
ga-> d var_name
where var name is the name of the variable as it was defined in the data descriptor file, e.g.:
ga-> d u10m
ga-> d t2m
Note that GrADS displays an x-y-plot at the first time and at the lowest level in the data set. Per
default, contour lines are plotted. This can be changed by entering
ga-> set gxout style
where style is one of the following:
• contour the default
• shaded coloured plots
• grfill the single grid cells can be seen in the coloured plot
• grid the values are written in the grid cell (not useful for bigger domains)
• vector for displaying special variables (see below)
• stream for displaying special variables (see below)
Display some variables in different styles, e.g.
ga-> d u10m (the default are contour lines)
ga-> c (for clear: clears the display)
ga-> set gxout shaded
ga-> d u10m
ga-> c
ga-> set gxout grfill
ga-> d u10m
For the styles shaded and grfill, you can draw a color-bar to see the range of the values of the displayed
variable by entering
ga-> run cbar
Note that cbar also is a user defined grads script.
You should get:
Using the styles vector or stream, you can visualize e.g. the wind:
ga-> c
ga-> set gxout vector
ga-> d u10m;v10m
ga-> c
ga-> d skip(u10m,5,5);skip(v10m,5,5) (Note the difference!)
ga-> c
ga-> set gxout stream
ga-> d u10m;v10m
ga-> c
By specifying a 3rd field, the vectors can also be colorized, e.g.
ga-> set gxout vector
ga-> d u10m;v10m;t2m
ga-> c
Altering the dimensions:
You now will enter commands to alter the dimension environment. The display command (and,
implicitly, the access, operation, and output of the data) will do things with respect to the current
dimension environment. You control the dimension environment with the set command.
ga-> c
ga-> set x 35
ga-> set y 30
ga-> d t2m
Result value = 281.26 (in Kelvin)
ga-> d t2m-273.15
Result value = 8.11025 (in Celsius)
ga-> d (t2m-273.15)*9/5+32
Result value = 46.5985 (in Fahrenheit)
In the above sequence, the x- and y-dimensions are set to a single value. Because the z- and t-dimensions
are also only a single value, all dimensions are now fixed and the result is just a singlevalue, in this case
the value for grid point (35,30), at the lowest level and the 1st time in the data set.
If you now enter
ga-> c
ga-> set x 1 201
ga-> d t2m
Now x (the longitude) is a varying dimension and displaying a variable will give a line graph.
Now enter
ga-> c
ga-> set y 1 177
ga-> d t2m
and you will get a two-dimensional plot again. You can also choose a subdomain for plotting:
ga-> c
ga-> set x 31 43
ga-> set y 25 45
ga-> set gxout shaded
ga-> cbar
ga-> d t2m
And on such a subdomain you can take a look on the values of the grid cells:
ga-> c
ga-> set gxout grid
ga-> set mproj scaled
ga-> set mpdset gmt_l_rot_eu
ga-> d t2m-273.15
Mapping with gme2ctl:
Try some commands with your own data.
Make a ctl-file with
[Link] <GRIB-file>
For more information about gme2ctl usage type: [Link] -h
Debug information with option -D (repeat -D for more debug information)
[Link] -D
Mapping all COSMO7 ouput
[Link] -n cosmo7 lfff00*0
You'll get on your screen:
grib1map: opening GRIB file: cosmo7_000
grib1map: opening GRIB file: cosmo7_003
grib1map: opening GRIB file: cosmo7_006
grib1map: opening GRIB file: cosmo7_009
grib1map: opening GRIB file: cosmo7_012
grib1map: reached end of files
grib1map: writing the map...
Control file: [Link]
Index file: [Link]
27
If also a third dimension is varied, you will get an animation sequence, which can be done e.g.
through time:
ga-> open [Link]
ga-> c
ga-> set gxout shaded
ga-> set x 1 129
ga-> set y 1 161
ga-> set t 1 13
ga->d t_2m 1 13
Operations on data:
GrADS offers the possibility to perform operations or several built in funtions on the data.
Any expression may be entered that involves the standard operators of +, -, * and /, and which
involves operands which may be constants, variables, or functions. Here is an example involving
functions to calculate the magnitude of the wind. The sequence
ga-> c
ga-> d sqrt(u_10m*u_10m+v_10m*v_10m)
can be replaced by the function
ga-> d mag(u_10m,v_10m)
Another built in function is the averaging function:
ga-> d ave(ps,t=1,t=7)
In this case the mean surface pressure over 7 values (from 00 UTC to 06 UTC!) is calculated.
You can also perform time differencing
ga-> c
ga-> d ps(t=2) – ps(t=1)
If there are two files open, perhaps one with model output, the other with analyses, you can also
take the difference between two fields by entering
ga-> d ps.2 - ps.1
Printing data
Newer version of GrADS have a comfortable way of printing data to a gif-file:
ga-> printim file name
where file name is the name that is given to the file. You can take a look on the contents of file name by using display.
Ending GrADS
The command to end the GrADS session is
ga-> quit
Drawing a Map Background:
To draw a map background is an advanced feature when visualizing COSMO-Model output with GrADS,
because of the rotated latitude-longitude grid the predefined GrADS maps cannot be used.
We have some special maps for rotated grids that are used for the reference run. The maps are provided in
a low, medium and high resolution over Europe for the rotation with pollat=32.5:
gmt_l_rot_eu_low resolution map
gmt_m_rot_eu medium resolution map
gmt_h_rot_eu high resolution map
and for the rotation with pollat=40.0:
gmt_l_rot_40.0 low resolution map
gmt_m_rot_40.0 medium resolution map
Start GrADS, open the data descriptor file and run the initialization script.
ga-> open [Link]
ga-> run [Link]
The script [Link] (.gs stands for grads script) just specifies the plotting area and defines some
COSMO-Model specific features. It can be accessed from the GrADS scripts-directory, which is set
by an environment variable (see above). You can take a look to see how this script looks like.
To control the map drawing, you have to set
ga-> set mproj latlon (sets the map projection to a lat-lon grid where the aspect ration
is maintained)
ga-> set mpdset < gmtl_rot_40.0 | gmt_m_rot_40.0 >
If you now display a variable, the political borders and the coastlines are drawn by default in
addition to the variable.
d t_2m-273.15
We can also display the data in other projections using the set mproj command:
•latlon •(lat/lon—maintains aspect •lambert •(Lambert conformal
ratio) conic)
•scaled •(lat/lon—does not •mollweide •(Mollweide)
maintain aspect ratio)
•nps •(North polar •orthogr •(Orthographic)
stereographic)
•sps •(South polar •robinson •(Robinson—requires set
stereographic) lon -180 180 and set lat
-90 90)
Default is latlon
set mproj off turns off the map projection
To switch off the borders and / or the coastlines you can use the set mpt command. The syntax is
set mpt type < off | <color>,<style>,<thickness>>
where type, color, style and thickness can be chosen from the following table:
To also switch on the main rivers in a black dotted line, you can enter
ga-> set mpt 3 1 5
and then display a variable. To switch all maps off, you can type
ga-> set mpt * off
Use of GrADS in Batch mode
You have already used the scripts [Link] or [Link] above. You can easily generate your own scripts by embracing
the most commands by an apostrophe (exceptions are variable definitions,...).
A short example is shown here
’open [Link]’
’run [Link]’
’set gxout grfill’
’d t_2m-273.16’
’printim my_plot.png’
Let us name this script ’[Link]’. You can of course call this script during your grads session, but you can call it
by a shell command, too:
grads -b -c ’[Link]’
To automatically quit grads you should finish the above script by a line ’quit’. Using scripts in
this way allows to use GrADS as a graphic production tool.
Why we need Scripting Language?
To avoid setting a number of plot setting every time, the GrADS script (.gs) file is recorded the display steps for modifying easily.
Run GrADS script
run <script_file> run the script file
script_file: the script file can be either the route or the file name if at the same directory, even without extension.
ex: ga-> run /home/user/[Link] absolute route
ga-> run ../[Link] related route
ga-> run [Link] run the file at the same directory
ga-> [Link] omitting the run commander
ga-> cmap omitting the .gs extension
Assignment: variable = expression
Operators: | & ! - = != > >= < <= % + - * /
Intrinsic script functions:
sublin(string,n) Get single line from string containing several lines
subwrd(string,n) Get the nth single word from a string.
substr(string,start,length) Get sub-string of string starting at location start for length length
Comment
Put an asterisk * at the first column of the line and GrADS system doesn’t run the line.
Ex: *”set ccolor 2”
If block
if(condition)
executed command if condition is true
else
executed command if condition is false While loop
endif while(condition)
Ex: if( t_2m-273 > 30 ) Executed command repetitive until condition is not true
say ‘hot time’ endwhile
else Ex: t = 1
say ‘nice time’ while(t<=30)
endif say t
there is no ‘else if’ command in GrADS t=t+1
endwhile
t=t+1
Example 1:
set display color white
c
open [Link]
q dims
set t 1 13
set lat -10
set lon 9
set ccolor 2
set cthick 10
d t_2m-273.15
draw title title T_2m evolution in time
printim T_2m-[Link]
Example 2:
open [Link]
Set display color white
c
run [Link]
set gxout shaded
set clab forced
d pmsl/100
set gxout contour
d pmsl/100
run [Link]
draw title pressure reduced to MSL [hPa]
set strsiz 0.14
draw string 1.4 8.3 COSMO-7km
printim [Link] png x1024 y768
quit
Example 3: Cross section
open [Link]
Set display color white
c
q dims
set y 100
set x 20 100
set lev 1000 450
set gxout contour
set grads off
d t-273.15
d u;v;mag(u,v)
draw title Cross section on latitudine
printim [Link] png x1024 y768
c
set lon 12
set lat -14 -9
set lev 1000 450
d t-273.15
draw title Cross section on longitude
printim [Link] png x1024 y768
quit
Example 4: Total cloud cover
open open all_lfff_refdata.ctl
set display color white
c
set mproj latlon
set mpdset gmt_l_rot_eu
set gxout shaded
set rgb 41 225 255 255
set rgb 42 180 240 250
set rgb 43 150 210 250
set rgb 44 120 185 250
set rgb 45 80 165 245
set rgb 46 60 150 245
set rgb 47 40 130 240
set rgb 48 30 110 235
set rgb 49 20 100 210
set rbcols 0 41 42 43 44 45 46 47 48 49
set csmooth on
d clct
[Link]
draw title Total cloud cover
printim [Link]
quit
Example 5: 10m wind
open all_lfff_refdata.ctl
Set display color white
c
set mproj latlon
set mpdset gmt_l_rot_eu
set gxout shaded
set rgb 31 230 255 225
set rgb 33 180 250 170
set rgb 35 120 245 115
set rgb 43 150 210 250
set rgb 46 60 150 245
set rgb 48 30 110 235
set rgb 26 255 50 0
set rgb 28 192 0 0
set rbcols 31 33 35 43 46 48 26 28 93
d
skip(u_10m,2,2);v_10m;mag(u_10m,v_10m)
draw map
[Link]
draw title Wind 10m
printim w_10m.png x1024 y768
quit
Helpful Tools: wgrib
As already mentioned above, GrADS has problems when two variables should be visualized thathave the same
element number but are from different Grib tables. Another problem is the visualization of threedimensional
variables, that have different vertical locations. In the COSMO-Model, most atmospheric variables are defined
on main levels, while the vertical velocity W (and some related variables) are defined on half levels.
There are tools whcih offer now convenient solutions for these problems. With wgrib it is possible to
extract certain variables out of a Grib file into a new Grib file. And if only one type of atmospheric
variable is present, it is no problem for GrADS.
A list of contents of a Grib file:
To see a list of all variables in a Grib file <name> type:
wgrib <name>
The listing gives you (among others) information about
d=09122112: the date
U: the name used in the COSMO-Model
kpds5=33: the element number (here defined by kpds5)
kpds6=110: the leveltyp (110 are variables on main levels, 109 variables on half levels)
Extracting variables out of a Grib file:
The output of the listing above can be piped into wgrib again to extract certain variables, which
you have to specify by the element number (or kpds5):
wgrib <name> | egrep -i <string> | wgrib -grib -i <name> -o <name> suffix
where <string> is e.g.
":U:kpds5=33:kpds6=110:" to extract U
":V:kpds5=34:kpds6=110:" to extract V
":W:kpds5=40:kpds6=109:" to extract W
":T:kpds5=11:kpds6=110:" to extract T
":P:kpds5=1:kpds6=110:" to extract P
":PP:kpds5=139:kpds6=110:" to extract PP
":QI:kpds5=33:kpds6=110:" to extract QI
You can also add several entries with the | in between:
":U:kpds5=33:kpds6=110:|:V:kpds5=34:kpds6=110:"
Example:
wgrib lfff00010000 | egrep -i ":V:kpds5=34:kpds6=110:|:U:kpds5=33:kpds6=110:" | wgrib -grib -i lfff00010000 -o lfff00010000_uv
Exercise: play with U,V variables.
Meteographs with meteo_plot.pl
Requirements
ASCII output of COSMO
perl typically in /usr/bin/perl
gnuplot [Link]
Date-Pcalc - a package consists of a Perl module for all kinds of date calculations based
on the Gregorian calendar
Explanation with option –h:
meteo_plot.pl –h
Problems? Use option –D (repeat –D for more debug information)
meteo_plot.pl –D …
Information on content of a meteograph file:
meteo_plot.pl –i M_*
Simple usage
meteo_plot.pl M_Bandung -e pmsl,ff10m,dd10m,t2m,td2m,clch,clcm,clcl,rain_con,precip
meteo_plot.pl M_Bandung -e pmsl,ff10m,dd10m,t2m,td2m,clch,clcm,clcl,rain_con,precip -o meteo_Bandung.png
48
meteo_plot.pl M_bandung -e pmsl,ff10m,dd10m,t2m,td2m,clch,clcm,clcl,rain_con,precip –o meteo_bandung_1.png -time '*:+52'
meteo_plot.pl M_bandung -e pmsl,t2m,tmin2m,tmax2m,precip -o meteo_bandung_2.png -time '2012101712 : 2012101906'
Visualization of NetCDF files ( GRIBOUT: yform_write='ncdf')
[Link] [Link] [Link] [Link] [Link] [Link]
[Link] [Link] [Link] [Link] [Link]
NetCDF (Network Common Data Form) is a set of software libraries and self-describing,
machine-independent data formats that support the creation, access, and sharing of
array-oriented scientific data. The project homepage is hosted by the Unidata program
at the University Corporation for Atmospheric Research (UCAR).
ncdump
Ncdump may be used as a simple browser for NetCDF data files,
to display the dimension names and sizes; variable names, types and shapes; attribute names and
values; and optionally, the data values themselves for all or selected variables in ASCII format.
ncdump -c [Link]
Dimension names and sizes, variable names, dependencies and values of dimensions will be displayed.
To get only header information (same as -c option but without the values of dimensions) use
ncdump -h [Link]
To display the values of a specified variable which is contained in the NetCDF file type
ncdump -v <Variable> [Link]
To send data to a text file use
ncdump -b c [Link] > [Link]
to produce an annotated CDL version of the structure and the data in the NetCDF-file [Link].
You can also save data for specified variables for example in *.txt-files just using:
ncdump -v <Variable> [Link] > [Link]
ncview
Ncview is a visual browser for NetCDF format files developed by David W. Pierce. Using ncview
you can get a quick and easy look at your NetCDF files. It is possible to view simple movies of
data, view along different dimensions, to have a look at actual data values at specific coordinates,
change colormaps, invert data, etc
You can run the program by typing:
ncview [Link]
which will open a new window with the display options..
Useful links for GrADS
Name Link
GrADS Home Page [Link]/grads/gadoc
GrADS User's Guide [Link]/grads/gadoc/[Link]
GrADS Documentation Index [Link]/grads/gadoc/[Link]
GrADS Script Library [Link]/grads/gadoc/[Link]
GrADS Tutorial [Link]/grads/gadoc/[Link]
OpenGrADS [Link]/[Link]