Introduction To GRADs
Introduction To GRADs
Nobuyuki Kayaba
Climate Prediction Division
Japan Meteorological Agency
・What's GrADS
・Practice
1.draw image using JRA-55
2.draw image using AGCM
3.draw image difference of two dataset
2
Aim
We can
・draw the global map using JRA55 and AGCM
・out put as a image file
3
What's GrADS
Introduction
The Grid Analysis and Display System
(GrADS) is an interactive desktop tool that
is used for easy access, and visualization
of earth science data.
help
Gives a summary list of operations essential to do anything in GrADS.
ga-> help
6
What's GrADS
draw title
display
cbarn
8
What's GrADS
To the external command, you need put a “!: exclamation mark” at the first.
Data sets
the Z dimension, or
pressurre level.
Element information
1-1 Temperature
1-2 Precipitation
1-3 Sea level pressure
1-4 wind vector map
13
Practice 1-1
How to draw monthly mean
climatology using JRA-55
reanalysis data.
Temperature map
14
Practice 1-1
Command :① initialize
ga-> reinit ①initialize
ga-> clear 15
Practice 1-1
① Initialize
1-1. reinit :Initialize Grads to its initial state
ga-> reinit
16
Practice 1-1
ga-> clear 17
Practice 1-1
② Open datafile(1)
2-1. open ctlfile :Open the grads control file
ga-> open /cygdrive/c/TCC_2015/Data/JRA55/tas.clim.ctl filename
2-2. query file :Get information about the grads control file
ga-> query file 1
② Open datafile(2)
2-3.open ctlfile :Open the grads control file
ga-> open /cygdrive/c/TCC_2015/Data/JRA55/pr.clim.ctl
filename
2-4. query file :Get information about the grads control file
ga-> query file 2
element
You have to remember this element
19
Practice 1-1
ga-> clear 20
Practice 1-1
3-2.set lat val1 val2 :Set latitude to vary from val1 val2
ga-> set lat -90 90
. You will note that by default, GrADS will display a lat/lon plot at the
first time and at the lowest level in the data set.
21
Practice 1-1
ga-> clear 22
Practice 1-1
By default, you get a contour plot. This default can be changed by the command
23
Practice 1-1
9 14 4 11 5 13 3 10 7 12 8 2 6
24
Practice 1-1
25
Practice 1-1
26
Practice 1-1
ga-> clear 27
Practice 1-1
29
Practice 1-1
31
Practice 1-1
Command
ga-> reinit ①initialize
Precipitation map
37
Practice 1-2
Command
ga-> reinit ①initialize
ga-> open /cygdrive/c/TCC_2015/Data/JRA55/tas.clim.ctl
ga-> open /cygdrive/c/TCC_2015/Data/JRA55/ps.clim.ctl ②open data
ga-> query file 1
ga-> query file 2
ga-> set lon 0 360
ga-> set lat -90 90 ③Set area and time
ga-> set t 1 (default is 1)
ga-> set gxout shaded (default is contour)
ga-> set clevs 0 2 4 6 8 10 12 14 16 18 20 22 ④Setting graphics type
ga-> set ccols 9 14 4 11 5 13 3 10 7 12 8 2 6
ga-> set mproj latlon (default is latlon)
ga-> set mpdset lowres (default is lowres)
ga-> set grads off (default is on)
ga-> display pr.2
ga-> cbarn Two dimension expressions ⑤Draw image
ga-> draw title JRA55_Prec_Jan
ga-> printim /cygdrive/c/TCC_2015/Doc/lecture/7/images/jra_pr_01.png white
ga-> clear
⑥Clear the display
38
Practice 1-3
How to draw monthly mean
climatology using JRA-55
reanalysis data.
39
Practice 1-3
Command
ga-> reinit ①initialize
ga-> open /cygdrive/c/TCC_2015/Data/JRA55/psl.clim.ctl
②open data
ga-> query file 1
ga-> clear
⑥Clear the display
40
Practice 1-3
42
Practice 1-4
Command
ga-> reinit ①initialize
ga-> open /cygdrive/c/TCC_2015/Data/JRA55/ua.clim.ctl
ga-> open /cygdrive/c/TCC_2015/Data/JRA55/va.clim.ctl ②open data
ga-> query file 1
ga-> query file 2
ga-> set lon 0 360
ga-> set lat -90 90 ③Set area and time
ga-> set lev 850
ga-> set t 1 (default is 1)
ga-> set gxout vector
ga-> set ccolor 5 ④Setting graphics type
ga-> set cthick 12
ga-> set mproj latlon (default is latlon)
ga-> set mpdset lowres (default is lowres)
ga-> set grads off (default is on)
ga-> display skip(ua.1,4,4);va.2
⑤Draw image
ga-> draw title JRA55_Wind_850hPa_Jan
ga-> set arrlab on
ga-> printim /cygdrive/c/TCC_2015/Doc/lecture/7/jra_wind_850_01.png white
2-1 Temperature
2-2 Precipitation
2-3 Sea level pressure
2-4 wind vector map
45
Practice 2-1
Temperature map
46
Practice 2-1
Command
ga-> reinit ①initialize
ga-> open /cygdrive/c/TCC_2015/Data/AGCM/ta-P.ctl
ga-> open /cygdrive/c/TCC_2015/Data/AGCM/ta-F.ctl ②open data
ga-> query file 1
ga-> query file 2
ga-> set lon 0 360
ga-> set lat -90 90 ③Set area and time
ga-> set t 1
ga-> set gxout shaded (default is contour)
ga-> set clevs -5 -4 -3 -2 -1 1 2 3 4 5
ga-> define_colors ④Setting graphics type
ga-> set ccols 59 58 56 54 52 0 62 64 66 68 69
ga-> set mproj latlon (default is latlon)
ga-> set mpdset lowres (default is lowres)
ga-> set grads off (default is on)
ga-> display ta.2(t=1)- ta.1(t=1)
⑤Draw image
ga-> cbarn
ga-> draw title AGCM_F-P_Temp_Jan
ga-> printim /cygdrive/c/TCC_2015/Doc/lecture/7/images/2-1_agcm_f-p_temp_01.png white
ga-> clear
⑥Clear the display
47
Practice 2-1
59 58 56 54 52 62 64 66 68 69
4-5. ga-> set mproj latlon
4-6. ga-> set mpdset lowres
48
Practice 2-1
5-2.display element
ga-> display ta.2(t=1)-ta.1(t=1)
Precipitation map
50
Practice 2-2
Command
ga-> reinit ①initialize
ga-> open /cygdrive/c/TCC_2015/Data/AGCM/precipi-P.ctl
ga-> open /cygdrive/c/TCC_2015/Data/AGCM/precipi-F.ctl ②open data
ga-> query file 1
ga-> query file 2
ga-> set lon 0 360
ga-> set lat -90 90 ③Set area and time
ga-> set gxout shaded (default is contour)
ga-> set clevs -5 -4 -3 -2 -1 1 2 3 4 5
ga-> define_colors
ga-> set ccols 79 78 76 74 72 0 32 34 36 38 39 ④Setting graphics type
ga-> set mproj latlon (default is latlon)
ga-> set mpdset lowres (default is lowres)
ga-> set grads off (default is on)
ga-> display precipi.2(t=1)- precipi.1(t=1) ⑤Draw image
ga-> cbarn
ga-> draw title AGCM_F-P_Prec_Jan
ga-> printim /cygdrive/c/TCC_2015/Doc/lecture/7/images/2-2_agcm_f-p_prec_01.png white
ga-> clear
⑥Clear the display
51
Practice 2-2
79 78 76 74 72 32 34 36 38 39
4-5. ga-> set mproj latlon
4-6. ga-> set mpdset lowres
52
Practice 2-3
54
Practice 2-3
59 58 56 54 52 62 64 66 68 69
4-5. ga-> set mproj latlon
4-6. ga-> set mpdset lowres
55
Practice 2-4
58
Practice 3
How to take the difference between the two data
by using JRA-55(55km) reanalysis data and AGCM(20km)
Simulation data.These data set have different resolution.
3-1 Temperature
3-2 Precipitation
3-3 Sea level pressure
3-4 wind vector map
59
Practice 3-1
Temperature map
60
Practice 3-1
Command
ga-> reinit ①initialize
ga-> open /cygdrive/c/TCC_2015/Data/JRA55/tas.clim.ctl
ga-> open /cygdrive/c/TCC_2015/Data/AGCM/ta-P.ctl ②open data
ga-> query file 1
ga-> query file 2
ga-> set lon 0 360
ga-> set lat -90 90 ③Set area and time
ga-> set gxout shaded (default is contour)
ga-> set clevs -5 -4 -3 -2 -1 0 1 2 3 4 5
ga-> define_colors
ga-> set ccols 59 58 56 54 52 0 62 64 66 68 69 ④Setting graphics type
ga-> set mproj latlon (default is latlon)
ga-> set mpdset lowres (default is lowres)
ga-> set grads off (default is on)
ga-> display ta.2(t=1)-lterp(tas.1(t=1),ta.2(t=1)) ⑤Draw image
ga-> cbarn
ga-> draw title AGCM_P-JRA55_Temp_Jan
ga-> printim /cygdrive/c/TCC_2015/Doc/lecture/7/agcm-jra_temp_01.png white
ga-> clear
⑥Clear the display
61
Practice 3-1
5-2.display element
ga-> display ta.2(t=1)-lterp(tas.1(t=1),ta.2(t=1))
Precipitation map
63
Practice 3-2
Command
ga-> reinit ①initialize
ga-> open /cygdrive/c/TCC_2015/Data/JRA55/pr.clim.ctl
ga-> open /cygdrive/c/TCC_2015/Data/AGCM/precipi-P.ctl ②open data
ga-> query file 1
ga-> query file 2
ga-> set lon 0 360
ga-> set lat -90 90 ③Set area and time
ga-> set gxout shaded (default is contour)
ga-> set clevs -5 -4 -3 -2 -1 0 1 2 3 4 5
ga-> define_colors
ga-> set ccols 79 78 76 74 72 0 32 34 36 38 39 ④Setting graphics type
ga-> set mproj latlon (default is latlon)
ga-> set mpdset lowres (default is lowres)
ga-> set grads off (default is on)
ga-> display precipi.2(t=1)-lterp(pr.1(t=1),precipi.2(t=1)) ⑤Draw image
ga-> cbarn
ga-> draw title AGCM_P-JRA55_Prec_Jan
ga-> printim /cygdrive/c/TCC_2015/Doc/lecture/7/images/3-2_agcm_p-jra_prec_01.png white
ga-> clear
⑥Clear the display
64
Practice 3-3
66
Practice 3-4
9 14 4 11 5 13 3 10 7 12 8 2 6
http://www.iges.org/grads/gadoc/gadocindex.html
69 68 66 64 62 0 52 54 56 58 59
69
Sample of Color number
0 1 2 3 4 5 6 7
8 9 10 11 12 13 14 15
59 58 56 54 52 62 64 66 68 69
79 78 76 74 72 32 34 36 38 39
49 48 46 44 42 22 24 26 28 29
70
MAP
71
Thank you for your attention.
Have a good seminar.
72