[gradsusr] Help needed in getting annual mean from time series data
gibies george
gibies at tropmet.res.in
Wed Oct 6 05:55:18 EDT 2010
On 25 May 2010 15:35, sudev das M P <devdas.pnr at gmail.com> wrote:
> 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 )
>
Error may be here at time definision
> '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
>>
>>
>
> _______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://gradsusr.org/mailman/listinfo/gradsusr
>
>
--
*Gibies George, CSIR-RF,
Climate and Global Modelling Division,
Indian Institute of Tropical Meteorology,
Dr. Homi Bhabha Road,
NCL (P. O.), Pashan,
Pune 411008, India.*
*http://sites.google.com/site/gibiesge/*
Think about the environment. Please don't print this e-mail unless it is
necessary.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20101006/b3138b4b/attachment-0003.html
More information about the gradsusr
mailing list