0% found this document useful (0 votes)
183 views72 pages

Introduction To GRADs

The open command opens the specified GrADS control file, which contains metadata about the gridded dataset such as its dimensions, projection etc. This prepares GrADS to work with that particular dataset. The tas.clim.ctl file contains information about the JRA-55 temperature climatology dataset, so opening it allows GrADS to understand and access that temperature data.

Uploaded by

Nada Kamilia
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
183 views72 pages

Introduction To GRADs

The open command opens the specified GrADS control file, which contains metadata about the gridded dataset such as its dimensions, projection etc. This prepares GrADS to work with that particular dataset. The tas.clim.ctl file contains information about the JRA-55 temperature climatology dataset, so opening it allows GrADS to understand and access that temperature data.

Uploaded by

Nada Kamilia
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 72

7.

Lecture and exercise:


Introduction to GrADS

Nobuyuki Kayaba
Climate Prediction Division
Japan Meteorological Agency

TCC Training Seminar on , Global Warming Projection Information


26 January 2015 (Tokyo, Japan)
Outline

・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

Climatology(1981-2010) at Jan Climate change (21th-20th) at Jan


using JRA55 using AGCM

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.

GrADS is implemented on all commonly


available UNIX workstations and DOS
based PCs, and freely distributed over the
Internet.
http://iges.org/grads/
GrADS provides an integrated environment
for access,manipulation,and display of
earth science data.

Windows users should install only one tool


“OpenGrADS” .

The procedure for installing “OpenGrADS”


is described website.
http://opengrads.org/ 4
What's GrADS

Click icon of “OpenGrADS” on your desktop.

Type “Enter” to “Landscape mode?”, then Open two windows.


Landscape :11 x 8.5 inches
the graphics window portrait :8.5 x 11 inches

the terminal window


5
What's GrADS

help
Gives a summary list of operations essential to do anything in GrADS.
ga-> help

Exit the progrum


ga-> quit

6
What's GrADS

Basic Command Work flow


ga-> reinit ①initialize

ga-> open /cygdrive/c/TCC_2015/Data/JRA55/tas.clim.ctl ②open data


ga-> query file 1
ga-> set lon 0 360
③Set area and time
ga-> set lat -90 90
ga-> set t 1
ga-> set gxout shaded
ga-> set clevs -12 -8 -4 0 4 8 12 16 20 24 28 32 ④Setting
ga-> set ccols 9 14 4 11 5 13 3 10 7 12 8 2 6 graphics type
ga-> set grads off
ga-> display tas - 273.15
ga-> cbarn
ga-> draw title JRA55_Temp_Jan ⑤Draw image
ga-> printim /cygdrive/c/TCC_2015/Doc/lecture/7/images/1-1_jra_temp_01.png white

ga-> clear ⑥Clear the display


7
What's GrADS

Out put image

draw title

display

cbarn

8
What's GrADS

Setting and realizing work space


1.!pwd :Show current directory.
ga-> !pwd positioning working directory

To the external command, you need put a “!: exclamation mark” at the first.

2. cd directory :Change directory to “/cygdrive/c/TCC_2015/Doc/lecture/7/”


ga-> cd /cygdrive/c/TCC_2015/Doc/lecture/7/

3.!ls : Show directorys and files in current directory.


ga-> !ls /cygdrive/c/TCC_2015/Data

Data sets

Shell command can be entered the GrADS command line, by proceeding


the them with an exclamation point.
9
What's GrADS
Data set (ctl file and data file)
▶ Computer ▶ Local Disk (C:) ▶ TCC_2015 ▶ Data ▶ JRA55

ctl file (The meta data ) Data set

the name of a GrADS data descriptor file,


also called a control file. ・・・・・・・・・・

ctl file grid data file


10
What's GrADS

Format of ctl file


ex
Data dile

the X,Y dimension, or


longitude,latitude

the Z dimension, or
pressurre level.

the time dimension

Element information

We uses the four conventional dimensions


(longitude, latitude, vertical level, and time)
11
Data description
Control File Name Description Run Duration
JRA55/pr.clim.ctl JRA55 Precipitation (mm/day) Climatology 1981-2010
JRA55/tas.clim.ctl JRA55 2m Temperature (K) Climatology 1981-2010
JRA55/psl.cim.ctl JRA55 Sea Level Pressure (Pa) Climatology 1981-2010
JRA55/ua.clim.ctl JRA55 Eastward Wind (m/s) Climatology 1981-2010
JRA55/va.clim.ctl JRA55 Northward Wind (m/s) Climatology 1981-2010
JRA55/uas.clim.ctl JRA55 Eastward Near-Surface Wind (m/s) Climatology 1981-2010
JRA55/vas.clim.ctl JRA55 Northward Near-Surface Wind (m/s) Climatology 1981-2010
AGCM/precipi-P.ctl AGCM Precipitation (mm/day) Present Simulation 1979-2003
AGCM/ta-P.ctl AGCM 2m Temperature (K) Present Simulation 1979-2003
AGCM/slp-P.ctl AGCM Sea Level Pressure (Pa) Present Simulation 1979-2003
AGCM/u-P.ctl AGCM Eastward Wind (m/s) Present Simulation 1979-2003
AGCM/v-P.ctl AGCM Northward Wind (m/s) Present Simulation 1979-2003
AGCM/ua-P.ctl AGCM Eastward Near-Surface Wind (m/s) Present Simulation 1979-2003
AGCM/va-P.ctl AGCM Northward Near-Surface Wind (m/s) Present Simulation 1979-2003
AGCM/precipi-F.ctl AGCM Precipitation (mm/day) Future Simulation 2075-2099
AGCM/ta-F.ctl AGCM 2m Temperature (K) Future Simulation 2075-2099
AGCM/slp-F.ctl AGCM Sea Level Pressure (Pa) Future Simulation 2075-2099
AGCM/u-F.ctl AGCM Eastward Wind (m/s) Future Simulation 2075-2099
AGCM/v-F.ctl AGCM Northward Wind (m/s) Future Simulation 2075-2099
AGCM/ua-F.ctl AGCM Eastward Near-Surface Wind (m/s) Future Simulation 2075-2099
AGCM/va-F.ctl AGCM Northward Near-Surface Wind (m/s) Future Simulation 2075-2099
12
Practice 1
How to draw monthly mean climatology
using JRA-55 reanalysis data.

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-> open /cygdrive/c/TCC_2015/Data/JRA55/tas.clim.ctl


ga-> query file 1
ga-> set lon 0 360
ga-> set lat -90 90
ga-> set t 1
ga-> set gxout shaded
ga-> set clevs -12 -8 -4 0 4 8 12 16 20 24 28 32
ga-> set ccols 9 14 4 11 5 13 3 10 7 12 8 2 6
ga-> set grads off
ga-> display tas - 273.15
ga-> cbarn
ga-> draw title JRA55_Temp_Jan
ga-> printim /cygdrive/c/TCC_2015/Doc/lecture/7/images/1-1_jra_temp_01.png white

ga-> clear 15
Practice 1-1

① Initialize
1-1. reinit :Initialize Grads to its initial state
ga-> reinit

The reinit command


returns GrADS to its
initial state

16
Practice 1-1

Command :② Open data


ga-> reinit

ga-> open /cygdrive/c/TCC_2015/Data/JRA55/tas.clim.ctl


ga-> query file 1 ②open data
ga-> set lon 0 360
ga-> set lat -90 90
ga-> set t 1
ga-> set gxout shaded
ga-> set clevs -12 -8 -4 0 4 8 12 16 20 24 28 32
ga-> set ccols 9 14 4 11 5 13 3 10 7 12 8 2 6
ga-> set grads off
ga-> display tas - 273.15
ga-> cbarn
ga-> draw title JRA55_Temp_Jan
ga-> printim /cygdrive/c/TCC_2015/Doc/lecture/7/images/1-1_jra_temp_01.png white

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

You have to remember this element name


element 18
Practice 1-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

Command :③ Set area and time


ga-> reinit

ga-> open /cygdrive/c/TCC_2015/Data/JRA55/tas.clim.ctl


ga-> query file 1
ga-> set lon 0 360
ga-> set lat -90 90
ga-> set t 1 ③Set area and time
ga-> set gxout shaded
ga-> set clevs -12 -8 -4 0 4 8 12 16 20 24 28 32
ga-> set ccols 9 14 4 11 5 13 3 10 7 12 8 2 6
ga-> set grads off
ga-> display tas - 273.15
ga-> cbarn
ga-> draw title JRA55_Temp_Jan
ga-> printim /cygdrive/c/TCC_2015/Doc/lecture/7/images/1-1_jra_temp_01.png white

ga-> clear 20
Practice 1-1

③ Set area and time


3-1.set lon val1 val2 :Set longitude to vary from val1 val2

ga-> set lon 0 360

3-2.set lat val1 val2 :Set latitude to vary from val1 val2
ga-> set lat -90 90

3-3.set t val :Set time at val(month)


ga-> set t 1

. 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

Command :④Setting graphics type


ga-> reinit

ga-> open /cygdrive/c/TCC_2015/Data/JRA55/tas.clim.ctl


ga-> query file 1
ga-> set lon 0 360
ga-> set lat -90 90
ga-> set t 1
ga-> set gxout shaded ④Setting graphics type
ga-> set clevs -12 -8 -4 0 4 8 12 16 20 24 28 32
ga-> set ccols 9 14 4 11 5 13 3 10 7 12 8 2 6
ga-> set grads off
ga-> display tas - 273.15
ga-> cbarn
ga-> draw title JRA55_Temp_Jan
ga-> printim /cygdrive/c/TCC_2015/Doc/lecture/7/images/1-1_jra_temp_01.png white

ga-> clear 22
Practice 1-1

④ Set graphic types (graphics type)


4-1.set gxout graphics_type :Set graphics output types
(graphics_type:shaded,contour, grfill etc…)
ga-> set gxout {shaded/contour/grill}

shaded contour grfill

By default, you get a contour plot. This default can be changed by the command
23
Practice 1-1

④ Set graphic types (colors:rainbow color)


4-2. set clevs vals :Set contour levels
ga-> set clevs -12 -8 -4 0 4 8 12 16 20 24 28 32

4-3. set ccols vals :Set color numbers


ga-> set ccols 9 14 4 11 5 13 3 10 7 12 8 2 6

Color index (rainbow color)

9 14 4 11 5 13 3 10 7 12 8 2 6

24
Practice 1-1

④ Set graphic type (projection)


4-5.Set mproj proj :Sets current map projection
K → degC
ga-> set mproj {latlon/robinson/mollweide/orthogr/}

latlon robinson mollweide

25
Practice 1-1

④ Set graphic type (resolution)


4-6.set mpdset res :Set map data resolution (res:lowres,mres ,hires)
ga-> set mpdset {lowres/mres/hires /}

lowres mres hires

26
Practice 1-1

Command: ⑤Draw image


ga-> reinit

ga-> open /cygdrive/c/TCC_2015/Data/JRA55/tas.clim.ctl


ga-> query file 1
ga-> set lon 0 360
ga-> set lat -90 90
ga-> set t 1
ga-> set gxout shaded
ga-> set clevs -12 -8 -4 0 4 8 12 16 20 24 28 32
ga-> set ccols 9 14 4 11 5 13 3 10 7 12 8 2 6
ga-> set grads off
⑤Draw image
ga-> display tas - 273.15
ga-> cbarn
ga-> draw title JRA55_Temp_Jan
ga-> printim /cygdrive/c/TCC_2015/Doc/lecture/7/images/1-1_jra_temp_01.png white

ga-> clear 27
Practice 1-1

⑤ Draw image (display the graphic output window )


5-1.Set grads on/off:turns on/off the display of the GrADS logo and the time label
ga-> set grads {on/off}

5-2.display element :Display data via the graphics output window


we want to see the
ga-> display tas.1-273.15 K → degC temperature in degree
instead of Kelvin.

You can type just “d” instead “display”

5-3.cbarn:Draw a color bar next to shaded plots


ga-> cbarn

5-4.draw title String:Creating titles


ga-> draw title JRA55_Temp_Jan
28
GrADS logo and the time label
Practice 1-1

⑤ Draw image (Output image files)


21.printim outfile colors :Produce a image file
ga-> printim /cygdrive/c/TCC_2015/Doc/lecture/7/images/jra_tas_01.png white

Check saved image file from explorer

▶ Computer ▶ Local Disk (C:) ▶ TCC_2015 ▶ Doc ▶ lecture ▶ 7 ▶ images

We can produce a PNG, GIF, or JPG


formatted image file ,which is the
displayed on the screen.

background color is white

29
Practice 1-1

Command :⑥Clear the display


ga-> reinit

ga-> open /cygdrive/c/TCC_2015/Data/JRA55/tas.clim.ctl


ga-> query file 1
ga-> set lon 0 360
ga-> set lat -90 90
ga-> set t 1
ga-> set gxout shaded
ga-> set clevs -12 -8 -4 0 4 8 12 16 20 24 28 32
ga-> set ccols 9 14 4 11 5 13 3 10 7 12 8 2 6
ga-> set grads off
ga-> display tas - 273.15
ga-> cbarn
ga-> draw title JRA55_Temp_Jan
ga-> printim /cygdrive/c/TCC_2015/Doc/lecture/7/images/1-1_jra_temp_01.png white

ga-> clear ⑥Clear the display 30


Practice 1-1

⑥ Clear the Display


6-1. clear :clear the Display
ga-> clear (or just c)
You can type just “c” instead “clear”

31
Practice 1-1
Command
ga-> reinit ①initialize

ga-> open /cygdrive/c/TCC_2015/Data/JRA55/tas.clim.ctl ②open data


ga-> query file 1
ga-> set lon 0 360
ga-> set lat -90 90 ③Set area and time
ga-> set t 1
ga-> set gxout shaded
④Setting graphics type
ga-> set clevs -12 -8 -4 0 4 8 12 16 20 24 28 32
ga-> set ccols 9 14 4 11 5 13 3 10 7 12 8 2 6
ga-> set grads off
ga-> display tas - 273.15
ga-> cbarn ⑤Draw image
ga-> draw title JRA55_Temp_Jan
ga-> printim /cygdrive/c/TCC_2015/Doc/lecture/7/images/1-1_jra_temp_01.png white

ga-> clear ⑥Clear the display


32
Practice 1-1 gsscript file

Open the gsscript and run


▶ Computer ▶ Local Disk (C:) ▶ TCC_2015 ▶ Doc ▶ lecture ▶ 7 ▶ gsscript

ga-> run gsscript/1-1_jra_temp_01.gs

Check saved image file from explorer


▶ Computer ▶ Local Disk (C:) ▶ TCC_2015 ▶ Doc ▶ lecture ▶ 7 ▶ images ▶ 1-1_jra_temp_01.png
33
Practice 1-1 How to edit and run gsscript file

1.Open the gsscript file with txt editor


▶ Computer ▶ Local Disk (C:) ▶ TCC_2015 ▶ Doc ▶ lecture ▶ 7 ▶ gsscript ▶ 1-1_jra_temp_01.gs

2.Editor the gsscript file ga-> reinit

ga-> open /cygdrive/c/TCC_2015/Data/JRA55/tas.clim.ctl


ga-> query file 1
ga-> set lon 0 360
ga-> set lat -90 90
ga-> set t 5

ga-> set gxout shaded


ga-> set clevs -12 -8 -4 0 4 8 12 16 20 24 28 32
ga-> set ccols 9 14 4 11 5 13 3 10 7 12 8 2 6

ga-> set grads off


ga-> display tas - 273.15
ga-> cbarn
ga-> draw title JRA55_Temp_May
ga-> printim /cygdrive/c/TCC_2015/Doc/lecture/7/images/1-1_jra_temp_05.png white

3.Save the gsscript file as “1-1_jra_temp_05.gs”


4.Run the gsscript file
ga-> run gsscript/1-1_jra_temp_05.gs
5.Check saved image file from explorer
34
▶ Computer ▶ Local Disk (C:) ▶ TCC_2015 ▶ Doc ▶ lecture ▶ 7 ▶ images ▶ 1-1_jra_temp_05.png
Practice 1-1 ex1
Command (draw annual mean)
ga-> reinit

ga-> open /cygdrive/c/TCC_2015/Data/JRA55/tas.clim.ctl


ga-> query file 1
ga-> set lon 0 360
ga-> set lat -90 90
ga-> set t 1
ga-> set gxout shaded
ga-> set clevs -12 -8 -4 0 4 8 12 16 20 24 28 32
ga-> set ccols 9 14 4 11 5 13 3 10 7 12 8 2 6
ga-> set grads off
ga-> display ave(tas - 273.15,t=1,t=12)
ga-> cbarn
ga-> draw title JRA55_Temp_annual
ga-> printim /cygdrive/c/TCC_2015/Doc/lecture/7/images/1-1-ex1_jra_temp_annual.png white

▶ Computer ▶ Local Disk (C:) ▶ TCC_2015 ▶ Doc ▶ lecture ▶ 7 ▶ gsscript ▶ 1-1-ex1_jra_temp_annual.gs


35
Practice 1-1 ex2
Command (draw graph from Jan to Dec at 35N 135E)
ga-> reinit

ga-> open /cygdrive/c/TCC_2015/Data/JRA55/tas.clim.ctl


ga-> query file 1
ga-> set lon 135
ga-> set lat 35
ga-> set t 1 12
ga-> set gxout shaded
ga-> set clevs -12 -8 -4 0 4 8 12 16 20 24 28 32
ga-> set ccols 9 14 4 11 5 13 3 10 7 12 8 2 6
ga-> set grads off
ga-> display tas - 273.15
ga-> cbarn
ga-> draw title JRA55_Temp_from Jan to Dec (35N,135N)
ga-> printim /cygdrive/c/TCC_2015/Doc/lecture/7/images/1-1-ex2_jra_temp_01-12.png white

▶ Computer ▶ Local Disk (C:) ▶ TCC_2015 ▶ Doc ▶ lecture ▶ 7 ▶ gsscript ▶ 1-1-ex2_jra_temp_01-12.gs


36
Practice 1-2
How to draw monthly mean
climatology using JRA-55
reanalysis data.

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.

Sea level Pressure map

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-> set lon 0 360


ga-> set lat -90 90 ③Set area and time
ga-> set t 1 (default is 1)
ga-> set gxout contour (default is contour)
ga-> set clevs 985 990 995 1000 1005 1010 1015 1020 1025 1030 1035 1040 ④Setting graphics type
ga-> set ccols 9 14 4 11 5 13 3 10 7 12 8 2 6
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 psl.1/100 ⑤Draw image
Pa → hPa
ga-> draw title JRA55_Psl_Jan
ga-> printim /cygdrive/c/TCC_2015/Doc/lecture/7jra_psl_01.png white

ga-> clear
⑥Clear the display
40
Practice 1-3

④ Set graphic types (graphics type)


4-1.set gxout graphics_type{shaded/contour/grill}
ga-> set gxout contour

4-2. set clevs vals :Set contour levels


ga-> set clevs 1 2 3 4 5 6 7 8 9 10 11 12

4-3. set ccols vals :Set color numbers


ga-> set ccols 9 14 4 11 5 13 3 10 7 12 8 2 6

4-4. set cthick vals :Set the thickness {1 ∼12}


ga-> set cthick 12

4-5.Set mproj proj :Sets current map projection {latlon/robinson/mollweide/orthogr/}


ga-> set mproj latlon K → degC

4-6.set mpdset res{lowres/mres/hires /}


ga-> set mpdset lowres
41
Practice 1-4
How to draw monthly mean
climatology using JRA-55
reanalysis data.
850hPa Wind Vector map

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

ga-> clear ⑥Clear the display


43
Practice 1-4

⑤ Draw image (display the graphic output window )


5-1.Set grads off
ga-> set grads off

5-2.display element the first variable is treated as the


U component, and the variable is
treated as the V component.
ga-> display skip(ua.1,4,4);va.2 These two variable are provided
to the display command by
entering two expressions
X,Y grid interval between the arrows separated by a semicolon:
5-3.set arrlab {on/off}: Drawing the vector arrow label
ga-> set arrlab on

5-4.draw title String:Creating titles


ga-> draw title JRA55_Wind_850hPa_Jan

5-5.printim outfile colors :Produce a image file


ga-> printim /cygdrive/c/TCC_2015/Doc/lecture/7/jra_Wind_850_01.png white
44
Practice 2
How to take the difference between the two data
by using AGCM Present and Future Simulation data

2-1 Temperature
2-2 Precipitation
2-3 Sea level pressure
2-4 wind vector map

45
Practice 2-1

How to take the difference


between the two data
by using AGCM
Present and Future
Simulation data

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

Set graphic types (colors)


4-1.set gxout graphics_type
ga-> set gxout shaded
4-2. set clevs vals :Set contour levels
ga-> set clevs -5 -4 -3 -2 -1 1 2 3 4 5

4-3.define_colors :Set colors


ga-> define_colors
4-4. set ccols vals :Set color numbers
ga-> set ccols 59 58 56 54 52 0 62 64 66 68 69
Color index

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

⑤ Draw image (display the graphic output window )


5-1.Set grads off
ga-> set grads off

5-2.display element
ga-> display ta.2(t=1)-ta.1(t=1)

(t=1) indicate “set time 1” ta.1(file1:present climate)


subtracted from ta.2(file2:future climate)
5-3.cbarn
ga-> cbarn

5-4.draw title String


ga-> title AGCM_F-P_Temp_Jan

5-5.printim outfile colors


ga-> printim /cygdrive/c/TCC_2015/Doc/lecture/7/agcm_f-p_temp_01.png white
49
Practice 2-2

How to take the difference


between the two data
by using AGCM
Present and Future
Simulation data

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

Set graphic types (colors)


4-1.set gxout graphics_type
ga-> set gxout shaded
4-2. set clevs vals :Set contour levels
ga-> set clevs -5 -4 -3 -2 -1 1 2 3 4 5

4-3.define_colors :Set colors


ga-> define_colors
4-4. set ccols vals :Set color numbers
ga-> set ccols 79 78 76 74 72 0 32 34 36 38 39
Color index

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

How to take the difference


between the two data
by using AGCM
Present and Future
Simulation data

Sea level Pressure map


53
Practice 2-3
Command
ga-> reinit ①initialize
ga-> open /cygdrive/c/TCC_2015/Data/AGCM/slp-P.ctl
ga-> open /cygdrive/c/TCC_2015/Data/AGCM/slp-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 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 slp.2(t=1)/100- slp.1(t=1)/100 ⑤Draw image
ga-> cbarn
ga-> draw title AGCM_F-P_Slp_Jan
ga-> printim /cygdrive/c/TCC_2015/Doc/lecture/7/images/2-3_agcm_f-p_slp_01.png white
ga-> clear
⑥Clear the display

54
Practice 2-3

Set graphic types (colors)


4-1.set gxout graphics_type
ga-> set gxout shaded
4-2. set clevs vals :Set contour levels
ga-> set clevs -5 -4 -3 -2 -1 1 2 3 4 5

4-3.define_colors :Set colors


ga-> define_colors
4-4. set ccols vals :Set color numbers
ga-> set ccols 59 58 56 54 52 0 62 64 66 68 69
Color index

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

How to take the difference


between the two data
by using AGCM
Present and Future
Simulation data

850hPa Wind Vector map


56
Practice 2-4
Command
ga-> reinit ①initialize
ga-> open /cygdrive/c/TCC_2015/Data/AGCM/u-P.ctl
ga-> open /cygdrive/c/TCC_2015/Data/AGCM/v-P.ctl ②open data
ga-> open /cygdrive/c/TCC_2015/Data/AGCM/u-F.ctl
ga-> open /cygdrive/c/TCC_2015/Data/AGCM/v-F.ctl
ga-> query file 1
ga-> query file 2
ga-> query file 3
ga-> query file 4
ga-> set lon 0 360 ③Set area and time
ga-> set lat -90 90
ga-> set lev 850
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) ⑤Draw image
ga-> display skip(u.3(t=1)-u.1(t=1),4,4);v.4(t=1)-v.2(t=1)))
ga-> draw AGCM_F-P_Wind_850hPa_Jan
ga-> set arrlab on
ga-> printim /cygdrive/c/TCC_2015/Doc/lecture/7/images/2-4_agcm_f-p_wind850_01.png white
⑥Clear the display
ga-> clear 57
Practice 2-4

Set graphic types (colors)


4-1.set ccols vals
ga-> set ccols 5
4-2. set cthick vals :thikness of vector (arrow)
ga-> set clevs 12

4-3.ga-> set mproj latlon


4-4. ga-> set mpdset lowres

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

How to take the difference


between the two data
by using JRA-55 reanalysis data
and AGCM Simulation data.

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

⑤ Draw image (display the graphic output window )


5-1.Set grads off
ga-> set grads off

5-2.display element
ga-> display ta.2(t=1)-lterp(tas.1(t=1),ta.2(t=1))

The lterp function performs interpolation between two grids.


5-3.cbarn
ga-> cbarn

5-4.draw title String


ga-> title AGCM_P-JRA55_Temp_Jan

5-5.printim outfile colors


ga-> printim /cygdrive/c/TCC_2015/Doc/lecture/7/agcm-jra_temp_01.png white
62
Practice 3-2

How to take the difference


between the two data
by using JRA-55 reanalysis data
and AGCM Simulation data

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

How to take the difference


between the two data
by using JRA-55 reanalysis data
and AGCM Simulation data

Sea level pressure map


65
Practice 3-3
Command
ga-> reinit ①initialize
ga-> open /cygdrive/c/TCC_2015/Data/JRA55/psl.clim.ctl
ga-> open /cygdrive/c/TCC_2015/Data/AGCM/slp-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 slp.2(t=1)/100-lterp(psl.1(t=1)/100,slp.2(t=1)/100) ⑤Draw image
ga-> cbarn
ga-> draw title AGCM_P-JRA55_Slp_Jan
ga-> printim /cygdrive/c/TCC_2015/Doc/lecture/7/images/3-3_agcm_p-jra_slp_01.png white
ga-> clear
⑥Clear the display

66
Practice 3-4

How to take the difference


between the two data
by using JRA-55 reanalysis data
and AGCM Simulation data

850hPa Wind Vector map


67
Practice 3-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-> open /cygdrive/c/TCC_2015/Data/AGCM/u-P.ctl
ga-> open /cygdrive/c/TCC_2015/Data/AGCM/v-P.ctl
ga-> query file 1
ga-> query file 2 ③Set area and time
ga-> query file 3
ga-> query file 4
ga-> set lon 0 360
ga-> set lat -90 90 ④Setting graphics type
ga-> set lev 850
ga-> set ccolor 5 (default is contour)
ga-> set cthick 12
ga-> set mproj latlon (default is latlon) ⑤Draw image
ga-> set mpdset lowres (default is lowres)
ga-> set grads off (default is on)
ga-> display skip(u.3(t=1)-lterp(ua.1(t=1),u.3(t=1)),10,10);v.4(t=1)-lterp(va.2(t=1),v.4(t=1))
ga-> set arrlab on
ga-> draw title AGCM_P-JRA55_Wind_850hPa_Jan ⑥Clear the display
ga-> printim /cygdrive/c/TCC_2015/Doc/lecture/7/images/3-4_agcm_p-jra_wind850_01.png white
ga-> clear 68
Sample of Color number

Set graphic colors


Reference number of colors

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

You might also like