grads, vector definition
Cristian Gonzal Muñoz Castillo
cmunozc at UDEC.CL
Tue Jul 7 16:34:01 EDT 2009
Thanks for the tip Eric, it really works perfectly! I appreciate your help,
Once again, thank you so much!. Regards,
> Hello Cristian,
>
> You can't use this script to accomplish your task. All your script does is
> redefine 'var2' every time through the loop. You need to do the following
> (assuming 'time' is the last value of t you want to consider):
>
> 'set t 2 'time
> 'define var2=var1-var1(t-1)'
>
> The new variable var2 will, at time t, contain the value of
> var1(t)-var1(t-1). Note that var2 is undefined for t=1.
>
> Best regards,
>
> Eric L. Altshuler
> Assistant Research Scientist
> Center for Ocean-Land-Atmosphere Studies
> 4041 Powder Mill Road, Suite 302
> Calverton, MD 20705-3106
> USA
>
> E-mail: ela at cola.iges.org
> Phone: (301) 902-1257
> Fax: (301) 595-9793
>
> ----- Original Message -----
> From: "Cristian Gonzal Muñoz Castillo" <cmunozc at UDEC.CL>
> To: GRADSUSR at LIST.CINECA.IT
> Sent: Monday, July 6, 2009 4:55:21 PM GMT -05:00 US/Canada Eastern
> Subject: grads, vector definition
>
> Hi,
>
> I'm trying to define a vector in grads. Can you help me with that?. My
> script is as follows
>
> 'set t 1'
> 'define var2 = var1'
> i=2
> while(i<=time)
> 'set t ' i
> 'define var2 = var1 - var1(t=' i-1 ')'
> i = i+1
> endwhile
>
> Bottom line, i want to make A(I) = B; as in any other scripting
> language...
>
> Thanks for your attention, Sincerely
>
> --
> Cristian G. Muñoz Castillo
> Licenciado en Ciencias FÃsicas
> Candidato a GeofÃsico
> Of. 442
> Tel. (41) 2203155
> Depto. GeofÃsica
> Facultad Ciencias FÃsicas y Matemáticas
> Universidad de Concepción
> Concepción
> Chile
> ^^^^^^^^^^^^^^^^^^^HATUSIME^^^^^^^^^^^^^^^^^^^^^
>
--
Cristian G. Muñoz Castillo
Licenciado en Ciencias Físicas
Candidato a Geofísico
Of. 442
Tel. (41) 2203155
Depto. Geofísica
Facultad Ciencias Físicas y Matemáticas
Universidad de Concepción
Concepción
Chile
^^^^^^^^^^^^^^^^^^^HATUSIME^^^^^^^^^^^^^^^^^^^^^
More information about the gradsusr
mailing list