Saturday, January 3, 2009

GrADS code for drawing linegraph with monthly mean data

prompt 'Enter the keyword: '
pull key
'!mkdir linegr_'key
prompt 'Enter the Latitude: '
pull lat
prompt 'Enter the Longitude: '
pull lon
prompt 'Enter the number of Years: '
pull noy


y=1
while y< noy
strtime=1+12*(y-1)
endtime=12*y

'reinit'
'sdfopen monmeandata/'key'.mon.mean.nc'
'q file'
'set lat 'lat
'set lon 'lon
'set t 'strtime' 'endtime
'd 'key
'draw xlab Time'
'draw ylab 'key



'printim linegr_'key'/'y'.jpg white'

y=y+1
endwhile

No comments: