[gradsusr] How to draw a figure containing many variables from different files?

2008 duan duan.scut.cn at gmail.com
Thu Feb 14 09:23:01 EST 2013


Hi everyone,

       Now I want to draw a figure that contains many variables from
different files under Grads.  The script is as follows.

'reinit'
'set grid off'
'set grads off'

*** for Windows
*'sdfopen C:\daily4times\hgt.2012.nc'
*'sdfopen C:\daily4times\hgt.meanrunmean.1981-2010.nc'
*'sdfopen C:\daily4times\hgt.meanrunstd.1981-2010.nc'

*** for Linux
'sdfopen /host/daily4times/hgt.2012.nc'
'sdfopen /host/daily4times/hgt.meanrunmean.1981-2010.nc'
'sdfopen /host/daily4times/hgt.meanrunstd.1981-2010.nc'



*** for output figure (type: eps)
*'enable print D:\Writing\disaster_management\hgtgap.gmf'
*'enable print dif_hgt.eps'
'set parea 1 9 1 8'
'set lat 10 60'
'set xlint 10'
'set lon 100 160'
'set ylint 10'
'set cint 0.5'
'set clskip 1'
'set rbcols 14 9 4 11 5 13 0 10 7 12 8 2 6'
'set strmden 1'
'set clevs -6 -5 -4 -3 -2 -1 0 1 2 3 4 5 6'
'set xlopts 1 4 0.15'
'set ylopts 1 4 0.15'
'define
stdanomalies=((hgt.1(time=12Z14JUL2012,LEV=500)-hgt.2(time=06Z29DEC2010,LEV=500))/hgt.3(time=06Z29DEC2010,LEV=500))'
'set gxout shaded'
'd stdanomalies'
'cbarn 1 0.5 9.3 4.5'
'open /host/GFS/20120714/gfs_3_20120714_1200_fff.ctl'
'set dfile 2'
'set lat 10 60'
'set xlint 10'
'set lon 100 160'
'set ylint 10'
'set gxout contour'
'set t 1'
'set lev 500'
'd hgt.4'
'draw title a.GFS 500 hPa hgtprs 12Z14JUL2012'

*** for output figure (type: eps)
*'print
*'disable print'
*** for outut figure (type: png)
'printim \host\daily4times\hgtstdanomalies_500_20120714.png white'

    As you see, it contains two parts. One is to display 'd stdanomalies',
the other is to 'd hgt.4'. I can display the first one, but cannot display
the second one. Because the second variable is come from GFS forecast data(
GFS/20120714/gfs_3_20120714_1200_fff.ctl'). But I think Grads can display
different variables from different files.
    So, anyone can help me how to work it.  Thank you very much!!!!

   Best wishes,

Duan


 [image: Inline image 1]

-- 
Weili Duan
Disaster Prevention Research Institute (DPRI), Kyoto University, Uji, Kyoto
611-0011, Japan
TEL: +81-774-38-4131 FAX: +81-774-38-4130
E-mail: duan.scut.cn at gmail.com
           duanwl1986 at flood.dpri.kyoto-u.ac.jp<dyuan.weiri.88r at st.kyoto-u.ac.jp><dyuan.weiri.88r at st.kyoto-u.ac.jp>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20130214/5e2badf8/attachment-0003.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/png
Size: 13757 bytes
Desc: not available
Url : http://gradsusr.org/pipermail/gradsusr/attachments/20130214/5e2badf8/attachment-0003.png 


More information about the gradsusr mailing list