From arch@CAOS.IISC.ERNET.IN Fri Mar 19 13:12:29 2004
Date: Fri, 19 Mar 2004 15:18:22 +0530
From: Arindam Chakraborty <arch@CAOS.IISC.ERNET.IN>
Reply-To: GRADSUSR@LIST.CINECA.IT
To: GRADSUSR@LIST.CINECA.IT
Subject: Re: need confirmation on monthly average

hi,
        I think Sulchan requires seasonal average, that is average
over all jan's of the available years and so on for the other
months. For that do like this:

'sdfopen your file'
'set the region in latlon'
'set t 1 12'
'define mnsn = ave(var,t+0,t=132,12)'
'define mnsn seasonal'
'set t 1'
* Now the variable mnsn is seasonal average of all the months over the
* years available. It has no year associated with it. And it has 12
* values. t=1 corresponts to Jan and so on.
* Notice that in the period jan1991 - dec2001 there are 11 years,
* and so there are 132 months

* Now to display, say feb do
'd mnsn(t=2)'


Hope this helps.

~ Arindam Chakraborty

On Fri, 19 Mar 2004, Don Hooper wrote:

> > From owner-gradsusr@LIST.CINECA.IT  Fri Mar 19 01:22:39 2004
> > Reply-To: M Sulchan Darmawan <msdarmawan@softhome.net>
> >
> > You mean I've done something wrong with the script ?
> Not as far as I know, but I'm no expert on GrADS scripting.
> > Please show me the right way ?
> See above.  I'm good under the hood, but not so hot behind the wheel.
> > I  didn't  see  which discussion is not relevant, since I use grads to
> > open it.
> My point is, whether the data file is NetCDF, or HDF-SDS, or GRIB, or
> flat binary, the script wouldn't be any different after the first line.
> The first line might change (to xdfopen or open maybe), but that's it.
> To be concerned about the fact that your data is in NetCDF is a red herring
> as far as this problem is concerned.  It just doesn't matter.
> >
> > Best regards,
> > Sulchan
> >
> > Don Hooper, on Friday, March 19, 2004, 9:54:32 AM, you wrote:
> > DH> I suspect I'll get some criticism for this post.  One thing I know for
> > DH> sure:  the fact the file is NetCDF isn't relevant to this discussion.
> > DH> Once the file is open, the input format type is irrelevant.
> >
> > DH> -Hoop
> > >> From owner-gradsusr@LIST.CINECA.IT  Thu Mar 18 19:40:57 2004
> > >> Reply-To: M Sulchan Darmawan <msdarmawan@softhome.net>
> > >>
> > >> Dear GRADSUSR...
> > >>
> > >>   I  have  monthly  data from NCEP realtime marine data. the format is
> > >>   NetCDF.  I'm  trying  to  do a monthly average over 10 years data. I
> > >>   need  your  confirmation  to  avoid mistaken in my analysis, does my
> > >>   script  is  right  or  not ?, if its wrong, please show me the right
> > >>   way...
> > >>
> > >>   Data description :
> > >>   monthly data : jan1991 - dec2001
> > >>
> > >>   purpose :
> > >>   Monthly average : Jan, Feb, ..., Dec = 12 picture
> > >>
> > >>   Script :
> > >>   sdfopen sst.mean.nc
> > >>   set lon 80 110
> > >>   set lat -10 10
> > >>   set t 1
> > >>   define zave=ave(sst, t+0, t=120, 1yr)
> > >>   d zave
> > >>
> > >>   does this script means January average ?
> > >>   what is the different if I set t to 13 (set t 13) ?
> > >>
> > >>   Just  to  make sure that I make the analysis right ;) Thank you very
> > >>   much.
> > >>
> > >> Cheers,
> > >> M Sulchan Darmawan
> > >>
> > >> --
> > >> GEOSTECH -- Sub lab Teknologi Sistem Iklim
> > >> Laboratorium Teknologi Sistem Kebumian dan Mitigasi Bencana Alam
> > >> PUSPIPTEK -- http://www.clivarindo.org
>
> -Hoop
>

From msdarmawan@softhome.net Thu Mar 25 13:10:57 2004
Date: Mon, 22 Mar 2004 20:11:25 +0700
From: M Sulchan Darmawan <msdarmawan@softhome.net>
To: GRADSUSR@LIST.CINECA.IT
Subject: Re: need confirmation on monthly average

Many  thanks to you. Your explanation is valuable for me as a beginner
in GrADS. Great explanation, it help very much.

Warm regards from Indonesia,
Sulchan

Arindam Chakraborty, on Friday, March 19, 2004, 4:48:22 PM, you wrote:
AC> hi,
AC>         I think Sulchan requires seasonal average, that is average
AC> over all jan's of the available years and so on for the other
AC> months. For that do like this:

AC> 'sdfopen your file'
AC> 'set the region in latlon'
AC> 'set t 1 12'
AC> 'define mnsn = ave(var,t+0,t=132,12)'
AC> 'define mnsn seasonal'
AC> 'set t 1'
AC> * Now the variable mnsn is seasonal average of all the months over the
AC> * years available. It has no year associated with it. And it has 12
AC> * values. t=1 corresponts to Jan and so on.
AC> * Notice that in the period jan1991 - dec2001 there are 11 years,
AC> * and so there are 132 months

AC> * Now to display, say feb do
AC> 'd mnsn(t=2)'


AC> Hope this helps.

AC> ~ Arindam Chakraborty

<deleted>

From arch@CAOS.IISC.ERNET.IN Thu Mar 25 13:11:22 2004
Date: Mon, 22 Mar 2004 19:59:04 +0530
From: Arindam Chakraborty <arch@CAOS.IISC.ERNET.IN>
Reply-To: GRADSUSR@LIST.CINECA.IT
To: GRADSUSR@LIST.CINECA.IT
Subject: Re: need confirmation on monthly average

hi Sulchan,
        I made a mistake perviously. Instead of
'define mnsn seasonal'

it has to be

'modify mnsn seasonal'

Sorry for that. Everything else is ok.

regards,

~ Arindam Chakraborty

On Mon, 22 Mar 2004, M Sulchan Darmawan wrote:

> Many  thanks to you. Your explanation is valuable for me as a beginner
> in GrADS. Great explanation, it help very much.
>
> Warm regards from Indonesia,
> Sulchan
>
> Arindam Chakraborty, on Friday, March 19, 2004, 4:48:22 PM, you wrote:
> AC> hi,
> AC>         I think Sulchan requires seasonal average, that is average
> AC> over all jan's of the available years and so on for the other
> AC> months. For that do like this:
>
> AC> 'sdfopen your file'
> AC> 'set the region in latlon'
> AC> 'set t 1 12'
> AC> 'define mnsn = ave(var,t+0,t=132,12)'
> AC> 'define mnsn seasonal'
> AC> 'set t 1'
> AC> * Now the variable mnsn is seasonal average of all the months over the
> AC> * years available. It has no year associated with it. And it has 12
> AC> * values. t=1 corresponts to Jan and so on.
> AC> * Notice that in the period jan1991 - dec2001 there are 11 years,
> AC> * and so there are 132 months
>
> AC> * Now to display, say feb do
> AC> 'd mnsn(t=2)'
>
>
> AC> Hope this helps.
>
> AC> ~ Arindam Chakraborty
>
> <deleted>
>