Define Command and Wind Vector

Eric L. Altshuler ela at COLA.IGES.ORG
Tue May 29 14:07:14 EDT 2007


Matt,

I think your problem is in the command:

define test = skip(ave(u,t=1,t=10),5,5);ave(v,t=1,t=10)

In grads, you cannot define vector variables. The right hand side
represents a vector (u;v) which cannot be assigned to a grads variable.
You need to do this instead:

define u1 = skip(ave(u,t=1,t=10),5,5)
define v1 = skip(ave(v,t=1,t=10),5,5)
...
...
d u1;v1

Here, you define separate "skipped" versions of u and v, then display
the vector whose components are the "skipped" u and v.

Best regards,
Eric L. Altshuler
Assistant Research Scientist
Center for Ocean-Land-Atmosphere Studies
Calverton, MD, USA
------------------------------------------------------------------------
Greetings all,

In using Version 1.8SL10, I'm having difficulty using the "define" command
in conjunction with a time average of wind vectors.

This command works fine by itself:
d skip(ave(u,t=1,t=10),5,5);ave(v,t=1,t=10)

but if i try to save it for use down the road:
define test = skip(ave(u,t=1,t=10),5,5);ave(v,t=1,t=10)

GrADS displays a Syntax error.

Any help on how to save this variable without displaying it (for further
manipulation down the road)?

thanks,
matt



More information about the gradsusr mailing list