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

Davide Sacchetti davide.sacchetti at arpal.gov.it
Thu Feb 14 10:38:01 EST 2013


it may be you set time to 1 referring to file 2:
> 'set dfile 2'
> 'set lat 10 60'
> 'set xlint 10'
> 'set lon 100 160'
> 'set ylint 10'
> 'set gxout contour'
> 'set t 1'

perhaps file 4 is not defined for year 1981:
> 'set t 1'
> 'set lev 500'
> 'd hgt.4'

you could try 'set dfile 4'

hoping it may help
bye bye
Davide

On Thu, 2013-02-14 at 23:23 +0900, 2008 duan wrote:
> 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
> 
>   
>  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
> _______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://gradsusr.org/mailman/listinfo/gradsusr

-- 
--> Attenzione cambio indirizzo: davide.sacchetti at arpal.gov.it
--
Davide Sacchetti
Centro Funzionale Meteo Idrologico di Protezione Civile della Regione Liguria
ARPAL Unità Tecnica Complessa di livello Regionale
V.le Brigare Partigiane 2 16121 Genova (I)
tel: +39 010 6437535                    fax: +39 010 6437520
mail: davide.sacchetti at arpal.gov.it     web: www.meteoliguria.it





More information about the gradsusr mailing list