[gradsusr] How to get a monthly & yearly time series plot correctly?

sudev das M P devdas.pnr at gmail.com
Mon May 24 08:00:24 EDT 2010


Dear Grads users,
I am a very beginner in GrADS.

I have a multi-year SST data. I want to get a time series monthly and annual
mean plot of this data
in a specified region in the same figure, keeping same x-axis (time) and
y-axis (SST).

Please see below the code I am having, I also attach the figure I am getting
out of it.
The annual mean value is found to be constant for all the 25 years I
considered.
Definitely some mistake I am making in the code, which I am not able to
identify.

Can somebody please help me the correct way of doing it?

--------------------------------------------------------------
'sdfopen sst_mon_81_07.nc'

'set x 1 360'
'set y 1 180'
'set z 1'
'set t 1 311'

'set lon 30'
'set lat 5'
'set t 2 301'
'define sstarea=aave(sst.1,lon=30,lon=78,lat=5,lat=31)'
'set gxout line';'set cstyle 1';'set cmark 3';'set ccolor 1'
'd tloop(sstarea)'


'set x 1 360'
'set y 1 180'
'set z 1'
'set t 1 311'

ts = 1
while ( ts <= 25 )
'set t 'ts * 12
'define sstave = ave(sst,t-10,t+1)'
ts = ts + 1
endwhile

'set lon 30'
'set lat 5'
'set t 1 25'
'set gxout line';'set cstyle 2';'set cmark 5';'set ccolor 3'
'd tloop(aave(sstave,lon=30,lon=78,lat=5,lat=31))'

--------------------------------------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20100524/d93383b8/attachment-0003.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: figsst.pdf
Type: application/pdf
Size: 38356 bytes
Desc: not available
Url : http://gradsusr.org/pipermail/gradsusr/attachments/20100524/d93383b8/attachment-0003.pdf 


More information about the gradsusr mailing list