To smooth the curve
Mary Jo Nath
Mary-Jo.Nath at NOAA.GOV
Thu Jun 30 10:00:45 EDT 2005
Christophe,
When smoothing in Z, assuming you had N levels in Z and "var" is defined from Z=1 to N :
set z 1 N
define newvar=ave(var,z-1,z+1))
d newvar
I'm not sure what Grads does exactly when Z=1, since Z-1 = 0. Maybe it just does
a partial average over z to z+1. Same with the case when Z=N. But the other levels
Z=2 to N-1 should be the average z-1 to z+1 .
I believe you can do the same for smoothing in Y.
Mary Jo
On Thursday 30 June 2005 09:13, you wrote:
>> Hello,
>>
>> I have a 1D graph (gxout line) and I want to smooth this line (in y axis)
>> with GrADS.
>> If "time" is the variable I can use the tloop function
>> ("tloop(ave(var,t-1,t+1))").
>>
>> How can I do if the variable is z or y ? (tloop(ave(var,z-1,z+1)) is not
>> correct).
>>
>> Thanks
>> Christophe LAVAYSSE
More information about the gradsusr
mailing list