Problem drawing meteogram

The GrADS graphics package.

Problem drawing meteogram

Postby kojokroavi » Sun Oct 27, 2013 4:55 am

I am attaching a script And a screenshot where I drew what Grads does not create ,The time lines.
Does anyone have an idea what is wrong, And how to draw the time lines every raked except the first?
Code: Select all


'c'
'reinit'
'reset'
'set xsize 650 500'
'set display color white'
'set mpdset hires'
f= 'http://monsoondata.org:9090/dods/gfs2/gfs.2013102600'
'sdfopen 'f



'set lat 32'
'set lon 35'
'set parea 1.3 8.2 9.275 10.5'

'set grid on'
'set xlab on'
'set xlpos 0 t'
'set lev 500'
'set t 1'
'define mx=max(z,t=1,t=65)'
'd mx'
m1=subwrd(result,4)
'set lev 500'
'define mn=min(z,t=1,t=65)'
'd mn'
m2=subwrd(result,4)
'set string 1'
'set lev 500'
'set vrange 'm2-1' 'm1+1
'set gxout contour'
'set t 1 65'
'set ccolor 2'
'set cmark 0'
'set ylint 20'
'd z'
'set string 2'

'set strsiz 0.08 0.10'
'draw string 0.03 10.3 H500'
'draw string 0.03 9.9  max:'m1''
'draw string 0.03 9.5 min:'m2''
'set parea off'

'set parea 1.3 8.2 8.05 9.275'
'set grid on'
'set xlab off'
'set timelab on'
'set grads on'
'set lev 1000'
'set t 1'
'define mx=max(z(lev=500)-z(lev=1000),t=1,t=65)'
'd mx'
m1=subwrd(result,4)
'set lev 1000'
'define mn=min(z(lev=500)-z(lev=1000),t=1,t=65)'
'd mn'
m2=subwrd(result,4)
'set lev 1000'
'set vrange 'm2-1' 'm1+1
'set t 1 65'
'set ccolor 3'
'set cmark 0'
'set ylint 20'
'd z(lev=500)-z(lev=1000)'
'set timelab on'
'set string 3'
'set strsiz 0.08 0.1'
'draw string 0.03 9.075 1000-500'
'draw string 0.03 8.675  max:'m1''
'draw string 0.03 8.275 min:'m2''
'set parea off'


'set parea 1.3 8.2 6.825 8.05'
'set grid on'
'set xlab off'
'set timelab on'
'set grads on'
'set lev 1000'
'set t 1'
'define mx=max(z(lev=850)-z(lev=1000),t=1,t=65)'
'd mx'
m1=subwrd(result,4)
'set lev 1000'
'define mn=min(z(lev=850)-z(lev=1000),t=1,t=65)'
'd mn'
m2=subwrd(result,4)
'set lev 1000'
'set vrange 'm2-1' 'm1+1
'set t 1 65'
'set ccolor 4'
'set cmark 0'
'set ylint 10'
'd z(lev=850)-z(lev=1000)'
'set timelab on'
'set string 4'
'set strsiz 0.08 0.1'
'draw string 0.03 7.85 1000-850'
'draw string 0.03 7.45  max:'m1''
'draw string 0.03 7.05 min:'m2''
'set parea off'


'set parea 1.3 8.2 5.6 6.825'
'set grid on'
'set xlab off'
'set timelab on'
'set grads on'
'set ylpos 0 l'
'set t 1'
'define mx=max(t2m-273.16,t=1,t=65)'
'd mx'
m1=subwrd(result,4)
'define mn=min(t2m-273.16,t=1,t=65)'
'd mn'
m2=subwrd(result,4)
'set vrange 'm2-1' 'm1+1
'set t 1 65'
'set ccolor 1'
'set cmark 0'
'set ylint 3'
'd t2m-273.16'

'set ylpos 0 r'
'set lev 1000'

'define tc=(t-273.16)'
'define td=tc-( (14.55+0.114*tc)*(1-0.01*rh) + pow((2.5+0.007*tc)*(1-0.01*rh),3) + (15.9+0.117*tc)*pow((1-0.01*rh),14) )'

'set t 1'
'define mx=max(td,t=1,t=65)'
'd mx'
m3=subwrd(result,4)
'set lev 1000'
'define mn=min(td,t=1,t=65)'
'd mn'
m4=subwrd(result,4)
'set lev 1000'
'set vrange 'm4-1' 'm3+1
'set t 1 65'
'set ccolor 4'
'set cmark 0'
'set cstyle 2'
'set ylint 3'
'd td'
'set timelab on'
'set string 1'
'set strsiz 0.08 0.1'
'draw string 0.03 6.625 T2M+TD'
'draw string 0.03 6.225  max:'m1''
'draw string 0.03 5.825 min:'m2''
'set parea off'

'set parea 1.3 8.2 4.375 5.6 '
'set grid on'
'set xlab off'
'set timelab on'
'set grads on'
'set ylpos 0 l'
'set t 1'
'define mx=max(rh2m,t=1,t=65)'
'd mx'
m1=subwrd(result,4)
'set lev 1000'
'define mn=min(rh2m,t=1,t=65)'
'd mn'
m2=subwrd(result,4)
'set lev 1000'
'set vrange 'm2-1' 'm1+1
'set t 1 65'
'set ccolor 5'
'set cmark 0'
'set ylint 10'
'd rh2m'
'set string 5'
'set strsiz 0.08 0.1'
'draw string 0.03 5.4 RH2M'
'draw string 0.03 5  max:'m1''
'draw string 0.03 4.6 min:'m2''
'set parea off'


'set parea 1.3 8.2 3.15 4.375'
'set grid on'
'set xlab off'
'set timelab on'
'set grads on'
'set ylpos 0 r'
'set xlab off'
'set lev 1000'
'set ylint 3'
'set vrange -8 8'
'set t 1 65'
'set ccolor 1'
'set cmark 0'
'set cthick 7'
'set lat 35'
'set lon 33'
'b=slp/100'
'set lat 30'
'set lon 31'
'a=slp/100'
'd a-b'


'set ylpos 0 l'
'set lev 1000'
'set t 1'
'define mx=max(slp/100,t=1,t=65)'
'd mx'
m1=subwrd(result,4)
'define mn=min(slp/100,t=1,t=65)'
'd mn'
m2=subwrd(result,4)
'set vrange 'm2-1' 'm1+1
'set t 1 65'
'set lev 1000'
'set ccolor 6'
'set cmark 0'
'set ylint 2'
'd slp/100'
'set string 6'
'set strsiz 0.08 0.1'
'draw string 0.03 4.175 SLP'
'draw string 0.03 3.775  max:'m1''
'draw string 0.03 3.375 min:'m2''
'set parea off'


'set parea 1.3 8.2 1.925 3.15'
'set grid on'
'set xlab off'
'set timelab on'
'set lev 1000'
'set t 1'
'define mx=max(cape,t=1,t=65)'
'd mx'
m1=subwrd(result,4)
'define mn=min(cape,t=1,t=65)'
'd mn'
m2=subwrd(result,4)
'set vrange 'm2-1' 'm1+1
'set t 1 65'
'set lev 1000'
'set ccolor 8'
'set cmark 0'
'set ylint 30'
'd cape'
'set string 8'
'set strsiz 0.08 0.1'
'draw string 0.03 2.95 CAPE0_180'
'draw string 0.03 2.55  max:'m1''
'draw string 0.03 2.15 min:'m2''
'set parea off'


'set parea 1.3 8.2 0.7 1.925'
'set grid on'
'set xlab on'
'set timelab on'
'set xlpos 0 b'
'set lev 1000'
'set t 1'
'define mx=max(sli,t=1,t=65)'
'd mx'
m1=subwrd(result,4)
'define mn=min(sli,t=1,t=65)'
'd mn'
m2=subwrd(result,4)
'set vrange 'm2-1' 'm1+1
'set t 1 65'
'set lev 1000'
'set ccolor 9'
'set cmark 0'
'set ylint 2'
'd sli'
'set string 9'
'set strsiz 0.08 0.1'
'draw string 0.03 1.725 LIFT INDEX'
'draw string 0.03 1.325  max:'m1''
'draw string 0.03 0.925 min:'m2''
'set parea off'


'set t 1'
'q time'
btime = subwrd(result,3)
bhour = substr(btime,1,3)
bday = substr(btime,4,9)


'set string 1'
'set strsiz 0.1 0.12'
'draw string 3.5 0.19  GFS RUN:'bday':'bhour''


'printim RAIN2.png x1500 y1200'
'end'




And here is a screenshot

http://www.stationonline.org/wp-content ... 3/10/4.png

Thanks

Avi.
kojokroavi
 
Posts: 2
Joined: Fri Sep 21, 2012 4:31 am

Return to GrADS

Who is online

Users browsing this forum: No registered users and 5 guests