There are three coordinate systems in GrADS:
The world coordinate is 4-D and is DEFINED INSIDE GrADS as the
variables or dimensions with the names lon
,
lat
, lev
and
time
. The typical correspondence between these GrADS
world
coordinates and the "real world" is:
14.3N; 145E; 500 mb; 00:12 UTC on 7 March 1996
(a point
above
Guam)) in GrADS world coordinates (lon;lat;lev;time
) would
be
(14.3;145.0;500;12:00Z7Mar1996
).
The grid coordinate is also 4-D and is DEFINED INSIDE GrADS as
(x,y,z,t
). In FORTRAN, the data would written out
parameter (nx=144,ny=73,nz=17,nt=2)
dimension u(nx,ny,nz,nt)
integer x,y,z,t
do t=1,nt
do z=1,nz
write(10) ((u(x,y),x=1,nx),y=1,ny)
end do
end do
However, as in the real world, GrADS only supports ONE
relationship or "map" between world and grid coordinates at a
time. This map is based on the "default" file which by default
is the first file opened. To understand where this world->grid
and grid->world map comes from consider the following data
descriptor or .ctl
file:
dset ^bm.dat
title the best model ver data
options yrev zrev
xdef 72 linear 0.0 5.0
ydef 46 linear -90 4.0
zdef 3 levels 850 500 200
tdef 1 linear 00z1jan1996 12hr
vars 1
z 3 0 geopotential height
endvars
x(y,z,t)def
cards and
(optionally)
the options
card. In GrADS the world coordinate is ALWAYS
defined such that longitude (lon
) increases from West to
East,
latitutde (lat
) increases toward the North and pressure
level
(lev
) DECREASES with height (this is not strictly true but
is
very important when doing calculations such as vint). Time is a
special case and can ONLY be linear with equal spacing
(12hr
in
the example). While the ?def
"cards" can be ordered in
any way
in the .ctl
file, the world coordinate inside GrADS is
ALWAYS
(lon,lat,lev,time
). However, this does NOT mean the DATA
has be
arranged this way and the "options" card tells GrADS how the data
differs from the standard. In the above example case, the
latitudes in GRID cooridates DECREASES with INCREASING y
,
that is
y=1 -> lat=90; y=2 -> lat=86; y=45 -> lat=-90
(some models
and
graphics systems prefer this orientation). Similarly,
lev=200
is
stored first, followed by lev=500
and
lev=200
. Other
modifications to the world<->grid map are possible, as described
below.
display
a
variable. Consider the typical case of a 2-D contour plot:
open psl.ecmwf.ctl
open psl.ncep.ctl
set gxout contour
set t 1
set lon 0 180
set lat 0 90
d psl
and let's see what is happening inside GrADS.
the "default" file is the first one or the data in
psl.ecmwf.ctl
.
This specifes that the grid-world and world-grid map will be
based on the psl.ecmwf.ctl
.
set t 1
- look at the first time in the file or
'set time 00z1mar96' if that were the actual time corresponding the