defining new variable
Lijuan Wu
lijuanwu at ATMOS.UIUC.EDU
Sun Oct 16 00:26:24 EDT 2005
Thanks for reply. Yes, I got the problem, I should disable fwrite before the next new fwrite.
Lijuan
----- Original Message -----
From: Henrique Barbosa
To: GRADSUSR at LIST.CINECA.IT
Sent: Saturday, October 15, 2005 4:26 PM
Subject: Re: defining new variable
Wu,
You don't need to save the data, just plot it! Try this:
'mean=ave(ave(temp,lon=0,lon=360),t=1,t=1000)'
'd mean'
There's also an error in your script. When you use fwrite,
you must "display" the variable to have it written to the file.
And I think it would be better to fclose the file before a
new fwrite.
x's
Henrique
On 10/14/05, L Wu <lijuanwu at atmos.uiuc.edu> wrote:
Hi, all, I have a question about defining new variables in grads.
I have variable temp(96,80,14), if I want to define new variable like
1000-day average of zonal mean temperature, and then plot the new variable,
I did it this way:
define tz=ave(temp,x=1,x=96)
set fwrite tz.dat
set gxout fwrite
define tmean=ave(tz, t=1,t=1000)
set fwrite tmean.dat
set gxout fwrite
set cint 5
set clab forced
set clskip 2
d tmean
but I cannot get the right plot, can anybody help me to see where is wrong,
and whether need I to use set fwrite... and set gxout fwrite twice?
Thanks in advance!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20051015/04911bb4/attachment.html
More information about the gradsusr
mailing list