<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Katherin,<br>
<br>
If you want to write&nbsp; a time series of Dec 1950, Jan 1951, Feb 1951,
Dec 1951, Jan 1952, ..., Feb 2000 ,<br>
then the following should work:<br>
<br>
'open anom.ctl'<big><br>
</big>'set gxout fwrite'<big><br>
</big>* xmax =&nbsp; number of longitude points set in anom.ctl for XDEF&nbsp;
(grads defaults to 'set x 1 'xmax+1, for wrap-around)<big><br>
</big>'set x 1 'xmax<big><br>
</big>* This writes December 1950, January 1951, February 1951,
December 1951, January 1952,..., February 2000 <big><br>
</big>'set fwrite djf.data'<big><br>
</big>imap = 12<big><br>
</big>pmap = 14<big><br>
</big>while (imap &lt;= 600)<big><br>
</big>'set t ' imap' 'pmap<big><br>
</big>'d anom'<big><br>
</big>imap = imap + 12<big><br>
</big>pmap = pmap + 12<big><br>
</big>endwhile<big><br>
</big>'disable fwrite'<br>
<br>
<br>
HOWEVER...<br>
If you intend to compute and write the DJF mean time series, then the
following should work:<br>
<br>
'open anom.ctl'<br>
'set gxout fwrite'<br>
<br>
* xmax =&nbsp; number of longitude points set in anom.ctl for XDEF (grads
defaults to 'set x 1 'xmax+1, for wrap-around)<br>
'set x 1 'xmax<br>
'set t 1'<br>
<br>
* This computes and writes the DJF seasonal mean from Dec1950/Feb1951 -
Dec1999/Feb2000<br>
<br>
'set fwrite djf.data'<br>
imap = 12<br>
pmap = 14<br>
while (imap &lt;= 600)<br>
'd ave(anom,t='imap',t='pmap')'<big><br>
</big>imap = imap + 12<br>
pmap = pmap + 12<br>
endwhile<br>
<br>
'disable fwrite'<br>
<big><br>
</big>Mary Jo<big><br>
</big><br>
Katherin Kullgren wrote:
<blockquote cite="mid20060815182622.4FCB3219C9@mx2.cineca.it"
 type="cite">
  <pre wrap="">Hi,

I am trying to extract seasonal subsets of data from my dataset.
I  want DJF MAM JJA SON

So this is what I tried

'open anom.ctl'
'set gxout fwrite'

* This creates the DJF season from Dec1950/Feb1951 - Dec1999/Feb2000

'set fwrite djf.data'
imap = 12
pmap = 14
while (imap &lt;= 600)
'set t ' imap pmap
'd anom'
imap = imap + 12
pmap = pmap + 14
endwhile

'disable fwrite'

This does not work. I am not sure the correct way  define the increments that I want.
I  want to have
set t 12 14
set t 24 26
 ..........
set t 603 605

I keep getting the error

Data Request Warning:  Request beyond file limits
Data Request Warning:  Request beyond file limits
Data Request Warning:  Request beyond file limits
Data Request Warning:  Request beyond file limits
Data Request Warning:  Request beyond file limits
Data Request Warning:  Request beyond file limits
Data Request Warning:  Request beyond file limits
and so on

If someone could suggest a way that this would work.  I would appreciate it.
BTW- its monthly gridded data.

Thanks
Katherin
  </pre>
</blockquote>
</body>
</html>