[gradsusr] Help needed in getting annual mean from time series data

sudev das M P devdas.pnr at gmail.com
Tue May 25 06:05:50 EDT 2010


Dear Madam,
Thanks for your reply.
In fact I sent my question yesterday to the GrADS user group, but didn't get
any reply so far.
I still could not resolve it.

I found that there is no keyword search option in the Grads Forum archive.
Could you please tell me if there is any such?

The data file link is given below:

http://apdrc.soest.hawaii.edu/dchart/index.html?cid=AAAAJA@@

Please also see my yesterday's email. if you have any further suggestion, I
will highly appreciate.
--------------------------------------------------------------

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))'




On Mon, May 24, 2010 at 6:08 PM, Jennifer Adams <jma at cola.iges.org> wrote:

> Dear Sudev,
>
> On May 21, 2010, at 11:25 AM, sudev das M P wrote:
>
> Dear Grads users,
> I am a beginner in GrADS.
> I have a multi-year time series data. I want to get the annual mean in this
> data.
>
> Please see that from the following I can get monthly time series plot, and
> it is working fine.
>
> 'set lon 30'
> 'set lat 5'
>
> 'set t 2 302'
>
> Why is this not 'set t 1 302' ?
>
>
> *------------------------
> *Monthly time series
> *------------------------
> 'define sstmonth=aave(sst.1,lon=30,
> lon=78,lat=5,lat=31)'
>
>
> 'set gxout line'
> 'set cmark 4'
> 'set grads off'
> 'set ccolor 9'
> 'd sstmonth'
>
> In the same plot, I want to have one more curve showing the annual mean.
> I mean 26 annual mean values for the 26 years.
>
> I don't know how to do this.
>
> Try this after you have defined sstmon:
>
> 'set t 1 12'
> 'sstann = ave(sstmonth,t+0,t=302,12)'
> 'modify sstann seasonal'
>
> --Jennifer
>
>
> I will highly appreciate if someone can help me in this.
>
> Thanks,
>
> Sudev
> _______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://gradsusr.org/mailman/listinfo/gradsusr
>
>
> --
> Jennifer M. Adams
> IGES/COLA
> 4041 Powder Mill Road, Suite 302
> Calverton, MD 20705
> jma at cola.iges.org
>
>
>
>
> _______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://gradsusr.org/mailman/listinfo/gradsusr
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20100525/b48e00cd/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/20100525/b48e00cd/attachment-0003.pdf 


More information about the gradsusr mailing list